Project
Loading...
Searching...
No Matches
FairGeoVolume.h
Go to the documentation of this file.
1/********************************************************************************
2 * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3 * *
4 * This software is distributed under the terms of the *
5 * GNU Lesser General Public Licence (LGPL) version 3, *
6 * copied verbatim in the file "LICENSE" *
7 ********************************************************************************/
8#ifndef FAIRGEOVOLUME_H
9#define FAIRGEOVOLUME_H
10
11#include "FairGeoMedium.h" // for FairGeoMedium
12#include "FairGeoTransform.h" // for FairGeoTransform
13#include "FairGeoVector.h" // for FairGeoVector
14
15#include <Rtypes.h> // for Int_t, Text_t, Double_t, etc
16#include <TNamed.h> // for TNamed
17#include <TObjArray.h> // for TObjArray
18#include <TString.h> // for TString
19#include <stddef.h> // for NULL
20
25class FairGeoVolume : public TNamed
26{
27 private:
28 FairGeoVolume& operator=(const FairGeoVolume&);
29
30 protected:
31 TString shape;
32 TString mother;
33 TObjArray* points;
37 Int_t nPoints;
38 Int_t fHadFormat; //
39 Int_t fgMCid;
41 public:
42 inline FairGeoVolume();
44 virtual ~FairGeoVolume();
45 const TString& getName() const { return fName; }
46 const TString& getShape() const { return shape; }
47 const TString& getMother() const { return mother; }
51 Int_t getNumPoints() { return nPoints; }
52 inline FairGeoVector* getPoint(const Int_t n);
53 inline void setName(const Text_t* s);
55 inline void setShape(const Text_t* s);
56 inline void setMother(const Text_t* s);
57 void createPoints(const Int_t);
58 void setPoint(const Int_t, const Double_t, const Double_t, const Double_t);
59 void setPoint(const Int_t, const FairGeoVector&);
60 virtual void clear();
61 virtual void print();
62 virtual void setHadFormat(Int_t i) { fHadFormat = i; }
63 Double_t getVolParameter(Int_t nPoint, Int_t pos);
64 Int_t getMCid() { return fgMCid; }
65 void setMCid(Int_t MCid) { fgMCid = MCid; }
66
68};
69
70// -------------------- inlines --------------------------
71
73 : TNamed()
74 , shape("")
75 , mother("")
76 , points(NULL)
77 , transform(FairGeoTransform())
78 , fLabTransform(FairGeoTransform())
79 , fMedium(0)
80 , nPoints(0)
81 , fHadFormat(0)
82 , fgMCid(0)
83{}
84
86{
87 if (points && n < nPoints) {
88 return static_cast<FairGeoVector*>(points->At(n));
89 } else {
90 return 0;
91 }
92}
93
94inline void FairGeoVolume::setName(const Text_t* s)
95{
96 fName = s;
97 fName.ToUpper();
98}
99
100inline void FairGeoVolume::setShape(const Text_t* s)
101{
102 shape = s;
103 shape.ToUpper();
104}
105
106inline void FairGeoVolume::setMother(const Text_t* s)
107{
108 mother = s;
109 mother.ToUpper();
110}
111
112#endif /* !FAIRGEOVOLUME_H */
int32_t i
uint16_t pos
Definition RawData.h:3
void setMother(const Text_t *s)
void setVolumePar(FairGeoVolume &)
const TString & getShape() const
FairGeoTransform & getLabTransform()
ClassDef(FairGeoVolume, 1)
void setMCid(Int_t MCid)
FairGeoVector * getPoint(const Int_t n)
FairGeoMedium & getMedium()
TObjArray * points
void setShape(const Text_t *s)
virtual void print()
void setPoint(const Int_t, const Double_t, const Double_t, const Double_t)
virtual void setHadFormat(Int_t i)
FairGeoTransform & getTransform()
virtual void clear()
Int_t getNumPoints()
Double_t getVolParameter(Int_t nPoint, Int_t pos)
const TString & getName() const
virtual ~FairGeoVolume()
void setName(const Text_t *s)
FairGeoTransform transform
const TString & getMother() const
FairGeoMedium fMedium
FairGeoTransform fLabTransform
void createPoints(const Int_t)
GLdouble n
Definition glcorearb.h:1982