CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/TrackingTools/DetLayers/src/GeometricSearchDet.cc

Go to the documentation of this file.
00001 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
00002 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" 
00003 
00004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00005 
00006  GeometricSearchDet::~GeometricSearchDet(){}
00007 
00008  void
00009  GeometricSearchDet::compatibleDetsV( const TrajectoryStateOnSurface&,
00010                                       const Propagator&, 
00011                                       const MeasurementEstimator&,
00012                                       std::vector<DetWithState>&) const {
00013    edm::LogError("DetLayers") << "At the moment not a real implementation" ;
00014  }
00015 
00016 void
00017 GeometricSearchDet::groupedCompatibleDetsV( const TrajectoryStateOnSurface& startingState,
00018                                             const Propagator&,
00019                                             const MeasurementEstimator&,
00020                                             std::vector<DetGroup> &) const {
00021    edm::LogError("DetLayers") << "At the moment not a real implementation" ;
00022 }
00023 
00024 
00025 std::vector<GeometricSearchDet::DetWithState> 
00026 GeometricSearchDet::compatibleDets( const TrajectoryStateOnSurface& startingState,
00027                                     const Propagator& prop, 
00028                                     const MeasurementEstimator& est) const {
00029   std::vector<DetWithState> result;
00030   compatibleDetsV( startingState, prop, est,result);
00031   return result;
00032 }
00033 
00034 std::vector<DetGroup> 
00035 GeometricSearchDet::groupedCompatibleDets( const TrajectoryStateOnSurface& startingState,
00036                                            const Propagator& prop,
00037                                            const MeasurementEstimator& est) const {
00038   std::vector<DetGroup> result;
00039   groupedCompatibleDetsV(startingState, prop, est,result);
00040   return result;
00041 }
00042 
00043 
00044 
00045 
00046 void
00047 GeometricSearchDetWithGroups::compatibleDetsV( const TrajectoryStateOnSurface& startingState,
00048                                                const Propagator& prop, 
00049                                                const MeasurementEstimator& est,
00050                                                std::vector<DetWithState> &result) const{
00051   
00052   // standard implementation of compatibleDets() for class which have 
00053   // groupedCompatibleDets implemented.
00054   
00055   std::vector<DetGroup> vectorGroups;
00056   groupedCompatibleDetsV(startingState,prop,est,vectorGroups);
00057   for(std::vector<DetGroup>::const_iterator itDG=vectorGroups.begin();
00058       itDG!=vectorGroups.end();itDG++){
00059     for(std::vector<DetGroupElement>::const_iterator itDGE=itDG->begin();
00060         itDGE!=itDG->end();itDGE++){
00061       result.push_back(DetWithState(itDGE->det(),itDGE->trajectoryState()));
00062     }
00063   }
00064 }
00065