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
|