Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:38

0001 #ifndef SeedTransformer_H
0002 #define SeedTransformer_H
0003 
0004 /** \class SeedTransformer
0005  *  Description: this class takes a TrajectorySeed,
0006  *  fits its RecHits and returns a vector of Trajectories.
0007  *  If the fit fails, the returned vector is empty.
0008  *
0009  *  \author D. Trocino - University and INFN Torino
0010  */
0011 
0012 // Base class header
0013 #include "FWCore/Utilities/interface/ESGetToken.h"
0014 #include "TrackingTools/TrackFitters/interface/TrajectoryFitter.h"
0015 
0016 #include <vector>
0017 
0018 namespace edm {
0019   class ParameterSet;
0020   class EventSetup;
0021   class ConsumesCollector;
0022 }  // namespace edm
0023 class Trajectory;
0024 class TrajectorySeed;
0025 class TrajectoryStateOnSurface;
0026 class GlobalTrackingGeometry;
0027 class MagneticField;
0028 class TransientTrackingRecHitBuilder;
0029 class Propagator;
0030 class GlobalTrackingGeometryRecord;
0031 class IdealMagneticFieldRecord;
0032 class TransientRecHitRecord;
0033 class TrackingComponentsRecord;
0034 
0035 class SeedTransformer {
0036 public:
0037   /// Constructor
0038   SeedTransformer(const edm::ParameterSet&, edm::ConsumesCollector);
0039 
0040   /// Destructor
0041   virtual ~SeedTransformer();
0042 
0043   // Operations
0044   /// Set the services needed by the SeedTransformer
0045   void setServices(const edm::EventSetup&);
0046 
0047   /// Performs the fit
0048   std::vector<Trajectory> seedTransform(const TrajectorySeed&) const;
0049   TrajectoryStateOnSurface seedTransientState(const TrajectorySeed&) const;
0050 
0051 protected:
0052 private:
0053   const GlobalTrackingGeometry* theTrackingGeometry;
0054   const MagneticField* theMagneticField;
0055   const TrajectoryFitter* theFitter;
0056   const TransientTrackingRecHitBuilder* theMuonRecHitBuilder;
0057   const Propagator* thePropagator;
0058 
0059   edm::ESGetToken<GlobalTrackingGeometry, GlobalTrackingGeometryRecord> theTrackingGeometryToken;
0060   edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> theMagneticFieldToken;
0061   edm::ESGetToken<TrajectoryFitter, TrajectoryFitter::Record> theFitterToken;
0062   edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> theMuonRecHitBuilderToken;
0063   edm::ESGetToken<Propagator, TrackingComponentsRecord> thePropagatorToken;
0064 
0065   /// Minimum number of RecHits required to perform the fit
0066   unsigned int nMinRecHits;
0067 
0068   /// Error rescale factor
0069   double errorRescale;
0070 
0071   bool useSubRecHits;
0072 };
0073 #endif