EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairGeoVolume.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairGeoVolume.h
1 #ifndef FAIRGEOVOLUME_H
2 #define FAIRGEOVOLUME_H
3 
4 #include "FairGeoTransform.h"
5 #include "FairGeoMedium.h"
6 #include "TNamed.h"
7 #include "TObjArray.h"
8 
9 class FairGeoVector;
10 
15 class FairGeoVolume : public TNamed
16 {
17  private:
19  protected:
20  TString shape;
21  TString mother;
22  TObjArray* points;
26  Int_t nPoints;
27  Int_t fHadFormat; //
28  Int_t fgMCid;
30  public:
31  inline FairGeoVolume();
33  virtual ~FairGeoVolume();
34  const TString& getName() const { return fName; }
35  const TString& getShape() const { return shape; }
36  const TString& getMother() const { return mother; }
40  Int_t getNumPoints() { return nPoints;}
41  inline FairGeoVector* getPoint(const Int_t n);
42  inline void setName(const Text_t* s);
44  inline void setShape(const Text_t* s);
45  inline void setMother(const Text_t* s);
46  void createPoints(const Int_t);
47  void setPoint(const Int_t,const Double_t,const Double_t,const Double_t);
48  void setPoint(const Int_t,const FairGeoVector&);
49  virtual void clear();
50  virtual void print();
51  virtual void setHadFormat( Int_t i ) { fHadFormat=i;}
52  Double_t getVolParameter( Int_t nPoint, Int_t pos );
53  Int_t getMCid() {return fgMCid;}
54  void setMCid(Int_t MCid) {fgMCid=MCid;}
55 
56  ClassDef(FairGeoVolume,1) //
57 };
58 
59 // -------------------- inlines --------------------------
60 
62  :TNamed(),
63  shape(""),
64  mother(""),
65  points(NULL),
67  fLabTransform(FairGeoTransform()),
68  fMedium(0),
69  nPoints(0),
70  fHadFormat(0),
71  fgMCid(0)
72 {
73 }
74 
75 
77 {
78  if (points && n<nPoints) { return (FairGeoVector*)points->At(n); }
79  else { return 0; }
80 }
81 
82 inline void FairGeoVolume::setName(const Text_t* s)
83 {
84  fName=s;
85  fName.ToUpper();
86 }
87 
88 inline void FairGeoVolume::setShape(const Text_t* s)
89 {
90  shape=s;
91  shape.ToUpper();
92 }
93 
94 inline void FairGeoVolume::setMother(const Text_t* s)
95 {
96  mother=s;
97  mother.ToUpper();
98 }
99 
100 #endif /* !FAIRGEOVOLUME_H */