StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcGeantPoint.hh
1 // $Id: StFtpcGeantPoint.hh,v 1.2 2001/01/25 15:25:52 oldi Exp $
2 // $Log: StFtpcGeantPoint.hh,v $
3 // Revision 1.2 2001/01/25 15:25:52 oldi
4 // Fix of several bugs which caused memory leaks:
5 // - Some arrays were not allocated and/or deleted properly.
6 // - TClonesArray seems to have a problem (it could be that I used it in a
7 // wrong way in StFtpcTrackMaker form where Holm cut and pasted it).
8 // I changed all occurences to TObjArray which makes the program slightly
9 // slower but much more save (in terms of memory usage).
10 //
11 // Revision 1.1 2000/11/24 15:02:34 hummler
12 // commit changes omitted in last commit
13 //
14 
16 // //
17 // StFtpcGeantPoint class - one FTPC cluster for the FTPC evaluation. //
18 // //
20 
21 #ifndef STAR_StFtpcGeantPoint
22 #define STAR_StFtpcGeantPoint
23 
24 #include "TObject.h"
25 
26 #include "tables/St_ffs_gepoint_Table.h"
27 
28 class StFtpcGeantPoint : public TObject {
29 
30 private:
31 
32  Int_t mTrackPointer;
33  Int_t mGeantPID;
34  Int_t mPrimaryTag;
35  Int_t mGeantProcess;
36 
37  Double_t mVertexMomentum[3]; // vector of geant track vertex momentum
38  Double_t mLocalMomentum[3]; // vector of geant track local momentum
39  Double_t mVertexPosition[3]; // vector of geant vertex position
40 
41 public:
42 
43  StFtpcGeantPoint(); // default constructor
44  virtual ~StFtpcGeantPoint(); // destructor
45  virtual Int_t ToTable(ffs_gepoint_st *geant_st); // writes cluster to STAF table
46 
47  // getter
48  Int_t GetTrackPointer() {return mTrackPointer;}
49  Int_t GetGeantPID() {return mGeantPID;}
50  Int_t GetPrimaryTag() {return mPrimaryTag;}
51  Int_t GetGeantProcess() {return mGeantProcess;}
52 
53  Double_t GetVertexMomentum(Int_t i) { return mVertexMomentum[i];}
54  Double_t GetLocalMomentum(Int_t i) { return mLocalMomentum[i];}
55  Double_t GetVertexPosition(Int_t i) { return mVertexPosition[i];}
56 
57  // setter
58  void SetTrackPointer(Int_t d) {mTrackPointer =d;}
59  void SetGeantPID(Int_t d) {mGeantPID =d;}
60  void SetPrimaryTag(Int_t d) {mPrimaryTag =d;}
61  void SetGeantProcess(Int_t d) {mGeantProcess =d;}
62 
63  void SetVertexMomentum(Int_t i, Double_t f) {if(i>=0&&i<3) mVertexMomentum[i]=f;}
64  void SetLocalMomentum(Int_t i, Double_t f) {if(i>=0&&i<3) mLocalMomentum[i]=f;}
65  void SetVertexPosition(Int_t i, Double_t f) {if(i>=0&&i<3) mVertexPosition[i]=f;}
66 
67  void SetVertexMomentum(Double_t f1,Double_t f2,Double_t f3)
68  {mVertexMomentum[0]=f1;mVertexMomentum[1]=f2;mVertexMomentum[2]=f3;}
69  void SetLocalMomentum(Double_t f1,Double_t f2,Double_t f3)
70  {mLocalMomentum[0]=f1;mLocalMomentum[1]=f2;mLocalMomentum[2]=f3;}
71  void SetVertexPosition(Double_t f1,Double_t f2,Double_t f3)
72  {mVertexPosition[0]=f1;mVertexPosition[1]=f2;mVertexPosition[2]=f3;}
73 
74  ClassDef(StFtpcGeantPoint, 1) //Ftpc point class
75 };
76 
77 #endif