CMS 3D CMS Logo

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

#include <SiStripElectronSeedGenerator.h>

Public Types

typedef
TransientTrackingRecHit::ConstRecHitPointer 
ConstRecHitPointer
 
typedef edm::OwnVector
< TrackingRecHit
PRecHitContainer
 
typedef
TransientTrackingRecHit::RecHitContainer 
RecHitContainer
 
typedef
TransientTrackingRecHit::RecHitPointer 
RecHitPointer
 

Public Member Functions

void run (edm::Event &, const edm::EventSetup &setup, const edm::Handle< reco::SuperClusterCollection > &, reco::ElectronSeedCollection &)
 
void setupES (const edm::EventSetup &setup)
 
 SiStripElectronSeedGenerator (const edm::ParameterSet &)
 
 ~SiStripElectronSeedGenerator ()
 

Private Member Functions

bool altCheckHitsAndTSOS (std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
 
const SiStripRecHit2DbackupHitConverter (ConstRecHitPointer crhp)
 
bool checkHitsAndTSOS (std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
 
void findSeedsFromCluster (edm::Ref< reco::SuperClusterCollection >, edm::Handle< reco::BeamSpot >, reco::ElectronSeedCollection &)
 
const SiStripMatchedRecHit2DmatchedHitConverter (ConstRecHitPointer crhp)
 
double normalPhi (double phi) const
 
double phiDiff (double phi1, double phi2)
 
bool preselection (GlobalPoint position, GlobalPoint superCluster, double phiVsRSlope, int hitLayer)
 
double unwrapPhi (double phi) const
 
std::vector< bool > useDetLayer (double scEta)
 
int whichSubdetector (std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit)
 

Private Attributes

std::vector< const
SiStripRecHit2D * > 
backupLayer2Hits_
 
edm::InputTag beamSpotTag_
 
unsigned long long cacheIDCkfComp_
 
unsigned long long cacheIDMagField_
 
unsigned long long cacheIDTrkGeom_
 
std::vector< const
SiStripMatchedRecHit2D * > 
layer1Hits_
 
std::vector< const
SiStripMatchedRecHit2D * > 
layer2Hits_
 
int maxSeeds_
 
edm::ESHandle< MeasurementTrackermeasurementTrackerHandle
 
double monoDeltaPsiCut_
 
int monoMaxHits_
 
double monoOriginZCut_
 
double monoPhiMissHit2Cut_
 
PTrajectoryStateOnDet pts_
 
PRecHitContainer recHits_
 
double tecDeltaPsiCut_
 
int tecMaxHits_
 
double tecOriginZCut_
 
double tecPhiMissHit2Cut_
 
double tecRMissHit2Cut_
 
edm::Handle< reco::BeamSpottheBeamSpot
 
Chi2MeasurementEstimatortheEstimator
 
edm::ESHandle< MagneticFieldtheMagField
 
const SiStripRecHitMatchertheMatcher_
 
const MeasurementTrackertheMeasurementTracker
 
std::string theMeasurementTrackerName
 
PropagatorWithMaterialthePropagator
 
const edm::EventSetuptheSetup
 
KFUpdatortheUpdator
 
double tibDeltaPsiCut_
 
double tibOriginZCut_
 
double tibPhiMissHit2Cut_
 
double tibZMissHit2Cut_
 
double tidDeltaPsiCut_
 
double tidEtaUsage_
 
int tidMaxHits_
 
double tidOriginZCut_
 
double tidPhiMissHit2Cut_
 
double tidRMissHit2Cut_
 
edm::ESHandle< TrackerGeometrytrackerGeometryHandle
 

Detailed Description

Class to generate the trajectory seed from two Si Strip hits.

Author
Chris Macklin, Avishek Chatterjee
Version
March 2009 (Adapt code to simplify call to SetupES)

Description: SiStrip-driven electron seed finding algorithm.

Definition at line 64 of file SiStripElectronSeedGenerator.h.

Member Typedef Documentation

Definition at line 69 of file SiStripElectronSeedGenerator.h.

Definition at line 68 of file SiStripElectronSeedGenerator.h.

Definition at line 71 of file SiStripElectronSeedGenerator.h.

Definition at line 70 of file SiStripElectronSeedGenerator.h.

Constructor & Destructor Documentation

SiStripElectronSeedGenerator::SiStripElectronSeedGenerator ( const edm::ParameterSet pset)

Definition at line 49 of file SiStripElectronSeedGenerator.cc.

References beamSpotTag_, Chi2MeasurementEstimatorESProducer_cfi::Chi2MeasurementEstimator, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), theEstimator, theMeasurementTrackerName, and theUpdator.

50  : beamSpotTag_("offlineBeamSpot"),
52  theSetup(0), theMatcher_(0),
54  tibOriginZCut_(pset.getParameter<double>("tibOriginZCut")),
55  tidOriginZCut_(pset.getParameter<double>("tidOriginZCut")),
56  tecOriginZCut_(pset.getParameter<double>("tecOriginZCut")),
57  monoOriginZCut_(pset.getParameter<double>("monoOriginZCut")),
58  tibDeltaPsiCut_(pset.getParameter<double>("tibDeltaPsiCut")),
59  tidDeltaPsiCut_(pset.getParameter<double>("tidDeltaPsiCut")),
60  tecDeltaPsiCut_(pset.getParameter<double>("tecDeltaPsiCut")),
61  monoDeltaPsiCut_(pset.getParameter<double>("monoDeltaPsiCut")),
62  tibPhiMissHit2Cut_(pset.getParameter<double>("tibPhiMissHit2Cut")),
63  tidPhiMissHit2Cut_(pset.getParameter<double>("tidPhiMissHit2Cut")),
64  tecPhiMissHit2Cut_(pset.getParameter<double>("tecPhiMissHit2Cut")),
65  monoPhiMissHit2Cut_(pset.getParameter<double>("monoPhiMissHit2Cut")),
66  tibZMissHit2Cut_(pset.getParameter<double>("tibZMissHit2Cut")),
67  tidRMissHit2Cut_(pset.getParameter<double>("tidRMissHit2Cut")),
68  tecRMissHit2Cut_(pset.getParameter<double>("tecRMissHit2Cut")),
69  tidEtaUsage_(pset.getParameter<double>("tidEtaUsage")),
70  tidMaxHits_(pset.getParameter<int>("tidMaxHits")),
71  tecMaxHits_(pset.getParameter<int>("tecMaxHits")),
72  monoMaxHits_(pset.getParameter<int>("monoMaxHits")),
73  maxSeeds_(pset.getParameter<int>("maxSeeds"))
74 {
75  // use of a theMeasurementTrackerName
76  if (pset.exists("measurementTrackerName"))
77  { theMeasurementTrackerName = pset.getParameter<std::string>("measurementTrackerName") ; }
78 
79  // new beamSpot tag
80  if (pset.exists("beamSpot"))
81  { beamSpotTag_ = pset.getParameter<edm::InputTag>("beamSpot") ; }
82 
83  theUpdator = new KFUpdator();
85 }
T getParameter(std::string const &) const
const MeasurementTracker * theMeasurementTracker
bool exists(std::string const &parameterName) const
checks if a parameter exists
Chi2MeasurementEstimator * theEstimator
const SiStripRecHitMatcher * theMatcher_
SiStripElectronSeedGenerator::~SiStripElectronSeedGenerator ( )

Definition at line 88 of file SiStripElectronSeedGenerator.cc.

References thePropagator, and theUpdator.

88  {
89  delete thePropagator;
90  delete theUpdator;
91 }

Member Function Documentation

bool SiStripElectronSeedGenerator::altCheckHitsAndTSOS ( std::vector< const SiStripMatchedRecHit2D * >::const_iterator  hit1,
std::vector< const SiStripRecHit2D * >::const_iterator  hit2,
double  scr,
double  scz,
double  pT,
double  scEta 
)
private

Definition at line 607 of file SiStripElectronSeedGenerator.cc.

References a, abs, b, TSiStripMatchedRecHit::build(), FastHelix::isValid(), monoPhiMissHit2Cut_, trajectoryStateTransform::persistentState(), phiDiff(), PropagatorWithMaterial::propagate(), pts_, diffTwoXMLs::r1, diffTwoXMLs::r2, mathSSE::sqrt(), FastHelix::stateAtVertex(), theMatcher_, thePropagator, theSetup, theUpdator, trackerGeometryHandle, and KFUpdator::update().

609  {
610 
611  bool seedCutSatisfied = false;
612 
613  using namespace std;
614 
615  GlobalPoint hit1Pos = trackerGeometryHandle->idToDet((*hit1)->geographicalId())->surface().toGlobal((*hit1)->localPosition());
616  double r1 = sqrt(hit1Pos.x()*hit1Pos.x() + hit1Pos.y()*hit1Pos.y());
617  double phi1 = hit1Pos.phi();
618  double z1=hit1Pos.z();
619 
620  GlobalPoint hit2Pos = trackerGeometryHandle->idToDet((*hit2)->geographicalId())->surface().toGlobal((*hit2)->localPosition());
621  double r2 = sqrt(hit2Pos.x()*hit2Pos.x() + hit2Pos.y()*hit2Pos.y());
622  double phi2 = hit2Pos.phi();
623  double z2 = hit2Pos.z();
624 
625  if(r2 > r1 && std::abs(z2) > std::abs(z1)) {
626 
627  //Consider the circle made of IP and Hit 1; Calculate it's radius using pT
628 
629  double curv = pT*100*.877;
630 
631  //Predict phi of hit 2
632  double a = (r2-r1)/(2*curv);
633  double b = phiDiff(phi2,phi1);
634  double phiMissHit2 = 0;
635  if(std::abs(b - a)<std::abs(b + a)) phiMissHit2 = b - a;
636  if(std::abs(b - a)>std::abs(b + a)) phiMissHit2 = b + a;
637 
638  if(std::abs(phiMissHit2) < monoPhiMissHit2Cut_) seedCutSatisfied = true;
639 
640  }
641 
642  if(!seedCutSatisfied) return false;
643 
644  // seed checks borrowed from pixel-based algoritm
645 
646 
647 
648  /* Some of this code could be better optimized. The Pixel algorithm natively
649  takes Transient rec hits, so to recycle code we have to build them.
650  */
651 
652  RecHitPointer hit1Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit1)->geographicalId()), *hit1, theMatcher_);
653  RecHitPointer hit2Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit2)->geographicalId()), *hit2, theMatcher_);
654 
656 
657  double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1);
658  GlobalPoint eleVertex(0.,0.,vertexZ);
659 
660  // make a spiral
661  FastHelix helix(hit2Pos,hit1Pos,eleVertex,*theSetup);
662  if (!helix.isValid()) return false;
663 
664  FreeTrajectoryState fts = helix.stateAtVertex();
665  TSOS propagatedState = thePropagator->propagate(fts,hit1Trans->det()->surface());
666 
667  if (!propagatedState.isValid()) return false;
668 
669  TSOS updatedState = theUpdator->update(propagatedState, *hit1Trans);
670  TSOS propagatedState_out = thePropagator->propagate(fts,hit2Trans->det()->surface()) ;
671 
672  if (!propagatedState_out.isValid()) return false;
673 
674  // the seed has now passed all the cuts
675 
676  TSOS updatedState_out = theUpdator->update(propagatedState_out, *hit2Trans);
677 
678  pts_ = trajectoryStateTransform::persistentState(updatedState_out, hit2Trans->geographicalId().rawId());
679 
680  return true;
681 }
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
#define abs(x)
Definition: mlp_lapack.h:159
TransientTrackingRecHit::RecHitPointer RecHitPointer
T sqrt(T t)
Definition: SSEVec.h:46
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
virtual TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:23
const SiStripRecHitMatcher * theMatcher_
double b
Definition: hdecay.h:120
double phiDiff(double phi1, double phi2)
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Definition: KFUpdator.cc:10
double a
Definition: hdecay.h:121
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, bool computeCoarseLocalPosition=false)
const SiStripRecHit2D * SiStripElectronSeedGenerator::backupHitConverter ( ConstRecHitPointer  crhp)
private

Definition at line 737 of file SiStripElectronSeedGenerator.cc.

737  {
738  const TrackingRecHit* trh = crhp->hit();
739  const SiStripRecHit2D* backupHit = dynamic_cast<const SiStripRecHit2D*>(trh);
740  return backupHit;
741 }
bool SiStripElectronSeedGenerator::checkHitsAndTSOS ( std::vector< const SiStripMatchedRecHit2D * >::const_iterator  hit1,
std::vector< const SiStripMatchedRecHit2D * >::const_iterator  hit2,
double  scr,
double  scz,
double  pT,
double  scEta 
)
private

Definition at line 505 of file SiStripElectronSeedGenerator.cc.

References a, abs, b, TSiStripMatchedRecHit::build(), FastHelix::isValid(), trajectoryStateTransform::persistentState(), phiDiff(), PropagatorWithMaterial::propagate(), pts_, diffTwoXMLs::r1, diffTwoXMLs::r2, mathSSE::sqrt(), FastHelix::stateAtVertex(), tecPhiMissHit2Cut_, tecRMissHit2Cut_, theMatcher_, thePropagator, theSetup, theUpdator, tibPhiMissHit2Cut_, tibZMissHit2Cut_, tidPhiMissHit2Cut_, tidRMissHit2Cut_, trackerGeometryHandle, KFUpdator::update(), and whichSubdetector().

507  {
508 
509  bool seedCutsSatisfied = false;
510 
511  using namespace std;
512 
513  GlobalPoint hit1Pos = trackerGeometryHandle->idToDet((*hit1)->geographicalId())->surface().toGlobal((*hit1)->localPosition());
514  double r1 = sqrt(hit1Pos.x()*hit1Pos.x() + hit1Pos.y()*hit1Pos.y());
515  double phi1 = hit1Pos.phi();
516  double z1=hit1Pos.z();
517 
518  GlobalPoint hit2Pos = trackerGeometryHandle->idToDet((*hit2)->geographicalId())->surface().toGlobal((*hit2)->localPosition());
519  double r2 = sqrt(hit2Pos.x()*hit2Pos.x() + hit2Pos.y()*hit2Pos.y());
520  double phi2 = hit2Pos.phi();
521  double z2 = hit2Pos.z();
522 
523  if(r2 > r1 && (std::abs(z2) > std::abs(z1) || std::abs(scEta) < 0.25)) {
524 
525  //Consider the circle made of IP and Hit 1; Calculate it's radius using pT
526 
527  double curv = pT*100*.877;
528 
529  //Predict phi of hit 2
530  double a = (r2-r1)/(2*curv);
531  double b = phiDiff(phi2,phi1);
532  //UB added '=0' to avoid compiler warning
533  double phiMissHit2=0;
534  if(std::abs(b - a)<std::abs(b + a)) phiMissHit2 = b - a;
535  if(std::abs(b - a)>std::abs(b + a)) phiMissHit2 = b + a;
536 
537  double zMissHit2 = z2 - (r2*(zc-z1)-r1*zc+rc*z1)/(rc-r1);
538 
539  double rPredHit2 = r1 + (rc-r1)/(zc-z1)*(z2-z1);
540  double rMissHit2 = r2 - rPredHit2;
541 
542  int subdetector = whichSubdetector(hit2);
543 
544  bool zDiff = true;
545  double zVar1 = std::abs(z1);
546  double zVar2 = std::abs(z2 - z1);
547  if(zVar1 > 75 && zVar1 < 95 && (zVar2 > 18 || zVar2 < 5)) zDiff = false;
548  if(zVar1 > 100 && zVar1 < 110 && (zVar2 > 35 || zVar2 < 5)) zDiff = false;
549  if(zVar1 > 125 && zVar1 < 150 && (zVar2 > 18 || zVar2 < 5)) zDiff = false;
550 
551  if(subdetector == 1){
552  int tibExtraCut = 0;
553  if(r1 > 23 && r1 < 28 && r2 > 31 && r2 < 37) tibExtraCut = 1;
554  if(std::abs(phiMissHit2) < tibPhiMissHit2Cut_ && std::abs(zMissHit2) < tibZMissHit2Cut_ && tibExtraCut == 1) seedCutsSatisfied = true;
555  }else if(subdetector == 2){
556  int tidExtraCut = 0;
557  if(r1 > 23 && r1 < 34 && r2 > 26 && r2 < 42) tidExtraCut = 1;
558  if(std::abs(phiMissHit2) < tidPhiMissHit2Cut_ && std::abs(rMissHit2) < tidRMissHit2Cut_ && tidExtraCut == 1 && zDiff) seedCutsSatisfied = true;
559  }else if(subdetector == 3){
560  int tecExtraCut = 0;
561  if(r1 > 23 && r1 < 32 && r2 > 26 && r2 < 42) tecExtraCut = 1;
562  if(std::abs(phiMissHit2) < tecPhiMissHit2Cut_ && std::abs(rMissHit2) < tecRMissHit2Cut_ && tecExtraCut == 1 && zDiff) seedCutsSatisfied = true;
563  }
564 
565  }
566 
567  if(!seedCutsSatisfied) return false;
568 
569  // seed checks borrowed from pixel-based algoritm
570 
571 
572  /* Some of this code could be better optimized. The Pixel algorithm natively
573  takes Transient rec hits, so to recycle code we have to build them.
574  */
575 
576  RecHitPointer hit1Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit1)->geographicalId()), *hit1, theMatcher_);
577  RecHitPointer hit2Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit2)->geographicalId()), *hit2, theMatcher_);
578 
580 
581  double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1);
582  GlobalPoint eleVertex(0.,0.,vertexZ);
583 
584  // make a spiral
585  FastHelix helix(hit2Pos,hit1Pos,eleVertex,*theSetup);
586  if (!helix.isValid()) return false;
587 
588  FreeTrajectoryState fts = helix.stateAtVertex();
589  TSOS propagatedState = thePropagator->propagate(fts,hit1Trans->det()->surface());
590 
591  if (!propagatedState.isValid()) return false;
592 
593  TSOS updatedState = theUpdator->update(propagatedState, *hit1Trans);
594  TSOS propagatedState_out = thePropagator->propagate(fts,hit2Trans->det()->surface()) ;
595 
596  if (!propagatedState_out.isValid()) return false;
597 
598  // the seed has now passed all the cuts
599 
600  TSOS updatedState_out = theUpdator->update(propagatedState_out, *hit2Trans);
601 
602  pts_ = trajectoryStateTransform::persistentState(updatedState_out, hit2Trans->geographicalId().rawId());
603 
604  return true;
605 }
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
#define abs(x)
Definition: mlp_lapack.h:159
TransientTrackingRecHit::RecHitPointer RecHitPointer
T sqrt(T t)
Definition: SSEVec.h:46
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
int whichSubdetector(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit)
virtual TrajectoryStateOnSurface propagate(const TrajectoryStateOnSurface &tsos, const Plane &plane) const
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:23
const SiStripRecHitMatcher * theMatcher_
double b
Definition: hdecay.h:120
double phiDiff(double phi1, double phi2)
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const
Definition: KFUpdator.cc:10
double a
Definition: hdecay.h:121
static RecHitPointer build(const GeomDet *geom, const TrackingRecHit *rh, const SiStripRecHitMatcher *matcher, const StripClusterParameterEstimator *cpe=0, bool computeCoarseLocalPosition=false)
void SiStripElectronSeedGenerator::findSeedsFromCluster ( edm::Ref< reco::SuperClusterCollection seedCluster,
edm::Handle< reco::BeamSpot bs,
reco::ElectronSeedCollection result 
)
private

Definition at line 138 of file SiStripElectronSeedGenerator.cc.

References abs, alongMomentum, SiPixelRawToDigiRegional_cfi::beamSpot, funct::cos(), dir, TrackingRecHit::geographicalId(), BaseTrackerRecHit::localPosition(), LayerMeasurements::measurements(), PV3DBase< T, PVType, FrameType >::perp(), position, funct::pow(), reco::ElectronSeed::setCaloCluster(), funct::sin(), mathSSE::sqrt(), FastHelix::stateAtVertex(), and GeometricSearchTracker::tibLayers().

Referenced by run().

141  {
142  // clear the member vectors of good hits
143  layer1Hits_.clear() ;
144  layer2Hits_.clear() ;
145  backupLayer2Hits_.clear() ;
146 
147  using namespace std;
148 
149  double sCenergy = seedCluster->energy();
150  math::XYZPoint sCposition = seedCluster->position();
151  double scEta = seedCluster->eta();
152 
153  double scz = sCposition.z();
154  double scr = sqrt(pow(sCposition.x(),2)+pow(sCposition.y(),2));
155 
156  double pT = sCenergy * seedCluster->position().rho()/sqrt(seedCluster->x()*seedCluster->x()+seedCluster->y()*seedCluster->y()+seedCluster->z()*seedCluster->z());
157 
158  double magneticField = 3.8;
159 
160  // cf Jackson p. 581-2, a little geometry
161  double phiVsRSlope = -3.00e-3 * magneticField / pT / 2.;
162 
163 
164  //Need to create TSOS to feed MeasurementTracker
165  GlobalPoint beamSpot(bs->x0(),bs->y0(),bs->z0());
166  GlobalPoint superCluster(sCposition.x(),sCposition.y(),sCposition.z());
167  double r0 = beamSpot.perp();
168  double z0 = beamSpot.z();
169 
170  //We need to pick a charge for the particle we want to reconstruct before hits can be retrieved
171  //Choosing both charges improves seeding efficiency by less than 0.5% for signal events
172  //If we pick a single charge, this reduces fake rate and CPU time
173  //So we pick a charge that is equally likely to be positive or negative
174 
175  int chargeHypothesis;
176  double chargeSelector = sCenergy - (int)sCenergy;
177  if(chargeSelector >= 0.5) chargeHypothesis = -1;
178  if(chargeSelector < 0.5) chargeHypothesis = 1;
179 
180  //Use BeamSpot and SC position to estimate 3rd point
181  double rFake = 25.;
182  double phiFake = phiDiff(superCluster.phi(),chargeHypothesis * phiVsRSlope * (scr - rFake));
183  double zFake = (rFake*(scz-z0)-r0*scz+scr*z0)/(scr-r0);
184  double xFake = rFake * cos(phiFake);
185  double yFake = rFake * sin(phiFake);
186  GlobalPoint fakePoint(xFake,yFake,zFake);
187 
188  //Use 3 points to make helix
189  FastHelix initialHelix(superCluster,fakePoint,beamSpot,*theSetup);
190 
191  //Use helix to get FTS
192  FreeTrajectoryState initialFTS = initialHelix.stateAtVertex();
193 
194  //Use FTS and BeamSpot to create TSOS
196  TrajectoryStateOnSurface initialTSOS = tipe->extrapolate(initialFTS,beamSpot);
197 
198  //Use GST to retrieve hits from various DetLayers using layerMeasurements class
199  const GeometricSearchTracker* gst = theMeasurementTracker->geometricSearchTracker();
200 
201  std::vector<BarrelDetLayer*> tibLayers = gst->tibLayers();
202  DetLayer* tib1 = tibLayers.at(0);
203  DetLayer* tib2 = tibLayers.at(1);
204 
205  std::vector<ForwardDetLayer*> tecLayers;
206  std::vector<ForwardDetLayer*> tidLayers;
207  if(scEta < 0){
208  tecLayers = gst->negTecLayers();
209  tidLayers = gst->negTidLayers();
210  }
211  if(scEta > 0){
212  tecLayers = gst->posTecLayers();
213  tidLayers = gst->posTidLayers();
214  }
215 
216  DetLayer* tid1 = tidLayers.at(0);
217  DetLayer* tid2 = tidLayers.at(1);
218  DetLayer* tid3 = tidLayers.at(2);
219  DetLayer* tec1 = tecLayers.at(0);
220  DetLayer* tec2 = tecLayers.at(1);
221  DetLayer* tec3 = tecLayers.at(2);
222 
223  //Figure out which DetLayers to use based on SC Eta
224  std::vector<bool> useDL = useDetLayer(scEta);
225  bool useTID = false;
226 
227  //Use counters to restrict the number of hits in TID and TEC layers
228  //This reduces seed multiplicity
229  int tid1MHC = 0;
230  int tid2MHC = 0;
231  int tid3MHC = 0;
232  int tid1BHC = 0;
233  int tid2BHC = 0;
234  int tid3BHC = 0;
235  int tec1MHC = 0;
236  int tec2MHC = 0;
237  int tec3MHC = 0;
238 
239  //Use counter to limit the allowed number of seeds
240  int seedCounter = 0;
241 
242  bool hasLay1Hit = false;
243  bool hasLay2Hit = false;
244  bool hasBackupHit = false;
245 
246  LayerMeasurements layerMeasurements(theMeasurementTracker);
247 
248  std::vector<TrajectoryMeasurement> tib1measurements;
249  if(useDL.at(0)) tib1measurements = layerMeasurements.measurements(*tib1,initialTSOS,*thePropagator,*theEstimator);
250  std::vector<TrajectoryMeasurement> tib2measurements;
251  if(useDL.at(1)) tib2measurements = layerMeasurements.measurements(*tib2,initialTSOS,*thePropagator,*theEstimator);
252 
253  //Basic idea: Retrieve hits from a given DetLayer
254  //Check if it is a Matched Hit and satisfies some cuts
255  //If yes, accept hit for seed making
256 
257  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib1measurements.begin(); tmIter != tib1measurements.end(); ++ tmIter){
258  ConstRecHitPointer hit = tmIter->recHit();
259  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
260  if(matchedHit){
261  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
262  if(preselection(position, superCluster, phiVsRSlope, 1)){
263  hasLay1Hit = true;
264  layer1Hits_.push_back(matchedHit);
265  }
266  }
267  }
268 
269  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tib2measurements.begin(); tmIter != tib2measurements.end(); ++ tmIter){
270  ConstRecHitPointer hit = tmIter->recHit();
271  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
272  if(matchedHit){
273  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
274  if(preselection(position, superCluster, phiVsRSlope, 1)){
275  hasLay2Hit = true;
276  layer2Hits_.push_back(matchedHit);
277  }
278  }
279  }
280 
281  if(!(hasLay1Hit && hasLay2Hit)) useTID = true;
282  if(std::abs(scEta) > tidEtaUsage_) useTID = true;
283  std::vector<TrajectoryMeasurement> tid1measurements;
284  if(useDL.at(2) && useTID) tid1measurements = layerMeasurements.measurements(*tid1,initialTSOS,*thePropagator,*theEstimator);
285  std::vector<TrajectoryMeasurement> tid2measurements;
286  if(useDL.at(3) && useTID) tid2measurements = layerMeasurements.measurements(*tid2,initialTSOS,*thePropagator,*theEstimator);
287  std::vector<TrajectoryMeasurement> tid3measurements;
288  if(useDL.at(4) && useTID) tid3measurements = layerMeasurements.measurements(*tid3,initialTSOS,*thePropagator,*theEstimator);
289 
290  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid1measurements.begin(); tmIter != tid1measurements.end(); ++ tmIter){
291  if(tid1MHC < tidMaxHits_){
292  ConstRecHitPointer hit = tmIter->recHit();
293  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
294  if(matchedHit){
295  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
296  if(preselection(position, superCluster, phiVsRSlope, 2)){
297  tid1MHC++;
298  hasLay1Hit = true;
299  layer1Hits_.push_back(matchedHit);
300  hasLay2Hit = true;
301  layer2Hits_.push_back(matchedHit);
302  }
303  }else if(useDL.at(8) && tid1BHC < monoMaxHits_){
304  const SiStripRecHit2D* backupHit = backupHitConverter(hit);
305  if(backupHit){
306  GlobalPoint position = trackerGeometryHandle->idToDet(backupHit->geographicalId())->surface().toGlobal(backupHit->localPosition());
307  if(preselection(position, superCluster, phiVsRSlope, 4) && position.perp() > 37.){
308  tid1BHC++;
309  hasBackupHit = true;
310  backupLayer2Hits_.push_back(backupHit);
311  }
312  }
313  }
314  }
315  }
316 
317  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid2measurements.begin(); tmIter != tid2measurements.end(); ++ tmIter){
318  if(tid2MHC < tidMaxHits_){
319  ConstRecHitPointer hit = tmIter->recHit();
320  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
321  if(matchedHit){
322  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
323  if(preselection(position, superCluster, phiVsRSlope, 2)){
324  tid2MHC++;
325  hasLay1Hit = true;
326  layer1Hits_.push_back(matchedHit);
327  hasLay2Hit = true;
328  layer2Hits_.push_back(matchedHit);
329  }
330  }else if(useDL.at(8) && tid2BHC < monoMaxHits_){
331  const SiStripRecHit2D* backupHit = backupHitConverter(hit);
332  if(backupHit){
333  GlobalPoint position = trackerGeometryHandle->idToDet(backupHit->geographicalId())->surface().toGlobal(backupHit->localPosition());
334  if(preselection(position, superCluster, phiVsRSlope, 4) && position.perp() > 37.){
335  tid2BHC++;
336  hasBackupHit = true;
337  backupLayer2Hits_.push_back(backupHit);
338  }
339  }
340  }
341  }
342  }
343 
344  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tid3measurements.begin(); tmIter != tid3measurements.end(); ++ tmIter){
345  if(tid3MHC < tidMaxHits_){
346  ConstRecHitPointer hit = tmIter->recHit();
347  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
348  if(matchedHit){
349  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
350  if(preselection(position, superCluster, phiVsRSlope, 2)){
351  tid3MHC++;
352  hasLay1Hit = true;
353  layer1Hits_.push_back(matchedHit);
354  hasLay2Hit = true;
355  layer2Hits_.push_back(matchedHit);
356  }
357  }else if(useDL.at(8) && tid3BHC < monoMaxHits_){
358  const SiStripRecHit2D* backupHit = backupHitConverter(hit);
359  if(backupHit){
360  GlobalPoint position = trackerGeometryHandle->idToDet(backupHit->geographicalId())->surface().toGlobal(backupHit->localPosition());
361  if(preselection(position, superCluster, phiVsRSlope, 4) && position.perp() > 37.){
362  tid3BHC++;
363  hasBackupHit = true;
364  backupLayer2Hits_.push_back(backupHit);
365  }
366  }
367  }
368  }
369  }
370 
371  std::vector<TrajectoryMeasurement> tec1measurements;
372  if(useDL.at(5)) tec1measurements = layerMeasurements.measurements(*tec1,initialTSOS,*thePropagator,*theEstimator);
373  std::vector<TrajectoryMeasurement> tec2measurements;
374  if(useDL.at(6)) tec2measurements = layerMeasurements.measurements(*tec2,initialTSOS,*thePropagator,*theEstimator);
375  std::vector<TrajectoryMeasurement> tec3measurements;
376  if(useDL.at(7)) tec3measurements = layerMeasurements.measurements(*tec3,initialTSOS,*thePropagator,*theEstimator);
377 
378  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec1measurements.begin(); tmIter != tec1measurements.end(); ++ tmIter){
379  if(tec1MHC < tecMaxHits_){
380  ConstRecHitPointer hit = tmIter->recHit();
381  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
382  if(matchedHit){
383  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
384  if(preselection(position, superCluster, phiVsRSlope, 3)){
385  tec1MHC++;
386  hasLay1Hit = true;
387  layer1Hits_.push_back(matchedHit);
388  hasLay2Hit = true;
389  layer2Hits_.push_back(matchedHit);
390  }
391  }
392  }
393  }
394 
395  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec2measurements.begin(); tmIter != tec2measurements.end(); ++ tmIter){
396  if(tec2MHC < tecMaxHits_){
397  ConstRecHitPointer hit = tmIter->recHit();
398  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
399  if(matchedHit){
400  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
401  if(preselection(position, superCluster, phiVsRSlope, 3)){
402  tec2MHC++;
403  hasLay1Hit = true;
404  layer1Hits_.push_back(matchedHit);
405  hasLay2Hit = true;
406  layer2Hits_.push_back(matchedHit);
407  }
408  }
409  }
410  }
411 
412  for(std::vector<TrajectoryMeasurement>::const_iterator tmIter = tec3measurements.begin(); tmIter != tec3measurements.end(); ++ tmIter){
413  if(tec3MHC < tecMaxHits_){
414  ConstRecHitPointer hit = tmIter->recHit();
415  const SiStripMatchedRecHit2D* matchedHit = matchedHitConverter(hit);
416  if(matchedHit){
417  GlobalPoint position = trackerGeometryHandle->idToDet(matchedHit->geographicalId())->surface().toGlobal(matchedHit->localPosition());
418  if(preselection(position, superCluster, phiVsRSlope, 3)){
419  tec3MHC++;
420  hasLay2Hit = true;
421  layer2Hits_.push_back(matchedHit);
422  }
423  }
424  }
425  }
426 
427  // We have 2 arrays of hits, combine them to form seeds
428  if( hasLay1Hit && hasLay2Hit ){
429 
430  for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit1 = layer1Hits_.begin() ; hit1!= layer1Hits_.end(); ++hit1) {
431  for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit2 = layer2Hits_.begin() ; hit2!= layer2Hits_.end(); ++hit2) {
432 
433  if(seedCounter < maxSeeds_){
434 
435  if(checkHitsAndTSOS(hit1,hit2,scr,scz,pT,scEta)) {
436 
437  seedCounter++;
438 
439  recHits_.clear();
440 
442  hit=new SiStripMatchedRecHit2D(*(dynamic_cast <const SiStripMatchedRecHit2D *> (*hit1) ) );
443  recHits_.push_back(hit);
444  hit=new SiStripMatchedRecHit2D(*(dynamic_cast <const SiStripMatchedRecHit2D *> (*hit2) ) );
445  recHits_.push_back(hit);
446 
448  reco::ElectronSeed seed(pts_,recHits_,dir) ;
449  reco::ElectronSeed::CaloClusterRef caloCluster(seedCluster) ;
450  seed.setCaloCluster(caloCluster) ;
451  result.push_back(seed);
452 
453  }
454 
455  }
456 
457  }// end of hit 2 loop
458 
459  }// end of hit 1 loop
460 
461  }//end of seed making
462 
463  //Make seeds using TID Ring 3 if necessary
464 
465  if(hasLay1Hit && hasBackupHit && seedCounter == 0){
466 
467  for (std::vector<const SiStripMatchedRecHit2D*>::const_iterator hit1 = layer1Hits_.begin() ; hit1!= layer1Hits_.end(); ++hit1) {
468  for (std::vector<const SiStripRecHit2D*>::const_iterator hit2 = backupLayer2Hits_.begin() ; hit2!= backupLayer2Hits_.end(); ++hit2) {
469 
470  if(seedCounter < maxSeeds_){
471 
472  if(altCheckHitsAndTSOS(hit1,hit2,scr,scz,pT,scEta)) {
473 
474  seedCounter++;
475 
476  recHits_.clear();
477 
478  SiStripMatchedRecHit2D *innerHit;
479  innerHit=new SiStripMatchedRecHit2D(*(dynamic_cast <const SiStripMatchedRecHit2D *> (*hit1) ) );
480  recHits_.push_back(innerHit);
481  SiStripRecHit2D *outerHit;
482  outerHit=new SiStripRecHit2D(*(dynamic_cast <const SiStripRecHit2D *> (*hit2) ) );
483  recHits_.push_back(outerHit);
484 
486  reco::ElectronSeed seed(pts_,recHits_,dir) ;
487  reco::ElectronSeed::CaloClusterRef caloCluster(seedCluster) ;
488  seed.setCaloCluster(caloCluster) ;
489  result.push_back(seed);
490 
491  }
492 
493  }
494 
495  }// end of hit 2 loop
496 
497  }// end of hit 1 loop
498 
499  }// end of backup seed making
500 
501 } // end of findSeedsFromCluster
bool checkHitsAndTSOS(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
T perp() const
Definition: PV3DBase.h:71
std::vector< bool > useDetLayer(double scEta)
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const MeasurementTracker * theMeasurementTracker
Chi2MeasurementEstimator * theEstimator
#define abs(x)
Definition: mlp_lapack.h:159
const SiStripMatchedRecHit2D * matchedHitConverter(ConstRecHitPointer crhp)
PropagationDirection
void push_back(D *&d)
Definition: OwnVector.h:273
T sqrt(T t)
Definition: SSEVec.h:46
tuple result
Definition: query.py:137
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
void clear()
Definition: OwnVector.h:370
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
bool preselection(GlobalPoint position, GlobalPoint superCluster, double phiVsRSlope, int hitLayer)
virtual LocalPoint localPosition() const
const SiStripRecHit2D * backupHitConverter(ConstRecHitPointer crhp)
bool altCheckHitsAndTSOS(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit1, std::vector< const SiStripRecHit2D * >::const_iterator hit2, double scr, double scz, double pT, double scEta)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
std::vector< const SiStripMatchedRecHit2D * > layer2Hits_
double phiDiff(double phi1, double phi2)
static int position[264][3]
Definition: ReadPGInfo.cc:509
std::vector< const SiStripRecHit2D * > backupLayer2Hits_
DetId geographicalId() const
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< const SiStripMatchedRecHit2D * > layer1Hits_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
const SiStripMatchedRecHit2D * SiStripElectronSeedGenerator::matchedHitConverter ( ConstRecHitPointer  crhp)
private

Definition at line 731 of file SiStripElectronSeedGenerator.cc.

731  {
732  const TrackingRecHit* trh = crhp->hit();
733  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh);
734  return matchedHit;
735 }
double SiStripElectronSeedGenerator::normalPhi ( double  phi) const
inlineprivate

Definition at line 83 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

Referenced by phiDiff().

83  {
84  while (phi > 2.* M_PI) { phi -= 2.*M_PI; }
85  while (phi < 0) { phi += 2.*M_PI; }
86  return phi;
87  }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
double SiStripElectronSeedGenerator::phiDiff ( double  phi1,
double  phi2 
)
inlineprivate

Definition at line 89 of file SiStripElectronSeedGenerator.h.

References M_PI, normalPhi(), and query::result.

Referenced by altCheckHitsAndTSOS(), checkHitsAndTSOS(), and preselection().

89  {
90  double result = normalPhi(phi1) - normalPhi(phi2);
91  if(result > M_PI) result -= 2*M_PI;
92  if(result < -M_PI) result += 2*M_PI;
93  return result;
94  }
tuple result
Definition: query.py:137
#define M_PI
Definition: BFit3D.cc:3
bool SiStripElectronSeedGenerator::preselection ( GlobalPoint  position,
GlobalPoint  superCluster,
double  phiVsRSlope,
int  hitLayer 
)
private

Definition at line 684 of file SiStripElectronSeedGenerator.cc.

References abs, monoDeltaPsiCut_, monoOriginZCut_, PV3DBase< T, PVType, FrameType >::perp(), phi, PV3DBase< T, PVType, FrameType >::phi(), phiDiff(), alignCSCRings::r, query::result, tecDeltaPsiCut_, tecOriginZCut_, tibDeltaPsiCut_, tibOriginZCut_, tidDeltaPsiCut_, tidOriginZCut_, detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

684  {
685  double r = position.perp();
686  double phi = position.phi();
687  double z = position.z();
688  double scr = superCluster.perp();
689  double scphi = superCluster.phi();
690  double scz = superCluster.z();
691  double psi = phiDiff(phi,scphi);
692  double deltaPsi = psi - (scr-r)*phiVsRSlope;
693  double antiDeltaPsi = psi - (r-scr)*phiVsRSlope;
694  double dP;
695  if (std::abs(deltaPsi)<std::abs(antiDeltaPsi)){
696  dP = deltaPsi;
697  }else{
698  dP = antiDeltaPsi;
699  }
700  double originZ = (scr*z - r*scz)/(scr-r);
701 
702  bool result = false;
703 
704  if(hitLayer == 1){
705  if(std::abs(originZ) < tibOriginZCut_ && std::abs(dP) < tibDeltaPsiCut_) result = true;
706  }else if(hitLayer == 2){
707  if(std::abs(originZ) < tidOriginZCut_ && std::abs(dP) < tidDeltaPsiCut_) result = true;
708  }else if(hitLayer == 3){
709  if(std::abs(originZ) < tecOriginZCut_ && std::abs(dP) < tecDeltaPsiCut_) result = true;
710  }else if(hitLayer == 4){
711  if(std::abs(originZ) < monoOriginZCut_ && std::abs(dP) < monoDeltaPsiCut_) result = true;
712  }
713 
714  return result;
715 }
T perp() const
Definition: PV3DBase.h:71
Geom::Phi< T > phi() const
Definition: PV3DBase.h:68
#define abs(x)
Definition: mlp_lapack.h:159
double double double z
std::map< std::string, int, std::less< std::string > > psi
T z() const
Definition: PV3DBase.h:63
tuple result
Definition: query.py:137
double phiDiff(double phi1, double phi2)
Definition: DDAxes.h:10
void SiStripElectronSeedGenerator::run ( edm::Event e,
const edm::EventSetup setup,
const edm::Handle< reco::SuperClusterCollection > &  clusters,
reco::ElectronSeedCollection out 
)

Definition at line 116 of file SiStripElectronSeedGenerator.cc.

References beamSpotTag_, findSeedsFromCluster(), edm::Event::getByLabel(), i, edm::EventBase::id(), LogDebug, HcalObjRepresent::setup(), theBeamSpot, theMeasurementTracker, theSetup, and MeasurementTracker::update().

118  {
119  theSetup= &setup;
121  theMeasurementTracker->update(e);
122 
123  for (unsigned int i=0;i<clusters->size();++i) {
124  edm::Ref<reco::SuperClusterCollection> theClusB(clusters,i);
125  // Find the seeds
126  LogDebug ("run") << "new cluster, calling findSeedsFromCluster";
128  }
129 
130  LogDebug ("run") << ": For event "<<e.id();
131  LogDebug ("run") <<"Nr of superclusters: "<<clusters->size()
132  <<", no. of ElectronSeeds found = " << out.size();
133 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
const MeasurementTracker * theMeasurementTracker
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
edm::Handle< reco::BeamSpot > theBeamSpot
tuple out
Definition: dbtoconf.py:99
void findSeedsFromCluster(edm::Ref< reco::SuperClusterCollection >, edm::Handle< reco::BeamSpot >, reco::ElectronSeedCollection &)
edm::EventID id() const
Definition: EventBase.h:56
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void SiStripElectronSeedGenerator::setupES ( const edm::EventSetup setup)

Definition at line 94 of file SiStripElectronSeedGenerator.cc.

References alongMomentum, cacheIDCkfComp_, edm::eventsetup::EventSetupRecord::cacheIdentifier(), cacheIDMagField_, cacheIDTrkGeom_, edm::EventSetup::get(), measurementTrackerHandle, edm::ESHandle< class >::product(), theMagField, theMeasurementTracker, theMeasurementTrackerName, thePropagator, and trackerGeometryHandle.

94  {
95 
98  cacheIDMagField_=setup.get<IdealMagneticFieldRecord>().cacheIdentifier();
99  if (thePropagator) delete thePropagator;
101  }
102 
105  cacheIDCkfComp_=setup.get<CkfComponentsRecord>().cacheIdentifier();
107  }
108 
111  cacheIDTrkGeom_=setup.get<TrackerDigiGeometryRecord>().cacheIdentifier();
112  }
113 
114 }
unsigned long long cacheIdentifier() const
const MeasurementTracker * theMeasurementTracker
edm::ESHandle< MagneticField > theMagField
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
edm::ESHandle< MeasurementTracker > measurementTrackerHandle
double SiStripElectronSeedGenerator::unwrapPhi ( double  phi) const
inlineprivate

Definition at line 96 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

96  {
97  while (phi > M_PI) { phi -= 2.*M_PI; }
98  while (phi < -M_PI) { phi += 2.*M_PI; }
99  return phi;
100  }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
std::vector< bool > SiStripElectronSeedGenerator::useDetLayer ( double  scEta)
private

Definition at line 743 of file SiStripElectronSeedGenerator.cc.

References abs.

743  {
744  std::vector<bool> useDetLayer;
745  double variable = std::abs(scEta);
746  if(variable > 0 && variable < 1.8){
747  useDetLayer.push_back(true);
748  }else{
749  useDetLayer.push_back(false);
750  }
751  if(variable > 0 && variable < 1.5){
752  useDetLayer.push_back(true);
753  }else{
754  useDetLayer.push_back(false);
755  }
756  if(variable > 1 && variable < 2.1){
757  useDetLayer.push_back(true);
758  }else{
759  useDetLayer.push_back(false);
760  }
761  if(variable > 1 && variable < 2.2){
762  useDetLayer.push_back(true);
763  }else{
764  useDetLayer.push_back(false);
765  }
766  if(variable > 1 && variable < 2.3){
767  useDetLayer.push_back(true);
768  }else{
769  useDetLayer.push_back(false);
770  }
771  if(variable > 1.8 && variable < 2.5){
772  useDetLayer.push_back(true);
773  }else{
774  useDetLayer.push_back(false);
775  }
776  if(variable > 1.8 && variable < 2.5){
777  useDetLayer.push_back(true);
778  }else{
779  useDetLayer.push_back(false);
780  }
781  if(variable > 1.8 && variable < 2.5){
782  useDetLayer.push_back(true);
783  }else{
784  useDetLayer.push_back(false);
785  }
786  if(variable > 1.2 && variable < 1.6){
787  useDetLayer.push_back(true);
788  }else{
789  useDetLayer.push_back(false);
790  }
791  return useDetLayer;
792 }
std::vector< bool > useDetLayer(double scEta)
#define abs(x)
Definition: mlp_lapack.h:159
int SiStripElectronSeedGenerator::whichSubdetector ( std::vector< const SiStripMatchedRecHit2D * >::const_iterator  hit)
private

Definition at line 719 of file SiStripElectronSeedGenerator.cc.

References query::result, StripSubdetector::TEC, StripSubdetector::TIB, and StripSubdetector::TID.

Referenced by checkHitsAndTSOS().

719  {
720  int result = 0;
721  if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TIB){
722  result = 1;
723  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TID){
724  result = 2;
725  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TEC){
726  result = 3;
727  }
728  return result;
729 }
tuple result
Definition: query.py:137

Member Data Documentation

std::vector<const SiStripRecHit2D*> SiStripElectronSeedGenerator::backupLayer2Hits_
private

Definition at line 143 of file SiStripElectronSeedGenerator.h.

edm::InputTag SiStripElectronSeedGenerator::beamSpotTag_
private

Definition at line 127 of file SiStripElectronSeedGenerator.h.

Referenced by run(), and SiStripElectronSeedGenerator().

unsigned long long SiStripElectronSeedGenerator::cacheIDCkfComp_
private

Definition at line 148 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDMagField_
private

Definition at line 147 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDTrkGeom_
private

Definition at line 149 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

std::vector<const SiStripMatchedRecHit2D*> SiStripElectronSeedGenerator::layer1Hits_
private

Definition at line 141 of file SiStripElectronSeedGenerator.h.

std::vector<const SiStripMatchedRecHit2D*> SiStripElectronSeedGenerator::layer2Hits_
private

Definition at line 142 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::maxSeeds_
private

Definition at line 170 of file SiStripElectronSeedGenerator.h.

edm::ESHandle<MeasurementTracker> SiStripElectronSeedGenerator::measurementTrackerHandle
private

Definition at line 123 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

double SiStripElectronSeedGenerator::monoDeltaPsiCut_
private

Definition at line 158 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::monoMaxHits_
private

Definition at line 169 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::monoOriginZCut_
private

Definition at line 154 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::monoPhiMissHit2Cut_
private

Definition at line 162 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS().

PTrajectoryStateOnDet SiStripElectronSeedGenerator::pts_
private

Definition at line 138 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

PRecHitContainer SiStripElectronSeedGenerator::recHits_
private

Definition at line 137 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecDeltaPsiCut_
private

Definition at line 157 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::tecMaxHits_
private

Definition at line 168 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecOriginZCut_
private

Definition at line 153 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tecPhiMissHit2Cut_
private

Definition at line 161 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tecRMissHit2Cut_
private

Definition at line 165 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

edm::Handle<reco::BeamSpot> SiStripElectronSeedGenerator::theBeamSpot
private

Definition at line 126 of file SiStripElectronSeedGenerator.h.

Referenced by run().

Chi2MeasurementEstimator* SiStripElectronSeedGenerator::theEstimator
private

Definition at line 131 of file SiStripElectronSeedGenerator.h.

Referenced by SiStripElectronSeedGenerator().

edm::ESHandle<MagneticField> SiStripElectronSeedGenerator::theMagField
private

Definition at line 124 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

const SiStripRecHitMatcher* SiStripElectronSeedGenerator::theMatcher_
private

Definition at line 145 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

const MeasurementTracker* SiStripElectronSeedGenerator::theMeasurementTracker
private

Definition at line 134 of file SiStripElectronSeedGenerator.h.

Referenced by run(), and setupES().

std::string SiStripElectronSeedGenerator::theMeasurementTrackerName
private

Definition at line 133 of file SiStripElectronSeedGenerator.h.

Referenced by setupES(), and SiStripElectronSeedGenerator().

PropagatorWithMaterial* SiStripElectronSeedGenerator::thePropagator
private
const edm::EventSetup* SiStripElectronSeedGenerator::theSetup
private

Definition at line 135 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), checkHitsAndTSOS(), and run().

KFUpdator* SiStripElectronSeedGenerator::theUpdator
private
double SiStripElectronSeedGenerator::tibDeltaPsiCut_
private

Definition at line 155 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibOriginZCut_
private

Definition at line 151 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibPhiMissHit2Cut_
private

Definition at line 159 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tibZMissHit2Cut_
private

Definition at line 163 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidDeltaPsiCut_
private

Definition at line 156 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidEtaUsage_
private

Definition at line 166 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::tidMaxHits_
private

Definition at line 167 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tidOriginZCut_
private

Definition at line 152 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidPhiMissHit2Cut_
private

Definition at line 160 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidRMissHit2Cut_
private

Definition at line 164 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

edm::ESHandle<TrackerGeometry> SiStripElectronSeedGenerator::trackerGeometryHandle
private

Definition at line 125 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), checkHitsAndTSOS(), and setupES().