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  theSplitHit(0),
11  theMatchedHit(theHit),
12  theRingNumber(0),
13  theCylinderNumber(0),
14  theLocalError(0.),
15  theLargerError(0.)
16 
17 {
18  init(theGeometry, tTopo);
19 }
20 
22  const TrackerGeometry* theGeometry,
23  const TrackerTopology* tTopo ) :
24  theSplitHit(theHit),
25  theMatchedHit(0),
26  theRingNumber(0),
27  theCylinderNumber(0),
28  theLocalError(0.),
29  theLargerError(0.)
30 
31 {
32  init(theGeometry,tTopo);
33 }
34 
35 void
37 
38  const DetId& theDetId = hit()->geographicalId();
39  int subDetId = theDetId.subdetId();
40  theGeomDet = theGeometry->idToDet(theDetId);
42  if ( subDetId == StripSubdetector::TIB) {
43 
45  forward = false;
46  } else if (subDetId== StripSubdetector::TOB ) {
47 
49  forward = false;
50  } else if ( subDetId == StripSubdetector::TID) {
51 
53  theRingNumber = tTopo->tidRing(theDetId);
54  forward = true;
55  } else if ( subDetId == StripSubdetector::TEC ) {
56 
58  theRingNumber = tTopo->tecRing(theDetId);
59  forward = true;
60  } else if ( subDetId == PixelSubdetector::PixelBarrel ) {
61 
63  forward = false;
64  } else if ( subDetId == PixelSubdetector::PixelEndcap ) {
65 
67  forward = true;
68  }
69 }
70 
71 bool
72 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets) const{
73 
74  for(unsigned int i=0; i<theLayersInSets.size(); ++i) {
75  if(theLayersInSets[i][0]==seedingLayer) return true;
76  }
77 
78  return false;
79 }
80 
81 bool
82 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond) const{
83 
84  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
85  if( theLayersInSets[i][0]==seedingLayer &&
86  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer()
87  )
88  return true;
89  }
90  return false;
91 }
92 
93 bool
94 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond, const TrajectorySeedHitCandidate& theSeedHitThird) const{
95 
96  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
97  if( theLayersInSets[i][0]==seedingLayer &&
98  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer() &&
99  theLayersInSets[i][2]==theSeedHitThird.getTrackingLayer()
100  ) return true;
101  }
102  return false;
103 }
104 
105 
int i
Definition: DBlmapReader.cc:9
unsigned int tidRing(const DetId &id) const
const GSSiTrackerRecHit2DLocalPos * hit() 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.
DetId geographicalId() const
const TrackingLayer & getTrackingLayer() const
unsigned int subDetId() const
The subdet Id.
virtual const TrackerGeomDet * idToDet(DetId) const