00001 #ifndef _CR_MATERIALEFFECTSUPDATOR_H_ 00002 #define _CR_MATERIALEFFECTSUPDATOR_H_ 00003 00015 #include "DataFormats/GeometrySurface/interface/Surface.h" 00016 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" 00017 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h" 00018 class MaterialEffectsUpdator 00019 { 00020 public: 00023 MaterialEffectsUpdator ( double mass ); 00024 virtual ~MaterialEffectsUpdator (); 00025 00029 virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface& TSoS, 00030 const PropagationDirection propDir) const; 00031 00038 virtual bool updateStateInPlace (TrajectoryStateOnSurface& TSoS, 00039 const PropagationDirection propDir) const; 00040 00041 00044 virtual double deltaP (const TrajectoryStateOnSurface& TSoS, const PropagationDirection propDir) const; 00045 00046 00049 virtual const AlgebraicSymMatrix55 &deltaLocalError (const TrajectoryStateOnSurface& TSoS, 00050 const PropagationDirection propDir) const; 00051 00054 inline double mass () const { 00055 return theMass; 00056 } 00057 00058 virtual MaterialEffectsUpdator* clone() const = 0; 00059 00060 private: 00061 // here comes the actual computation of the values 00062 virtual void compute (const TrajectoryStateOnSurface&, const PropagationDirection) const = 0; 00063 00064 // check of arguments for use with cached values 00065 bool newArguments (const TrajectoryStateOnSurface & TSoS, PropagationDirection propDir) const; 00066 00067 private: 00068 double theMass; 00069 00070 // chache previous call state 00071 mutable double theLastOverP; 00072 mutable double theLastDxdz; 00073 mutable float theLastRL; 00074 mutable PropagationDirection theLastPropDir; 00075 00076 00077 protected: 00078 mutable double theDeltaP; 00079 mutable AlgebraicSymMatrix55 theDeltaCov; 00080 static AlgebraicSymMatrix55 theNullMatrix; 00081 }; 00082 00083 #endif