#ifndef FAIRGEOVOLUME_H #define FAIRGEOVOLUME_H #include "FairGeoTransform.h" #include "FairGeoMedium.h" #include "TNamed.h" #include "TObjArray.h" class FairGeoVector; /** * basic geometry parameters of a volume * @author Ilse koenig */ class FairGeoVolume : public TNamed { private: FairGeoVolume& operator=(const FairGeoVolume&); protected: TString shape; /**eant shape of the volume*/ TString mother; /** Name of the mother volume*/ TObjArray* points; /** array of points (type FairGeoVector)*/ FairGeoTransform transform; /** transformation relative to the mother system */ FairGeoTransform fLabTransform; /** transformation to the LAB system; */ FairGeoMedium fMedium; /** medium properties */ Int_t nPoints; /** number of points */ Int_t fHadFormat; // Int_t fgMCid; /** Volume Id given by MC*/ public: inline FairGeoVolume(); FairGeoVolume(FairGeoVolume&); virtual ~FairGeoVolume(); const TString& getName() const { return fName; } const TString& getShape() const { return shape; } const TString& getMother() const { return mother; } FairGeoTransform& getTransform() { return transform; } FairGeoTransform& getLabTransform() { return fLabTransform;} FairGeoMedium& getMedium() { return fMedium;} Int_t getNumPoints() { return nPoints;} inline FairGeoVector* getPoint(const Int_t n); inline void setName(const Text_t* s); void setVolumePar(FairGeoVolume&); inline void setShape(const Text_t* s); inline void setMother(const Text_t* s); void createPoints(const Int_t); void setPoint(const Int_t,const Double_t,const Double_t,const Double_t); void setPoint(const Int_t,const FairGeoVector&); virtual void clear(); virtual void print(); virtual void setHadFormat( Int_t i ) { fHadFormat=i;} Double_t getVolParameter( Int_t nPoint, Int_t pos ); Int_t getMCid() {return fgMCid;} void setMCid(Int_t MCid) {fgMCid=MCid;} ClassDef(FairGeoVolume,1) // }; // -------------------- inlines -------------------------- inline FairGeoVolume::FairGeoVolume() :TNamed(), shape(""), mother(""), points(NULL), transform(FairGeoTransform()), fLabTransform(FairGeoTransform()), fMedium(0), nPoints(0), fHadFormat(0), fgMCid(0) { } inline FairGeoVector* FairGeoVolume::getPoint(const Int_t n) { if (points && nAt(n); } else { return 0; } } inline void FairGeoVolume::setName(const Text_t* s) { fName=s; fName.ToUpper(); } inline void FairGeoVolume::setShape(const Text_t* s) { shape=s; shape.ToUpper(); } inline void FairGeoVolume::setMother(const Text_t* s) { mother=s; mother.ToUpper(); } #endif /* !FAIRGEOVOLUME_H */