Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:26:29

0001 #ifndef TrackingTools_PatternTools_TrajectoryBuilder_h
0002 #define TrackingTools_PatternTools_TrajectoryBuilder_h
0003 
0004 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
0005 #include "TrackingTools/PatternTools/interface/Trajectory.h"
0006 #include "FWCore/Framework/interface/Event.h"
0007 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0008 
0009 class TrajectorySeed;
0010 
0011 /** The component of track reconstruction that, strating from a seed,
0012  *  reconstructs all possible trajectories.
0013  *  The resulting trajectories may be mutually exclusive and require
0014  *  cleaning by a TrajectoryCleaner.
0015  *  The Trajectories are normally not smoothed.
0016  */
0017 
0018 class TrajectoryBuilder {
0019 public:
0020   typedef std::vector<Trajectory> TrajectoryContainer;
0021   typedef TrajectoryContainer::iterator TrajectoryIterator;
0022 
0023   virtual ~TrajectoryBuilder(){};
0024 
0025   virtual TrajectoryContainer trajectories(const TrajectorySeed&) const = 0;
0026 
0027   virtual void trajectories(const TrajectorySeed& seed, TrajectoryContainer& out) const {
0028     TrajectoryContainer&& ret = trajectories(seed);
0029     out = std::move(ret);
0030   }
0031 
0032   /** Interface for trajectories re-building in the seeding region method.
0033       It has to be correctly implemented in the concrete class
0034   **/
0035   virtual void rebuildSeedingRegion(const TrajectorySeed&, TrajectoryContainer& result) const {
0036     LogDebug("TrajectoryBuilding") << "WARNING: you are using a trajectory builder which is not overloading the "
0037                                       "rebuildSeedingRegion method because there is not an implementation yet: output "
0038                                       "TrajectoryContainer is equal to inputTrajectoryContainer";
0039   }
0040 
0041   virtual void setEvent(const edm::Event& event) const = 0;
0042   virtual void unset() const {};
0043 };
0044 
0045 #endif