CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoVertex/PrimaryVertexProducer/interface/DAClusterizerInZ.h

Go to the documentation of this file.
00001 #ifndef DAClusterizerInZ_h
00002 #define DAClusterizerInZ_h
00003 
00010 #include "RecoVertex/PrimaryVertexProducer/interface/TrackClusterizerInZ.h"
00011 #include "TrackingTools/TransientTrack/interface/TransientTrack.h"
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include <vector>
00014 #include "DataFormats/Math/interface/Error.h"
00015 #include "RecoVertex/VertexTools/interface/VertexDistanceXY.h"
00016 #include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"
00017 
00018 
00019 
00020 
00021 class DAClusterizerInZ : public TrackClusterizerInZ {
00022 
00023 
00024 public:
00025 
00026 struct track_t{
00027   double z;              // z-coordinate at point of closest approach to the beamline
00028   double dz2;            // square of the error of z(pca)
00029   const reco::TransientTrack* tt;  // a pointer to the Transient Track
00030   double Z;              // Z[i]   for DA clustering
00031   double pi;             // track weight
00032 };
00033 
00034 
00035 struct vertex_t{
00036   double z;    //           z coordinate
00037   double pk;   //           vertex weight for "constrained" clustering
00038   // --- temporary numbers, used during update
00039   double ei;
00040   double sw;
00041   double swz;
00042   double se;
00043 };
00044 
00045 
00046 
00047 
00048  DAClusterizerInZ(const edm::ParameterSet& conf);
00049 
00050   std::vector< std::vector<reco::TransientTrack> >
00051     clusterize(const std::vector<reco::TransientTrack> & tracks)const;
00052 
00053 
00054   std::vector< TransientVertex >
00055     vertices(const std::vector<reco::TransientTrack> & tracks, const int verbosity=0)const;
00056 
00057 
00058   std::vector<track_t> fill(const std::vector<reco::TransientTrack> & tracks)const;
00059 
00060   double update(
00061                      double beta,
00062                      std::vector<track_t> & tks,
00063                      std::vector<vertex_t> & y
00064                      )const;
00065 
00066   double update(
00067                      double beta,
00068                      std::vector<track_t> & tks,
00069                      std::vector<vertex_t> & y,
00070                      double &
00071                      )const;
00072 
00073   void dump(const double beta, const std::vector<vertex_t> & y, const std::vector<track_t> & tks, const int verbosity=0)const;
00074   bool merge(std::vector<vertex_t> &,int )const;
00075   bool purge(std::vector<vertex_t> &, std::vector<track_t> & , double &, const double )const;
00076 
00077   void splitAll(
00078                std::vector<track_t> & tks,
00079                std::vector<vertex_t> & y
00080                )const;
00081 
00082   double beta0(
00083                const double betamax,
00084                std::vector<track_t> & tks,
00085                std::vector<vertex_t> & y
00086                )const;
00087 
00088   double Eik(const track_t & t, const vertex_t & k)const;
00089 
00090   
00091 private:
00092   bool verbose_;
00093   float vertexSize_;
00094   int maxIterations_;
00095   double coolingFactor_;
00096   float betamax_;
00097   float betastop_;
00098   double dzCutOff_;
00099   double d0CutOff_;
00100 };
00101 
00102 #endif