CMS 3D CMS Logo

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

#include <TrajectorySeedHitCandidate.h>

Public Member Functions

unsigned int cylinderNumber () const
 The global layer number in the nested cylinder geometry. More...
 
const TrackingLayergetTrackingLayer () const
 
const FastTrackerRecHithit () const
 The Hit itself. More...
 
void init (const TrackerTopology *tTopo)
 Initialization at construction time. More...
 
bool isForward () const
 Is it a forward hit ? More...
 
bool isOnRequestedDet (const std::vector< std::vector< TrackingLayer > > &theLayersInSets) const
 Check if the hit is on one of the requested detector. More...
 
bool isOnRequestedDet (const std::vector< std::vector< TrackingLayer > > &theLayersInSets, const TrajectorySeedHitCandidate &theSeedHitSecond) const
 
bool isOnRequestedDet (const std::vector< std::vector< TrackingLayer > > &theLayersInSets, const TrajectorySeedHitCandidate &theSeedHitSecond, const TrajectorySeedHitCandidate &theSeedHitThird) const
 
bool isOnTheSameLayer (const TrajectorySeedHitCandidate &other) const
 Check if two hits are on the same layer of the same subdetector. More...
 
unsigned int layerNumber () const
 The Layer Number. More...
 
LocalPoint localPosition () const
 The local position. More...
 
bool operator!= (const TrajectorySeedHitCandidate &aHit) const
 
unsigned int ringNumber () const
 The Ring Number. More...
 
unsigned int subDetId () const
 The subdet Id. More...
 
 TrajectorySeedHitCandidate ()
 Default Constructor. More...
 
 TrajectorySeedHitCandidate (const FastTrackerRecHit *hit, const TrajectorySeedHitCandidate &other)
 
 TrajectorySeedHitCandidate (const FastTrackerRecHit *hit, const TrackerTopology *tTopo)
 Constructor from a FastTrackerRecHit and topology. More...
 

Private Attributes

bool forward
 
TrackingLayer seedingLayer
 
unsigned int theCylinderNumber
 
const FastTrackerRecHittheHit
 
unsigned int theRingNumber
 

Detailed Description

Definition at line 24 of file TrajectorySeedHitCandidate.h.

Constructor & Destructor Documentation

TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( )
inline

Default Constructor.

Definition at line 28 of file TrajectorySeedHitCandidate.h.

28  :
29  theHit(0),
30  seedingLayer(),
31  theRingNumber(0),
33  forward(false)
34 
35  {
36 
37  }
const FastTrackerRecHit * theHit
TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const FastTrackerRecHit hit,
const TrajectorySeedHitCandidate other 
)
inline

Soft Copy Constructor from private members lv: do we need this one?

Definition at line 41 of file TrajectorySeedHitCandidate.h.

42  :
43  theHit(hit),
45  theRingNumber(other.ringNumber()),
47  forward(other.isForward())
48 
49  {
50 
51  }
unsigned int cylinderNumber() const
The global layer number in the nested cylinder geometry.
bool isForward() const
Is it a forward hit ?
const FastTrackerRecHit * theHit
unsigned int ringNumber() const
The Ring Number.
const TrackingLayer & getTrackingLayer() const
TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const FastTrackerRecHit hit,
const TrackerTopology tTopo 
)

Constructor from a FastTrackerRecHit and topology.

Definition at line 7 of file TrajectorySeedHitCandidate.cc.

References init().

8  :
9  theHit(hit),
10  theRingNumber(0),
12 {
13  init(tTopo);
14 }
const FastTrackerRecHit * theHit
void init(const TrackerTopology *tTopo)
Initialization at construction time.

Member Function Documentation

unsigned int TrajectorySeedHitCandidate::cylinderNumber ( ) const
inline

The global layer number in the nested cylinder geometry.

Definition at line 78 of file TrajectorySeedHitCandidate.h.

References theCylinderNumber.

const TrackingLayer& TrajectorySeedHitCandidate::getTrackingLayer ( ) const
inline
const FastTrackerRecHit* TrajectorySeedHitCandidate::hit ( ) const
inline

The Hit itself.

Definition at line 61 of file TrajectorySeedHitCandidate.h.

References theHit.

Referenced by init(), SeedFinder::insertHit(), localPosition(), operator!=(), and FastTSGFromPropagation::trackerSeeds().

61 { return theHit; }
const FastTrackerRecHit * theHit
void TrajectorySeedHitCandidate::init ( const TrackerTopology tTopo)

Initialization at construction time.

Definition at line 17 of file TrajectorySeedHitCandidate.cc.

References TrackingLayer::createFromDetId(), forward, TrackingRecHit::geographicalId(), TrackingLayer::getLayerNumber(), hit(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerInteractionGeometry::PXB, TrackerInteractionGeometry::PXD, seedingLayer, DetId::subdetId(), subDetId(), StripSubdetector::TEC, TrackerInteractionGeometry::TEC, TrackerTopology::tecRing(), theCylinderNumber, theRingNumber, StripSubdetector::TIB, TrackerInteractionGeometry::TIB, StripSubdetector::TID, TrackerInteractionGeometry::TID, TrackerTopology::tidRing(), StripSubdetector::TOB, and TrackerInteractionGeometry::TOB.

Referenced by TrajectorySeedHitCandidate().

17  {
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 }
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
Definition: DetId.h:18
const FastTrackerRecHit * hit() const
The Hit itself.
DetId geographicalId() const
unsigned int subDetId() const
The subdet Id.
bool TrajectorySeedHitCandidate::isForward ( ) const
inline

Is it a forward hit ?

Definition at line 81 of file TrajectorySeedHitCandidate.h.

References forward.

bool TrajectorySeedHitCandidate::isOnRequestedDet ( const std::vector< std::vector< TrackingLayer > > &  theLayersInSets) const

Check if the hit is on one of the requested detector.

request check with 1, 2 and 3 seeds

Definition at line 52 of file TrajectorySeedHitCandidate.cc.

References i, and seedingLayer.

52  {
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 }
int i
Definition: DBlmapReader.cc:9
bool TrajectorySeedHitCandidate::isOnRequestedDet ( const std::vector< std::vector< TrackingLayer > > &  theLayersInSets,
const TrajectorySeedHitCandidate theSeedHitSecond 
) const

Definition at line 62 of file TrajectorySeedHitCandidate.cc.

References getTrackingLayer(), i, and seedingLayer.

62  {
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 }
int i
Definition: DBlmapReader.cc:9
const TrackingLayer & getTrackingLayer() const
bool TrajectorySeedHitCandidate::isOnRequestedDet ( const std::vector< std::vector< TrackingLayer > > &  theLayersInSets,
const TrajectorySeedHitCandidate theSeedHitSecond,
const TrajectorySeedHitCandidate theSeedHitThird 
) const

Definition at line 74 of file TrajectorySeedHitCandidate.cc.

References getTrackingLayer(), i, and seedingLayer.

74  {
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 }
int i
Definition: DBlmapReader.cc:9
const TrackingLayer & getTrackingLayer() const
bool TrajectorySeedHitCandidate::isOnTheSameLayer ( const TrajectorySeedHitCandidate other) const
inline

Check if two hits are on the same layer of the same subdetector.

Definition at line 95 of file TrajectorySeedHitCandidate.h.

References seedingLayer.

95  {
96 
97  return seedingLayer==other.seedingLayer;
98  }
unsigned int TrajectorySeedHitCandidate::layerNumber ( ) const
inline

The Layer Number.

Definition at line 72 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getLayerNumber(), and seedingLayer.

72 { return seedingLayer.getLayerNumber(); }
unsigned int getLayerNumber() const
Definition: TrackingLayer.h:85
LocalPoint TrajectorySeedHitCandidate::localPosition ( ) const
inline

The local position.

Definition at line 84 of file TrajectorySeedHitCandidate.h.

References hit(), and BaseTrackerRecHit::localPosition().

84 { return hit()->localPosition(); }
const FastTrackerRecHit * hit() const
The Hit itself.
virtual LocalPoint localPosition() const final
bool TrajectorySeedHitCandidate::operator!= ( const TrajectorySeedHitCandidate aHit) const
inline

Definition at line 100 of file TrajectorySeedHitCandidate.h.

References hit(), BaseTrackerRecHit::localPosition(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

100  {
101  return
102  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
103  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
104  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
105  }
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
const FastTrackerRecHit * hit() const
The Hit itself.
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const final
unsigned int TrajectorySeedHitCandidate::ringNumber ( ) const
inline

The Ring Number.

Definition at line 75 of file TrajectorySeedHitCandidate.h.

References theRingNumber.

unsigned int TrajectorySeedHitCandidate::subDetId ( ) const
inline

The subdet Id.

Definition at line 69 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getSubDetNumber(), and seedingLayer.

Referenced by init().

69 { return seedingLayer.getSubDetNumber(); }
unsigned int getSubDetNumber() const
Definition: TrackingLayer.h:75

Member Data Documentation

bool TrajectorySeedHitCandidate::forward
private

Definition at line 115 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and isForward().

TrackingLayer TrajectorySeedHitCandidate::seedingLayer
private
unsigned int TrajectorySeedHitCandidate::theCylinderNumber
private

Definition at line 114 of file TrajectorySeedHitCandidate.h.

Referenced by cylinderNumber(), and init().

const FastTrackerRecHit* TrajectorySeedHitCandidate::theHit
private

Definition at line 111 of file TrajectorySeedHitCandidate.h.

Referenced by hit().

unsigned int TrajectorySeedHitCandidate::theRingNumber
private

Definition at line 113 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and ringNumber().