CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Alignment/ReferenceTrajectories/interface/DualReferenceTrajectory.h

Go to the documentation of this file.
00001 #ifndef Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
00002 #define Alignment_ReferenceTrajectories_DualReferenceTrajectory_H
00003 
00029 #include "Alignment/ReferenceTrajectories/interface/ReferenceTrajectoryBase.h"
00030 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00031 
00032 class ReferenceTrajectory;
00033 namespace reco { class BeamSpot;}
00034 
00035 class DualReferenceTrajectory : public ReferenceTrajectoryBase
00036 {
00037 
00038 public:
00039 
00040   typedef TransientTrackingRecHit::ConstRecHitContainer ConstRecHitContainer;
00041 
00042   DualReferenceTrajectory( const TrajectoryStateOnSurface &referenceTsos,
00043                            const ConstRecHitContainer &forwardRecHits,
00044                            const ConstRecHitContainer &backwardRecHits,
00045                            const MagneticField *magField,
00046                            MaterialEffects materialEffects,
00047                            PropagationDirection propDir,
00048                            double mass,
00049                            bool useBeamSpot,
00050                            const reco::BeamSpot &beamSpot);
00051 
00052   virtual ~DualReferenceTrajectory() {}
00053 
00054   virtual DualReferenceTrajectory* clone() const { return new DualReferenceTrajectory(*this); }
00055 
00056 protected:
00057 
00058   DualReferenceTrajectory( unsigned int nPar, unsigned int nHits);
00059 
00062   virtual bool construct(const TrajectoryStateOnSurface &referenceTsos, 
00063                          const ConstRecHitContainer &forwardRecHits,
00064                          const ConstRecHitContainer &backwardRecHits,
00065                          double mass, MaterialEffects materialEffects,
00066                          const PropagationDirection propDir,
00067                          const MagneticField *magField,
00068                          bool useBeamSpot,
00069                          const reco::BeamSpot &beamSpot);
00070 
00071   virtual ReferenceTrajectory* construct(const TrajectoryStateOnSurface &referenceTsos, 
00072                                          const ConstRecHitContainer &recHits,
00073                                          double mass, MaterialEffects materialEffects,
00074                                          const PropagationDirection propDir,
00075                                          const MagneticField *magField,
00076                                          bool useBeamSpot,
00077                                          const reco::BeamSpot &beamSpot) const;
00078 
00079   virtual AlgebraicVector extractParameters(const TrajectoryStateOnSurface &referenceTsos) const;
00080 
00081   inline const PropagationDirection oppositeDirection( const PropagationDirection propDir ) const
00082   { return ( propDir == anyDirection ) ? anyDirection : ( ( propDir == alongMomentum ) ? oppositeToMomentum : alongMomentum ); }
00083 
00084 };
00085 
00086 #endif