ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/Vect4M.h
Revision: 1.7
Committed: Wed Oct 20 20:33:17 2010 UTC (14 years, 6 months ago) by bendavid
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, V07-05-00, Mit_016, Mit_015b, Mit_015a, HEAD
Branch point for: Mit_025c_branch
Changes since 1.6: +4 -4 lines
Log Message:
less aggressive rounding

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Vect4M.h,v 1.6 2009/03/25 10:01:41 loizides Exp $
3 //
4 // Vect4M
5 //
6 // Implementation of our own FourVectorM32.
7 //
8 // Authors: C.Loizides
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITCOMMON_DATAFORMATS_VECT4M_H
12 #define MITCOMMON_DATAFORMATS_VECT4M_H
13
14 #include "MitCommon/DataFormats/interface/Types.h"
15
16 namespace mithep
17 {
18 class Vect4M
19 {
20 public:
21 Vect4M() :
22 fPt(0), fEta(0), fPhi(0), fM(0) {}
23 Vect4M(Double_t pt, Double_t eta, Double_t phi, Double_t m) :
24 fPt(pt), fEta(eta), fPhi(phi), fM(m) {}
25 Vect4M(const FourVector &mom) :
26 fPt(mom.Pt()), fEta(mom.Eta()), fPhi(mom.Phi()), fM(mom.M()) {}
27 Vect4M(const FourVectorM &mom) :
28 fPt(mom.Pt()), fEta(mom.Eta()), fPhi(mom.Phi()), fM(mom.M()) {}
29
30 Double_t Eta() const { return fEta; }
31 Double_t Phi() const { return fPhi; }
32 Double_t Pt() const { return fPt; }
33 Double_t M() const { return fM; }
34 void Set(Double_t pt, Double_t eta, Double_t phi, Double_t m);
35 void SetXYZT(Double_t px, Double_t py, Double_t pz, Double_t e);
36 FourVectorM V() const { return FourVectorM(fPt,fEta,fPhi,fM); }
37
38 protected:
39 Double32_t fPt; //[0,0,14]pt-component
40 Double32_t fEta; //[0,0,14]eta-component
41 Double32_t fPhi; //[0,0,14]phi-component
42 Double32_t fM; //[0,0,14]mass-component
43
44 ClassDef(Vect4M, 2) // Implementation of our own FourVectorM32
45 };
46 }
47
48 //--------------------------------------------------------------------------------------------------
49 inline void mithep::Vect4M::Set(Double_t pt, Double_t eta, Double_t phi, Double_t m)
50 {
51 // Set four vector.
52
53 fPt = pt;
54 fEta = eta;
55 fPhi = phi;
56 fM = m;
57 }
58
59 //--------------------------------------------------------------------------------------------------
60 inline void mithep::Vect4M::SetXYZT(Double_t px, Double_t py, Double_t pz, Double_t e)
61 {
62 // Set four vector.
63
64 FourVector tmp(px, py, pz, e);
65 fPt = tmp.Pt();
66 fEta = tmp.Eta();
67 fPhi = tmp.Phi();
68 fM = tmp.M();
69 }
70 #endif