3 |
|
// |
4 |
|
// Vertex |
5 |
|
// |
6 |
< |
// Vertex class implemented as holding a 3d vector as a point in space. |
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 DATATREE_VERTEX_H |
12 |
< |
#define DATATREE_VERTEX_H |
11 |
> |
#ifndef MITANA_DATATREE_VERTEX_H |
12 |
> |
#define MITANA_DATATREE_VERTEX_H |
13 |
|
|
14 |
< |
#include "MitAna/DataTree/interface/DataObject.h" |
14 |
> |
#include <TMath.h> |
15 |
> |
#include "MitAna/DataTree/interface/BaseVertex.h" |
16 |
|
|
17 |
|
namespace mithep |
18 |
|
{ |
19 |
< |
class Vertex : public DataObject |
19 |
> |
class Vertex : public BaseVertex |
20 |
|
{ |
21 |
|
public: |
22 |
< |
Vertex() : fPoint(0,0,0) {} |
23 |
< |
Vertex(Double_t x, Double_t y, Double_t z) : fPoint(x,y,z) {} |
24 |
< |
~Vertex() {} |
22 |
> |
Vertex() : fChi2(0), fNdof(0), fNTracks(0) {} |
23 |
> |
Vertex(Double_t x, Double_t y, Double_t z) : |
24 |
> |
BaseVertex(x,y,z), fChi2(0), fNdof(0), fNTracks(0) {} |
25 |
> |
Vertex(Double_t x, Double_t y, Double_t z, Double_t xErr, Double_t yErr, Double_t zErr) : |
26 |
> |
BaseVertex(x,y,z,xErr,yErr,zErr), fChi2(0), fNdof(0), fNTracks(0) {} |
27 |
> |
Vertex(const ThreeVector &pos) : |
28 |
> |
BaseVertex(pos), fChi2(0), fNdof(0), fNTracks(0) {} |
29 |
|
|
30 |
< |
Double_t Phi() const { return fPoint.Phi(); } |
31 |
< |
Double_t Rho() const { return fPoint.Rho(); } |
32 |
< |
void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); } |
33 |
< |
Double_t X() const { return fPoint.X(); } |
34 |
< |
Double_t Y() const { return fPoint.Y(); } |
35 |
< |
Double_t Z() const { return fPoint.Z(); } |
30 |
> |
Double_t Chi2() const { return fChi2; } |
31 |
> |
UShort_t Ndof() const { return fNdof; } |
32 |
> |
UInt_t NTracks() const { return fNTracks; } |
33 |
> |
EObjType ObjType() const { return kVertex; } |
34 |
> |
Double_t Prob() const { return TMath::Prob(fChi2,fNdof); } |
35 |
> |
void SetChi2(Double_t chi2) { fChi2 = chi2; } |
36 |
> |
void SetNdof(UShort_t nDof) { fNdof = nDof; } |
37 |
> |
void SetNTracks(UShort_t ntrks) { fNTracks = ntrks; } |
38 |
|
|
39 |
|
protected: |
40 |
< |
ThreeVector fPoint; //point in space |
40 |
> |
Double32_t fChi2; //[0,0,12]chi squared of conversion vertex fit |
41 |
> |
UShort_t fNdof; //number of degrees of freedom of conversion vertex fit |
42 |
> |
UShort_t fNTracks; //number of tracks used for the fit |
43 |
|
|
44 |
|
ClassDef(Vertex, 1) // Vertex class |
45 |
|
}; |