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 GSSiTrackerRecHit2DLocalPoshit () const
 
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...
 
const SiTrackerGSMatchedRecHit2DmatchedHit () const
 The Hit itself. More...
 
bool operator!= (const TrajectorySeedHitCandidate &aHit) const
 
unsigned int ringNumber () const
 The Ring Number. More...
 
const SiTrackerGSRecHit2DsplitHit () const
 
unsigned int subDetId () const
 The subdet Id. More...
 
 TrajectorySeedHitCandidate ()
 Default Constructor. More...
 
 TrajectorySeedHitCandidate (const SiTrackerGSRecHit2D *theSplitHit, const TrajectorySeedHitCandidate &other)
 Soft Copy Constructor from private members. More...
 
 TrajectorySeedHitCandidate (const SiTrackerGSRecHit2D *theHit, const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
 Constructor from a GSRecHit and the Geometry. More...
 
 TrajectorySeedHitCandidate (const SiTrackerGSMatchedRecHit2D *theHit, const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
 

Private Attributes

bool forward
 
TrackingLayer seedingLayer
 
unsigned int theCylinderNumber
 
const GeomDettheGeomDet
 
double theLargerError
 
double theLocalError
 
const SiTrackerGSMatchedRecHit2DtheMatchedHit
 
unsigned int theRingNumber
 
const SiTrackerGSRecHit2DtheSplitHit
 

Detailed Description

Definition at line 21 of file TrajectorySeedHitCandidate.h.

Constructor & Destructor Documentation

TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( )
inline

Default Constructor.

Definition at line 25 of file TrajectorySeedHitCandidate.h.

TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const SiTrackerGSRecHit2D theSplitHit,
const TrajectorySeedHitCandidate other 
)
inline

Soft Copy Constructor from private members.

Definition at line 42 of file TrajectorySeedHitCandidate.h.

43  :
44  theSplitHit(theSplitHit),
45  theMatchedHit(0),
46  theGeomDet(other.geomDet()),
48  theRingNumber(other.ringNumber()),
50  theLocalError(0.),
51  theLargerError(0.),
52  forward(other.isForward())
53 
54  {
55 
56  }
unsigned int cylinderNumber() const
The global layer number in the nested cylinder geometry.
bool isForward() const
Is it a forward hit ?
unsigned int ringNumber() const
The Ring Number.
const GeomDet * geomDet() const
The GeomDet.
const SiTrackerGSMatchedRecHit2D * theMatchedHit
const TrackingLayer & getTrackingLayer() const
const SiTrackerGSRecHit2D * theSplitHit
TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const SiTrackerGSRecHit2D theHit,
const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Constructor from a GSRecHit and the Geometry.

Definition at line 21 of file TrajectorySeedHitCandiate.cc.

References init().

23  :
24  theSplitHit(theHit),
25  theMatchedHit(0),
26  theRingNumber(0),
28  theLocalError(0.),
29  theLargerError(0.)
30 
31 {
32  init(theGeometry,tTopo);
33 }
void init(const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
Initialization at construction time.
const SiTrackerGSMatchedRecHit2D * theMatchedHit
const SiTrackerGSRecHit2D * theSplitHit
TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( const SiTrackerGSMatchedRecHit2D theHit,
const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Definition at line 7 of file TrajectorySeedHitCandiate.cc.

References init().

9  :
10  theSplitHit(0),
11  theMatchedHit(theHit),
12  theRingNumber(0),
14  theLocalError(0.),
15  theLargerError(0.)
16 
17 {
18  init(theGeometry, tTopo);
19 }
void init(const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
Initialization at construction time.
const SiTrackerGSMatchedRecHit2D * theMatchedHit
const SiTrackerGSRecHit2D * theSplitHit

Member Function Documentation

unsigned int TrajectorySeedHitCandidate::cylinderNumber ( ) const
inline

The global layer number in the nested cylinder geometry.

Definition at line 98 of file TrajectorySeedHitCandidate.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

const GeomDet* TrajectorySeedHitCandidate::geomDet ( ) const
inline

The GeomDet.

Definition at line 104 of file TrajectorySeedHitCandidate.h.

References theGeomDet.

Referenced by operator!=().

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

The global position.

Definition at line 107 of file TrajectorySeedHitCandidate.h.

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

Referenced by FastPixelHitMatcher::isASeed(), and TrajectorySeedProducer::pass2HitsCuts().

107  {
108  return theGeomDet->surface().toGlobal(hit()->localPosition());
109  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:114
const GSSiTrackerRecHit2DLocalPos * hit() const
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
LocalPoint localPosition() const
The local position.
const GSSiTrackerRecHit2DLocalPos* TrajectorySeedHitCandidate::hit ( ) const
inline
void TrajectorySeedHitCandidate::init ( const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Initialization at construction time.

Definition at line 36 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().

36  {
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 }
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)
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
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 101 of file TrajectorySeedHitCandidate.h.

References forward.

Referenced by TrajectorySeedProducer::pass2HitsCuts().

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 72 of file TrajectorySeedHitCandiate.cc.

References i, and seedingLayer.

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

Definition at line 82 of file TrajectorySeedHitCandiate.cc.

References getTrackingLayer(), i, and seedingLayer.

82  {
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 }
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 94 of file TrajectorySeedHitCandiate.cc.

References getTrackingLayer(), i, and seedingLayer.

94  {
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 }
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 123 of file TrajectorySeedHitCandidate.h.

References seedingLayer.

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

123  {
124 
125  return seedingLayer==other.seedingLayer;
126  }
double TrajectorySeedHitCandidate::largerError ( ) const
inline

Definition at line 146 of file TrajectorySeedHitCandidate.h.

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

Referenced by TrajectorySeedProducer::pass2HitsCuts().

147  {
148 
149  // Check if it has been already computed
150  if ( theLargerError != 0. ) return theLargerError;
151 
152  // Otherwise, compute it!
153  double xx = hit()->localPositionError().xx();
154  double yy = hit()->localPositionError().yy();
155  double xy = hit()->localPositionError().xy();
156  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
157  theLargerError = 0.5 * (xx+yy+delta);
158  return theLargerError;
159 
160  }
dbl * delta
Definition: mlp_gen.cc:36
float xx() const
Definition: LocalError.h:24
const GSSiTrackerRecHit2DLocalPos * hit() const
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
unsigned int TrajectorySeedHitCandidate::layerNumber ( ) const
inline

The Layer Number.

Definition at line 92 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getLayerNumber(), and seedingLayer.

Referenced by TrackCandidateProducer::produce(), and FastElectronSeedGenerator::run().

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

Definition at line 129 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().

130  {
131 
132  // Check if it has been already computed
133  if ( theLocalError != 0. ) return theLocalError;
134 
135  // Otherwise, compute it!
136  double xx = hit()->localPositionError().xx();
137  double yy = hit()->localPositionError().yy();
138  double xy = hit()->localPositionError().xy();
139  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
140  theLocalError = 0.5 * (xx+yy-delta);
141  return theLocalError;
142 
143  }
dbl * delta
Definition: mlp_gen.cc:36
float xx() const
Definition: LocalError.h:24
const GSSiTrackerRecHit2DLocalPos * hit() const
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
LocalPoint TrajectorySeedHitCandidate::localPosition ( ) const
inline

The local position.

Definition at line 112 of file TrajectorySeedHitCandidate.h.

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

Referenced by globalPosition().

112 { return hit()->localPosition(); }
const GSSiTrackerRecHit2DLocalPos * hit() const
virtual LocalPoint localPosition() const
const SiTrackerGSMatchedRecHit2D* TrajectorySeedHitCandidate::matchedHit ( ) const
inline

The Hit itself.

Definition at line 76 of file TrajectorySeedHitCandidate.h.

References theMatchedHit.

76 { return theMatchedHit; }
const SiTrackerGSMatchedRecHit2D * theMatchedHit
bool TrajectorySeedHitCandidate::operator!= ( const TrajectorySeedHitCandidate aHit) const
inline

Definition at line 162 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().

162  {
163  return
164  aHit.geomDet() != this->geomDet() ||
165  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
166  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
167  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
168  }
const GSSiTrackerRecHit2DLocalPos * hit() const
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
const GeomDet * geomDet() const
The GeomDet.
T x() const
Definition: PV3DBase.h:62
virtual LocalPoint localPosition() const
unsigned int TrajectorySeedHitCandidate::ringNumber ( ) const
inline

The Ring Number.

Definition at line 95 of file TrajectorySeedHitCandidate.h.

References theRingNumber.

Referenced by FastElectronSeedGenerator::run().

const SiTrackerGSRecHit2D* TrajectorySeedHitCandidate::splitHit ( ) const
inline

Definition at line 77 of file TrajectorySeedHitCandidate.h.

References theSplitHit.

77 { return theSplitHit; }
const SiTrackerGSRecHit2D * theSplitHit
unsigned int TrajectorySeedHitCandidate::subDetId ( ) const
inline

Member Data Documentation

bool TrajectorySeedHitCandidate::forward
private

Definition at line 180 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and isForward().

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

Definition at line 177 of file TrajectorySeedHitCandidate.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrajectorySeedHitCandidate::theGeomDet
private

Definition at line 174 of file TrajectorySeedHitCandidate.h.

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

double TrajectorySeedHitCandidate::theLargerError
mutableprivate

Definition at line 179 of file TrajectorySeedHitCandidate.h.

Referenced by largerError().

double TrajectorySeedHitCandidate::theLocalError
mutableprivate

Definition at line 178 of file TrajectorySeedHitCandidate.h.

Referenced by localError().

const SiTrackerGSMatchedRecHit2D* TrajectorySeedHitCandidate::theMatchedHit
private

Definition at line 173 of file TrajectorySeedHitCandidate.h.

Referenced by hit(), and matchedHit().

unsigned int TrajectorySeedHitCandidate::theRingNumber
private

Definition at line 176 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and ringNumber().

const SiTrackerGSRecHit2D* TrajectorySeedHitCandidate::theSplitHit
private

Definition at line 172 of file TrajectorySeedHitCandidate.h.

Referenced by hit(), and splitHit().