WCSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WCSimRootGeom.hh
Go to the documentation of this file.
1 #ifndef WCSim_RootGeom
2 #define WCSim_RootGeom
3 
5 //
6 // WCSim_RootGeom
7 //
8 // This class contains information needed to be passed to reconstruction
9 // routines. It's just simple right now-- only the bare-bones
10 // WC info
12 
13 #include "TObject.h"
14 #include "TClonesArray.h"
15 
16 class TDirectory;
17 
19 
20 class WCSimRootPMT : public TObject {
21 
22 private:
23  Int_t fTubeNo;
24  Int_t fCylLoc; // endcap1, wall, endcap2
25  Float_t fOrientation[3];
26  Float_t fPosition[3];
27 
28 public:
29  WCSimRootPMT();
30  WCSimRootPMT(Int_t tubeNo, Int_t cylLoc, Double_t orientation[3], Double_t position[3]);
31  WCSimRootPMT(const WCSimRootPMT & in);
32  virtual ~WCSimRootPMT();
33  bool CompareAllVariables(const WCSimRootPMT * c) const;
34 
35  void SetTubeNo(Int_t i) {fTubeNo=i;}
36  void SetCylLoc(Int_t i) {fCylLoc=i;}
37  void SetOrientation(Int_t i, Double_t f) {fOrientation[i]= ( (i<3) ? f : 0);}
38  void SetPosition(Int_t i, Double_t f) {fPosition[i]= ( (i<3) ? f : 0);}
39 
40  Int_t GetTubeNo() const {return fTubeNo;}
41  Int_t GetCylLoc() const {return fCylLoc;}
42  Float_t GetOrientation(Int_t i=0) const {return (i<3) ? fOrientation[i] : 0;}
43  Float_t GetPosition(Int_t i=0) const {return (i<3) ? fPosition[i] : 0;}
44 
45  ClassDef(WCSimRootPMT,1) //WCSimPMT structure
46 };
47 
48 
50 
51 class WCSimRootGeom : public TObject {
52 
53 private:
54 
55  Float_t fWCCylRadius; // Radius of WC tank
56  Float_t fWCCylLength; // Length of WC tank
57 
58  Int_t fgeo_type; // mailbox or cylinder?
59 
60  Float_t fWCPMTRadius; // Radius of PMT
61  Int_t fWCNumPMT; // Number of PMTs
62  Float_t fODWCPMTRadius; // Radius of OD PMT
63  Int_t fODWCNumPMT; // Number of OD PMTs
64  Float_t fWCOffset[3]; // Offset of barrel center in global coords
65  Int_t fOrientation; //Orientation o detector, 0 is 2km horizontal, 1 is Upright
66 
67  TClonesArray *fPMTArray;
68 
69 public:
70 
71  WCSimRootGeom();
72  WCSimRootGeom(const WCSimRootGeom & in);
73  virtual ~WCSimRootGeom();
74  bool CompareAllVariables(const WCSimRootGeom * c) const;
75 
76  // Sets and gets
77 
78  void SetWCCylRadius(Double_t f) {fWCCylRadius=f;}
79  void SetWCCylLength(Double_t f) {fWCCylLength=f;}
80 
81  void SetGeo_Type(Int_t f){fgeo_type = f;}
82 
83  void SetWCNumPMT(Int_t i) {fWCNumPMT= i;}
84  void SetODWCNumPMT(Int_t i) {fODWCNumPMT= i;}
85  void SetWCPMTRadius(Double_t f) {fWCPMTRadius = f;}
86  void SetODWCPMTRadius(Double_t f) {fODWCPMTRadius = f;}
87  void SetWCOffset(Double_t x, Double_t y, Double_t z)
88  {fWCOffset[0]=x; fWCOffset[1]=y; fWCOffset[2] = z;}
89  void SetPMT(Int_t i, Int_t tubeno, Int_t cyl_loc, Double_t rot[3], Double_t pos[3], bool expand=true);
90  void SetOrientation(Int_t o) {fOrientation = o;}
91 
92  Float_t GetWCCylRadius() const {return fWCCylRadius;}
93  Float_t GetWCCylLength() const {return fWCCylLength;}
94 
95  Int_t GetGeo_Type() const {return fgeo_type;}
96 
97 
98  Int_t GetWCNumPMT() const {return fWCNumPMT;}
99  Int_t GetODWCNumPMT() const {return fODWCNumPMT;}
100  Float_t GetWCPMTRadius() const {return fWCPMTRadius;}
101  Float_t GetODWCPMTRadius() const {return fODWCPMTRadius;}
102  Float_t GetWCOffset(Int_t i) const {return (i<3) ? fWCOffset[i] : 0.;}
103  Int_t GetOrientation() const { return fOrientation; }
104 
105  WCSimRootPMT GetPMT(Int_t i){return *(WCSimRootPMT*)(*fPMTArray)[i];}
106  const WCSimRootPMT * GetPMTPtr(Int_t i) const {return (WCSimRootPMT*)(fPMTArray->At(i));}
107 
108  ClassDef(WCSimRootGeom,1) //WCSimRootEvent structure
109 };
110 
111 
112 #endif
void SetPosition(Int_t i, Double_t f)
void SetOrientation(Int_t i, Double_t f)
Float_t GetPosition(Int_t i=0) const
void SetTubeNo(Int_t i)
Float_t GetWCOffset(Int_t i) const
void SetWCNumPMT(Int_t i)
Int_t GetWCNumPMT() const
Int_t GetTubeNo() const
Float_t fWCPMTRadius
void SetODWCPMTRadius(Double_t f)
void SetWCCylRadius(Double_t f)
Int_t GetGeo_Type() const
Float_t GetOrientation(Int_t i=0) const
void SetWCCylLength(Double_t f)
const WCSimRootPMT * GetPMTPtr(Int_t i) const
Float_t GetWCPMTRadius() const
void SetODWCNumPMT(Int_t i)
Int_t GetCylLoc() const
virtual ~WCSimRootGeom()
Float_t GetODWCPMTRadius() const
void SetOrientation(Int_t o)
void SetWCPMTRadius(Double_t f)
Float_t fWCCylRadius
bool CompareAllVariables(const WCSimRootGeom *c) const
Float_t fPosition[3]
void SetGeo_Type(Int_t f)
bool CompareAllVariables(const WCSimRootPMT *c) const
Float_t GetWCCylRadius() const
Int_t GetODWCNumPMT() const
void SetWCOffset(Double_t x, Double_t y, Double_t z)
Int_t GetOrientation() const
Float_t GetWCCylLength() const
void SetPMT(Int_t i, Int_t tubeno, Int_t cyl_loc, Double_t rot[3], Double_t pos[3], bool expand=true)
Float_t fWCOffset[3]
Float_t fWCCylLength
virtual ~WCSimRootPMT()
void SetCylLoc(Int_t i)
Float_t fODWCPMTRadius
Float_t fOrientation[3]
TClonesArray * fPMTArray
WCSimRootPMT GetPMT(Int_t i)