Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef PosteriorWeightsCalculator_H_
0002 #define PosteriorWeightsCalculator_H_
0003 
0004 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0005 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0006 
0007 /** Helper class which calculates the posterior weights of a Gaussian
0008  *  mixture given a prior (predicted) mixture and a RecHit. The prior
0009  *  is specified during construction time in the form of a vector of
0010  *  trajectory states.
0011  */
0012 
0013 class PosteriorWeightsCalculator {
0014 private:
0015   typedef TrajectoryStateOnSurface TSOS;
0016 
0017 public:
0018   PosteriorWeightsCalculator(const std::vector<TSOS>& mixture) : predictedComponents(mixture) {}
0019 
0020   ~PosteriorWeightsCalculator() {}
0021   /// Create random state
0022   std::vector<double> weights(const TrackingRecHit& tsos) const;
0023   template <unsigned int D>
0024   std::vector<double> weights(const TrackingRecHit& tsos) const;
0025 
0026 private:
0027   std::vector<TSOS> predictedComponents;
0028 };
0029 
0030 #endif  //_TR_PosteriorWeightsCalculator_H_