Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:37

0001 #ifndef GsfMaterialEffectsAdapter_H_
0002 #define GsfMaterialEffectsAdapter_H_
0003 
0004 #include "DataFormats/GeometryCommonDetAlgo/interface/DeepCopyPointerByClone.h"
0005 #include "TrackingTools/MaterialEffects/interface/MaterialEffectsUpdator.h"
0006 #include "TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h"
0007 
0008 /** Make standard (single state) MaterialEffectsUpdator usable in
0009  *  the context of GSF.
0010  */
0011 class GsfMaterialEffectsAdapter final : public GsfMaterialEffectsUpdator {
0012   GsfMaterialEffectsAdapter* clone() const override { return new GsfMaterialEffectsAdapter(*this); }
0013 
0014 public:
0015   GsfMaterialEffectsAdapter(const MaterialEffectsUpdator& aMEUpdator)
0016       : GsfMaterialEffectsUpdator(aMEUpdator.mass(), 1), theMEUpdator(aMEUpdator.clone()) {}
0017 
0018   ~GsfMaterialEffectsAdapter() override {}
0019 
0020   // here comes the actual computation of the values
0021   void compute(const TrajectoryStateOnSurface&, const PropagationDirection, Effect[]) const override;
0022 
0023 private:
0024   DeepCopyPointerByClone<MaterialEffectsUpdator> theMEUpdator;
0025 };
0026 
0027 #endif