CMS 3D CMS Logo

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

#include <SiStripElectronSeedGenerator.h>

Classes

struct  Tokens
 

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 &, const Tokens &)
 
 ~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 >, const MeasurementTrackerEvent &trackerData, 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::EDGetTokenT< reco::BeamSpotbeamSpotTag_
 
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
 
edm::EDGetTokenT
< MeasurementTrackerEvent
theMeasurementTrackerEventTag
 
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 63 of file SiStripElectronSeedGenerator.h.

Member Typedef Documentation

Definition at line 73 of file SiStripElectronSeedGenerator.h.

Definition at line 72 of file SiStripElectronSeedGenerator.h.

Definition at line 75 of file SiStripElectronSeedGenerator.h.

Definition at line 74 of file SiStripElectronSeedGenerator.h.

Constructor & Destructor Documentation

SiStripElectronSeedGenerator::SiStripElectronSeedGenerator ( const edm::ParameterSet pset,
const Tokens tokens 
)

Definition at line 50 of file SiStripElectronSeedGenerator.cc.

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

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

Definition at line 93 of file SiStripElectronSeedGenerator.cc.

References thePropagator, and theUpdator.

93  {
94  delete thePropagator;
95  delete theUpdator;
96 }

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, funct::abs(), b, edm::EventSetup::get(), FastHelix::isValid(), monoPhiMissHit2Cut_, trajectoryStateTransform::persistentState(), phiDiff(), Propagator::propagate(), pts_, diffTwoXMLs::r1, diffTwoXMLs::r2, mathSSE::sqrt(), FastHelix::stateAtVertex(), thePropagator, theSetup, theUpdator, trackerGeometryHandle, 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 
661 
662 
664 
665  double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1);
666  GlobalPoint eleVertex(0.,0.,vertexZ);
667 
668  // FIXME optimize: move outside loop
670  theSetup->get<IdealMagneticFieldRecord>().get(bfield);
671  float nomField = bfield->nominalValue();
672 
673  // make a spiral
674  FastHelix helix(hit2Pos,hit1Pos,eleVertex,nomField,&*bfield);
675  if (!helix.isValid()) return false;
676 
677  FreeTrajectoryState fts(helix.stateAtVertex());
678  TSOS propagatedState = thePropagator->propagate(fts,(*hit1)->det()->surface());
679 
680  if (!propagatedState.isValid()) return false;
681 
682  TSOS updatedState = theUpdator->update(propagatedState, **hit1);
683  TSOS propagatedState_out = thePropagator->propagate(fts,(*hit2)->det()->surface()) ;
684 
685  if (!propagatedState_out.isValid()) return false;
686 
687  // the seed has now passed all the cuts
688 
689  TSOS updatedState_out = theUpdator->update(propagatedState_out, **hit2);
690 
691  pts_ = trajectoryStateTransform::persistentState(updatedState_out, (*hit2)->geographicalId().rawId());
692 
693  return true;
694 }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition: KFUpdator.cc:75
T sqrt(T t)
Definition: SSEVec.h:48
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
const T & get() const
Definition: EventSetup.h:56
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 750 of file SiStripElectronSeedGenerator.cc.

References TrackingRecHit::hit().

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

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

522  {
523 
524  bool seedCutsSatisfied = false;
525 
526  using namespace std;
527 
528  GlobalPoint hit1Pos = trackerGeometryHandle->idToDet((*hit1)->geographicalId())->surface().toGlobal((*hit1)->localPosition());
529  double r1 = sqrt(hit1Pos.x()*hit1Pos.x() + hit1Pos.y()*hit1Pos.y());
530  double phi1 = hit1Pos.phi();
531  double z1=hit1Pos.z();
532 
533  GlobalPoint hit2Pos = trackerGeometryHandle->idToDet((*hit2)->geographicalId())->surface().toGlobal((*hit2)->localPosition());
534  double r2 = sqrt(hit2Pos.x()*hit2Pos.x() + hit2Pos.y()*hit2Pos.y());
535  double phi2 = hit2Pos.phi();
536  double z2 = hit2Pos.z();
537 
538  if(r2 > r1 && (std::abs(z2) > std::abs(z1) || std::abs(scEta) < 0.25)) {
539 
540  //Consider the circle made of IP and Hit 1; Calculate it's radius using pT
541 
542  double curv = pT*100*.877;
543 
544  //Predict phi of hit 2
545  double a = (r2-r1)/(2*curv);
546  double b = phiDiff(phi2,phi1);
547  //UB added '=0' to avoid compiler warning
548  double phiMissHit2=0;
549  if(std::abs(b - a)<std::abs(b + a)) phiMissHit2 = b - a;
550  if(std::abs(b - a)>std::abs(b + a)) phiMissHit2 = b + a;
551 
552  double zMissHit2 = z2 - (r2*(zc-z1)-r1*zc+rc*z1)/(rc-r1);
553 
554  double rPredHit2 = r1 + (rc-r1)/(zc-z1)*(z2-z1);
555  double rMissHit2 = r2 - rPredHit2;
556 
557  int subdetector = whichSubdetector(hit2);
558 
559  bool zDiff = true;
560  double zVar1 = std::abs(z1);
561  double zVar2 = std::abs(z2 - z1);
562  if(zVar1 > 75 && zVar1 < 95 && (zVar2 > 18 || zVar2 < 5)) zDiff = false;
563  if(zVar1 > 100 && zVar1 < 110 && (zVar2 > 35 || zVar2 < 5)) zDiff = false;
564  if(zVar1 > 125 && zVar1 < 150 && (zVar2 > 18 || zVar2 < 5)) zDiff = false;
565 
566  if(subdetector == 1){
567  int tibExtraCut = 0;
568  if(r1 > 23 && r1 < 28 && r2 > 31 && r2 < 37) tibExtraCut = 1;
569  if(std::abs(phiMissHit2) < tibPhiMissHit2Cut_ && std::abs(zMissHit2) < tibZMissHit2Cut_ && tibExtraCut == 1) seedCutsSatisfied = true;
570  }else if(subdetector == 2){
571  int tidExtraCut = 0;
572  if(r1 > 23 && r1 < 34 && r2 > 26 && r2 < 42) tidExtraCut = 1;
573  if(std::abs(phiMissHit2) < tidPhiMissHit2Cut_ && std::abs(rMissHit2) < tidRMissHit2Cut_ && tidExtraCut == 1 && zDiff) seedCutsSatisfied = true;
574  }else if(subdetector == 3){
575  int tecExtraCut = 0;
576  if(r1 > 23 && r1 < 32 && r2 > 26 && r2 < 42) tecExtraCut = 1;
577  if(std::abs(phiMissHit2) < tecPhiMissHit2Cut_ && std::abs(rMissHit2) < tecRMissHit2Cut_ && tecExtraCut == 1 && zDiff) seedCutsSatisfied = true;
578  }
579 
580  }
581 
582  if(!seedCutsSatisfied) return false;
583 
584  // seed checks borrowed from pixel-based algoritm
585 
586 
587 
589 
590  double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1);
591  GlobalPoint eleVertex(0.,0.,vertexZ);
592 
593  // FIXME optimize: move outside loop
595  theSetup->get<IdealMagneticFieldRecord>().get(bfield);
596  float nomField = bfield->nominalValue();
597 
598  // make a spiral
599  FastHelix helix(hit2Pos,hit1Pos,eleVertex,nomField,&*bfield);
600  if (!helix.isValid()) return false;
601 
602  FreeTrajectoryState fts(helix.stateAtVertex());
603  TSOS propagatedState = thePropagator->propagate(fts,(*hit1)->det()->surface());
604 
605  if (!propagatedState.isValid()) return false;
606 
607  TSOS updatedState = theUpdator->update(propagatedState, **hit1);
608  TSOS propagatedState_out = thePropagator->propagate(fts,(*hit2)->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, **hit2);
615 
616  pts_ = trajectoryStateTransform::persistentState(updatedState_out, (*hit2)->geographicalId().rawId());
617 
618  return true;
619 }
virtual FreeTrajectoryState propagate(const FreeTrajectoryState &ftsStart, const GlobalPoint &pDest) const final
Definition: Propagator.h:119
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
Definition: KFUpdator.cc:75
T sqrt(T t)
Definition: SSEVec.h:48
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
int whichSubdetector(std::vector< const SiStripMatchedRecHit2D * >::const_iterator hit)
TrajectoryStateOnSurface TSOS
Definition: TestHits.cc:19
const T & get() const
Definition: EventSetup.h:56
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,
const MeasurementTrackerEvent trackerData,
reco::ElectronSeedCollection result 
)
private

Definition at line 146 of file SiStripElectronSeedGenerator.cc.

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

References TrackingRecHit::hit().

744  {
745  const TrackingRecHit* trh = crhp->hit();
746  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh);
747  return matchedHit;
748 }
virtual TrackingRecHit const * hit() const
double SiStripElectronSeedGenerator::normalPhi ( double  phi) const
inlineprivate

Definition at line 88 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

Referenced by phiDiff().

88  {
89  while (phi > 2.* M_PI) { phi -= 2.*M_PI; }
90  while (phi < 0) { phi += 2.*M_PI; }
91  return phi;
92  }
#define M_PI
double SiStripElectronSeedGenerator::phiDiff ( double  phi1,
double  phi2 
)
inlineprivate

Definition at line 94 of file SiStripElectronSeedGenerator.h.

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

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

94  {
95  double result = normalPhi(phi1) - normalPhi(phi2);
96  if(result > M_PI) result -= 2*M_PI;
97  if(result < -M_PI) result += 2*M_PI;
98  return result;
99  }
tuple result
Definition: query.py:137
#define M_PI
bool SiStripElectronSeedGenerator::preselection ( GlobalPoint  position,
GlobalPoint  superCluster,
double  phiVsRSlope,
int  hitLayer 
)
private

Definition at line 697 of file SiStripElectronSeedGenerator.cc.

References funct::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_, z, and PV3DBase< T, PVType, FrameType >::z().

697  {
698  double r = position.perp();
699  double phi = position.phi();
700  double z = position.z();
701  double scr = superCluster.perp();
702  double scphi = superCluster.phi();
703  double scz = superCluster.z();
704  double psi = phiDiff(phi,scphi);
705  double deltaPsi = psi - (scr-r)*phiVsRSlope;
706  double antiDeltaPsi = psi - (r-scr)*phiVsRSlope;
707  double dP;
708  if (std::abs(deltaPsi)<std::abs(antiDeltaPsi)){
709  dP = deltaPsi;
710  }else{
711  dP = antiDeltaPsi;
712  }
713  double originZ = (scr*z - r*scz)/(scr-r);
714 
715  bool result = false;
716 
717  if(hitLayer == 1){
718  if(std::abs(originZ) < tibOriginZCut_ && std::abs(dP) < tibDeltaPsiCut_) result = true;
719  }else if(hitLayer == 2){
720  if(std::abs(originZ) < tidOriginZCut_ && std::abs(dP) < tidDeltaPsiCut_) result = true;
721  }else if(hitLayer == 3){
722  if(std::abs(originZ) < tecOriginZCut_ && std::abs(dP) < tecDeltaPsiCut_) result = true;
723  }else if(hitLayer == 4){
724  if(std::abs(originZ) < monoOriginZCut_ && std::abs(dP) < monoDeltaPsiCut_) result = true;
725  }
726 
727  return result;
728 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
std::map< std::string, int, std::less< std::string > > psi
T z() const
Definition: PV3DBase.h:64
tuple result
Definition: query.py:137
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phiDiff(double phi1, double phi2)
void SiStripElectronSeedGenerator::run ( edm::Event e,
const edm::EventSetup setup,
const edm::Handle< reco::SuperClusterCollection > &  clusters,
reco::ElectronSeedCollection out 
)

Definition at line 121 of file SiStripElectronSeedGenerator.cc.

References beamSpotTag_, AlCaHLTBitMon_QueryRunRegistry::data, findSeedsFromCluster(), edm::Event::getByToken(), i, edm::EventBase::id(), LogDebug, HcalObjRepresent::setup(), theBeamSpot, theMeasurementTrackerEventTag, and theSetup.

123  {
124  theSetup= &setup;
125 
129 
130 
131  for (unsigned int i=0;i<clusters->size();++i) {
132  edm::Ref<reco::SuperClusterCollection> theClusB(clusters,i);
133  // Find the seeds
134  LogDebug ("run") << "new cluster, calling findSeedsFromCluster";
135  findSeedsFromCluster(theClusB,theBeamSpot,*data,out);
136  }
137 
138  LogDebug ("run") << ": For event "<<e.id();
139  LogDebug ("run") <<"Nr of superclusters: "<<clusters->size()
140  <<", no. of ElectronSeeds found = " << out.size();
141 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
edm::EDGetTokenT< reco::BeamSpot > beamSpotTag_
edm::EDGetTokenT< MeasurementTrackerEvent > theMeasurementTrackerEventTag
edm::Handle< reco::BeamSpot > theBeamSpot
void findSeedsFromCluster(edm::Ref< reco::SuperClusterCollection >, edm::Handle< reco::BeamSpot >, const MeasurementTrackerEvent &trackerData, reco::ElectronSeedCollection &)
tuple out
Definition: dbtoconf.py:99
edm::EventID id() const
Definition: EventBase.h:60
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
void SiStripElectronSeedGenerator::setupES ( const edm::EventSetup setup)

Definition at line 99 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.

99  {
100 
103  cacheIDMagField_=setup.get<IdealMagneticFieldRecord>().cacheIdentifier();
104  if (thePropagator) delete thePropagator;
106  }
107 
110  cacheIDCkfComp_=setup.get<CkfComponentsRecord>().cacheIdentifier();
112  }
113 
116  cacheIDTrkGeom_=setup.get<TrackerDigiGeometryRecord>().cacheIdentifier();
117  }
118 
119 }
unsigned long long cacheIdentifier() const
const MeasurementTracker * theMeasurementTracker
edm::ESHandle< MagneticField > theMagField
edm::ESHandle< TrackerGeometry > trackerGeometryHandle
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
edm::ESHandle< MeasurementTracker > measurementTrackerHandle
double SiStripElectronSeedGenerator::unwrapPhi ( double  phi) const
inlineprivate

Definition at line 101 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

101  {
102  while (phi > M_PI) { phi -= 2.*M_PI; }
103  while (phi < -M_PI) { phi += 2.*M_PI; }
104  return phi;
105  }
#define M_PI
std::vector< bool > SiStripElectronSeedGenerator::useDetLayer ( double  scEta)
private

Definition at line 756 of file SiStripElectronSeedGenerator.cc.

References funct::abs().

756  {
757  std::vector<bool> useDetLayer;
758  double variable = std::abs(scEta);
759  if(variable > 0 && variable < 1.8){
760  useDetLayer.push_back(true);
761  }else{
762  useDetLayer.push_back(false);
763  }
764  if(variable > 0 && variable < 1.5){
765  useDetLayer.push_back(true);
766  }else{
767  useDetLayer.push_back(false);
768  }
769  if(variable > 1 && variable < 2.1){
770  useDetLayer.push_back(true);
771  }else{
772  useDetLayer.push_back(false);
773  }
774  if(variable > 1 && variable < 2.2){
775  useDetLayer.push_back(true);
776  }else{
777  useDetLayer.push_back(false);
778  }
779  if(variable > 1 && variable < 2.3){
780  useDetLayer.push_back(true);
781  }else{
782  useDetLayer.push_back(false);
783  }
784  if(variable > 1.8 && variable < 2.5){
785  useDetLayer.push_back(true);
786  }else{
787  useDetLayer.push_back(false);
788  }
789  if(variable > 1.8 && variable < 2.5){
790  useDetLayer.push_back(true);
791  }else{
792  useDetLayer.push_back(false);
793  }
794  if(variable > 1.8 && variable < 2.5){
795  useDetLayer.push_back(true);
796  }else{
797  useDetLayer.push_back(false);
798  }
799  if(variable > 1.2 && variable < 1.6){
800  useDetLayer.push_back(true);
801  }else{
802  useDetLayer.push_back(false);
803  }
804  return useDetLayer;
805 }
std::vector< bool > useDetLayer(double scEta)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int SiStripElectronSeedGenerator::whichSubdetector ( std::vector< const SiStripMatchedRecHit2D * >::const_iterator  hit)
private

Definition at line 732 of file SiStripElectronSeedGenerator.cc.

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

Referenced by checkHitsAndTSOS().

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

Member Data Documentation

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

Definition at line 150 of file SiStripElectronSeedGenerator.h.

edm::EDGetTokenT<reco::BeamSpot> SiStripElectronSeedGenerator::beamSpotTag_
private

Definition at line 133 of file SiStripElectronSeedGenerator.h.

Referenced by run().

unsigned long long SiStripElectronSeedGenerator::cacheIDCkfComp_
private

Definition at line 155 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDMagField_
private

Definition at line 154 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDTrkGeom_
private

Definition at line 156 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

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

Definition at line 148 of file SiStripElectronSeedGenerator.h.

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

Definition at line 149 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::maxSeeds_
private

Definition at line 177 of file SiStripElectronSeedGenerator.h.

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

Definition at line 129 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

double SiStripElectronSeedGenerator::monoDeltaPsiCut_
private

Definition at line 165 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::monoMaxHits_
private

Definition at line 176 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::monoOriginZCut_
private

Definition at line 161 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::monoPhiMissHit2Cut_
private

Definition at line 169 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS().

PTrajectoryStateOnDet SiStripElectronSeedGenerator::pts_
private

Definition at line 145 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

PRecHitContainer SiStripElectronSeedGenerator::recHits_
private

Definition at line 144 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecDeltaPsiCut_
private

Definition at line 164 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::tecMaxHits_
private

Definition at line 175 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecOriginZCut_
private

Definition at line 160 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tecPhiMissHit2Cut_
private

Definition at line 168 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tecRMissHit2Cut_
private

Definition at line 172 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 132 of file SiStripElectronSeedGenerator.h.

Referenced by run().

Chi2MeasurementEstimator* SiStripElectronSeedGenerator::theEstimator
private

Definition at line 137 of file SiStripElectronSeedGenerator.h.

Referenced by SiStripElectronSeedGenerator().

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

Definition at line 130 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

const SiStripRecHitMatcher* SiStripElectronSeedGenerator::theMatcher_
private

Definition at line 152 of file SiStripElectronSeedGenerator.h.

const MeasurementTracker* SiStripElectronSeedGenerator::theMeasurementTracker
private

Definition at line 140 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

edm::EDGetTokenT<MeasurementTrackerEvent> SiStripElectronSeedGenerator::theMeasurementTrackerEventTag
private

Definition at line 141 of file SiStripElectronSeedGenerator.h.

Referenced by run().

std::string SiStripElectronSeedGenerator::theMeasurementTrackerName
private

Definition at line 139 of file SiStripElectronSeedGenerator.h.

Referenced by setupES(), and SiStripElectronSeedGenerator().

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

Definition at line 142 of file SiStripElectronSeedGenerator.h.

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

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

Definition at line 162 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibOriginZCut_
private

Definition at line 158 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibPhiMissHit2Cut_
private

Definition at line 166 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tibZMissHit2Cut_
private

Definition at line 170 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidDeltaPsiCut_
private

Definition at line 163 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidEtaUsage_
private

Definition at line 173 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::tidMaxHits_
private

Definition at line 174 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tidOriginZCut_
private

Definition at line 159 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidPhiMissHit2Cut_
private

Definition at line 167 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidRMissHit2Cut_
private

Definition at line 171 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 131 of file SiStripElectronSeedGenerator.h.

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