00001 #ifndef GsfMaterialEffectsAdapter_H_ 00002 #define GsfMaterialEffectsAdapter_H_ 00003 00004 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h" 00005 #include "TrackingTools/MaterialEffects/interface/MaterialEffectsUpdator.h" 00006 #include "TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h" 00007 00011 class GsfMaterialEffectsAdapter : public GsfMaterialEffectsUpdator 00012 { 00013 virtual GsfMaterialEffectsAdapter* clone() const 00014 { 00015 return new GsfMaterialEffectsAdapter(*this); 00016 } 00017 00018 public: 00019 00020 // GsfMaterialEffectsAdapter(); 00021 00022 GsfMaterialEffectsAdapter( const MaterialEffectsUpdator& aMEUpdator ) : 00023 GsfMaterialEffectsUpdator(aMEUpdator.mass()), 00024 theMEUpdator(aMEUpdator.clone()) {theWeights.push_back(1.);} 00025 00026 ~GsfMaterialEffectsAdapter() {} 00027 00028 private: 00029 // here comes the actual computation of the values 00030 virtual void compute (const TrajectoryStateOnSurface&, const PropagationDirection) const; 00031 00032 protected: 00033 // check of arguments for use with cached values 00034 virtual bool newArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const 00035 { 00036 return true; 00037 } 00038 // storage of arguments for later use of 00039 virtual void storeArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const {} 00040 00041 private: 00042 DeepCopyPointerByClone<MaterialEffectsUpdator> theMEUpdator; 00043 }; 00044 00045 #endif