ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Vertex.h
Revision: 1.7
Committed: Tue Dec 9 17:47:00 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.6: +10 -10 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Vertex.h,v 1.6 2008/11/12 18:18:27 bendavid Exp $
3 //
4 // Vertex
5 //
6 // Vertex class implemented as holding a 3d vector as a point in space with fit information.
7 //
8 // Authors: J.Bendavid
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_VERTEX_H
12 #define MITANA_DATATREE_VERTEX_H
13
14 #include <TMath.h>
15 #include "MitAna/DataTree/interface/BaseVertex.h"
16
17 namespace mithep
18 {
19 class Vertex : public BaseVertex
20 {
21 public:
22 Vertex() :
23 fChi2(0.0), fNdof(0), fNTracks(0) {}
24 Vertex(Double_t x, Double_t y, Double_t z) :
25 BaseVertex(x,y,z), fChi2(0), fNdof(0), fNTracks(0) {}
26 Vertex(Double_t x, Double_t y, Double_t z, Double_t xErr, Double_t yErr, Double_t zErr) :
27 BaseVertex(x,y,z,xErr,yErr,zErr), fChi2(0.0), fNdof(0), fNTracks(0) {}
28 Vertex(const ThreeVector &pos) :
29 BaseVertex(pos), fChi2(0), fNdof(0), fNTracks(0) {}
30 ~Vertex() {}
31
32 Double_t Chi2() const { return fChi2; }
33 UInt_t Ndof() const { return fNdof; }
34 UInt_t NTracks() const { return fNTracks; }
35 EObjType ObjType() const { return kVertex; }
36 Double_t Prob() const { return TMath::Prob(fChi2,fNdof); }
37 void SetChi2(Double_t chi2) { fChi2 = chi2; }
38 void SetNdof(UInt_t nDof) { fNdof = nDof; }
39 void SetNTracks(UInt_t ntrks) { fNTracks = ntrks; }
40
41 protected:
42 Double32_t fChi2; //chi squared of conversion vertex fit
43 UInt_t fNdof; //number of degrees of freedom of conversion vertex fit
44 UInt_t fNTracks; //number of tracks used for the fit
45
46 ClassDef(Vertex, 1) // Vertex class
47 };
48 }
49 #endif