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, const TrackerTopology *tTopo)
 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 isOnRequestedDet (const std::vector< std::string > &layerList) const
 
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, const TrackerTopology *tTopo)
 Constructor from a GSRecHit and the Geometry. More...
 
 TrackerRecHit (const SiTrackerGSMatchedRecHit2D *theHit, const TrackerGeometry *theGeometry, const TrackerTopology *tTopo)
 

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 23 of file TrackerRecHit.h.

Constructor & Destructor Documentation

TrackerRecHit::TrackerRecHit ( )
inline

Default Constructor.

Definition at line 27 of file TrackerRecHit.h.

27  :
28  theSplitHit(0),
29  theMatchedHit(0),
30  theGeomDet(0),
31  theSubDetId(0),
32  theLayerNumber(0),
33  theRingNumber(0),
35  theLocalError(0.),
36  theLargerError(0.),
37  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 40 of file TrackerRecHit.h.

41  :
42  theSplitHit(theSplitHit),
43  theMatchedHit(0),
44  theGeomDet(other.geomDet()),
45  theSubDetId(other.subDetId()),
46  theLayerNumber(other.layerNumber()),
47  theRingNumber(other.ringNumber()),
49  theLocalError(0.),
50  theLargerError(0.),
51  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:88
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
unsigned int ringNumber() const
The Ring Number.
Definition: TrackerRecHit.h:85
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
const GeomDet * theGeomDet
double theLocalError
bool isForward() const
Is it a forward hit ?
Definition: TrackerRecHit.h:91
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:82
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:79
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:94
TrackerRecHit::TrackerRecHit ( const SiTrackerGSRecHit2D theHit,
const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Constructor from a GSRecHit and the Geometry.

Definition at line 20 of file TrackerRecHit.cc.

References init().

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

Definition at line 4 of file TrackerRecHit.cc.

References init().

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

Member Function Documentation

unsigned int TrackerRecHit::cylinderNumber ( ) const
inline

The global layer number in the nested cylinder geometry.

Definition at line 88 of file TrackerRecHit.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

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

The GeomDet.

Definition at line 94 of file TrackerRecHit.h.

References theGeomDet.

Referenced by operator!=().

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

The global position.

Definition at line 97 of file TrackerRecHit.h.

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

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

97  {
99  }
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:35
const GeomDet * theGeomDet
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
LocalPoint localPosition() const
The local position.
const GSSiTrackerRecHit2DLocalPos* TrackerRecHit::hit ( void  ) const
inline
void TrackerRecHit::init ( const TrackerGeometry theGeometry,
const TrackerTopology tTopo 
)

Initialization at construction time.

Definition at line 37 of file TrackerRecHit.cc.

References forward, TrackingRecHit::geographicalId(), hit(), TrackerGeometry::idToDet(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerInteractionGeometry::PXB, TrackerTopology::pxbLayer(), TrackerInteractionGeometry::PXD, TrackerTopology::pxfDisk(), DetId::subdetId(), StripSubdetector::TEC, TrackerInteractionGeometry::TEC, TrackerTopology::tecRing(), TrackerTopology::tecWheel(), theCylinderNumber, theGeomDet, theLayerNumber, theRingNumber, theSubDetId, StripSubdetector::TIB, TrackerInteractionGeometry::TIB, TrackerTopology::tibLayer(), StripSubdetector::TID, TrackerInteractionGeometry::TID, TrackerTopology::tidRing(), TrackerTopology::tidWheel(), StripSubdetector::TOB, TrackerInteractionGeometry::TOB, and TrackerTopology::tobLayer().

Referenced by TrackerRecHit().

37  {
38 
39  const DetId& theDetId = hit()->geographicalId();
40  theGeomDet = theGeometry->idToDet(theDetId);
41  theSubDetId = theDetId.subdetId();
43 
44  theLayerNumber = tTopo->tibLayer(theDetId);
46  forward = false;
47  } else if ( theSubDetId == StripSubdetector::TOB ) {
48 
49  theLayerNumber = tTopo->tobLayer(theDetId);
51  forward = false;
52  } else if ( theSubDetId == StripSubdetector::TID) {
53 
54  theLayerNumber = tTopo->tidWheel(theDetId);
56  theRingNumber = tTopo->tidRing(theDetId);
57  forward = true;
58  } else if ( theSubDetId == StripSubdetector::TEC ) {
59 
60  theLayerNumber = tTopo->tecWheel(theDetId);
62  theRingNumber = tTopo->tecRing(theDetId);
63  forward = true;
64  } else if ( theSubDetId == PixelSubdetector::PixelBarrel ) {
65 
66  theLayerNumber = tTopo->pxbLayer(theDetId);
68  forward = false;
69  } else if ( theSubDetId == PixelSubdetector::PixelEndcap ) {
70 
71  theLayerNumber = tTopo->pxfDisk(theDetId);
73  forward = true;
74  }
75 
76 }
unsigned int theLayerNumber
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
unsigned int tecRing(const DetId &id) const
ring id
unsigned int tidWheel(const DetId &id) const
unsigned int theCylinderNumber
unsigned int theRingNumber
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 pxbLayer(const DetId &id) const
Definition: DetId.h:20
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
DetId geographicalId() const
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
bool TrackerRecHit::isForward ( ) const
inline

Is it a forward hit ?

Definition at line 91 of file TrackerRecHit.h.

References forward.

Referenced by TrajectorySeedProducer::produce().

91 { 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 169 of file TrackerRecHit.cc.

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

Referenced by TrajectorySeedProducer::produce().

169  {
170 
171  bool isOnDet = false;
172 
173  for ( unsigned idet=0; idet<whichDet.size(); ++idet ) {
174 
175  switch ( whichDet[idet] ) {
176 
177  case 1:
178  //Pixel Barrel
179  isOnDet = theSubDetId==1;
180  break;
181 
182  case 2:
183  //Pixel Disks
184  isOnDet = theSubDetId==2;
185  break;
186 
187  case 3:
188  //Inner Barrel
189  isOnDet = theSubDetId==3 && theLayerNumber < 4;
190  break;
191 
192  case 4:
193  //Inner Disks
194  isOnDet = theSubDetId==4 && theRingNumber < 3;
195  break;
196 
197  case 5:
198  //Outer Barrel
199  if(seedingAlgo == "TobTecLayerPairs"){
200  isOnDet = theSubDetId==5 && theLayerNumber <3;
201  }else {
202  isOnDet = false;
203  }
204  break;
205 
206  case 6:
207  //Tracker EndCap
208  if(seedingAlgo == "PixelLessPairs"){
209  isOnDet = theSubDetId==6 && theLayerNumber < 6 && theRingNumber < 3;
210  }else if (seedingAlgo == "TobTecLayerPairs"){
211  // isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber < 5;
212  isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber == 5;
213  } else if (seedingAlgo == "MixedTriplets"){
214  // isOnDet = theSubDetId==6 && theLayerNumber == 2 && theRingNumber == 1;
215  isOnDet = theSubDetId==6 && theLayerNumber < 4 && theRingNumber == 1;
216  } else {
217  isOnDet = theSubDetId==6;
218  std::cout << "DEBUG - this should never happen" << std::endl;
219  }
220 
221  break;
222 
223  default:
224  // Should not happen
225  isOnDet = false;
226  break;
227 
228  }
229 
230  if ( isOnDet ) break;
231 
232  }
233 
234  return isOnDet;
235 }
unsigned int theLayerNumber
unsigned int theRingNumber
unsigned int theSubDetId
tuple cout
Definition: gather_cfg.py:121
bool TrackerRecHit::isOnRequestedDet ( const std::vector< std::string > &  layerList) const

TEMPORARY, JUST FOR SOME TESTS

http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoTracker/TkSeedingLayers/src/SeedingLayerSetsBuilder.cc?revision=1.13&view=markup

Definition at line 80 of file TrackerRecHit.cc.

References gather_cfg::cout, i, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

80  {
81 
82  std::cout << "layerList.size() = " << layerList.size() << std::endl;
83  bool isOnDet = false;
84 
85  int subdet = 0; // 1 = PXB, 2 = PXD, 3 = TIB, 4 = TID, 5 = TOB, 6 = TEC, 0 = not valid
86  int idLayer = 0;
87  int side = 0; // 0 = barrel, -1 = neg. endcap, +1 = pos. endcap
88 
89  for (unsigned i=0; i<layerList.size();i++) {
91  std::cout << "------- Name = " << name << std::endl;
92 
93  //
94  // BPIX
95  //
96  if (name.substr(0,4) == "BPix") {
97  subdet = 1;
98  idLayer = atoi(name.substr(4,1).c_str());
99  side=0;
100  }
101  //
102  // FPIX
103  //
104  else if (name.substr(0,4) == "FPix") {
105  subdet = 2;
106  idLayer = atoi(name.substr(4,1).c_str());
107  if ( name.find("pos") != std::string::npos ) {
108  side = +1;
109  } else {
110  side = -1;
111  }
112  }
113  //
114  // TIB
115  //
116  else if (name.substr(0,3) == "TIB") {
117  subdet = 3;
118  idLayer = atoi(name.substr(3,1).c_str());
119  side=0;
120  }
121  //
122  // TID
123  //
124  else if (name.substr(0,3) == "TID") {
125  subdet = 4;
126  idLayer = atoi(name.substr(3,1).c_str());
127  if ( name.find("pos") !=std::string::npos ) {
128  side = +1;
129  } else {
130  side = -1;
131  }
132  }
133  //
134  // TOB
135  //
136  else if (name.substr(0,3) == "TOB") {
137  subdet = 5;
138  idLayer = atoi(name.substr(3,1).c_str());
139  side = 0;
140  }
141  //
142  // TEC
143  //
144  else if (name.substr(0,3) == "TEC") {
145  subdet = 6;
146  idLayer = atoi(name.substr(3,1).c_str());
147  if ( name.find("pos") != std::string::npos ) {
148  side = +1;
149  } else {
150  side = -1;
151  }
152  }
153 
154  std::cout << "subdet = " << subdet << std::endl;
155  std::cout << "idLayer = " << idLayer << std::endl;
156  std::cout << "side = " << side << std::endl;
157 
158  }
159 
161 
162 
163 
164  return isOnDet;
165 }
int i
Definition: DBlmapReader.cc:9
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 118 of file TrackerRecHit.h.

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

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

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

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

142  {
143 
144  // Check if it has been already computed
145  if ( theLargerError != 0. ) return theLargerError;
146 
147  // Otherwise, compute it!
148  double xx = hit()->localPositionError().xx();
149  double yy = hit()->localPositionError().yy();
150  double xy = hit()->localPositionError().xy();
151  double delta = std::sqrt((xx-yy)*(xx-yy)+4.*xy*xy);
152  theLargerError = 0.5 * (xx+yy+delta);
153  return theLargerError;
154 
155  }
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:48
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
unsigned int TrackerRecHit::layerNumber ( ) const
inline
double TrackerRecHit::localError ( )
inline

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

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

The local position.

Definition at line 102 of file TrackerRecHit.h.

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

Referenced by globalPosition().

102 { return hit()->localPosition(); }
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
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 238 of file TrackerRecHit.cc.

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

238  {
239 
240  bool isAProperPair = false;
241 
242  unsigned int anotherSubDetId = anotherHit.subDetId();
243  unsigned int anotherLayerNumber = anotherHit.layerNumber();
244  isAProperPair =
245  // First hit on PXB1
246  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
247  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
248  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
249  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
250  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
251  // First hit on PXB2
252  ( ( theSubDetId == 1 && theLayerNumber == 2 ) && (
253  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
254  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
255  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
256  // First Hit on PXD1
257  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
258  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) ) ||
259  // First Hit on PXD2
260  ( ( theSubDetId == 2 && theLayerNumber == 2 ) && (
261  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ||
262  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ) ||
263  // First Hit on TEC1
264  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
265  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
266  // First Hit on TEC2
267  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
268  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
269 
270  //Pixelless Pairs
271  // First Hit on TIB1
272  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
273  (( anotherSubDetId == 3 && anotherLayerNumber == 2 ) ||
274  ( anotherSubDetId == 4 && anotherLayerNumber == 1 )) ) ||
275  // First Hit on TID1
276  ( ( theSubDetId == 4 && theLayerNumber == 1 ) &&
277  ( anotherSubDetId == 4 && anotherLayerNumber == 2 ) ) ||
278  // First Hit on TID2
279  ( ( theSubDetId == 4 && theLayerNumber == 2 ) &&
280  ( anotherSubDetId == 4 && anotherLayerNumber == 3 ) ) ||
281  // First Hit on TID3
282  ( ( theSubDetId == 4 && theLayerNumber == 3 ) &&
283  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ) ||
284  // First Hit on TEC3
285  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
286  ( ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ||
287  ( anotherSubDetId == 6 && anotherLayerNumber == 5 )) ) ||
288  // First Hit on TEC4
289  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
290  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
291 
292  //Tob-Tec pairs
293  //first hit on TOB1
294  ( ( theSubDetId == 5 && theLayerNumber == 1 ) &&
295  (( anotherSubDetId == 5 && anotherLayerNumber == 2 ) ||
296  ( anotherSubDetId == 6 && anotherLayerNumber == 1 )) ) ||
297  // First Hit on TEC1
298  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
299  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
300  // First Hit on TEC2
301  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
302  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
303  // First Hit on TEC3
304  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
305  ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ) ||
306  // ??? ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
307  // First Hit on TEC4
308  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
309  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
310  // First Hit on TEC5
311  ( ( theSubDetId == 6 && theLayerNumber == 5 ) &&
312  ( anotherSubDetId == 6 && anotherLayerNumber == 6 ) ) ||
313  // First Hit on TEC6
314  ( ( theSubDetId == 6 && theLayerNumber == 6 ) &&
315  ( anotherSubDetId == 6 && anotherLayerNumber == 7 ) ) ;
316 
317  return isAProperPair;
318 
319 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:82
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:79
bool TrackerRecHit::makesAPairWith3rd ( const TrackerRecHit anotherHit) const

Definition at line 322 of file TrackerRecHit.cc.

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

322  {
323 
324  bool isAProperPair = false;
325 
326  unsigned int anotherSubDetId = anotherHit.subDetId();
327  unsigned int anotherLayerNumber = anotherHit.layerNumber();
328  isAProperPair =
329  // First hit on PXB1
330  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
331  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
332  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ) ) ||
333  // First hit on PXB2
334  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
335  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ) ||
336  // First Hit on PXD1
337  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
338  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ||
339  // First Hit on PXD2
340  ( ( theSubDetId == 2 && theLayerNumber == 2 ) &&
341  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) );
342 
343  return isAProperPair;
344 
345 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:82
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:79
bool TrackerRecHit::makesATripletWith ( const TrackerRecHit anotherHit,
const TrackerRecHit yetAnotherHit 
) const

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

Definition at line 348 of file TrackerRecHit.cc.

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

349  {
350 
351  bool isAProperTriplet = false;
352 
353  unsigned int anotherSubDetId = anotherHit.subDetId();
354  unsigned int anotherLayerNumber = anotherHit.layerNumber();
355  unsigned int yetAnotherSubDetId = yetAnotherHit.subDetId();
356  unsigned int yetAnotherLayerNumber = yetAnotherHit.layerNumber();
357  isAProperTriplet =
358  // First hit on PXB1, second on PXB2
359  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
360  ( anotherSubDetId == 1 && anotherLayerNumber == 2) && (
361  ( yetAnotherSubDetId == 1 && yetAnotherLayerNumber == 3) ||
362  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 1) ||
363  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ) ||
364  // First hit on PXB1, second on PXB3
365  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
366  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
367  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
368  // First hit on PXB2, second on PXB3
369  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
370  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
371  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
372  // First Hit on PXB1, second on PXD1
373  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
374  ( anotherSubDetId == 2 && anotherLayerNumber == 1) && (
375  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 2) ||
376  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 1) ||
377  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 2) ) ) ||
378  // First Hit on PXD1, second on PXD2
379  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
380  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) && (
381  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 1 ) ||
382  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 2 ) ) ) ||
383  // First hit on TIB1 (pixel less)
384  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
385  ( anotherSubDetId == 3 && anotherLayerNumber == 2 ) &&
386  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 3 ) );
387 
388  return isAProperTriplet;
389 
390 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:82
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:79
const SiTrackerGSMatchedRecHit2D* TrackerRecHit::matchedHit ( ) const
inline

The Hit itself.

Definition at line 71 of file TrackerRecHit.h.

References theMatchedHit.

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

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

Definition at line 157 of file TrackerRecHit.h.

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

157  {
158  return
159  aHit.geomDet() != this->geomDet() ||
160  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
161  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
162  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
163  }
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:74
virtual LocalPoint localPosition() const
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:94
unsigned int TrackerRecHit::ringNumber ( ) const
inline

The Ring Number.

Definition at line 85 of file TrackerRecHit.h.

References theRingNumber.

Referenced by FastElectronSeedGenerator::run().

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

Definition at line 72 of file TrackerRecHit.h.

References theSplitHit.

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

Member Data Documentation

bool TrackerRecHit::forward
private

Definition at line 176 of file TrackerRecHit.h.

Referenced by init(), and isForward().

unsigned int TrackerRecHit::theCylinderNumber
private

Definition at line 173 of file TrackerRecHit.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrackerRecHit::theGeomDet
private

Definition at line 169 of file TrackerRecHit.h.

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

double TrackerRecHit::theLargerError
private

Definition at line 175 of file TrackerRecHit.h.

Referenced by largerError().

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

Definition at line 174 of file TrackerRecHit.h.

Referenced by localError().

const SiTrackerGSMatchedRecHit2D* TrackerRecHit::theMatchedHit
private

Definition at line 168 of file TrackerRecHit.h.

Referenced by hit(), and matchedHit().

unsigned int TrackerRecHit::theRingNumber
private

Definition at line 172 of file TrackerRecHit.h.

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

const SiTrackerGSRecHit2D* TrackerRecHit::theSplitHit
private

Definition at line 167 of file TrackerRecHit.h.

Referenced by hit(), and splitHit().

unsigned int TrackerRecHit::theSubDetId
private