Go to the documentation of this file.00001 #ifndef GsfMaterialEffectsUpdator_h_
00002 #define GsfMaterialEffectsUpdator_h_
00003
00004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00005 #include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
00006 #include "DataFormats/GeometrySurface/interface/Surface.h"
00007
00008 #include <vector>
00009
00015 class GsfMaterialEffectsUpdator
00016 {
00017 public:
00020 GsfMaterialEffectsUpdator ( float mass ) :
00021 theMass(mass) {}
00022
00023 virtual ~GsfMaterialEffectsUpdator () {}
00024
00028 virtual TrajectoryStateOnSurface updateState (const TrajectoryStateOnSurface& TSoS,
00029 const PropagationDirection propDir) const;
00032 virtual std::vector<double> weights (const TrajectoryStateOnSurface& TSoS,
00033 const PropagationDirection propDir) const {
00034
00035 if ( !TSoS.surface().mediumProperties() ) return std::vector<double>();
00036
00037 if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
00038 return theWeights;
00039 }
00042 virtual std::vector<double> deltaPs (const TrajectoryStateOnSurface& TSoS,
00043 const PropagationDirection propDir) const {
00044
00045 if ( !TSoS.surface().mediumProperties() ) return std::vector<double>();
00046
00047 if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
00048 return theDeltaPs;
00049 }
00052 virtual std::vector<AlgebraicSymMatrix55> deltaLocalErrors (const TrajectoryStateOnSurface& TSoS,
00053 const PropagationDirection propDir) const {
00054
00055 if ( !TSoS.surface().mediumProperties() ) return std::vector<AlgebraicSymMatrix55>();
00056
00057 if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
00058 return theDeltaCovs;
00059 }
00062 inline float mass () const {
00063 return theMass;
00064 }
00065
00066 virtual GsfMaterialEffectsUpdator* clone() const = 0;
00067
00068 private:
00069
00070 virtual void compute (const TrajectoryStateOnSurface&, const PropagationDirection) const = 0;
00071
00072 protected:
00073
00074 virtual bool newArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const {
00075 return true;
00076 }
00077
00078 virtual void storeArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const {
00079 }
00080
00081 private:
00082 float theMass;
00083
00084
00085 protected:
00086 mutable std::vector<double> theWeights;
00087 mutable std::vector<double> theDeltaPs;
00088 mutable std::vector<AlgebraicSymMatrix55> theDeltaCovs;
00089 };
00090
00091 #endif