ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitCommon/DataFormats/interface/Vect3.h
Revision: 1.2
Committed: Mon Mar 16 20:29:11 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_008pre2
Changes since 1.1: +4 -4 lines
Log Message:
Adjustment

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Vect3.h,v 1.1 2009/03/08 12:00:54 loizides Exp $
3 //
4 // Vect3C
5 //
6 // Implementation of our own ThreeVector32.
7 //
8 // Authors: C.Loizides
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITCOMMON_DATAFORMATS_VECT3_H
12 #define MITCOMMON_DATAFORMATS_VECT3_H
13
14 #include "MitCommon/DataFormats/interface/Types.h"
15
16 namespace mithep
17 {
18 class Vect3
19 {
20 public:
21 Vect3() :
22 fX(0), fY(0), fZ(0) {}
23 Vect3(Double_t x, Double_t y, Double_t z) :
24 fX(x), fY(y), fZ(z) {}
25 Vect3(const ThreeVector pos) :
26 fX(pos.X()), fY(pos.Y()), fZ(pos.Z()) {}
27 Vect3(const ThreeVectorC pos) :
28 fX(pos.X()), fY(pos.Y()), fZ(pos.Z()) {}
29
30 Double_t X() const { return fX; }
31 Double_t Y() const { return fY; }
32 Double_t Z() const { return fZ; }
33 const ThreeVector V() const { return ThreeVector(fX,fY,fZ); }
34 void SetXYZ(Double_t x, Double_t y, Double_t z);
35
36 protected:
37 Double32_t fX; //[0,0,14]x-component
38 Double32_t fY; //[0,0,14]y-component
39 Double32_t fZ; //[0,0,14]z-component
40
41 ClassDef(Vect3, 1)
42 };
43 }
44
45 //--------------------------------------------------------------------------------------------------
46 inline void mithep::Vect3::SetXYZ(Double_t x, Double_t y, Double_t z)
47 {
48 // Set three vector.
49
50 fX=x;
51 fY=y;
52 fZ=z;
53 }
54 #endif