CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackHelixVertexFitter.h
Go to the documentation of this file.
1 #ifndef RecoTauTag_ImpactParameter_TrackHelixVertexFitter_h
2 #define RecoTauTag_ImpactParameter_TrackHelixVertexFitter_h
3 
4 /* From SimpleFits Package
5  * Designed an written by
6  * author: Ian M. Nugent
7  * Humboldt Foundations
8  */
9 
10 // system include files
11 #include <TMatrixT.h>
12 #include <TVectorT.h>
13 #include <TLorentzVector.h>
14 #include <TVector3.h>
15 #include <TVectorD.h>
16 
21 
22 namespace tauImpactParameter {
23 
25  public:
29 
30  TrackHelixVertexFitter(const std::vector<TrackParticle>& particles, const TVector3& vguess);
31  virtual ~TrackHelixVertexFitter();
32 
33  virtual bool fit()=0;
34  virtual double updateChisquare(const TVectorT<double>& inpar);
35  virtual double chiSquare(){return chi2_;}
36  virtual double ndf(){return ndf_;}
38  virtual std::vector<TrackParticle> getRefitTracks();
39  std::vector<LorentzVectorParticle> getRefitLorentzVectorParticles();
40  virtual TVector3 getVertex();
41  virtual TMatrixTSym<double> getVertexError();
42 
43  static void computedxydz(const TVectorT<double>& inpar,int particle,double& kappa,double& lam,double& phi,double& x,double& y,double& z,double& s,double& dxy,double& dz);
44  static TVectorT<double> computeLorentzVectorPar(const TVectorT<double>& inpar);
45  protected:
47  TVectorT<double> par_;
48  TMatrixTSym<double> parcov_;
49  virtual TString freeParName(int Par);
50  double chi2_, ndf_;
51  private:
52  static TVectorT<double> computePar(const TVectorT<double>& inpar);
53  static TVectorT<double> computeTrackPar(const TVectorT<double>& inpar,int p=0);
54  static TVectorT<double> computeMotherLorentzVectorPar(const TVectorT<double>& inpar);
55 
56  static int measuredValueIndex(int TrackPar,int Particle){
57  return TrackPar+Particle*TrackParticle::NHelixPar;
58  }
59  static int freeParIndex(int Par,int Particle){
60  if(Par==x0 || Par==y0 || Par==z0) return Par;
61  return Par+Particle*(NFreeTrackPar-NFreeVertexPar);
62  }
63  static void parSizeInfo(const TVectorT<double>& inpar, int& np, int& parsize,bool hasextras=0);
64 
65  std::vector<TrackParticle> particles_;
66  TVectorT<double> val_;
67  TMatrixTSym<double> cov_;
68  TMatrixTSym<double> cov_inv_;
70 };
71 
72 }
73 #endif
74 
75 
static TVectorT< double > computeMotherLorentzVectorPar(const TVectorT< double > &inpar)
virtual double updateChisquare(const TVectorT< double > &inpar)
virtual std::vector< TrackParticle > getRefitTracks()
int np
Definition: AMPTWrapper.h:33
static TVectorT< double > computePar(const TVectorT< double > &inpar)
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
static int measuredValueIndex(int TrackPar, int Particle)
virtual TMatrixTSym< double > getVertexError()
std::vector< LorentzVectorParticle > getRefitLorentzVectorParticles()
TrackHelixVertexFitter(const std::vector< TrackParticle > &particles, const TVector3 &vguess)
static TVectorT< double > computeTrackPar(const TVectorT< double > &inpar, int p=0)
static int freeParIndex(int Par, int Particle)
static void computedxydz(const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)
static void parSizeInfo(const TVectorT< double > &inpar, int &np, int &parsize, bool hasextras=0)
static const G4double kappa