1 #ifndef ALIITSGEOMSPD_H
2 #define ALIITSGEOMSPD_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
16 class AliITSgeomSPD : public TObject {
20 AliITSgeomSPD(Float_t dy,Int_t nx,Float_t *bx,Int_t nz,Float_t *bz);
21 AliITSgeomSPD(AliITSgeomSPD &source);
22 AliITSgeomSPD& operator=(AliITSgeomSPD &source);
23 virtual ~AliITSgeomSPD();
24 virtual void ReSetBins(Float_t dy,Int_t nx,Float_t *bx,
25 Int_t nz,Float_t *bz);
26 virtual TShape *GetShape() const {return fShapeSPD;}
27 virtual Float_t GetDx() { // Get TBRIK Dx
28 if(fShapeSPD!=0) return fShapeSPD->GetDx();
30 virtual Float_t GetDy() {// Get TBRIK Dy
31 if(fShapeSPD!=0) return fShapeSPD->GetDy();
33 virtual Float_t GetDz() {// Get TBRIK Dz
34 if(fShapeSPD!=0) return fShapeSPD->GetDz();
36 virtual Int_t GetNbinxX(){return fNbinx-1;} // returns the number of bins x
37 virtual Int_t GetNbinxZ(){return fNbinz-1;} // returns the number of bins z
38 virtual Float_t GetBinSizeX(Int_t i)
39 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i+1]-fLowBinEdgeX[i];
40 else return 0.0;}; // give size of bin i in x.
41 virtual Float_t GetBinSizeZ(Int_t i)
42 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeZ[i+1]-fLowBinEdgeZ[i];
43 else return 0.0;}; // give size of bin i in z.
44 virtual Float_t GetBinLowEdgeX(Int_t i)
45 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i];
46 else return 0.0;}; // give size of bin i in x.
47 virtual Float_t GetBinLowEdgeZ(Int_t i)
48 {if(i<fNbinz-1&&i>=0) return fLowBinEdgeZ[i];
49 else return 0.0;}; // give size of bin i in z.
50 virtual void InitLowBinEdgeX(){// allocate memory for fLowBinEdgeX.
51 if(fLowBinEdgeX!=0) delete[] fLowBinEdgeX;
52 if(fNbinx>0) fLowBinEdgeX = new Float_t[fNbinx];else fLowBinEdgeX = 0;}
53 virtual void InitLowBinEdgeZ(){// allocate memory for fLowBinEdgeZ.
54 if(fLowBinEdgeZ!=0) delete[] fLowBinEdgeZ;
55 if(fNbinz>0) fLowBinEdgeZ = new Float_t[fNbinz];else fLowBinEdgeZ = 0;}
56 virtual void SetShape(const char *name,const char *title,const char *mat,
57 Float_t dx,Float_t dy,Float_t dz)
58 {fShapeSPD = new TBRIK(name,title,mat,dx,dy,dz);};
59 virtual void SetNbinX(Int_t i){fNbinx = i+1;} // Set nubmer of pixels in x
60 virtual void SetNbinZ(Int_t i){fNbinz = i+1;} // Set nubmer of pixels in z
61 virtual void SetLowBinEdgeX(Int_t i,Float_t s){//puts value in fLowbinEdgeX
62 if(i>=0&&i<fNbinx) fLowBinEdgeX[i] = s;}
63 virtual void SetLowBinEdgeZ(Int_t i,Float_t s){//puts value in fLowbinEdgeZ
64 if(i>=0&&i<fNbinz) fLowBinEdgeZ[i] = s;};
65 virtual void LToDet(Float_t xl,Float_t zl,Int_t &row,Int_t &col);
66 virtual void DetToL(Int_t row,Int_t col,Float_t &xl,Float_t &zl);
67 virtual void Print(ostream *os); // output streamer to standard out.
68 virtual void Read(istream *is); // input streamer from standard in.
71 TBRIK *fShapeSPD; // SPD active area shape
72 Int_t fNbinx; // the number of elements in fLowBinEdgeX (#bins-1)
73 Int_t fNbinz; // the number of elements in fLowBinEdgeZ (#bins-1)
74 Float_t *fLowBinEdgeX; //[fNbinx] Array of X lower bin edges for the pixels
75 Float_t *fLowBinEdgeZ; //[fNbinz] Array of Z lower bin edges for the pixels
77 ClassDef(AliITSgeomSPD,1) // ITS SPD detector geometry class..
80 // Input and output function for standard C++ input/output.
81 ostream &operator<<(ostream &os,AliITSgeomSPD &source);
82 istream &operator>>(istream &os,AliITSgeomSPD &source);
84 //======================================================================
86 #ifndef ALIITSGEOMSPD300_H
87 #define ALIITSGEOMSPD300_H
88 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
89 * See cxx source for full Copyright notice */
93 //#include "AliITSgeomSPD.h"
98 class AliITSgeomSPD300 : public AliITSgeomSPD {
103 // This clas now has version 0 so that it will not be written to a root
104 // file. This is good since there are no longer any data members to this
105 // class. It is only designed to make it easer to define this standard
106 // SPD detector geometry.
107 ClassDef(AliITSgeomSPD300,0) // ITS SPD detector geometry class for 300X50 micron pixel size.
110 // Input and output function for standard C++ input/output.
111 ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
112 istream &operator>>(istream &os,AliITSgeomSPD300 &source);
114 //======================================================================
116 #ifndef ALIITSGEOMSPD425SHORT_H
117 #define ALIITSGEOMSPD425SHORT_H
118 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
119 * See cxx source for full Copyright notice */
123 //#include "AliITSgeomSPD.h"
126 // temporary - this will migrate into the segmentation class
131 class AliITSgeomSPD425Short : public AliITSgeomSPD {
134 AliITSgeomSPD425Short();
136 // This clas now has version 0 so that it will not be written to a root
137 // file. This is good since there are no longer any data members to this
138 // class. It is only designed to make it easer to define this standard
139 // SPD detector geometry.
140 ClassDef(AliITSgeomSPD425Short,0) // ITS SPD detector geometry class for 425X50 micron pixel size Short version.
143 // Input and output function for standard C++ input/output.
144 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
145 istream &operator>>(istream &os,AliITSgeomSPD425Short &source);
147 //======================================================================
149 #ifndef ALIITSGEOMSPD425LONG_H
150 #define ALIITSGEOMSPD425LONG_H
151 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
152 * See cxx source for full Copyright notice */
156 //#include "AliITSgeomSPD.h"
159 // temporary - this will migrate into the segmentation class
164 class AliITSgeomSPD425Long : public AliITSgeomSPD {
167 AliITSgeomSPD425Long();
169 // This clas now has version 0 so that it will not be written to a root
170 // file. This is good since there are no longer any data members to this
171 // class. It is only designed to make it easer to define this standard
172 // SPD detector geometry.
173 ClassDef(AliITSgeomSPD425Long,0) // ITS SPD detector geometry class for 425X50 micron pixel size.
176 // Input and output function for standard C++ input/output.
177 ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
178 istream &operator>>(istream &os,AliITSgeomSPD425Long &source);