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 GeomDetgeomDet () const
 The GeomDet. More...
 
const TrackingLayergetTrackingLayer () const
 
GlobalPoint globalPosition () const
 The global position. More...
 
const FastTrackerRecHithit () const
 The Hit itself. More...
 
void init (const TrackerGeometry *theGeometry, 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...
 
double largerError () const
 
unsigned int layerNumber () const
 The Layer Number. More...
 
double localError () const
 
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 TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
 Constructor from a GSRecHit and the Geometry. More...
 

Private Attributes

bool forward
 
TrackingLayer seedingLayer
 
unsigned int theCylinderNumber
 
const GeomDettheGeomDet
 
const FastTrackerRecHittheHit
 
double theLargerError
 
double theLocalError
 
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.

TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const FastTrackerRecHit hit,
const TrajectorySeedHitCandidate other 
)
inline

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

Definition at line 44 of file TrajectorySeedHitCandidate.h.

45  :
46  theHit(hit),
47  theGeomDet(other.geomDet()),
49  theRingNumber(other.ringNumber()),
51  theLocalError(0.),
52  theLargerError(0.),
53  forward(other.isForward())
54 
55  {
56 
57  }
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 GeomDet * geomDet() const
The GeomDet.
const TrackingLayer & getTrackingLayer() const
TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const FastTrackerRecHit hit,
const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Constructor from a GSRecHit and the Geometry.

Definition at line 7 of file TrajectorySeedHitCandiate.cc.

References init().

9  :
10  theHit(hit),
11  theRingNumber(0),
13  theLocalError(0.),
14  theLargerError(0.)
15 
16 {
17  init(theGeometry, tTopo);
18 }
void init(const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
Initialization at construction time.
const FastTrackerRecHit * theHit

Member Function Documentation

unsigned int TrajectorySeedHitCandidate::cylinderNumber ( ) const
inline

The global layer number in the nested cylinder geometry.

Definition at line 86 of file TrajectorySeedHitCandidate.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

const GeomDet* TrajectorySeedHitCandidate::geomDet ( ) const
inline

The GeomDet.

Definition at line 92 of file TrajectorySeedHitCandidate.h.

References theGeomDet.

Referenced by operator!=().

92 { return theGeomDet; }
const TrackingLayer& TrajectorySeedHitCandidate::getTrackingLayer ( ) const
inline
GlobalPoint TrajectorySeedHitCandidate::globalPosition ( ) const
inline

The global position.

Definition at line 95 of file TrajectorySeedHitCandidate.h.

References hit(), localPosition(), GeomDet::surface(), theGeomDet, and Surface::toGlobal().

Referenced by FastPixelHitMatcher::isASeed().

95  {
97  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
LocalPoint localPosition() const
The local position.
const FastTrackerRecHit * hit() const
The Hit itself.
const FastTrackerRecHit* TrajectorySeedHitCandidate::hit ( ) const
inline
void TrajectorySeedHitCandidate::init ( const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Initialization at construction time.

Definition at line 21 of file TrajectorySeedHitCandiate.cc.

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

Referenced by TrajectorySeedHitCandidate().

21  {
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 }
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.
virtual const TrackerGeomDet * idToDet(DetId) const
bool TrajectorySeedHitCandidate::isForward ( ) const
inline

Is it a forward hit ?

Definition at line 89 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 57 of file TrajectorySeedHitCandiate.cc.

References i, and seedingLayer.

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

Definition at line 67 of file TrajectorySeedHitCandiate.cc.

References getTrackingLayer(), i, and seedingLayer.

67  {
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 }
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 79 of file TrajectorySeedHitCandiate.cc.

References getTrackingLayer(), i, and seedingLayer.

79  {
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 }
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 111 of file TrajectorySeedHitCandidate.h.

References seedingLayer.

Referenced by FastPixelHitMatcher::isASeed(), TrackCandidateProducer::produce(), and TrajectorySeedProducer::produce().

111  {
112 
113  return seedingLayer==other.seedingLayer;
114  }
double TrajectorySeedHitCandidate::largerError ( ) const
inline

Definition at line 134 of file TrajectorySeedHitCandidate.h.

References delta, hit(), BaseTrackerRecHit::localPositionError(), mathSSE::sqrt(), theLargerError, LocalError::xx(), LocalError::xy(), create_public_lumi_plots::xy, and LocalError::yy().

135  {
136 
137  // Check if it has been already computed
138  if ( theLargerError != 0. ) return theLargerError;
139 
140  // Otherwise, compute it!
141  double xx = hit()->localPositionError().xx();
142  double yy = hit()->localPositionError().yy();
143  double xy = hit()->localPositionError().xy();
144  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
145  theLargerError = 0.5 * (xx+yy+delta);
146  return theLargerError;
147 
148  }
dbl * delta
Definition: mlp_gen.cc:36
float xx() const
Definition: LocalError.h:24
virtual LocalError localPositionError() const
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:48
const FastTrackerRecHit * hit() const
The Hit itself.
unsigned int TrajectorySeedHitCandidate::layerNumber ( ) const
inline

The Layer Number.

Definition at line 80 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getLayerNumber(), and seedingLayer.

Referenced by TrackCandidateProducer::produce().

80 { return seedingLayer.getLayerNumber(); }
unsigned int getLayerNumber() const
Definition: TrackingLayer.h:85
double TrajectorySeedHitCandidate::localError ( ) const
inline

Definition at line 117 of file TrajectorySeedHitCandidate.h.

References delta, hit(), BaseTrackerRecHit::localPositionError(), mathSSE::sqrt(), theLocalError, LocalError::xx(), LocalError::xy(), create_public_lumi_plots::xy, and LocalError::yy().

Referenced by TrackCandidateProducer::produce().

118  {
119 
120  // Check if it has been already computed
121  if ( theLocalError != 0. ) return theLocalError;
122 
123  // Otherwise, compute it!
124  double xx = hit()->localPositionError().xx();
125  double yy = hit()->localPositionError().yy();
126  double xy = hit()->localPositionError().xy();
127  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
128  theLocalError = 0.5 * (xx+yy-delta);
129  return theLocalError;
130 
131  }
dbl * delta
Definition: mlp_gen.cc:36
float xx() const
Definition: LocalError.h:24
virtual LocalError localPositionError() const
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:48
const FastTrackerRecHit * hit() const
The Hit itself.
LocalPoint TrajectorySeedHitCandidate::localPosition ( ) const
inline

The local position.

Definition at line 100 of file TrajectorySeedHitCandidate.h.

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

Referenced by globalPosition().

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

Definition at line 150 of file TrajectorySeedHitCandidate.h.

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

150  {
151  return
152  aHit.geomDet() != this->geomDet() ||
153  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
154  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
155  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
156  }
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
const GeomDet * geomDet() const
The GeomDet.
const FastTrackerRecHit * hit() const
The Hit itself.
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const
unsigned int TrajectorySeedHitCandidate::ringNumber ( ) const
inline

The Ring Number.

Definition at line 83 of file TrajectorySeedHitCandidate.h.

References theRingNumber.

unsigned int TrajectorySeedHitCandidate::subDetId ( ) const
inline

The subdet Id.

Definition at line 77 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getSubDetNumber(), and seedingLayer.

Referenced by init(), FastPixelHitMatcher::isASeed(), and TrackCandidateProducer::produce().

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

Member Data Documentation

bool TrajectorySeedHitCandidate::forward
private

Definition at line 169 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and isForward().

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

Definition at line 166 of file TrajectorySeedHitCandidate.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrajectorySeedHitCandidate::theGeomDet
private

Definition at line 163 of file TrajectorySeedHitCandidate.h.

Referenced by geomDet(), globalPosition(), and init().

const FastTrackerRecHit* TrajectorySeedHitCandidate::theHit
private

Definition at line 162 of file TrajectorySeedHitCandidate.h.

Referenced by hit().

double TrajectorySeedHitCandidate::theLargerError
mutableprivate

Definition at line 168 of file TrajectorySeedHitCandidate.h.

Referenced by largerError().

double TrajectorySeedHitCandidate::theLocalError
mutableprivate

Definition at line 167 of file TrajectorySeedHitCandidate.h.

Referenced by localError().

unsigned int TrajectorySeedHitCandidate::theRingNumber
private

Definition at line 165 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and ringNumber().