Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-12 03:09:54

0001 #include "TrackingTools/DetLayers/interface/GeometricSearchDet.h"
0002 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0003 
0004 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0005 #include "FWCore/Utilities/interface/Likely.h"
0006 
0007 GeometricSearchDet::~GeometricSearchDet() {}
0008 
0009 void GeometricSearchDet::compatibleDetsV(const TrajectoryStateOnSurface& startingState,
0010                                          const Propagator& prop,
0011                                          const MeasurementEstimator& est,
0012                                          std::vector<DetWithState>& result) const {
0013   if UNLIKELY (!hasGroups())
0014     edm::LogError("DetLayers") << "At the moment not a real implementation";
0015 
0016   // standard implementation of compatibleDets() for class which have
0017   // groupedCompatibleDets implemented.
0018 
0019   std::vector<DetGroup> vectorGroups;
0020   groupedCompatibleDetsV(startingState, prop, est, vectorGroups);
0021   for (auto itDG = vectorGroups.begin(); itDG != vectorGroups.end(); itDG++) {
0022     for (auto itDGE = itDG->begin(); itDGE != itDG->end(); itDGE++) {
0023       result.emplace_back(itDGE->det(), itDGE->trajectoryState());
0024     }
0025   }
0026 }
0027 
0028 void GeometricSearchDet::groupedCompatibleDetsV(const TrajectoryStateOnSurface& startingState,
0029                                                 const Propagator&,
0030                                                 const MeasurementEstimator&,
0031                                                 std::vector<DetGroup>&) const {
0032   edm::LogError("DetLayers") << "At the moment not a real implementation";
0033 }
0034 
0035 std::vector<GeometricSearchDet::DetWithState> GeometricSearchDet::compatibleDets(
0036     const TrajectoryStateOnSurface& startingState, const Propagator& prop, const MeasurementEstimator& est) const {
0037   std::vector<DetWithState> result;
0038   compatibleDetsV(startingState, prop, est, result);
0039   return result;
0040 }
0041 
0042 std::vector<DetGroup> GeometricSearchDet::groupedCompatibleDets(const TrajectoryStateOnSurface& startingState,
0043                                                                 const Propagator& prop,
0044                                                                 const MeasurementEstimator& est) const {
0045   std::vector<DetGroup> result;
0046   groupedCompatibleDetsV(startingState, prop, est, result);
0047   return result;
0048 }