Revision: | 1.6 |
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.5: | +5 -5 lines |
Log Message: | less aggressive rounding |
# | User | Rev | Content |
---|---|---|---|
1 | loizides | 1.1 | //-------------------------------------------------------------------------------------------------- |
2 | bendavid | 1.6 | // $Id: Vect3C.h,v 1.5 2009/07/20 03:12:22 loizides Exp $ |
3 | loizides | 1.1 | // |
4 | // Vect3C | ||
5 | // | ||
6 | // Implementation of our own ThreeVectorC32. | ||
7 | // | ||
8 | // Authors: C.Loizides | ||
9 | //-------------------------------------------------------------------------------------------------- | ||
10 | |||
11 | #ifndef MITCOMMON_DATAFORMATS_VECT3C_H | ||
12 | #define MITCOMMON_DATAFORMATS_VECT3C_H | ||
13 | |||
14 | #include "MitCommon/DataFormats/interface/Types.h" | ||
15 | |||
16 | namespace mithep | ||
17 | { | ||
18 | class Vect3C | ||
19 | { | ||
20 | public: | ||
21 | Vect3C() : | ||
22 | fRho(0), fEta(0), fPhi(0) {} | ||
23 | Vect3C(Double_t rho, Double_t eta, Double_t phi) : | ||
24 | fRho(rho), fEta(eta), fPhi(phi) {} | ||
25 | Vect3C(const ThreeVector pos) : | ||
26 | fRho(pos.Rho()), fEta(pos.Eta()), fPhi(pos.Phi()) {} | ||
27 | Vect3C(const ThreeVectorC pos) : | ||
28 | fRho(pos.Rho()), fEta(pos.Eta()), fPhi(pos.Phi()) {} | ||
29 | |||
30 | Double_t Eta() const { return fEta; } | ||
31 | Double_t Phi() const { return fPhi; } | ||
32 | Double_t Rho() const { return fRho; } | ||
33 | loizides | 1.3 | ThreeVectorC V() const { return ThreeVectorC(fRho,fEta,fPhi); } |
34 | bendavid | 1.4 | void Set(Double_t rho, Double_t eta, Double_t phi); |
35 | loizides | 1.1 | void SetXYZ(Double_t x, Double_t y, Double_t z); |
36 | |||
37 | protected: | ||
38 | bendavid | 1.6 | Double32_t fRho; //[0,0,14]rho-component |
39 | Double32_t fEta; //[0,0,14]eta-component | ||
40 | Double32_t fPhi; //[0,0,14]phi-component | ||
41 | loizides | 1.1 | |
42 | bendavid | 1.6 | ClassDef(Vect3C, 2) // Implementation of our own ThreeVectorC32 |
43 | loizides | 1.1 | }; |
44 | } | ||
45 | |||
46 | //-------------------------------------------------------------------------------------------------- | ||
47 | inline void mithep::Vect3C::SetXYZ(Double_t x, Double_t y, Double_t z) | ||
48 | { | ||
49 | // Set four vector. | ||
50 | |||
51 | ThreeVector tmp(x, y, z); | ||
52 | fRho=tmp.Rho(); | ||
53 | fEta=tmp.Eta(); | ||
54 | fPhi=tmp.Phi(); | ||
55 | } | ||
56 | bendavid | 1.4 | |
57 | //-------------------------------------------------------------------------------------------------- | ||
58 | inline void mithep::Vect3C::Set(Double_t rho, Double_t eta, Double_t phi) | ||
59 | { | ||
60 | // Set four vector. | ||
61 | |||
62 | fRho = rho; | ||
63 | fEta = eta; | ||
64 | fPhi = phi; | ||
65 | } | ||
66 | loizides | 1.1 | #endif |