CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrajectorySeedHitCandidate.cc
Go to the documentation of this file.
2 
6 
8  const TrackerTopology* tTopo) :
9  theHit(hit),
10  theRingNumber(0),
11  theCylinderNumber(0)
12 {
13  init(tTopo);
14 }
15 
16 void
18 
19  const DetId& theDetId = hit()->geographicalId();
20  int subDetId = theDetId.subdetId();
22  if ( subDetId == StripSubdetector::TIB) {
23 
25  forward = false;
26  } else if (subDetId== StripSubdetector::TOB ) {
27 
29  forward = false;
30  } else if ( subDetId == StripSubdetector::TID) {
31 
33  theRingNumber = tTopo->tidRing(theDetId);
34  forward = true;
35  } else if ( subDetId == StripSubdetector::TEC ) {
36 
38  theRingNumber = tTopo->tecRing(theDetId);
39  forward = true;
40  } else if ( subDetId == PixelSubdetector::PixelBarrel ) {
41 
43  forward = false;
44  } else if ( subDetId == PixelSubdetector::PixelEndcap ) {
45 
47  forward = true;
48  }
49 }
50 
51 bool
52 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets) const{
53 
54  for(unsigned int i=0; i<theLayersInSets.size(); ++i) {
55  if(theLayersInSets[i][0]==seedingLayer) return true;
56  }
57 
58  return false;
59 }
60 
61 bool
62 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond) const{
63 
64  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
65  if( theLayersInSets[i][0]==seedingLayer &&
66  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer()
67  )
68  return true;
69  }
70  return false;
71 }
72 
73 bool
74 TrajectorySeedHitCandidate::isOnRequestedDet(const std::vector<std::vector<TrackingLayer> >& theLayersInSets, const TrajectorySeedHitCandidate& theSeedHitSecond, const TrajectorySeedHitCandidate& theSeedHitThird) const{
75 
76  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
77  if( theLayersInSets[i][0]==seedingLayer &&
78  theLayersInSets[i][1]==theSeedHitSecond.getTrackingLayer() &&
79  theLayersInSets[i][2]==theSeedHitThird.getTrackingLayer()
80  ) return true;
81  }
82  return false;
83 }
84 
85 
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)
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.
void init(const TrackerTopology *tTopo)
Initialization at construction time.
DetId geographicalId() const
const TrackingLayer & getTrackingLayer() const
unsigned int subDetId() const
The subdet Id.