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 SiStripRecHit2D * backupHitConverter (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 SiStripMatchedRecHit2D * matchedHitConverter (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 65 of file SiStripElectronSeedGenerator.h.

Member Typedef Documentation

Definition at line 70 of file SiStripElectronSeedGenerator.h.

Definition at line 69 of file SiStripElectronSeedGenerator.h.

Definition at line 72 of file SiStripElectronSeedGenerator.h.

Definition at line 71 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(), AlCaHLTBitMon_QueryRunRegistry::string, 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 618 of file SiStripElectronSeedGenerator.cc.

References a, abs, b, newFWLiteAna::build, edm::EventSetup::get(), FastHelix::isValid(), monoPhiMissHit2Cut_, trajectoryStateTransform::persistentState(), phiDiff(), pts_, diffTwoXMLs::r1, diffTwoXMLs::r2, mathSSE::sqrt(), FastHelix::stateAtVertex(), theMatcher_, thePropagator, theSetup, theUpdator, and trackerGeometryHandle.

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

Definition at line 753 of file SiStripElectronSeedGenerator.cc.

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

References a, abs, b, newFWLiteAna::build, edm::EventSetup::get(), FastHelix::isValid(), trajectoryStateTransform::persistentState(), phiDiff(), pts_, diffTwoXMLs::r1, diffTwoXMLs::r2, mathSSE::sqrt(), FastHelix::stateAtVertex(), tecPhiMissHit2Cut_, tecRMissHit2Cut_, theMatcher_, thePropagator, theSetup, theUpdator, tibPhiMissHit2Cut_, tibZMissHit2Cut_, tidPhiMissHit2Cut_, tidRMissHit2Cut_, trackerGeometryHandle, and whichSubdetector().

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

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

747  {
748  const TrackingRecHit* trh = crhp->hit();
749  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh);
750  return matchedHit;
751 }
double SiStripElectronSeedGenerator::normalPhi ( double  phi) const
inlineprivate

Definition at line 84 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

Referenced by phiDiff().

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

Definition at line 90 of file SiStripElectronSeedGenerator.h.

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

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

90  {
91  double result = normalPhi(phi1) - normalPhi(phi2);
92  if(result > M_PI) result -= 2*M_PI;
93  if(result < -M_PI) result += 2*M_PI;
94  return result;
95  }
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 700 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().

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

References M_PI, and phi.

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

Definition at line 759 of file SiStripElectronSeedGenerator.cc.

References abs.

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

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

Referenced by checkHitsAndTSOS().

735  {
736  int result = 0;
737  if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TIB){
738  result = 1;
739  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TID){
740  result = 2;
741  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TEC){
742  result = 3;
743  }
744  return result;
745 }
tuple result
Definition: query.py:137

Member Data Documentation

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

Definition at line 144 of file SiStripElectronSeedGenerator.h.

edm::InputTag SiStripElectronSeedGenerator::beamSpotTag_
private

Definition at line 128 of file SiStripElectronSeedGenerator.h.

Referenced by run(), and SiStripElectronSeedGenerator().

unsigned long long SiStripElectronSeedGenerator::cacheIDCkfComp_
private

Definition at line 149 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDMagField_
private

Definition at line 148 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDTrkGeom_
private

Definition at line 150 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

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

Definition at line 142 of file SiStripElectronSeedGenerator.h.

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

Definition at line 143 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::maxSeeds_
private

Definition at line 171 of file SiStripElectronSeedGenerator.h.

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

Definition at line 124 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

double SiStripElectronSeedGenerator::monoDeltaPsiCut_
private

Definition at line 159 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::monoMaxHits_
private

Definition at line 170 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::monoOriginZCut_
private

Definition at line 155 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::monoPhiMissHit2Cut_
private

Definition at line 163 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS().

PTrajectoryStateOnDet SiStripElectronSeedGenerator::pts_
private

Definition at line 139 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

PRecHitContainer SiStripElectronSeedGenerator::recHits_
private

Definition at line 138 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecDeltaPsiCut_
private

Definition at line 158 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::tecMaxHits_
private

Definition at line 169 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecOriginZCut_
private

Definition at line 154 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tecPhiMissHit2Cut_
private

Definition at line 162 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tecRMissHit2Cut_
private

Definition at line 166 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 127 of file SiStripElectronSeedGenerator.h.

Referenced by run().

Chi2MeasurementEstimator* SiStripElectronSeedGenerator::theEstimator
private

Definition at line 132 of file SiStripElectronSeedGenerator.h.

Referenced by SiStripElectronSeedGenerator().

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

Definition at line 125 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

const SiStripRecHitMatcher* SiStripElectronSeedGenerator::theMatcher_
private

Definition at line 146 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

const MeasurementTracker* SiStripElectronSeedGenerator::theMeasurementTracker
private

Definition at line 135 of file SiStripElectronSeedGenerator.h.

Referenced by run(), and setupES().

std::string SiStripElectronSeedGenerator::theMeasurementTrackerName
private

Definition at line 134 of file SiStripElectronSeedGenerator.h.

Referenced by setupES(), and SiStripElectronSeedGenerator().

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

Definition at line 136 of file SiStripElectronSeedGenerator.h.

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

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

Definition at line 156 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibOriginZCut_
private

Definition at line 152 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibPhiMissHit2Cut_
private

Definition at line 160 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tibZMissHit2Cut_
private

Definition at line 164 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidDeltaPsiCut_
private

Definition at line 157 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidEtaUsage_
private

Definition at line 167 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::tidMaxHits_
private

Definition at line 168 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tidOriginZCut_
private

Definition at line 153 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidPhiMissHit2Cut_
private

Definition at line 161 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidRMissHit2Cut_
private

Definition at line 165 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 126 of file SiStripElectronSeedGenerator.h.

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