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
TrackerRecHit Class Reference

#include <TrackerRecHit.h>

Public Member Functions

unsigned int cylinderNumber () const
 The global layer number in the nested cylinder geometry. More...
 
const GeomDetgeomDet () const
 The GeomDet. More...
 
GlobalPoint globalPosition () const
 The global position. More...
 
const GSSiTrackerRecHit2DLocalPoshit () const
 
void init (const TrackerGeometry *theGeometry)
 Initialization at construction time. More...
 
bool isForward () const
 Is it a forward hit ? More...
 
bool isOnRequestedDet (const std::vector< unsigned int > &whichDet, const std::string &seedingAlgo) const
 Check if the hit is on one of the requested detector. More...
 
bool isOnTheSameLayer (const TrackerRecHit &other) const
 Check if two hits are on the same layer of the same subdetector. More...
 
double largerError ()
 
unsigned int layerNumber () const
 The Layer Number. More...
 
double localError ()
 
LocalPoint localPosition () const
 The local position. More...
 
bool makesAPairWith (const TrackerRecHit &anotherHit) const
 Check if a pair is on the proper combination of detectors. More...
 
bool makesAPairWith3rd (const TrackerRecHit &anotherHit) const
 
bool makesATripletWith (const TrackerRecHit &anotherHit, const TrackerRecHit &yetAnotherHit) const
 Check if a triplet is on the proper combination of detectors. More...
 
const SiTrackerGSMatchedRecHit2DmatchedHit () const
 The Hit itself. More...
 
bool operator!= (const TrackerRecHit &aHit) const
 
unsigned int ringNumber () const
 The Ring Number. More...
 
const SiTrackerGSRecHit2DsplitHit () const
 
unsigned int subDetId () const
 The subdet Id. More...
 
 TrackerRecHit ()
 Default Constructor. More...
 
 TrackerRecHit (const SiTrackerGSRecHit2D *theSplitHit, const TrackerRecHit &other)
 Soft Copy Constructor from private members. More...
 
 TrackerRecHit (const SiTrackerGSRecHit2D *theHit, const TrackerGeometry *theGeometry)
 Constructor from a GSRecHit and the Geometry. More...
 
 TrackerRecHit (const SiTrackerGSMatchedRecHit2D *theHit, const TrackerGeometry *theGeometry)
 

Private Attributes

bool forward
 
unsigned int theCylinderNumber
 
const GeomDettheGeomDet
 
double theLargerError
 
unsigned int theLayerNumber
 
double theLocalError
 
const SiTrackerGSMatchedRecHit2DtheMatchedHit
 
unsigned int theRingNumber
 
const SiTrackerGSRecHit2DtheSplitHit
 
unsigned int theSubDetId
 

Detailed Description

A class that gives some properties of the Tracker Layers in FAMOS

Definition at line 25 of file TrackerRecHit.h.

Constructor & Destructor Documentation

TrackerRecHit::TrackerRecHit ( )
inline

Default Constructor.

Definition at line 29 of file TrackerRecHit.h.

29  :
30  theSplitHit(0),
31  theMatchedHit(0),
32  theGeomDet(0),
33  theSubDetId(0),
34  theLayerNumber(0),
35  theRingNumber(0),
37  theLocalError(0.),
38  theLargerError(0.),
39  forward(false) {}
unsigned int theLayerNumber
const SiTrackerGSRecHit2D * theSplitHit
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
const GeomDet * theGeomDet
double theLocalError
TrackerRecHit::TrackerRecHit ( const SiTrackerGSRecHit2D theSplitHit,
const TrackerRecHit other 
)
inline

Soft Copy Constructor from private members.

Definition at line 42 of file TrackerRecHit.h.

43  :
44  theSplitHit(theSplitHit),
45  theMatchedHit(0),
46  theGeomDet(other.geomDet()),
47  theSubDetId(other.subDetId()),
48  theLayerNumber(other.layerNumber()),
49  theRingNumber(other.ringNumber()),
51  theLocalError(0.),
52  theLargerError(0.),
53  forward(other.isForward()) {}
unsigned int theLayerNumber
const SiTrackerGSRecHit2D * theSplitHit
unsigned int cylinderNumber() const
The global layer number in the nested cylinder geometry.
Definition: TrackerRecHit.h:87
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
unsigned int ringNumber() const
The Ring Number.
Definition: TrackerRecHit.h:84
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
const GeomDet * theGeomDet
double theLocalError
bool isForward() const
Is it a forward hit ?
Definition: TrackerRecHit.h:90
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:81
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:78
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:93
TrackerRecHit::TrackerRecHit ( const SiTrackerGSRecHit2D theHit,
const TrackerGeometry theGeometry 
)

Constructor from a GSRecHit and the Geometry.

Definition at line 19 of file TrackerRecHit.cc.

References init().

20  :
21  theSplitHit(theHit),
22  theMatchedHit(0),
23  theSubDetId(0),
24  theLayerNumber(0),
25  theRingNumber(0),
27  theLocalError(0.),
28  theLargerError(0.)
29 
30 {
31  init(theGeometry);
32 }
unsigned int theLayerNumber
const SiTrackerGSRecHit2D * theSplitHit
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
double theLocalError
void init(const TrackerGeometry *theGeometry)
Initialization at construction time.
TrackerRecHit::TrackerRecHit ( const SiTrackerGSMatchedRecHit2D theHit,
const TrackerGeometry theGeometry 
)

Definition at line 4 of file TrackerRecHit.cc.

References init().

5  :
6  theSplitHit(0),
7  theMatchedHit(theHit),
8  theSubDetId(0),
10  theRingNumber(0),
12  theLocalError(0.),
13  theLargerError(0.)
14 
15 {
16  init(theGeometry);
17 }
unsigned int theLayerNumber
const SiTrackerGSRecHit2D * theSplitHit
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
double theLocalError
void init(const TrackerGeometry *theGeometry)
Initialization at construction time.

Member Function Documentation

unsigned int TrackerRecHit::cylinderNumber ( ) const
inline

The global layer number in the nested cylinder geometry.

Definition at line 87 of file TrackerRecHit.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

87 { return theCylinderNumber; }
unsigned int theCylinderNumber
const GeomDet* TrackerRecHit::geomDet ( ) const
inline

The GeomDet.

Definition at line 93 of file TrackerRecHit.h.

References theGeomDet.

Referenced by operator!=().

93 { return theGeomDet; }
const GeomDet * theGeomDet
GlobalPoint TrackerRecHit::globalPosition ( ) const
inline

The global position.

Definition at line 96 of file TrackerRecHit.h.

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

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

96  {
98  }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:78
const GeomDet * theGeomDet
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
LocalPoint localPosition() const
The local position.
const GSSiTrackerRecHit2DLocalPos* TrackerRecHit::hit ( void  ) const
inline
void TrackerRecHit::init ( const TrackerGeometry theGeometry)

Initialization at construction time.

Definition at line 35 of file TrackerRecHit.cc.

References forward, TrackingRecHit::geographicalId(), hit(), TrackerGeometry::idToDet(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerInteractionGeometry::PXB, TrackerInteractionGeometry::PXD, DetId::rawId(), DetId::subdetId(), StripSubdetector::TEC, TrackerInteractionGeometry::TEC, theCylinderNumber, theGeomDet, theLayerNumber, theRingNumber, theSubDetId, StripSubdetector::TIB, TrackerInteractionGeometry::TIB, StripSubdetector::TID, TrackerInteractionGeometry::TID, StripSubdetector::TOB, and TrackerInteractionGeometry::TOB.

Referenced by TrackerRecHit().

35  {
36 
37  const DetId& theDetId = hit()->geographicalId();
38  theGeomDet = theGeometry->idToDet(theDetId);
39  theSubDetId = theDetId.subdetId();
41  TIBDetId tibid(theDetId.rawId());
42  theLayerNumber = tibid.layer();
44  forward = false;
45  } else if ( theSubDetId == StripSubdetector::TOB ) {
46  TOBDetId tobid(theDetId.rawId());
47  theLayerNumber = tobid.layer();
49  forward = false;
50  } else if ( theSubDetId == StripSubdetector::TID) {
51  TIDDetId tidid(theDetId.rawId());
52  theLayerNumber = tidid.wheel();
54  theRingNumber = tidid.ring();
55  forward = true;
56  } else if ( theSubDetId == StripSubdetector::TEC ) {
57  TECDetId tecid(theDetId.rawId());
58  theLayerNumber = tecid.wheel();
60  theRingNumber = tecid.ring();
61  forward = true;
62  } else if ( theSubDetId == PixelSubdetector::PixelBarrel ) {
63  PXBDetId pxbid(theDetId.rawId());
64  theLayerNumber = pxbid.layer();
66  forward = false;
67  } else if ( theSubDetId == PixelSubdetector::PixelEndcap ) {
68  PXFDetId pxfid(theDetId.rawId());
69  theLayerNumber = pxfid.disk();
71  forward = true;
72  }
73 
74 }
unsigned int theLayerNumber
unsigned int layer() const
layer id
Definition: TOBDetId.h:39
unsigned int theCylinderNumber
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
unsigned int theRingNumber
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
unsigned int theSubDetId
const GeomDet * theGeomDet
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
virtual const GeomDet * idToDet(DetId) const
unsigned int disk() const
disk id
Definition: PXFDetId.h:43
Definition: DetId.h:20
unsigned int wheel() const
wheel id
Definition: TECDetId.h:52
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
DetId geographicalId() const
unsigned int wheel() const
wheel id
Definition: TIDDetId.h:50
bool TrackerRecHit::isForward ( ) const
inline

Is it a forward hit ?

Definition at line 90 of file TrackerRecHit.h.

References forward.

Referenced by TrajectorySeedProducer::produce().

90 { return forward; }
bool TrackerRecHit::isOnRequestedDet ( const std::vector< unsigned int > &  whichDet,
const std::string &  seedingAlgo 
) const

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

Definition at line 78 of file TrackerRecHit.cc.

References gather_cfg::cout, theLayerNumber, theRingNumber, and theSubDetId.

Referenced by TrajectorySeedProducer::produce().

78  {
79 
80  bool isOnDet = false;
81 
82  for ( unsigned idet=0; idet<whichDet.size(); ++idet ) {
83 
84  switch ( whichDet[idet] ) {
85 
86  case 1:
87  //Pixel Barrel
88  isOnDet = theSubDetId==1;
89  break;
90 
91  case 2:
92  //Pixel Disks
93  isOnDet = theSubDetId==2;
94  break;
95 
96  case 3:
97  //Inner Barrel
98  isOnDet = theSubDetId==3 && theLayerNumber < 4;
99  break;
100 
101  case 4:
102  //Inner Disks
103  isOnDet = theSubDetId==4 && theRingNumber < 3;
104  break;
105 
106  case 5:
107  //Outer Barrel
108  if(seedingAlgo == "TobTecLayerPairs"){
109  isOnDet = theSubDetId==5 && theLayerNumber <3;
110  }else {
111  isOnDet = false;
112  }
113  break;
114 
115  case 6:
116  //Tracker EndCap
117  if(seedingAlgo == "PixelLessPairs"){
118  isOnDet = theSubDetId==6 && theLayerNumber < 6 && theRingNumber < 3;
119  }else if (seedingAlgo == "TobTecLayerPairs"){
120  // isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber < 5;
121  isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber == 5;
122  } else if (seedingAlgo == "MixedTriplets"){
123  // isOnDet = theSubDetId==6 && theLayerNumber == 2 && theRingNumber == 1;
124  isOnDet = theSubDetId==6 && theLayerNumber < 4 && theRingNumber == 1;
125  } else {
126  isOnDet = theSubDetId==6;
127  std::cout << "DEBUG - this should never happen" << std::endl;
128  }
129 
130  break;
131 
132  default:
133  // Should not happen
134  isOnDet = false;
135  break;
136 
137  }
138 
139  if ( isOnDet ) break;
140 
141  }
142 
143  return isOnDet;
144 }
unsigned int theLayerNumber
unsigned int theRingNumber
unsigned int theSubDetId
tuple cout
Definition: gather_cfg.py:121
bool TrackerRecHit::isOnTheSameLayer ( const TrackerRecHit other) const
inline

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

Definition at line 116 of file TrackerRecHit.h.

References layerNumber(), subDetId(), theLayerNumber, and theSubDetId.

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

116  {
117 
118  return
119  theSubDetId == other.subDetId() &&
120  theLayerNumber == other.layerNumber();
121  }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:81
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:78
double TrackerRecHit::largerError ( )
inline

Definition at line 140 of file TrackerRecHit.h.

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

Referenced by TrajectorySeedProducer::produce().

140  {
141 
142  // Check if it has been already computed
143  if ( theLargerError != 0. ) return theLargerError;
144 
145  // Otherwise, compute it!
146  double xx = hit()->localPositionError().xx();
147  double yy = hit()->localPositionError().yy();
148  double xy = hit()->localPositionError().xy();
149  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
150  theLargerError = 0.5 * (xx+yy+delta);
151  return theLargerError;
152 
153  }
dbl * delta
Definition: mlp_gen.cc:36
float xx() const
Definition: LocalError.h:24
virtual LocalError localPositionError() const
double theLargerError
float xy() const
Definition: LocalError.h:25
float yy() const
Definition: LocalError.h:26
T sqrt(T t)
Definition: SSEVec.h:46
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
unsigned int TrackerRecHit::layerNumber ( ) const
inline
double TrackerRecHit::localError ( )
inline

Definition at line 124 of file TrackerRecHit.h.

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

Referenced by TrackCandidateProducer::produce().

124  {
125 
126  // Check if it has been already computed
127  if ( theLocalError != 0. ) return theLocalError;
128 
129  // Otherwise, compute it!
130  double xx = hit()->localPositionError().xx();
131  double yy = hit()->localPositionError().yy();
132  double xy = hit()->localPositionError().xy();
133  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
134  theLocalError = 0.5 * (xx+yy-delta);
135  return theLocalError;
136 
137  }
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:46
double theLocalError
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
LocalPoint TrackerRecHit::localPosition ( ) const
inline

The local position.

Definition at line 101 of file TrackerRecHit.h.

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

Referenced by globalPosition().

101 { return hit()->localPosition(); }
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
virtual LocalPoint localPosition() const
bool TrackerRecHit::makesAPairWith ( const TrackerRecHit anotherHit) const

Check if a pair is on the proper combination of detectors.

Definition at line 147 of file TrackerRecHit.cc.

References layerNumber(), subDetId(), theLayerNumber, and theSubDetId.

147  {
148 
149  bool isAProperPair = false;
150 
151  unsigned int anotherSubDetId = anotherHit.subDetId();
152  unsigned int anotherLayerNumber = anotherHit.layerNumber();
153  isAProperPair =
154  // First hit on PXB1
155  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
156  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
157  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
158  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
159  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
160  // First hit on PXB2
161  ( ( theSubDetId == 1 && theLayerNumber == 2 ) && (
162  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
163  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
164  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
165  // First Hit on PXD1
166  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
167  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) ) ||
168  // First Hit on PXD2
169  ( ( theSubDetId == 2 && theLayerNumber == 2 ) && (
170  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ||
171  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ) ||
172  // First Hit on TEC1
173  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
174  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
175  // First Hit on TEC2
176  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
177  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
178 
179  //Pixelless Pairs
180  // First Hit on TIB1
181  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
182  (( anotherSubDetId == 3 && anotherLayerNumber == 2 ) ||
183  ( anotherSubDetId == 4 && anotherLayerNumber == 1 )) ) ||
184  // First Hit on TID1
185  ( ( theSubDetId == 4 && theLayerNumber == 1 ) &&
186  ( anotherSubDetId == 4 && anotherLayerNumber == 2 ) ) ||
187  // First Hit on TID2
188  ( ( theSubDetId == 4 && theLayerNumber == 2 ) &&
189  ( anotherSubDetId == 4 && anotherLayerNumber == 3 ) ) ||
190  // First Hit on TID3
191  ( ( theSubDetId == 4 && theLayerNumber == 3 ) &&
192  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ) ||
193  // First Hit on TEC3
194  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
195  ( ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ||
196  ( anotherSubDetId == 6 && anotherLayerNumber == 5 )) ) ||
197  // First Hit on TEC4
198  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
199  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
200 
201  //Tob-Tec pairs
202  //first hit on TOB1
203  ( ( theSubDetId == 5 && theLayerNumber == 1 ) &&
204  (( anotherSubDetId == 5 && anotherLayerNumber == 2 ) ||
205  ( anotherSubDetId == 6 && anotherLayerNumber == 1 )) ) ||
206  // First Hit on TEC1
207  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
208  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
209  // First Hit on TEC2
210  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
211  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
212  // First Hit on TEC3
213  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
214  ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ) ||
215  // ??? ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
216  // First Hit on TEC4
217  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
218  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
219  // First Hit on TEC5
220  ( ( theSubDetId == 6 && theLayerNumber == 5 ) &&
221  ( anotherSubDetId == 6 && anotherLayerNumber == 6 ) ) ||
222  // First Hit on TEC6
223  ( ( theSubDetId == 6 && theLayerNumber == 6 ) &&
224  ( anotherSubDetId == 6 && anotherLayerNumber == 7 ) ) ;
225 
226  return isAProperPair;
227 
228 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:81
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:78
bool TrackerRecHit::makesAPairWith3rd ( const TrackerRecHit anotherHit) const

Definition at line 231 of file TrackerRecHit.cc.

References layerNumber(), subDetId(), theLayerNumber, and theSubDetId.

231  {
232 
233  bool isAProperPair = false;
234 
235  unsigned int anotherSubDetId = anotherHit.subDetId();
236  unsigned int anotherLayerNumber = anotherHit.layerNumber();
237  isAProperPair =
238  // First hit on PXB1
239  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
240  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
241  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ) ) ||
242  // First hit on PXB2
243  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
244  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ) ||
245  // First Hit on PXD1
246  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
247  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ||
248  // First Hit on PXD2
249  ( ( theSubDetId == 2 && theLayerNumber == 2 ) &&
250  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) );
251 
252  return isAProperPair;
253 
254 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:81
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:78
bool TrackerRecHit::makesATripletWith ( const TrackerRecHit anotherHit,
const TrackerRecHit yetAnotherHit 
) const

Check if a triplet is on the proper combination of detectors.

Definition at line 257 of file TrackerRecHit.cc.

References layerNumber(), subDetId(), theLayerNumber, and theSubDetId.

258  {
259 
260  bool isAProperTriplet = false;
261 
262  unsigned int anotherSubDetId = anotherHit.subDetId();
263  unsigned int anotherLayerNumber = anotherHit.layerNumber();
264  unsigned int yetAnotherSubDetId = yetAnotherHit.subDetId();
265  unsigned int yetAnotherLayerNumber = yetAnotherHit.layerNumber();
266  isAProperTriplet =
267  // First hit on PXB1, second on PXB2
268  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
269  ( anotherSubDetId == 1 && anotherLayerNumber == 2) && (
270  ( yetAnotherSubDetId == 1 && yetAnotherLayerNumber == 3) ||
271  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 1) ||
272  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ) ||
273  // First hit on PXB1, second on PXB3
274  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
275  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
276  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
277  // First hit on PXB2, second on PXB3
278  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
279  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
280  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
281  // First Hit on PXB1, second on PXD1
282  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
283  ( anotherSubDetId == 2 && anotherLayerNumber == 1) && (
284  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 2) ||
285  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 1) ||
286  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 2) ) ) ||
287  // First Hit on PXD1, second on PXD2
288  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
289  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) && (
290  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 1 ) ||
291  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 2 ) ) ) ||
292  // First hit on TIB1 (pixel less)
293  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
294  ( anotherSubDetId == 3 && anotherLayerNumber == 2 ) &&
295  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 3 ) );
296 
297  return isAProperTriplet;
298 
299 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:81
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:78
const SiTrackerGSMatchedRecHit2D* TrackerRecHit::matchedHit ( ) const
inline

The Hit itself.

Definition at line 70 of file TrackerRecHit.h.

References theMatchedHit.

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

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

Definition at line 155 of file TrackerRecHit.h.

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

155  {
156  return
157  aHit.geomDet() != this->geomDet() ||
158  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
159  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
160  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
161  }
T y() const
Definition: PV3DBase.h:62
T z() const
Definition: PV3DBase.h:63
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:73
virtual LocalPoint localPosition() const
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:93
T x() const
Definition: PV3DBase.h:61
unsigned int TrackerRecHit::ringNumber ( ) const
inline

The Ring Number.

Definition at line 84 of file TrackerRecHit.h.

References theRingNumber.

Referenced by FastElectronSeedGenerator::run().

84 { return theRingNumber; }
unsigned int theRingNumber
const SiTrackerGSRecHit2D* TrackerRecHit::splitHit ( ) const
inline

Definition at line 71 of file TrackerRecHit.h.

References theSplitHit.

71 { return theSplitHit; }
const SiTrackerGSRecHit2D * theSplitHit
unsigned int TrackerRecHit::subDetId ( ) const
inline

Member Data Documentation

bool TrackerRecHit::forward
private

Definition at line 174 of file TrackerRecHit.h.

Referenced by init(), and isForward().

unsigned int TrackerRecHit::theCylinderNumber
private

Definition at line 171 of file TrackerRecHit.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrackerRecHit::theGeomDet
private

Definition at line 167 of file TrackerRecHit.h.

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

double TrackerRecHit::theLargerError
private

Definition at line 173 of file TrackerRecHit.h.

Referenced by largerError().

unsigned int TrackerRecHit::theLayerNumber
private
double TrackerRecHit::theLocalError
private

Definition at line 172 of file TrackerRecHit.h.

Referenced by localError().

const SiTrackerGSMatchedRecHit2D* TrackerRecHit::theMatchedHit
private

Definition at line 166 of file TrackerRecHit.h.

Referenced by hit(), and matchedHit().

unsigned int TrackerRecHit::theRingNumber
private

Definition at line 170 of file TrackerRecHit.h.

Referenced by init(), isOnRequestedDet(), and ringNumber().

const SiTrackerGSRecHit2D* TrackerRecHit::theSplitHit
private

Definition at line 165 of file TrackerRecHit.h.

Referenced by hit(), and splitHit().

unsigned int TrackerRecHit::theSubDetId
private