CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/RecoVertex/VertexPrimitives/interface/BasicSingleVertexState.h

Go to the documentation of this file.
00001 #ifndef BasicSingleVertexState_H
00002 #define BasicSingleVertexState_H
00003 
00004 #include "RecoVertex/VertexPrimitives/interface/BasicVertexState.h"
00005 
00006 //#include "CommonReco/CommonVertex/interface/RefCountedVertexSeed.h"
00007 
00008 
00013 class BasicSingleVertexState : public BasicVertexState {
00014 
00015 public:
00016 
00019   BasicSingleVertexState();
00020   BasicSingleVertexState(const GlobalPoint & pos, const GlobalError & posErr,
00021                 const double & weightInMix = 1.0);
00022   BasicSingleVertexState(const GlobalPoint & pos, const GlobalWeight & posWeight,
00023                 const double & weightInMix = 1.0);
00024   BasicSingleVertexState(const AlgebraicVector3 & weightTimesPosition,
00025                 const GlobalWeight & posWeight,
00026                 const double & weightInMix = 1.0);
00027 
00030   virtual BasicSingleVertexState* clone() const
00031   {
00032     return new BasicSingleVertexState(*this);
00033   }
00034 
00035   GlobalPoint position() const;
00036   GlobalError error() const;
00037   GlobalWeight weight() const;
00038   AlgebraicVector3 weightTimesPosition() const;
00039   double weightInMixture() const;
00040 
00044   bool isValid() const {return valid;}
00045 
00046 private:
00047 
00048   void computePosition() const;
00049   void computeError() const;
00050   void computeWeight() const;
00051   void computeWeightTimesPos() const;
00052 
00053   mutable GlobalPoint thePos;
00054   mutable bool thePosAvailable;
00055   mutable GlobalError theErr;
00056   mutable bool theErrAvailable;
00057   mutable GlobalWeight theWeight;
00058   mutable bool theWeightAvailable;
00059   mutable AlgebraicVector3 theWeightTimesPos;
00060   mutable bool theWeightTimesPosAvailable;
00061 
00062   bool valid;
00063   double theWeightInMix;
00064 };
00065 
00066 #endif