]>
Commit | Line | Data |
---|---|---|
a3d834a0 | 1 | #ifndef ALIITSGEOMSPD_H |
2 | #define ALIITSGEOMSPD_H | |
3da30618 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
58005f18 | 7 | |
8253cd9a | 8 | #include <TObject.h> |
9 | #include <TBRIK.h> | |
195d8dfe | 10 | |
58005f18 | 11 | |
8253cd9a | 12 | class TShape; |
195d8dfe | 13 | |
8253cd9a | 14 | class AliITSgeomSPD : public TObject { |
a3d834a0 | 15 | |
8253cd9a | 16 | public: |
17 | AliITSgeomSPD(); | |
18 | AliITSgeomSPD(Float_t dy,Int_t nx,Float_t *bx,Int_t nz,Float_t *bz); | |
19 | AliITSgeomSPD(AliITSgeomSPD &source); | |
20 | AliITSgeomSPD& operator=(AliITSgeomSPD &source); | |
21 | virtual ~AliITSgeomSPD(); | |
22 | virtual void ReSetBins(Float_t dy,Int_t nx,Float_t *bx, | |
23 | Int_t nz,Float_t *bz); | |
24 | virtual TShape *GetShape() const {return fShapeSPD;} | |
31b8cd63 | 25 | virtual Float_t GetDx() const { // Get TBRIK Dx |
8253cd9a | 26 | if(fShapeSPD!=0) return fShapeSPD->GetDx(); |
27 | else return 0.0;} | |
31b8cd63 | 28 | virtual Float_t GetDy() const {// Get TBRIK Dy |
8253cd9a | 29 | if(fShapeSPD!=0) return fShapeSPD->GetDy(); |
30 | else return 0.0;} | |
31b8cd63 | 31 | virtual Float_t GetDz() const {// Get TBRIK Dz |
8253cd9a | 32 | if(fShapeSPD!=0) return fShapeSPD->GetDz(); |
33 | else return 0.0;} | |
8f74f9fa | 34 | virtual Int_t GetNbinsX() const {return fNbinx-1;} // returns the number of bins x |
35 | virtual Int_t GetNbinsZ() const {return fNbinz-1;} // returns the number of bins z | |
31b8cd63 | 36 | virtual Float_t GetBinSizeX(Int_t i) const |
8253cd9a | 37 | {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i+1]-fLowBinEdgeX[i]; |
38 | else return 0.0;}; // give size of bin i in x. | |
31b8cd63 | 39 | virtual Float_t GetBinSizeZ(Int_t i) const |
8253cd9a | 40 | {if(i<fNbinx-1&&i>=0) return fLowBinEdgeZ[i+1]-fLowBinEdgeZ[i]; |
41 | else return 0.0;}; // give size of bin i in z. | |
31b8cd63 | 42 | virtual Float_t GetBinLowEdgeX(Int_t i) const |
8253cd9a | 43 | {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i]; |
44 | else return 0.0;}; // give size of bin i in x. | |
31b8cd63 | 45 | virtual Float_t GetBinLowEdgeZ(Int_t i) const |
8253cd9a | 46 | {if(i<fNbinz-1&&i>=0) return fLowBinEdgeZ[i]; |
47 | else return 0.0;}; // give size of bin i in z. | |
48 | virtual void InitLowBinEdgeX(){// allocate memory for fLowBinEdgeX. | |
49 | if(fLowBinEdgeX!=0) delete[] fLowBinEdgeX; | |
50 | if(fNbinx>0) fLowBinEdgeX = new Float_t[fNbinx];else fLowBinEdgeX = 0;} | |
51 | virtual void InitLowBinEdgeZ(){// allocate memory for fLowBinEdgeZ. | |
52 | if(fLowBinEdgeZ!=0) delete[] fLowBinEdgeZ; | |
53 | if(fNbinz>0) fLowBinEdgeZ = new Float_t[fNbinz];else fLowBinEdgeZ = 0;} | |
54 | virtual void SetShape(const char *name,const char *title,const char *mat, | |
55 | Float_t dx,Float_t dy,Float_t dz) | |
56 | {fShapeSPD = new TBRIK(name,title,mat,dx,dy,dz);}; | |
57 | virtual void SetNbinX(Int_t i){fNbinx = i+1;} // Set nubmer of pixels in x | |
58 | virtual void SetNbinZ(Int_t i){fNbinz = i+1;} // Set nubmer of pixels in z | |
59 | virtual void SetLowBinEdgeX(Int_t i,Float_t s){//puts value in fLowbinEdgeX | |
60 | if(i>=0&&i<fNbinx) fLowBinEdgeX[i] = s;} | |
61 | virtual void SetLowBinEdgeZ(Int_t i,Float_t s){//puts value in fLowbinEdgeZ | |
62 | if(i>=0&&i<fNbinz) fLowBinEdgeZ[i] = s;}; | |
63 | virtual void LToDet(Float_t xl,Float_t zl,Int_t &row,Int_t &col); | |
64 | virtual void DetToL(Int_t row,Int_t col,Float_t &xl,Float_t &zl); | |
31b8cd63 | 65 | virtual void Print(ostream *os) const; // output streamer to standard out. |
8253cd9a | 66 | virtual void Read(istream *is); // input streamer from standard in. |
67 | ||
68 | protected: | |
69 | TBRIK *fShapeSPD; // SPD active area shape | |
70 | Int_t fNbinx; // the number of elements in fLowBinEdgeX (#bins-1) | |
71 | Int_t fNbinz; // the number of elements in fLowBinEdgeZ (#bins-1) | |
72 | Float_t *fLowBinEdgeX; //[fNbinx] Array of X lower bin edges for the pixels | |
73 | Float_t *fLowBinEdgeZ; //[fNbinz] Array of Z lower bin edges for the pixels | |
74 | ||
75 | ClassDef(AliITSgeomSPD,1) // ITS SPD detector geometry class.. | |
76 | ||
77 | }; | |
78 | // Input and output function for standard C++ input/output. | |
79 | ostream &operator<<(ostream &os,AliITSgeomSPD &source); | |
80 | istream &operator>>(istream &os,AliITSgeomSPD &source); | |
81 | #endif | |
82 | //====================================================================== | |
83 | ||
84 | #ifndef ALIITSGEOMSPD300_H | |
85 | #define ALIITSGEOMSPD300_H | |
86 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
87 | * See cxx source for full Copyright notice */ | |
88 | ||
89 | /* $Id$ */ | |
90 | ||
91 | //#include "AliITSgeomSPD.h" | |
92 | ||
8253cd9a | 93 | |
94 | class AliITSgeomSPD300 : public AliITSgeomSPD { | |
a3d834a0 | 95 | |
58005f18 | 96 | public: |
8253cd9a | 97 | AliITSgeomSPD300(); |
98 | ||
99 | // This clas now has version 0 so that it will not be written to a root | |
100 | // file. This is good since there are no longer any data members to this | |
101 | // class. It is only designed to make it easer to define this standard | |
102 | // SPD detector geometry. | |
103 | ClassDef(AliITSgeomSPD300,0) // ITS SPD detector geometry class for 300X50 micron pixel size. | |
104 | ||
105 | }; | |
106 | // Input and output function for standard C++ input/output. | |
107 | ostream &operator<<(ostream &os,AliITSgeomSPD300 &source); | |
108 | istream &operator>>(istream &os,AliITSgeomSPD300 &source); | |
109 | #endif | |
110 | //====================================================================== | |
111 | ||
112 | #ifndef ALIITSGEOMSPD425SHORT_H | |
113 | #define ALIITSGEOMSPD425SHORT_H | |
114 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
115 | * See cxx source for full Copyright notice */ | |
116 | ||
117 | /* $Id$ */ | |
118 | ||
119 | //#include "AliITSgeomSPD.h" | |
120 | ||
121 | ||
122 | // temporary - this will migrate into the segmentation class | |
123 | ||
8253cd9a | 124 | |
125 | class AliITSgeomSPD425Short : public AliITSgeomSPD { | |
126 | ||
127 | public: | |
128 | AliITSgeomSPD425Short(); | |
129 | ||
130 | // This clas now has version 0 so that it will not be written to a root | |
131 | // file. This is good since there are no longer any data members to this | |
132 | // class. It is only designed to make it easer to define this standard | |
133 | // SPD detector geometry. | |
134 | ClassDef(AliITSgeomSPD425Short,0) // ITS SPD detector geometry class for 425X50 micron pixel size Short version. | |
135 | ||
136 | }; | |
137 | // Input and output function for standard C++ input/output. | |
138 | ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source); | |
139 | istream &operator>>(istream &os,AliITSgeomSPD425Short &source); | |
140 | #endif | |
141 | //====================================================================== | |
142 | ||
143 | #ifndef ALIITSGEOMSPD425LONG_H | |
144 | #define ALIITSGEOMSPD425LONG_H | |
145 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
146 | * See cxx source for full Copyright notice */ | |
147 | ||
148 | /* $Id$ */ | |
149 | ||
150 | //#include "AliITSgeomSPD.h" | |
151 | ||
152 | ||
153 | // temporary - this will migrate into the segmentation class | |
154 | ||
8253cd9a | 155 | |
156 | class AliITSgeomSPD425Long : public AliITSgeomSPD { | |
157 | ||
158 | public: | |
159 | AliITSgeomSPD425Long(); | |
160 | ||
161 | // This clas now has version 0 so that it will not be written to a root | |
162 | // file. This is good since there are no longer any data members to this | |
163 | // class. It is only designed to make it easer to define this standard | |
164 | // SPD detector geometry. | |
165 | ClassDef(AliITSgeomSPD425Long,0) // ITS SPD detector geometry class for 425X50 micron pixel size. | |
a3d834a0 | 166 | |
58005f18 | 167 | }; |
8253cd9a | 168 | // Input and output function for standard C++ input/output. |
169 | ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source); | |
170 | istream &operator>>(istream &os,AliITSgeomSPD425Long &source); | |
58005f18 | 171 | #endif |