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 */
14 class AliITSgeomSPD : public TObject {
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;}
25 virtual Float_t GetDx() const { // Get TBRIK Dx
26 if(fShapeSPD!=0) return fShapeSPD->GetDx();
28 virtual Float_t GetDy() const {// Get TBRIK Dy
29 if(fShapeSPD!=0) return fShapeSPD->GetDy();
31 virtual Float_t GetDz() const {// Get TBRIK Dz
32 if(fShapeSPD!=0) return fShapeSPD->GetDz();
34 virtual Int_t GetNbinxX() const {return fNbinx-1;} // returns the number of bins x
35 virtual Int_t GetNbinxZ() const {return fNbinz-1;} // returns the number of bins z
36 virtual Float_t GetBinSizeX(Int_t i) const
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.
39 virtual Float_t GetBinSizeZ(Int_t i) const
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.
42 virtual Float_t GetBinLowEdgeX(Int_t i) const
43 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i];
44 else return 0.0;}; // give size of bin i in x.
45 virtual Float_t GetBinLowEdgeZ(Int_t i) const
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);
65 virtual void Print(ostream *os) const; // output streamer to standard out.
66 virtual void Read(istream *is); // input streamer from standard in.
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
75 ClassDef(AliITSgeomSPD,1) // ITS SPD detector geometry class..
78 // Input and output function for standard C++ input/output.
79 ostream &operator<<(ostream &os,AliITSgeomSPD &source);
80 istream &operator>>(istream &os,AliITSgeomSPD &source);
82 //======================================================================
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 */
91 //#include "AliITSgeomSPD.h"
94 class AliITSgeomSPD300 : public AliITSgeomSPD {
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.
106 // Input and output function for standard C++ input/output.
107 ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
108 istream &operator>>(istream &os,AliITSgeomSPD300 &source);
110 //======================================================================
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 */
119 //#include "AliITSgeomSPD.h"
122 // temporary - this will migrate into the segmentation class
125 class AliITSgeomSPD425Short : public AliITSgeomSPD {
128 AliITSgeomSPD425Short();
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.
137 // Input and output function for standard C++ input/output.
138 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
139 istream &operator>>(istream &os,AliITSgeomSPD425Short &source);
141 //======================================================================
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 */
150 //#include "AliITSgeomSPD.h"
153 // temporary - this will migrate into the segmentation class
156 class AliITSgeomSPD425Long : public AliITSgeomSPD {
159 AliITSgeomSPD425Long();
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.
168 // Input and output function for standard C++ input/output.
169 ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
170 istream &operator>>(istream &os,AliITSgeomSPD425Long &source);