ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Vertex.h
Revision: 1.8
Committed: Wed Feb 18 15:38:55 2009 UTC (16 years, 2 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2, Mit_008pre1
Changes since 1.7: +3 -5 lines
Log Message:
Reworked particle interface to cache FourVectorM

File Contents

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