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_
 
PTrajectoryStateOnDetpts_
 
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
 
TrajectoryStateTransform transformer_
 

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 58 of file SiStripElectronSeedGenerator.cc.

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

59  : beamSpotTag_("offlineBeamSpot"),
61  theSetup(0),pts_(0),theMatcher_(0),
63  tibOriginZCut_(pset.getParameter<double>("tibOriginZCut")),
64  tidOriginZCut_(pset.getParameter<double>("tidOriginZCut")),
65  tecOriginZCut_(pset.getParameter<double>("tecOriginZCut")),
66  monoOriginZCut_(pset.getParameter<double>("monoOriginZCut")),
67  tibDeltaPsiCut_(pset.getParameter<double>("tibDeltaPsiCut")),
68  tidDeltaPsiCut_(pset.getParameter<double>("tidDeltaPsiCut")),
69  tecDeltaPsiCut_(pset.getParameter<double>("tecDeltaPsiCut")),
70  monoDeltaPsiCut_(pset.getParameter<double>("monoDeltaPsiCut")),
71  tibPhiMissHit2Cut_(pset.getParameter<double>("tibPhiMissHit2Cut")),
72  tidPhiMissHit2Cut_(pset.getParameter<double>("tidPhiMissHit2Cut")),
73  tecPhiMissHit2Cut_(pset.getParameter<double>("tecPhiMissHit2Cut")),
74  monoPhiMissHit2Cut_(pset.getParameter<double>("monoPhiMissHit2Cut")),
75  tibZMissHit2Cut_(pset.getParameter<double>("tibZMissHit2Cut")),
76  tidRMissHit2Cut_(pset.getParameter<double>("tidRMissHit2Cut")),
77  tecRMissHit2Cut_(pset.getParameter<double>("tecRMissHit2Cut")),
78  tidEtaUsage_(pset.getParameter<double>("tidEtaUsage")),
79  tidMaxHits_(pset.getParameter<int>("tidMaxHits")),
80  tecMaxHits_(pset.getParameter<int>("tecMaxHits")),
81  monoMaxHits_(pset.getParameter<int>("monoMaxHits")),
82  maxSeeds_(pset.getParameter<int>("maxSeeds"))
83 {
84  // use of a theMeasurementTrackerName
85  if (pset.exists("measurementTrackerName"))
86  { theMeasurementTrackerName = pset.getParameter<std::string>("measurementTrackerName") ; }
87 
88  // new beamSpot tag
89  if (pset.exists("beamSpot"))
90  { beamSpotTag_ = pset.getParameter<edm::InputTag>("beamSpot") ; }
91 
92  theUpdator = new KFUpdator();
94 }
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 97 of file SiStripElectronSeedGenerator.cc.

References thePropagator, and theUpdator.

97  {
98  delete thePropagator;
99  delete theUpdator;
100 }

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 621 of file SiStripElectronSeedGenerator.cc.

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

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

Definition at line 751 of file SiStripElectronSeedGenerator.cc.

751  {
752  const TrackingRecHit* trh = crhp->hit();
753  const SiStripRecHit2D* backupHit = dynamic_cast<const SiStripRecHit2D*>(trh);
754  return backupHit;
755 }
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 518 of file SiStripElectronSeedGenerator.cc.

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

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

Definition at line 147 of file SiStripElectronSeedGenerator.cc.

References abs, alongMomentum, funct::cos(), dir, TrackingRecHit::geographicalId(), BaseSiTrackerRecHit2DLocalPos::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().

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

745  {
746  const TrackingRecHit* trh = crhp->hit();
747  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh);
748  return matchedHit;
749 }
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 698 of file SiStripElectronSeedGenerator.cc.

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

698  {
699  double r = position.perp();
700  double phi = position.phi();
701  double z = position.z();
702  double scr = superCluster.perp();
703  double scphi = superCluster.phi();
704  double scz = superCluster.z();
705  double psi = phiDiff(phi,scphi);
706  double deltaPsi = psi - (scr-r)*phiVsRSlope;
707  double antiDeltaPsi = psi - (r-scr)*phiVsRSlope;
708  double dP;
709  if (std::abs(deltaPsi)<std::abs(antiDeltaPsi)){
710  dP = deltaPsi;
711  }else{
712  dP = antiDeltaPsi;
713  }
714  double originZ = (scr*z - r*scz)/(scr-r);
715 
716  bool result = false;
717 
718  if(hitLayer == 1){
719  if(std::abs(originZ) < tibOriginZCut_ && std::abs(dP) < tibDeltaPsiCut_) result = true;
720  }else if(hitLayer == 2){
721  if(std::abs(originZ) < tidOriginZCut_ && std::abs(dP) < tidDeltaPsiCut_) result = true;
722  }else if(hitLayer == 3){
723  if(std::abs(originZ) < tecOriginZCut_ && std::abs(dP) < tecDeltaPsiCut_) result = true;
724  }else if(hitLayer == 4){
725  if(std::abs(originZ) < monoOriginZCut_ && std::abs(dP) < monoDeltaPsiCut_) result = true;
726  }
727 
728  return result;
729 }
T perp() const
Definition: PV3DBase.h:66
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
#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:58
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 125 of file SiStripElectronSeedGenerator.cc.

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

127  {
128  theSetup= &setup;
131 
132  for (unsigned int i=0;i<clusters->size();++i) {
133  edm::Ref<reco::SuperClusterCollection> theClusB(clusters,i);
134  // Find the seeds
135  LogDebug ("run") << "new cluster, calling findSeedsFromCluster";
137  }
138 
139  LogDebug ("run") << ": For event "<<e.id();
140  LogDebug ("run") <<"Nr of superclusters: "<<clusters->size()
141  <<", no. of ElectronSeeds found = " << out.size();
142 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
virtual void update(const edm::Event &) const
const MeasurementTracker * theMeasurementTracker
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
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 103 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.

103  {
104 
107  cacheIDMagField_=setup.get<IdealMagneticFieldRecord>().cacheIdentifier();
108  if (thePropagator) delete thePropagator;
110  }
111 
114  cacheIDCkfComp_=setup.get<CkfComponentsRecord>().cacheIdentifier();
116  }
117 
120  cacheIDTrkGeom_=setup.get<TrackerDigiGeometryRecord>().cacheIdentifier();
121  }
122 
123 }
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 757 of file SiStripElectronSeedGenerator.cc.

References abs.

757  {
758  std::vector<bool> useDetLayer;
759  double variable = std::abs(scEta);
760  if(variable > 0 && variable < 1.8){
761  useDetLayer.push_back(true);
762  }else{
763  useDetLayer.push_back(false);
764  }
765  if(variable > 0 && variable < 1.5){
766  useDetLayer.push_back(true);
767  }else{
768  useDetLayer.push_back(false);
769  }
770  if(variable > 1 && variable < 2.1){
771  useDetLayer.push_back(true);
772  }else{
773  useDetLayer.push_back(false);
774  }
775  if(variable > 1 && variable < 2.2){
776  useDetLayer.push_back(true);
777  }else{
778  useDetLayer.push_back(false);
779  }
780  if(variable > 1 && variable < 2.3){
781  useDetLayer.push_back(true);
782  }else{
783  useDetLayer.push_back(false);
784  }
785  if(variable > 1.8 && variable < 2.5){
786  useDetLayer.push_back(true);
787  }else{
788  useDetLayer.push_back(false);
789  }
790  if(variable > 1.8 && variable < 2.5){
791  useDetLayer.push_back(true);
792  }else{
793  useDetLayer.push_back(false);
794  }
795  if(variable > 1.8 && variable < 2.5){
796  useDetLayer.push_back(true);
797  }else{
798  useDetLayer.push_back(false);
799  }
800  if(variable > 1.2 && variable < 1.6){
801  useDetLayer.push_back(true);
802  }else{
803  useDetLayer.push_back(false);
804  }
805  return useDetLayer;
806 }
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 733 of file SiStripElectronSeedGenerator.cc.

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

Referenced by checkHitsAndTSOS().

733  {
734  int result = 0;
735  if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TIB){
736  result = 1;
737  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TID){
738  result = 2;
739  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TEC){
740  result = 3;
741  }
742  return result;
743 }
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().

TrajectoryStateTransform SiStripElectronSeedGenerator::transformer_
private

Definition at line 136 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().