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 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 >, const MeasurementTrackerEvent &trackerData, 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::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 66 of file SiStripElectronSeedGenerator.h.

Member Typedef Documentation

Definition at line 76 of file SiStripElectronSeedGenerator.h.

Definition at line 75 of file SiStripElectronSeedGenerator.h.

Definition at line 78 of file SiStripElectronSeedGenerator.h.

Definition at line 77 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 627 of file SiStripElectronSeedGenerator.cc.

References a, funct::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.

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

762  {
763  const TrackingRecHit* trh = crhp->hit();
764  const SiStripRecHit2D* backupHit = dynamic_cast<const SiStripRecHit2D*>(trh);
765  return backupHit;
766 }
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, 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().

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  /* Some of this code could be better optimized. The Pixel algorithm natively
588  takes Transient rec hits, so to recycle code we have to build them.
589  */
590 
591  RecHitPointer hit1Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit1)->geographicalId()), *hit1, theMatcher_);
592  RecHitPointer hit2Trans = TSiStripMatchedRecHit::build(trackerGeometryHandle->idToDet((*hit2)->geographicalId()), *hit2, theMatcher_);
593 
595 
596  double vertexZ = z1 - (r1 * (zc - z1) ) / (rc - r1);
597  GlobalPoint eleVertex(0.,0.,vertexZ);
598 
599  // FIXME optimize: move outside loop
601  theSetup->get<IdealMagneticFieldRecord>().get(bfield);
602  float nomField = bfield->nominalValue();
603 
604  // make a spiral
605  FastHelix helix(hit2Pos,hit1Pos,eleVertex,nomField,&*bfield);
606  if (!helix.isValid()) return false;
607 
608  FreeTrajectoryState fts(helix.stateAtVertex());
609  TSOS propagatedState = thePropagator->propagate(fts,hit1Trans->det()->surface());
610 
611  if (!propagatedState.isValid()) return false;
612 
613  TSOS updatedState = theUpdator->update(propagatedState, *hit1Trans);
614  TSOS propagatedState_out = thePropagator->propagate(fts,hit2Trans->det()->surface()) ;
615 
616  if (!propagatedState_out.isValid()) return false;
617 
618  // the seed has now passed all the cuts
619 
620  TSOS updatedState_out = theUpdator->update(propagatedState_out, *hit2Trans);
621 
622  pts_ = trajectoryStateTransform::persistentState(updatedState_out, hit2Trans->geographicalId().rawId());
623 
624  return true;
625 }
PTrajectoryStateOnDet persistentState(const TrajectoryStateOnSurface &ts, unsigned int detid)
TransientTrackingRecHit::RecHitPointer RecHitPointer
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 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,
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, LayerMeasurements::measurements(), PV3DBase< T, PVType, FrameType >::perp(), position, funct::pow(), singleTopDQM_cfi::preselection, 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<BarrelDetLayer*> tibLayers = gst->tibLayers();
217  DetLayer* tib1 = tibLayers.at(0);
218  DetLayer* tib2 = tibLayers.at(1);
219 
220  std::vector<ForwardDetLayer*> tecLayers;
221  std::vector<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  DetLayer* tid1 = tidLayers.at(0);
232  DetLayer* tid2 = tidLayers.at(1);
233  DetLayer* tid3 = tidLayers.at(2);
234  DetLayer* tec1 = tecLayers.at(0);
235  DetLayer* tec2 = tecLayers.at(1);
236  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 
456  SiStripMatchedRecHit2D *hit;
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 
463  reco::ElectronSeed seed(pts_,recHits_,dir) ;
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 
501  reco::ElectronSeed seed(pts_,recHits_,dir) ;
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
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
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: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 756 of file SiStripElectronSeedGenerator.cc.

756  {
757  const TrackingRecHit* trh = crhp->hit();
758  const SiStripMatchedRecHit2D* matchedHit = dynamic_cast<const SiStripMatchedRecHit2D*>(trh);
759  return matchedHit;
760 }
double SiStripElectronSeedGenerator::normalPhi ( double  phi) const
inlineprivate

Definition at line 91 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

Referenced by phiDiff().

91  {
92  while (phi > 2.* M_PI) { phi -= 2.*M_PI; }
93  while (phi < 0) { phi += 2.*M_PI; }
94  return phi;
95  }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
double SiStripElectronSeedGenerator::phiDiff ( double  phi1,
double  phi2 
)
inlineprivate

Definition at line 97 of file SiStripElectronSeedGenerator.h.

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

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

97  {
98  double result = normalPhi(phi1) - normalPhi(phi2);
99  if(result > M_PI) result -= 2*M_PI;
100  if(result < -M_PI) result += 2*M_PI;
101  return result;
102  }
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 709 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_, detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().

709  {
710  double r = position.perp();
711  double phi = position.phi();
712  double z = position.z();
713  double scr = superCluster.perp();
714  double scphi = superCluster.phi();
715  double scz = superCluster.z();
716  double psi = phiDiff(phi,scphi);
717  double deltaPsi = psi - (scr-r)*phiVsRSlope;
718  double antiDeltaPsi = psi - (r-scr)*phiVsRSlope;
719  double dP;
720  if (std::abs(deltaPsi)<std::abs(antiDeltaPsi)){
721  dP = deltaPsi;
722  }else{
723  dP = antiDeltaPsi;
724  }
725  double originZ = (scr*z - r*scz)/(scr-r);
726 
727  bool result = false;
728 
729  if(hitLayer == 1){
730  if(std::abs(originZ) < tibOriginZCut_ && std::abs(dP) < tibDeltaPsiCut_) result = true;
731  }else if(hitLayer == 2){
732  if(std::abs(originZ) < tidOriginZCut_ && std::abs(dP) < tidDeltaPsiCut_) result = true;
733  }else if(hitLayer == 3){
734  if(std::abs(originZ) < tecOriginZCut_ && std::abs(dP) < tecDeltaPsiCut_) result = true;
735  }else if(hitLayer == 4){
736  if(std::abs(originZ) < monoOriginZCut_ && std::abs(dP) < monoDeltaPsiCut_) result = true;
737  }
738 
739  return result;
740 }
T perp() const
Definition: PV3DBase.h:72
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
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
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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 121 of file SiStripElectronSeedGenerator.cc.

References beamSpotTag_, 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:434
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:56
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
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:55
T const * product() const
Definition: ESHandle.h:62
edm::ESHandle< MeasurementTracker > measurementTrackerHandle
double SiStripElectronSeedGenerator::unwrapPhi ( double  phi) const
inlineprivate

Definition at line 104 of file SiStripElectronSeedGenerator.h.

References M_PI, and phi.

104  {
105  while (phi > M_PI) { phi -= 2.*M_PI; }
106  while (phi < -M_PI) { phi += 2.*M_PI; }
107  return phi;
108  }
#define M_PI
Definition: BFit3D.cc:3
Definition: DDAxes.h:10
std::vector< bool > SiStripElectronSeedGenerator::useDetLayer ( double  scEta)
private

Definition at line 768 of file SiStripElectronSeedGenerator.cc.

References funct::abs().

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

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

Referenced by checkHitsAndTSOS().

744  {
745  int result = 0;
746  if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TIB){
747  result = 1;
748  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TID){
749  result = 2;
750  }else if(((*hit)->geographicalId()).subdetId() == StripSubdetector::TEC){
751  result = 3;
752  }
753  return result;
754 }
tuple result
Definition: query.py:137

Member Data Documentation

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

Definition at line 153 of file SiStripElectronSeedGenerator.h.

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

Definition at line 136 of file SiStripElectronSeedGenerator.h.

Referenced by run().

unsigned long long SiStripElectronSeedGenerator::cacheIDCkfComp_
private

Definition at line 158 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDMagField_
private

Definition at line 157 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

unsigned long long SiStripElectronSeedGenerator::cacheIDTrkGeom_
private

Definition at line 159 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

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

Definition at line 151 of file SiStripElectronSeedGenerator.h.

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

Definition at line 152 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::maxSeeds_
private

Definition at line 180 of file SiStripElectronSeedGenerator.h.

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

Definition at line 132 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

double SiStripElectronSeedGenerator::monoDeltaPsiCut_
private

Definition at line 168 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::monoMaxHits_
private

Definition at line 179 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::monoOriginZCut_
private

Definition at line 164 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::monoPhiMissHit2Cut_
private

Definition at line 172 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS().

PTrajectoryStateOnDet SiStripElectronSeedGenerator::pts_
private

Definition at line 148 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

PRecHitContainer SiStripElectronSeedGenerator::recHits_
private

Definition at line 147 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecDeltaPsiCut_
private

Definition at line 167 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

int SiStripElectronSeedGenerator::tecMaxHits_
private

Definition at line 178 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tecOriginZCut_
private

Definition at line 163 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tecPhiMissHit2Cut_
private

Definition at line 171 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tecRMissHit2Cut_
private

Definition at line 175 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 135 of file SiStripElectronSeedGenerator.h.

Referenced by run().

Chi2MeasurementEstimator* SiStripElectronSeedGenerator::theEstimator
private

Definition at line 140 of file SiStripElectronSeedGenerator.h.

Referenced by SiStripElectronSeedGenerator().

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

Definition at line 133 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

const SiStripRecHitMatcher* SiStripElectronSeedGenerator::theMatcher_
private

Definition at line 155 of file SiStripElectronSeedGenerator.h.

Referenced by altCheckHitsAndTSOS(), and checkHitsAndTSOS().

const MeasurementTracker* SiStripElectronSeedGenerator::theMeasurementTracker
private

Definition at line 143 of file SiStripElectronSeedGenerator.h.

Referenced by setupES().

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

Definition at line 144 of file SiStripElectronSeedGenerator.h.

Referenced by run().

std::string SiStripElectronSeedGenerator::theMeasurementTrackerName
private

Definition at line 142 of file SiStripElectronSeedGenerator.h.

Referenced by setupES(), and SiStripElectronSeedGenerator().

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

Definition at line 145 of file SiStripElectronSeedGenerator.h.

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

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

Definition at line 165 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibOriginZCut_
private

Definition at line 161 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tibPhiMissHit2Cut_
private

Definition at line 169 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tibZMissHit2Cut_
private

Definition at line 173 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidDeltaPsiCut_
private

Definition at line 166 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidEtaUsage_
private

Definition at line 176 of file SiStripElectronSeedGenerator.h.

int SiStripElectronSeedGenerator::tidMaxHits_
private

Definition at line 177 of file SiStripElectronSeedGenerator.h.

double SiStripElectronSeedGenerator::tidOriginZCut_
private

Definition at line 162 of file SiStripElectronSeedGenerator.h.

Referenced by preselection().

double SiStripElectronSeedGenerator::tidPhiMissHit2Cut_
private

Definition at line 170 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

double SiStripElectronSeedGenerator::tidRMissHit2Cut_
private

Definition at line 174 of file SiStripElectronSeedGenerator.h.

Referenced by checkHitsAndTSOS().

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

Definition at line 134 of file SiStripElectronSeedGenerator.h.

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