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