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 22 of file TrajectorySeedHitCandidate.h.

Constructor & Destructor Documentation

TrajectorySeedHitCandidate::TrajectorySeedHitCandidate ( )
inline

Default Constructor.

Definition at line 26 of file TrajectorySeedHitCandidate.h.

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

Soft Copy Constructor from private members.

Definition at line 43 of file TrajectorySeedHitCandidate.h.

44  :
45  theSplitHit(theSplitHit),
46  theMatchedHit(0),
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 ?
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 99 of file TrajectorySeedHitCandidate.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

const GeomDet* TrajectorySeedHitCandidate::geomDet ( ) const
inline

The GeomDet.

Definition at line 105 of file TrajectorySeedHitCandidate.h.

References theGeomDet.

Referenced by operator!=().

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

The global position.

Definition at line 108 of file TrajectorySeedHitCandidate.h.

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

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

108  {
109  return theGeomDet->surface().toGlobal(hit()->localPosition());
110  }
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 ( void  ) 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 102 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 124 of file TrajectorySeedHitCandidate.h.

References seedingLayer.

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

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

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

148  {
149 
150  // Check if it has been already computed
151  if ( theLargerError != 0. ) return theLargerError;
152 
153  // Otherwise, compute it!
154  double xx = hit()->localPositionError().xx();
155  double yy = hit()->localPositionError().yy();
156  double xy = hit()->localPositionError().xy();
157  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
158  theLargerError = 0.5 * (xx+yy+delta);
159  return theLargerError;
160 
161  }
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 93 of file TrajectorySeedHitCandidate.h.

References TrackingLayer::getLayerNumber(), and seedingLayer.

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

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

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

131  {
132 
133  // Check if it has been already computed
134  if ( theLocalError != 0. ) return theLocalError;
135 
136  // Otherwise, compute it!
137  double xx = hit()->localPositionError().xx();
138  double yy = hit()->localPositionError().yy();
139  double xy = hit()->localPositionError().xy();
140  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
141  theLocalError = 0.5 * (xx+yy-delta);
142  return theLocalError;
143 
144  }
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 113 of file TrajectorySeedHitCandidate.h.

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

Referenced by globalPosition().

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

The Hit itself.

Definition at line 77 of file TrajectorySeedHitCandidate.h.

References theMatchedHit.

Referenced by TrackCandidateProducer::addSplitHits(), and TrackCandidateProducer::produce().

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

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

163  {
164  return
165  aHit.geomDet() != this->geomDet() ||
166  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
167  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
168  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
169  }
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 96 of file TrajectorySeedHitCandidate.h.

References theRingNumber.

Referenced by FastElectronSeedGenerator::run().

const SiTrackerGSRecHit2D* TrajectorySeedHitCandidate::splitHit ( ) const
inline

Definition at line 78 of file TrajectorySeedHitCandidate.h.

References theSplitHit.

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

Member Data Documentation

bool TrajectorySeedHitCandidate::forward
private

Definition at line 181 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and isForward().

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

Definition at line 178 of file TrajectorySeedHitCandidate.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrajectorySeedHitCandidate::theGeomDet
private

Definition at line 175 of file TrajectorySeedHitCandidate.h.

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

double TrajectorySeedHitCandidate::theLargerError
mutableprivate

Definition at line 180 of file TrajectorySeedHitCandidate.h.

Referenced by largerError().

double TrajectorySeedHitCandidate::theLocalError
mutableprivate

Definition at line 179 of file TrajectorySeedHitCandidate.h.

Referenced by localError().

const SiTrackerGSMatchedRecHit2D* TrajectorySeedHitCandidate::theMatchedHit
private

Definition at line 174 of file TrajectorySeedHitCandidate.h.

Referenced by hit(), and matchedHit().

unsigned int TrajectorySeedHitCandidate::theRingNumber
private

Definition at line 177 of file TrajectorySeedHitCandidate.h.

Referenced by init(), and ringNumber().

const SiTrackerGSRecHit2D* TrajectorySeedHitCandidate::theSplitHit
private

Definition at line 173 of file TrajectorySeedHitCandidate.h.

Referenced by hit(), and splitHit().