FitSum.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // \file FitSum.cxx
3 // \brief Kinematic summary object.
4 // \version $Id: KineSum.cxx,v 1.0 2014-09-25 00:00:00 mbaird42 Exp $
5 // \author $Author: mbaird42 $
6 // \date $Date: 2014-09-25 00:00:00 $
7 ////////////////////////////////////////////////////////////////////////
8 #include "RecoBase/FitSum.h"
9 
10 namespace rb
11 {
13  fPDG(0)
14  {
15  fChi2[0]=0;
16  fChi2[1]=0;
17  fChi2[2]=0;
18  fChi2[3]=0;
19  fNdof[0]=0;
20  fNdof[1]=0;
21  fNdof[2]=0;
22  fNdof[3]=0;
23  fFourMom.SetPxPyPzE(0.0,0.0,0.0,0.0);
24  }
25 
26  FitSum::FitSum(TVector3 dir, double p, double m, int pdg,
27  double chi2_hit1, double chi2_hit2,
28  double chi2_angle1, double chi2_angle2,
29  int ndof_hit1, int ndof_hit2,
30  int ndof_angle1, int ndof_angle2):
31  fPDG(pdg)
32  {
33  fChi2[0]=chi2_hit1;
34  fChi2[1]=chi2_hit2;
35  fChi2[2]=chi2_angle1;
36  fChi2[3]=chi2_angle2;
37  fNdof[0]=ndof_hit1;
38  fNdof[1]=ndof_hit2;
39  fNdof[2]=ndof_angle1;
40  fNdof[3]=ndof_angle2;
41  this->SetKin(dir,p,m);
42  }
43 
44  //
45  // Construct a four vector that contains kinematic
46  // information for each track.
47  //
48  void FitSum::SetKin(TVector3 dir, double p, double m)
49  {
50  fFourMom.SetPxPyPzE(dir.X()*p,dir.Y()*p,dir.Z()*p,sqrt(p*p+m*m));
51  }
52 
53 } // end namespace
54 ////////////////////////////////////////////////////////////////////////
TLorentzVector fFourMom
four momentum
Definition: FitSum.h:78
const char * p
Definition: xmltok.h:285
T sqrt(T number)
Definition: d0nt_math.hpp:156
double fChi2[8]
provide user with a chi-squared for track fit parameters
Definition: FitSum.h:80
Perform a "2 point" Hough transform on a collection of hits.
int fPDG
pdg code for particle type
Definition: FitSum.h:79
int fNdof[8]
provide user with N degrees of freedom for track fit parameters
Definition: FitSum.h:81
TDirectory * dir
Definition: macro.C:5
void SetKin(TVector3 dir, double momentum, double mass)
Definition: FitSum.cxx:48