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, const TrackerTopology *tTopo, 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 33 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,
const TrackerTopology tTopo,
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, GeometricSearchDet::surface(), GeomDetEnumerators::TEC, TrackerTopology::tecRing(), TrackerTopology::tecWheel(), GeomDetEnumerators::TID, and TrackerTopology::tidRing().

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

Member Function Documentation

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

Definition at line 151 of file PixelMatchNextLayers.cc.

References badMeasurementsHere.

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

Definition at line 156 of file PixelMatchNextLayers.cc.

References hitsHere.

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

Definition at line 146 of file PixelMatchNextLayers.cc.

References measurementsHere.

Referenced by PixelHitMatcher::compatibleHits().

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

Definition at line 161 of file PixelMatchNextLayers.cc.

References predictionHere.

Referenced by PixelHitMatcher::compatibleHits().

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

Member Data Documentation

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

Definition at line 53 of file PixelMatchNextLayers.h.

Referenced by badMeasurementsInNextLayers(), and PixelMatchNextLayers().

TransientTrackingRecHit::RecHitContainer PixelMatchNextLayers::hitsHere
private

Definition at line 54 of file PixelMatchNextLayers.h.

Referenced by hitsInNextLayers(), and PixelMatchNextLayers().

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

Definition at line 52 of file PixelMatchNextLayers.h.

Referenced by measurementsInNextLayers(), and PixelMatchNextLayers().

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

Definition at line 55 of file PixelMatchNextLayers.h.

Referenced by PixelMatchNextLayers(), and predictionInNextLayers().