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, const NavigationSchool &navigationSchool, 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,
const NavigationSchool navigationSchool,
bool  searchInTIDTEC 
)

Definition at line 32 of file PixelMatchNextLayers.cc.

References alongMomentum, badMeasurementsHere, GeomDetEnumerators::endcap, hitsHere, DetLayer::location(), contentValuesFiles::m, LayerMeasurements::measurements(), measurementsHere, NavigationSchool::nextLayers(), GeomDetEnumerators::PixelBarrel, GeomDetEnumerators::PixelEndcap, predictionHere, GeometricSearchDet::surface(), GeomDetEnumerators::TEC, TrackerTopology::tecRing(), TrackerTopology::tecWheel(), GeomDetEnumerators::TID, and TrackerTopology::tidRing().

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

Member Function Documentation

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

Definition at line 152 of file PixelMatchNextLayers.cc.

References badMeasurementsHere.

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

Definition at line 157 of file PixelMatchNextLayers.cc.

References hitsHere.

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

Definition at line 147 of file PixelMatchNextLayers.cc.

References measurementsHere.

Referenced by PixelHitMatcher::compatibleHits().

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

Definition at line 162 of file PixelMatchNextLayers.cc.

References predictionHere.

Referenced by PixelHitMatcher::compatibleHits().

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

Member Data Documentation

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

Definition at line 54 of file PixelMatchNextLayers.h.

Referenced by badMeasurementsInNextLayers(), and PixelMatchNextLayers().

TransientTrackingRecHit::RecHitContainer PixelMatchNextLayers::hitsHere
private

Definition at line 55 of file PixelMatchNextLayers.h.

Referenced by hitsInNextLayers(), and PixelMatchNextLayers().

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

Definition at line 53 of file PixelMatchNextLayers.h.

Referenced by measurementsInNextLayers(), and PixelMatchNextLayers().

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

Definition at line 56 of file PixelMatchNextLayers.h.

Referenced by PixelMatchNextLayers(), and predictionInNextLayers().