CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectorySeedHitCandiate.cc
Go to the documentation of this file.
2 
6 
8  const TrackerGeometry* theGeometry,
9  const TrackerTopology* tTopo) :
10  theHit(hit),
11  theRingNumber(0),
12  theCylinderNumber(0),
13  theLocalError(0.),
14  theLargerError(0.)
15 
16 {
17  init(theGeometry, tTopo);
18 }
19 
20 void
22 
23  const DetId& theDetId = hit()->geographicalId();
24  int subDetId = theDetId.subdetId();
25  theGeomDet = theGeometry->idToDet(theDetId);
27  if ( subDetId == StripSubdetector::TIB) {
28 
30  forward = false;
31  } else if (subDetId== StripSubdetector::TOB ) {
32 
34  forward = false;
35  } else if ( subDetId == StripSubdetector::TID) {
36 
38  theRingNumber = tTopo->tidRing(theDetId);
39  forward = true;
40  } else if ( subDetId == StripSubdetector::TEC ) {
41 
43  theRingNumber = tTopo->tecRing(theDetId);
44  forward = true;
45  } else if ( subDetId == PixelSubdetector::PixelBarrel ) {
46 
48  forward = false;
49  } else if ( subDetId == PixelSubdetector::PixelEndcap ) {
50 
52  forward = true;
53  }
54 }
55 
56 bool
57 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets) const{
58 
59  for(unsigned int i=0; i<theLayersInSets.size(); ++i) {
60  if(theLayersInSets[i][0]==seedingLayer) return true;
61  }
62 
63  return false;
64 }
65 
66 bool
67 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond) const{
68 
69  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
70  if( theLayersInSets[i][0]==seedingLayer &&
71  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer()
72  )
73  return true;
74  }
75  return false;
76 }
77 
78 bool
79 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond, const TrajectorySeedHitCandidate& theSeedHitThird) const{
80 
81  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
82  if( theLayersInSets[i][0]==seedingLayer &&
83  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer() &&
84  theLayersInSets[i][2]==theSeedHitThird.getTrackingLayer()
85  ) return true;
86  }
87  return false;
88 }
89 
90 
int i
Definition: DBlmapReader.cc:9
unsigned int tidRing(const DetId &id) const
unsigned int getLayerNumber() const
Definition: TrackingLayer.h:85
unsigned int tecRing(const DetId &id) const
ring id
static TrackingLayer createFromDetId(const DetId &detId, const TrackerTopology &trackerTopology)
void init(const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
Initialization at construction time.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
TrajectorySeedHitCandidate()
Default Constructor.
Definition: DetId.h:18
bool isOnRequestedDet(const std::vector< std::vector< TrackingLayer > > &theLayersInSets) const
Check if the hit is on one of the requested detector.
const FastTrackerRecHit * hit() const
The Hit itself.
DetId geographicalId() const
const TrackingLayer & getTrackingLayer() const
unsigned int subDetId() const
The subdet Id.
virtual const TrackerGeomDet * idToDet(DetId) const