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

#include <PixelMatchNextLayers.h>

Public Member Functions

std::vector
< TrajectoryMeasurement
badMeasurementsInNextLayers () const
 
TransientTrackingRecHit::RecHitContainer hitsInNextLayers () const
 
std::vector
< TrajectoryMeasurement
measurementsInNextLayers () const
 
 PixelMatchNextLayers (const LayerMeasurements *theLayerMeasurements, const DetLayer *ilayer, FreeTrajectoryState &aFTS, const PropagatorWithMaterial *aProp, const BarrelMeasurementEstimator *aBarrelMeas, const ForwardMeasurementEstimator *aForwardMeas, bool searchInTIDTEC)
 
std::vector< CLHEP::Hep3Vector > predictionInNextLayers () const
 

Private Attributes

std::vector
< TrajectoryMeasurement
badMeasurementsHere
 
TransientTrackingRecHit::RecHitContainer hitsHere
 
std::vector
< TrajectoryMeasurement
measurementsHere
 
std::vector< CLHEP::Hep3Vector > predictionHere
 

Detailed Description

Description: class to find the compatible hits in the next layer

Implementation: <Notes on="" implementation>="">

Definition at line 32 of file PixelMatchNextLayers.h.

Constructor & Destructor Documentation

PixelMatchNextLayers::PixelMatchNextLayers ( const LayerMeasurements theLayerMeasurements,
const DetLayer ilayer,
FreeTrajectoryState aFTS,
const PropagatorWithMaterial aProp,
const BarrelMeasurementEstimator aBarrelMeas,
const ForwardMeasurementEstimator aForwardMeas,
bool  searchInTIDTEC 
)

Definition at line 32 of file PixelMatchNextLayers.cc.

References alongMomentum, badMeasurementsHere, GeomDetEnumerators::endcap, hitsHere, DetLayer::location(), m, LayerMeasurements::measurements(), measurementsHere, DetLayer::nextLayers(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, predictionHere, relativeConstraints::ring, GeometricSearchDet::surface(), GeomDetEnumerators::TEC, and GeomDetEnumerators::TID.

38  {
39 
40  typedef std::vector<TrajectoryMeasurement>::const_iterator aMeas;
41  std::vector<const DetLayer*> allayers;
42  std::vector<const DetLayer*> nl = ilayer->nextLayers( aFTS, alongMomentum);
43  for (std::vector<const DetLayer*>::const_iterator il = nl.begin(); il != nl.end(); il++) {
44  allayers.push_back(*il);
45  std::vector<const DetLayer*> n2l = (*il)->nextLayers( aFTS, alongMomentum);
46  for (std::vector<const DetLayer*>::const_iterator i2l = n2l.begin(); i2l != n2l.end(); i2l++) {
47  allayers.push_back(*i2l);
48  }
49  }
50 
51  const TrajectoryStateOnSurface tsos(aFTS,ilayer->surface());
52 
53  if (tsos.isValid())
54  {
55  for (std::vector<const DetLayer*>::const_iterator il = allayers.begin(); il != allayers.end(); il++)
56  {
57  if ( (*il)->subDetector()==GeomDetEnumerators::PixelBarrel || (*il)->subDetector()==GeomDetEnumerators::PixelEndcap ) {
58 
59  std::vector<TrajectoryMeasurement> pixelMeasurements;
60  if ((*il)->subDetector()==GeomDetEnumerators::PixelBarrel) {
61  pixelMeasurements = theLayerMeasurements->measurements( **il, tsos , *aProp, *aBarrelMeas);
62  } else {
63  pixelMeasurements = theLayerMeasurements->measurements( **il, tsos, *aProp, *aForwardMeas);
64  }
65  for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++){
66  if (m == pixelMeasurements.begin()){
67  CLHEP::Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
68  m->forwardPredictedState().globalPosition().y(),
69  m->forwardPredictedState().globalPosition().z());
70  predictionHere.push_back( prediction);
71  }
72  if (m->recHit()->isValid()) {
73  measurementsHere.push_back( *m);
74  hitsHere.push_back( m->recHit());
75 
76  //std::cout<<"\n SH B-D "<<std::endl;
77 
78  } else {
79  badMeasurementsHere.push_back( *m);
80  }
81  }
82  }
83  if (searchInTIDTEC) {
84  //additional search in the TID layers
85  if ( ((*il)->subDetector())==GeomDetEnumerators::TID && (ilayer->location()) == GeomDetEnumerators::endcap)
86  {
87  std::vector<TrajectoryMeasurement> pixelMeasurements;
88  pixelMeasurements = theLayerMeasurements->measurements( (**il), tsos , *aProp, *aForwardMeas);
89 
90  for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++)
91  {
92  // limit search in first ring
93  if (TIDDetId(m->recHit()->geographicalId()).ring() > 1) continue;
94  if (m == pixelMeasurements.begin())
95  {
96  CLHEP::Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
97  m->forwardPredictedState().globalPosition().y(),
98  m->forwardPredictedState().globalPosition().z());
99  predictionHere.push_back( prediction);
100  }
101  if (m->recHit()->isValid())
102  {
103  measurementsHere.push_back( *m);
104  hitsHere.push_back(m->recHit());
105  }
106  // else{ std::cout<<" 2H not valid "<<std::endl;}
107  }
108  } //end of TID search
109 
110  //additional search in the TEC layers
111  if ( ((*il)->subDetector())==GeomDetEnumerators::TEC && (ilayer->location()) == GeomDetEnumerators::endcap)
112  {
113  std::vector<TrajectoryMeasurement> pixelMeasurements;
114  pixelMeasurements = theLayerMeasurements->measurements( (**il), tsos , *aProp, *aForwardMeas);
115 
116  for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++)
117  {
118  // limit search in first ring and first third wheels
119  if (TECDetId(m->recHit()->geographicalId()).ring() > 1) continue;
120  if (TECDetId(m->recHit()->geographicalId()).wheel() > 3) continue;
121  if (m == pixelMeasurements.begin())
122  {
123  CLHEP::Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
124  m->forwardPredictedState().globalPosition().y(),
125  m->forwardPredictedState().globalPosition().z());
126  predictionHere.push_back( prediction);
127  }
128  if (m->recHit()->isValid())
129  {
130  measurementsHere.push_back( *m);
131  hitsHere.push_back(m->recHit());
132 
133  //std::cout<<"\n SH TEC "<<std::endl;
134 
135  }
136  // else{ std::cout<<" 2H not valid "<<std::endl;}
137  }
138  } //end of TEC search
139  }
140  }
141  }
142 }
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual Location location() const =0
Which part of the detector (barrel, endcap)
std::vector< TrajectoryMeasurement > measurementsHere
virtual std::vector< const DetLayer * > nextLayers(NavigationDirection direction) const
Definition: DetLayer.cc:35
TransientTrackingRecHit::RecHitContainer hitsHere
std::vector< TrajectoryMeasurement > badMeasurementsHere
std::vector< CLHEP::Hep3Vector > predictionHere

Member Function Documentation

std::vector< TrajectoryMeasurement > PixelMatchNextLayers::badMeasurementsInNextLayers ( ) const

Definition at line 150 of file PixelMatchNextLayers.cc.

References badMeasurementsHere.

150  {
151 
152  return badMeasurementsHere;
153 }
std::vector< TrajectoryMeasurement > badMeasurementsHere
TransientTrackingRecHit::RecHitContainer PixelMatchNextLayers::hitsInNextLayers ( ) const

Definition at line 155 of file PixelMatchNextLayers.cc.

References hitsHere.

155  {
156 
157  return hitsHere;
158 }
TransientTrackingRecHit::RecHitContainer hitsHere
std::vector< TrajectoryMeasurement > PixelMatchNextLayers::measurementsInNextLayers ( ) const

Definition at line 145 of file PixelMatchNextLayers.cc.

References measurementsHere.

Referenced by PixelHitMatcher::compatibleHits().

145  {
146 
147  return measurementsHere;
148 }
std::vector< TrajectoryMeasurement > measurementsHere
std::vector< CLHEP::Hep3Vector > PixelMatchNextLayers::predictionInNextLayers ( ) const

Definition at line 160 of file PixelMatchNextLayers.cc.

References predictionHere.

Referenced by PixelHitMatcher::compatibleHits().

160  {
161 
162  return predictionHere;
163 }
std::vector< CLHEP::Hep3Vector > predictionHere

Member Data Documentation

std::vector<TrajectoryMeasurement> PixelMatchNextLayers::badMeasurementsHere
private

Definition at line 50 of file PixelMatchNextLayers.h.

Referenced by badMeasurementsInNextLayers(), and PixelMatchNextLayers().

TransientTrackingRecHit::RecHitContainer PixelMatchNextLayers::hitsHere
private

Definition at line 51 of file PixelMatchNextLayers.h.

Referenced by hitsInNextLayers(), and PixelMatchNextLayers().

std::vector<TrajectoryMeasurement> PixelMatchNextLayers::measurementsHere
private

Definition at line 49 of file PixelMatchNextLayers.h.

Referenced by measurementsInNextLayers(), and PixelMatchNextLayers().

std::vector<CLHEP::Hep3Vector> PixelMatchNextLayers::predictionHere
private

Definition at line 52 of file PixelMatchNextLayers.h.

Referenced by PixelMatchNextLayers(), and predictionInNextLayers().