CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfMaterialEffectsUpdator.h
Go to the documentation of this file.
1 #ifndef GsfMaterialEffectsUpdator_h_
2 #define GsfMaterialEffectsUpdator_h_
3 
7 
8 #include <vector>
9 
16 {
17 public:
21  theMass(mass) {}
22 
24 
29  const PropagationDirection propDir) const;
32  virtual std::vector<double> weights (const TrajectoryStateOnSurface& TSoS,
33  const PropagationDirection propDir) const {
34  // check for material
35  if ( !TSoS.surface().mediumProperties() ) return std::vector<double>();
36  // check for change (avoid using compute method if possible)
37  if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
38  return theWeights;
39  }
42  virtual std::vector<double> deltaPs (const TrajectoryStateOnSurface& TSoS,
43  const PropagationDirection propDir) const {
44  // check for material
45  if ( !TSoS.surface().mediumProperties() ) return std::vector<double>();
46  // check for change (avoid using compute method if possible)
47  if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
48  return theDeltaPs;
49  }
52  virtual std::vector<AlgebraicSymMatrix55> deltaLocalErrors (const TrajectoryStateOnSurface& TSoS,
53  const PropagationDirection propDir) const {
54  // check for material
55  if ( !TSoS.surface().mediumProperties() ) return std::vector<AlgebraicSymMatrix55>();
56  // check for change (avoid using compute method if possible)
57  if ( newArguments(TSoS,propDir) ) compute(TSoS,propDir);
58  return theDeltaCovs;
59  }
62  inline float mass () const {
63  return theMass;
64  }
65 
66  virtual GsfMaterialEffectsUpdator* clone() const = 0;
67 
68 private:
69  // here comes the actual computation of the values
70  virtual void compute (const TrajectoryStateOnSurface&, const PropagationDirection) const = 0;
71 
72 protected:
73  // check of arguments for use with cached values
74  virtual bool newArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const {
75  return true;
76  }
77  // storage of arguments for later use
78  virtual void storeArguments (const TrajectoryStateOnSurface&, const PropagationDirection) const {
79  }
80 
81 private:
82  float theMass;
83 
84 
85 protected:
86  mutable std::vector<double> theWeights;
87  mutable std::vector<double> theDeltaPs;
88  mutable std::vector<AlgebraicSymMatrix55> theDeltaCovs;
89 };
90 
91 #endif
std::vector< AlgebraicSymMatrix55 > theDeltaCovs
virtual void compute(const TrajectoryStateOnSurface &, const PropagationDirection) const =0
PropagationDirection
const MediumProperties * mediumProperties() const
Definition: Surface.h:93
virtual GsfMaterialEffectsUpdator * clone() const =0
virtual bool newArguments(const TrajectoryStateOnSurface &, const PropagationDirection) const
virtual std::vector< double > deltaPs(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual TrajectoryStateOnSurface updateState(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual std::vector< AlgebraicSymMatrix55 > deltaLocalErrors(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const
virtual void storeArguments(const TrajectoryStateOnSurface &, const PropagationDirection) const
const Surface & surface() const
virtual std::vector< double > weights(const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir) const