ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/Vect4M.h
Revision: 1.6
Committed: Wed Mar 25 10:01:41 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, ConvRejection-10-06-09, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, Mit_011a, Mit_011, Mit_010a, Mit_010, Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008
Changes since 1.5: +3 -3 lines
Log Message:
Forgotton commit.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Vect4M.h,v 1.5 2009/03/25 05:16:12 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,12]eta-component
41 Double32_t fPhi; //[0,0,12]phi-component
42 Double32_t fM; //[0,0,14]mass-component
43
44 ClassDef(Vect4M, 1) // 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