00001 #ifndef Alignment_ReferenceTrajectories_TrajectoryFactoryBase_h 00002 #define Alignment_ReferenceTrajectories_TrajectoryFactoryBase_h 00003 00004 #include "Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h" 00005 #include "Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h" 00006 00007 #include "TrackingTools/PatternTools/interface/Trajectory.h" 00008 00009 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" 00010 00013 00014 00015 namespace reco { class BeamSpot;} 00016 00017 class TrajectoryFactoryBase 00018 { 00019 00020 public: 00021 00022 typedef ReferenceTrajectoryBase::ReferenceTrajectoryPtr ReferenceTrajectoryPtr; 00023 typedef ReferenceTrajectoryBase::MaterialEffects MaterialEffects; 00024 typedef AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair; 00025 typedef AlignmentAlgorithmBase::ConstTrajTrackPairCollection ConstTrajTrackPairCollection; 00026 typedef std::vector< ReferenceTrajectoryPtr > ReferenceTrajectoryCollection; 00027 typedef std::pair< TrajectoryStateOnSurface, TransientTrackingRecHit::ConstRecHitContainer > TrajectoryInput; 00028 typedef std::vector< TrajectoryStateOnSurface > ExternalPredictionCollection; 00029 00030 TrajectoryFactoryBase( const edm::ParameterSet & config ); 00031 virtual ~TrajectoryFactoryBase( void ); 00032 00033 virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, 00034 const ConstTrajTrackPairCollection &tracks, 00035 const reco::BeamSpot &beamSpot) const = 0; 00036 00037 virtual const ReferenceTrajectoryCollection trajectories(const edm::EventSetup &setup, 00038 const ConstTrajTrackPairCollection &tracks, 00039 const ExternalPredictionCollection &external, 00040 const reco::BeamSpot &beamSpot) const = 0; 00041 00042 virtual TrajectoryFactoryBase* clone( void ) const = 0; 00043 00044 inline MaterialEffects materialEffects( void ) const { return theMaterialEffects; } 00045 inline PropagationDirection propagationDirection( void ) const { return thePropDir; } 00046 00047 protected: 00048 00049 virtual const TrajectoryInput innermostStateAndRecHits( const ConstTrajTrackPair & track ) const; 00050 virtual const Trajectory::DataContainer orderedTrajectoryMeasurements( const Trajectory & trajectory ) const; 00051 bool sameSurface( const Surface& s1, const Surface& s2 ) const; 00052 bool useRecHit( const TransientTrackingRecHit::ConstRecHitPointer& hitPtr ) const; 00053 00054 private: 00055 00056 MaterialEffects materialEffects( const std::string & strME ) const; 00057 PropagationDirection propagationDirection( const std::string & strPD ) const; 00058 00059 MaterialEffects theMaterialEffects; 00060 PropagationDirection thePropDir; 00061 00062 bool theUseWithoutDet; 00063 bool theUseInvalidHits; 00064 bool theUseProjectedHits; 00065 00066 protected: 00067 00068 bool theUseBeamSpot; 00069 }; 00070 00071 00072 #endif