CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/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   // ---for Tc
00044   double swE;
00045   double Tc;
00046 };
00047 
00048 
00049 
00050 
00051  DAClusterizerInZ(const edm::ParameterSet& conf);
00052 
00053   std::vector< std::vector<reco::TransientTrack> >
00054     clusterize(const std::vector<reco::TransientTrack> & tracks)const;
00055 
00056 
00057   std::vector< TransientVertex >
00058     vertices(const std::vector<reco::TransientTrack> & tracks, const int verbosity=0)const;
00059 
00060 
00061   std::vector<track_t> fill(const std::vector<reco::TransientTrack> & tracks)const;
00062 
00063  bool split(
00064                      double beta,
00065                      std::vector<track_t> & tks,
00066                      std::vector<vertex_t> & y,
00067                      double threshold
00068                )const;
00069 
00070   double update(
00071                      double beta,
00072                      std::vector<track_t> & tks,
00073                      std::vector<vertex_t> & y
00074                      )const;
00075 
00076   double update(
00077                      double beta,
00078                      std::vector<track_t> & tks,
00079                      std::vector<vertex_t> & y,
00080                      double &
00081                      )const;
00082 
00083   void dump(const double beta, const std::vector<vertex_t> & y, const std::vector<track_t> & tks, const int verbosity=0)const;
00084   bool merge(std::vector<vertex_t> &,int )const;
00085   bool merge(std::vector<vertex_t> &,double & )const;
00086   bool purge(std::vector<vertex_t> &, std::vector<track_t> & , double &, const double )const;
00087 
00088   void splitAll(
00089                std::vector<vertex_t> & y
00090                )const;
00091 
00092   double beta0(
00093                const double betamax,
00094                std::vector<track_t> & tks,
00095                std::vector<vertex_t> & y
00096                )const;
00097 
00098   double Eik(const track_t & t, const vertex_t & k)const;
00099 
00100   
00101 private:
00102   bool verbose_;
00103   bool useTc_;
00104   float vertexSize_;
00105   int maxIterations_;
00106   double coolingFactor_;
00107   float betamax_;
00108   float betastop_;
00109   double dzCutOff_;
00110   double d0CutOff_;
00111 };
00112 
00113 #endif