Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:29

0001 #ifndef BasicMultiTrajectoryState_H
0002 #define BasicMultiTrajectoryState_H
0003 
0004 #include "TrackingTools/TrajectoryState/interface/BasicTrajectoryState.h"
0005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
0006 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0007 #include "FWCore/Utilities/interface/Exception.h"
0008 
0009 /** Class which combines a set of components of a Gaussian mixture
0010  *  into a single component. Given all the components of a mixture, it
0011  *  calculates the mean and covariance matrix of the entire mixture.
0012  *  This combiner class can also be used in the process of transforming a
0013  *  Gaussian mixture into another Gaussian mixture with a smaller number
0014  *  of components. The relevant formulas can be found in
0015  *  R. Fruhwirth, Computer Physics Communications 100 (1997), 1.
0016  */
0017 class BasicMultiTrajectoryState final : public BasicTrajectoryState {
0018   typedef TrajectoryStateOnSurface TSOS;
0019 
0020 public:
0021   explicit BasicMultiTrajectoryState(const std::vector<TSOS>& tsvec);
0022 
0023   BasicMultiTrajectoryState() {}
0024 
0025   /** Rescaling the error of the mixture with a given factor. Please note that
0026    *  this rescaling is imposed on each of the components of the mixture and does
0027    *  therefore not exactly correspond to rescaling theCombinedState with the same
0028    *  factor.
0029    */
0030 
0031   void rescaleError(double factor);
0032 
0033   pointer clone() const override { return build<BasicMultiTrajectoryState>(*this); }
0034 
0035   using Components = BasicTrajectoryState::Components;
0036   Components const& components() const override { return theStates; }
0037   bool singleState() const override { return false; }
0038 
0039   bool canUpdateLocalParameters() const override { return false; }
0040   void update(const LocalTrajectoryParameters& p,
0041               const Surface& aSurface,
0042               const MagneticField* field,
0043               const SurfaceSide side) override;
0044 
0045   void update(double weight,
0046               const LocalTrajectoryParameters& p,
0047               const LocalTrajectoryError& err,
0048               const Surface& aSurface,
0049               const MagneticField* field,
0050               const SurfaceSide side) override;
0051 
0052 private:
0053   Components theStates;
0054 
0055   void combine() dso_internal;
0056 };
0057 
0058 #endif