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::vector< TrajectorySeedProducer::LayerSpec > > &theLayersInSets) const
 request check with 1, 2 and 3 seeds More...
 
bool isOnRequestedDet (const std::vector< std::vector< TrajectorySeedProducer::LayerSpec > > &theLayersInSets, const TrackerRecHit &theSeedHitSecond) const
 
bool isOnRequestedDet (const std::vector< std::vector< TrajectorySeedProducer::LayerSpec > > &theLayersInSets, const TrackerRecHit &theSeedHitSecond, const TrackerRecHit &theSeedHitThird) 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 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:90
const SiTrackerGSMatchedRecHit2D * theMatchedHit
unsigned int theCylinderNumber
unsigned int ringNumber() const
The Ring Number.
Definition: TrackerRecHit.h:87
double theLargerError
unsigned int theRingNumber
unsigned int theSubDetId
const GeomDet * theGeomDet
double theLocalError
bool isForward() const
Is it a forward hit ?
Definition: TrackerRecHit.h:93
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:96
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 90 of file TrackerRecHit.h.

References theCylinderNumber.

Referenced by FastPixelHitMatcher::isASeed().

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

The GeomDet.

Definition at line 96 of file TrackerRecHit.h.

References theGeomDet.

Referenced by operator!=().

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

The global position.

Definition at line 99 of file TrackerRecHit.h.

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

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

99  {
100  return theGeomDet->surface().toGlobal(hit()->localPosition());
101  }
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:76
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:37
virtual const GeomDet * idToDet(DetId) const
unsigned int pxbLayer(const DetId &id) const
Definition: DetId.h:18
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:76
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 93 of file TrackerRecHit.h.

References forward.

Referenced by TrajectorySeedProducer::produce().

93 { 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 114 of file TrackerRecHit.cc.

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

Referenced by TrajectorySeedProducer::produce().

114  {
115 
116  bool isOnDet = false;
117 
118  for ( unsigned idet=0; idet<whichDet.size(); ++idet ) {
119 
120  switch ( whichDet[idet] ) {
121 
122  case 1:
123  //Pixel Barrel
124  isOnDet = theSubDetId==1;
125  break;
126 
127  case 2:
128  //Pixel Disks
129  isOnDet = theSubDetId==2;
130  break;
131 
132  case 3:
133  //Inner Barrel
134  isOnDet = theSubDetId==3 && theLayerNumber < 4;
135  break;
136 
137  case 4:
138  //Inner Disks
139  isOnDet = theSubDetId==4 && theRingNumber < 3;
140  break;
141 
142  case 5:
143  //Outer Barrel
144  if(seedingAlgo == "TobTecLayerPairs"){
145  isOnDet = theSubDetId==5 && theLayerNumber <3;
146  }else {
147  isOnDet = false;
148  }
149  break;
150 
151  case 6:
152  //Tracker EndCap
153  if(seedingAlgo == "PixelLessPairs"){
154  isOnDet = theSubDetId==6 && theLayerNumber < 6 && theRingNumber < 3;
155  }else if (seedingAlgo == "TobTecLayerPairs"){
156  // isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber < 5;
157  isOnDet = theSubDetId==6 && theLayerNumber < 8 && theRingNumber == 5;
158  } else if (seedingAlgo == "MixedTriplets"){
159  // isOnDet = theSubDetId==6 && theLayerNumber == 2 && theRingNumber == 1;
160  isOnDet = theSubDetId==6 && theLayerNumber < 4 && theRingNumber == 1;
161  } else {
162  isOnDet = theSubDetId==6;
163  std::cout << "DEBUG - this should never happen" << std::endl;
164  }
165 
166  break;
167 
168  default:
169  // Should not happen
170  isOnDet = false;
171  break;
172 
173  }
174 
175  if ( isOnDet ) break;
176 
177  }
178 
179  return isOnDet;
180 }
unsigned int theLayerNumber
unsigned int theRingNumber
unsigned int theSubDetId
tuple cout
Definition: gather_cfg.py:121
bool TrackerRecHit::isOnRequestedDet ( const std::vector< std::vector< TrajectorySeedProducer::LayerSpec > > &  theLayersInSets) const

request check with 1, 2 and 3 seeds

Definition at line 79 of file TrackerRecHit.cc.

References i, theLayerNumber, and theSubDetId.

79  {
80 
81  for(unsigned int i=0; i<theLayersInSets.size(); ++i) {
82  if(theLayersInSets[i][0].subDet==theSubDetId && theLayersInSets[i][0].idLayer==theLayerNumber) return true;
83  }
84 
85  return false;
86 }
int i
Definition: DBlmapReader.cc:9
unsigned int theLayerNumber
unsigned int theSubDetId
bool TrackerRecHit::isOnRequestedDet ( const std::vector< std::vector< TrajectorySeedProducer::LayerSpec > > &  theLayersInSets,
const TrackerRecHit theSeedHitSecond 
) const

Definition at line 89 of file TrackerRecHit.cc.

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

89  {
90 
91  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
92  if( theLayersInSets[i][0].subDet==theSubDetId && theLayersInSets[i][0].idLayer==theLayerNumber &&
93  theLayersInSets[i][1].subDet==theSeedHitSecond.subDetId() && theLayersInSets[i][1].idLayer==theSeedHitSecond.layerNumber()
94  ) return true;
95  }
96  return false;
97 }
int i
Definition: DBlmapReader.cc:9
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
bool TrackerRecHit::isOnRequestedDet ( const std::vector< std::vector< TrajectorySeedProducer::LayerSpec > > &  theLayersInSets,
const TrackerRecHit theSeedHitSecond,
const TrackerRecHit theSeedHitThird 
) const

Definition at line 100 of file TrackerRecHit.cc.

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

100  {
101 
102  for(unsigned int i=0; i<theLayersInSets.size(); ++i){
103  if( theLayersInSets[i][0].subDet==theSubDetId && theLayersInSets[i][0].idLayer==theLayerNumber &&
104  theLayersInSets[i][1].subDet==theSeedHitSecond.subDetId() && theLayersInSets[i][1].idLayer==theSeedHitSecond.layerNumber() &&
105  theLayersInSets[i][2].subDet==theSeedHitThird.subDetId() && theLayersInSets[i][2].idLayer==theSeedHitThird.layerNumber()
106  ) return true;
107  }
108  return false;
109 }
int i
Definition: DBlmapReader.cc:9
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
bool TrackerRecHit::isOnTheSameLayer ( const TrackerRecHit other) const
inline

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

Definition at line 122 of file TrackerRecHit.h.

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

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

122  {
123 
124  return
125  theSubDetId == other.subDetId() &&
126  theLayerNumber == other.layerNumber();
127  }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
double TrackerRecHit::largerError ( )
inline

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

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

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

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
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:76
LocalPoint TrackerRecHit::localPosition ( ) const
inline

The local position.

Definition at line 104 of file TrackerRecHit.h.

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

Referenced by globalPosition().

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

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

183  {
184 
185  bool isAProperPair = false;
186 
187  unsigned int anotherSubDetId = anotherHit.subDetId();
188  unsigned int anotherLayerNumber = anotherHit.layerNumber();
189  isAProperPair =
190  // First hit on PXB1
191  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
192  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
193  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
194  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
195  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
196  // First hit on PXB2
197  ( ( theSubDetId == 1 && theLayerNumber == 2 ) && (
198  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ||
199  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ||
200  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ) ||
201  // First Hit on PXD1
202  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
203  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) ) ||
204  // First Hit on PXD2
205  ( ( theSubDetId == 2 && theLayerNumber == 2 ) && (
206  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ||
207  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ) ||
208  // First Hit on TEC1
209  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
210  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
211  // First Hit on TEC2
212  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
213  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
214 
215  //Pixelless Pairs
216  // First Hit on TIB1
217  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
218  (( anotherSubDetId == 3 && anotherLayerNumber == 2 ) ||
219  ( anotherSubDetId == 4 && anotherLayerNumber == 1 )) ) ||
220  // First Hit on TID1
221  ( ( theSubDetId == 4 && theLayerNumber == 1 ) &&
222  ( anotherSubDetId == 4 && anotherLayerNumber == 2 ) ) ||
223  // First Hit on TID2
224  ( ( theSubDetId == 4 && theLayerNumber == 2 ) &&
225  ( anotherSubDetId == 4 && anotherLayerNumber == 3 ) ) ||
226  // First Hit on TID3
227  ( ( theSubDetId == 4 && theLayerNumber == 3 ) &&
228  ( anotherSubDetId == 6 && anotherLayerNumber == 1 ) ) ||
229  // First Hit on TEC3
230  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
231  ( ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ||
232  ( anotherSubDetId == 6 && anotherLayerNumber == 5 )) ) ||
233  // First Hit on TEC4
234  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
235  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
236 
237  //Tob-Tec pairs
238  //first hit on TOB1
239  ( ( theSubDetId == 5 && theLayerNumber == 1 ) &&
240  (( anotherSubDetId == 5 && anotherLayerNumber == 2 ) ||
241  ( anotherSubDetId == 6 && anotherLayerNumber == 1 )) ) ||
242  // First Hit on TEC1
243  ( ( theSubDetId == 6 && theLayerNumber == 1 ) &&
244  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) ) ||
245  // First Hit on TEC2
246  ( ( theSubDetId == 6 && theLayerNumber == 2 ) &&
247  ( anotherSubDetId == 6 && anotherLayerNumber == 3 ) ) ||
248  // First Hit on TEC3
249  ( ( theSubDetId == 6 && theLayerNumber == 3 ) &&
250  ( anotherSubDetId == 6 && anotherLayerNumber == 4 ) ) ||
251  // ??? ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
252  // First Hit on TEC4
253  ( ( theSubDetId == 6 && theLayerNumber == 4 ) &&
254  ( anotherSubDetId == 6 && anotherLayerNumber == 5 ) ) ||
255  // First Hit on TEC5
256  ( ( theSubDetId == 6 && theLayerNumber == 5 ) &&
257  ( anotherSubDetId == 6 && anotherLayerNumber == 6 ) ) ||
258  // First Hit on TEC6
259  ( ( theSubDetId == 6 && theLayerNumber == 6 ) &&
260  ( anotherSubDetId == 6 && anotherLayerNumber == 7 ) ) ;
261 
262  return isAProperPair;
263 
264 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
bool TrackerRecHit::makesAPairWith3rd ( const TrackerRecHit anotherHit) const

Definition at line 267 of file TrackerRecHit.cc.

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

267  {
268 
269  bool isAProperPair = false;
270 
271  unsigned int anotherSubDetId = anotherHit.subDetId();
272  unsigned int anotherLayerNumber = anotherHit.layerNumber();
273  isAProperPair =
274  // First hit on PXB1
275  ( ( theSubDetId == 1 && theLayerNumber == 1 ) && (
276  ( anotherSubDetId == 1 && anotherLayerNumber == 2) ||
277  ( anotherSubDetId == 2 && anotherLayerNumber == 1) ) ) ||
278  // First hit on PXB2
279  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
280  ( anotherSubDetId == 1 && anotherLayerNumber == 3) ) ||
281  // First Hit on PXD1
282  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
283  ( anotherSubDetId == 2 && anotherLayerNumber == 2) ) ||
284  // First Hit on PXD2
285  ( ( theSubDetId == 2 && theLayerNumber == 2 ) &&
286  ( anotherSubDetId == 6 && anotherLayerNumber == 2 ) );
287 
288  return isAProperPair;
289 
290 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
bool TrackerRecHit::makesATripletWith ( const TrackerRecHit anotherHit,
const TrackerRecHit yetAnotherHit 
) const

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

Definition at line 293 of file TrackerRecHit.cc.

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

294  {
295 
296  bool isAProperTriplet = false;
297 
298  unsigned int anotherSubDetId = anotherHit.subDetId();
299  unsigned int anotherLayerNumber = anotherHit.layerNumber();
300  unsigned int yetAnotherSubDetId = yetAnotherHit.subDetId();
301  unsigned int yetAnotherLayerNumber = yetAnotherHit.layerNumber();
302  isAProperTriplet =
303  // First hit on PXB1, second on PXB2
304  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
305  ( anotherSubDetId == 1 && anotherLayerNumber == 2) && (
306  ( yetAnotherSubDetId == 1 && yetAnotherLayerNumber == 3) ||
307  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 1) ||
308  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ) ||
309  // First hit on PXB1, second on PXB3
310  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
311  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
312  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
313  // First hit on PXB2, second on PXB3
314  ( ( theSubDetId == 1 && theLayerNumber == 2 ) &&
315  ( anotherSubDetId == 1 && anotherLayerNumber == 3) &&
316  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 1) ) ||
317  // First Hit on PXB1, second on PXD1
318  ( ( theSubDetId == 1 && theLayerNumber == 1 ) &&
319  ( anotherSubDetId == 2 && anotherLayerNumber == 1) && (
320  ( yetAnotherSubDetId == 2 && yetAnotherLayerNumber == 2) ||
321  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 1) ||
322  ( yetAnotherSubDetId == 4 && yetAnotherLayerNumber == 2) ) ) ||
323  // First Hit on PXD1, second on PXD2
324  ( ( theSubDetId == 2 && theLayerNumber == 1 ) &&
325  ( anotherSubDetId == 2 && anotherLayerNumber == 2 ) && (
326  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 1 ) ||
327  ( yetAnotherSubDetId == 6 && yetAnotherLayerNumber == 2 ) ) ) ||
328  // First hit on TIB1 (pixel less)
329  ( ( theSubDetId == 3 && theLayerNumber == 1 ) &&
330  ( anotherSubDetId == 3 && anotherLayerNumber == 2 ) &&
331  ( yetAnotherSubDetId == 3 && yetAnotherLayerNumber == 3 ) );
332 
333  return isAProperTriplet;
334 
335 }
unsigned int theLayerNumber
unsigned int theSubDetId
unsigned int layerNumber() const
The Layer Number.
Definition: TrackerRecHit.h:84
unsigned int subDetId() const
The subdet Id.
Definition: TrackerRecHit.h:81
const SiTrackerGSMatchedRecHit2D* TrackerRecHit::matchedHit ( ) const
inline

The Hit itself.

Definition at line 73 of file TrackerRecHit.h.

References theMatchedHit.

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

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

Definition at line 161 of file TrackerRecHit.h.

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

161  {
162  return
163  aHit.geomDet() != this->geomDet() ||
164  aHit.hit()->localPosition().x() != this->hit()->localPosition().x() ||
165  aHit.hit()->localPosition().y() != this->hit()->localPosition().y() ||
166  aHit.hit()->localPosition().z() != this->hit()->localPosition().z();
167  }
const GSSiTrackerRecHit2DLocalPos * hit() const
Definition: TrackerRecHit.h:76
virtual LocalPoint localPosition() const
const GeomDet * geomDet() const
The GeomDet.
Definition: TrackerRecHit.h:96
unsigned int TrackerRecHit::ringNumber ( ) const
inline

The Ring Number.

Definition at line 87 of file TrackerRecHit.h.

References theRingNumber.

Referenced by FastElectronSeedGenerator::run().

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

Definition at line 74 of file TrackerRecHit.h.

References theSplitHit.

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

Member Data Documentation

bool TrackerRecHit::forward
private

Definition at line 180 of file TrackerRecHit.h.

Referenced by init(), and isForward().

unsigned int TrackerRecHit::theCylinderNumber
private

Definition at line 177 of file TrackerRecHit.h.

Referenced by cylinderNumber(), and init().

const GeomDet* TrackerRecHit::theGeomDet
private

Definition at line 173 of file TrackerRecHit.h.

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

double TrackerRecHit::theLargerError
private

Definition at line 179 of file TrackerRecHit.h.

Referenced by largerError().

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

Definition at line 178 of file TrackerRecHit.h.

Referenced by localError().

const SiTrackerGSMatchedRecHit2D* TrackerRecHit::theMatchedHit
private

Definition at line 172 of file TrackerRecHit.h.

Referenced by hit(), and matchedHit().

unsigned int TrackerRecHit::theRingNumber
private

Definition at line 176 of file TrackerRecHit.h.

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

const SiTrackerGSRecHit2D* TrackerRecHit::theSplitHit
private

Definition at line 171 of file TrackerRecHit.h.

Referenced by hit(), and splitHit().

unsigned int TrackerRecHit::theSubDetId
private