CMS 3D CMS Logo

PixelMatchNextLayers Class Reference

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

#include <RecoEgamma/EgammaElectronAlgos/interface/PixelMatchNextLayers.h>

List of all members.

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< Hep3Vector > predictionInNextLayers () const

Private Attributes

std::vector
< TrajectoryMeasurement
badMeasurementsHere
TransientTrackingRecHit::RecHitContainer hitsHere
std::vector
< TrajectoryMeasurement
measurementsHere
std::vector< 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 44 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, GeomDetEnumerators::TID, and muonGeometry::wheel.

00050  {
00051 
00052   typedef std::vector<TrajectoryMeasurement>::const_iterator aMeas;
00053   std::vector<const DetLayer*> allayers;
00054   std::vector<const DetLayer*> nl = ilayer->nextLayers( aFTS, alongMomentum);
00055   for (std::vector<const DetLayer*>::const_iterator il = nl.begin(); il != nl.end(); il++) {
00056     allayers.push_back(*il);
00057     std::vector<const DetLayer*> n2l = (*il)->nextLayers( aFTS, alongMomentum);
00058     for (std::vector<const DetLayer*>::const_iterator i2l = n2l.begin(); i2l != n2l.end(); i2l++) {
00059       allayers.push_back(*i2l);
00060     }
00061   }
00062 
00063   const TrajectoryStateOnSurface tsos(aFTS,ilayer->surface());
00064   
00065   if (tsos.isValid()) 
00066     {    
00067       for (std::vector<const DetLayer*>::const_iterator il = allayers.begin(); il != allayers.end(); il++) 
00068         {
00069           if ( (*il)->subDetector()==GeomDetEnumerators::PixelBarrel || (*il)->subDetector()==GeomDetEnumerators::PixelEndcap ) {
00070             
00071             std::vector<TrajectoryMeasurement> pixelMeasurements;
00072             if ((*il)->subDetector()==GeomDetEnumerators::PixelBarrel) {
00073               pixelMeasurements = theLayerMeasurements->measurements( **il, tsos , *aProp, *aBarrelMeas); 
00074             } else {
00075               pixelMeasurements = theLayerMeasurements->measurements( **il, tsos, *aProp, *aForwardMeas);
00076             }
00077             for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++){
00078               if (m == pixelMeasurements.begin()){
00079                 Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
00080                                       m->forwardPredictedState().globalPosition().y(),
00081                                       m->forwardPredictedState().globalPosition().z());
00082                 predictionHere.push_back( prediction);
00083               }
00084               if (m->recHit()->isValid()) {
00085                 measurementsHere.push_back( *m);
00086                 hitsHere.push_back( m->recHit());
00087 
00088                 //std::cout<<"\n SH B-D "<<std::endl;
00089 
00090               } else {
00091                 badMeasurementsHere.push_back( *m);
00092               }
00093             }
00094           }
00095           if (searchInTIDTEC) {   
00096           //additional search in the TID layers
00097           if ( ((*il)->subDetector())==GeomDetEnumerators::TID && (ilayer->location()) == GeomDetEnumerators::endcap)
00098             {
00099               std::vector<TrajectoryMeasurement> pixelMeasurements;
00100               pixelMeasurements = theLayerMeasurements->measurements( (**il), tsos , *aProp, *aForwardMeas); 
00101               
00102               for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++)
00103                 {
00104                   // limit search in first ring
00105                   if (TIDDetId(m->recHit()->geographicalId()).ring() > 1) continue;
00106                   if (m == pixelMeasurements.begin())
00107                     {
00108                       Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
00109                                             m->forwardPredictedState().globalPosition().y(),
00110                                             m->forwardPredictedState().globalPosition().z());
00111                       predictionHere.push_back( prediction);
00112                     }
00113                   if (m->recHit()->isValid()) 
00114                     {
00115                       measurementsHere.push_back( *m);
00116                       hitsHere.push_back(m->recHit());
00117                     }
00118                   // else{ std::cout<<" 2H not valid "<<std::endl;}
00119                 }
00120             } //end of TID search
00121           
00122           //additional search in the TEC layers
00123           if ( ((*il)->subDetector())==GeomDetEnumerators::TEC && (ilayer->location()) == GeomDetEnumerators::endcap)
00124             {
00125               std::vector<TrajectoryMeasurement> pixelMeasurements;
00126               pixelMeasurements = theLayerMeasurements->measurements( (**il), tsos , *aProp, *aForwardMeas); 
00127                       
00128               for (aMeas m=pixelMeasurements.begin(); m!=pixelMeasurements.end(); m++)
00129                 {
00130                   // limit search in first ring and first third wheels
00131                   if (TECDetId(m->recHit()->geographicalId()).ring() > 1) continue;
00132                   if (TECDetId(m->recHit()->geographicalId()).wheel() > 3) continue;
00133                   if (m == pixelMeasurements.begin())
00134                     {
00135                       Hep3Vector prediction(m->forwardPredictedState().globalPosition().x(),
00136                                             m->forwardPredictedState().globalPosition().y(),
00137                                             m->forwardPredictedState().globalPosition().z());
00138                       predictionHere.push_back( prediction);
00139                     }
00140                   if (m->recHit()->isValid()) 
00141                     {
00142                       measurementsHere.push_back( *m);
00143                       hitsHere.push_back(m->recHit());
00144 
00145                       //std::cout<<"\n SH TEC "<<std::endl;
00146 
00147                     }
00148                   // else{ std::cout<<" 2H not valid "<<std::endl;}
00149                 }
00150             } //end of TEC search
00151           }
00152         }
00153     } 
00154 }


Member Function Documentation

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

Definition at line 162 of file PixelMatchNextLayers.cc.

References badMeasurementsHere.

00162                                                                                          {
00163 
00164   return badMeasurementsHere;
00165 }

TransientTrackingRecHit::RecHitContainer PixelMatchNextLayers::hitsInNextLayers (  )  const

Definition at line 167 of file PixelMatchNextLayers.cc.

References hitsHere.

00167                                                                                     {
00168 
00169   return hitsHere;
00170 }

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

Definition at line 157 of file PixelMatchNextLayers.cc.

References measurementsHere.

Referenced by PixelHitMatcher::compatibleHits().

00157                                                                                       {
00158 
00159   return measurementsHere;
00160 }

std::vector< Hep3Vector > PixelMatchNextLayers::predictionInNextLayers (  )  const

Definition at line 172 of file PixelMatchNextLayers.cc.

References predictionHere.

Referenced by PixelHitMatcher::compatibleHits().

00172                                                                          {
00173 
00174   return predictionHere;
00175 }


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<Hep3Vector> PixelMatchNextLayers::predictionHere [private]

Definition at line 52 of file PixelMatchNextLayers.h.

Referenced by PixelMatchNextLayers(), and predictionInNextLayers().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:02 2009 for CMSSW by  doxygen 1.5.4