]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSgeomSPD.h
Discard STAR type geometry before MDC
[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     virtual void Print(Option_t *option="") const {TObject::Print(option);}
74     virtual Int_t Read(const char *name) {return TObject::Read(name);}
75
76  protected:
77     TBRIK  *fShapeSPD; // SPD active area shape
78     Int_t fNbinx;  // the number of elements in fLowBinEdgeX (#bins-1)
79     Int_t fNbinz;  // the number of elements in fLowBinEdgeZ (#bins-1)
80     Float_t *fLowBinEdgeX; //[fNbinx] Array of X lower bin edges for the pixels
81     Float_t *fLowBinEdgeZ; //[fNbinz] Array of Z lower bin edges for the pixels
82
83     ClassDef(AliITSgeomSPD,1) // ITS SPD detector geometry class..
84
85 };
86 // Input and output function for standard C++ input/output.
87 ostream &operator<<(ostream &os,AliITSgeomSPD &source);
88 istream &operator>>(istream &os,AliITSgeomSPD &source);
89 #endif
90 //======================================================================
91
92 #ifndef ALIITSGEOMSPD300_H
93 #define ALIITSGEOMSPD300_H
94 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
95  * See cxx source for full Copyright notice                               */
96
97 /* $Id$ */
98
99 //#include "AliITSgeomSPD.h"
100
101
102 class AliITSgeomSPD300 : public AliITSgeomSPD {
103
104  public:
105     AliITSgeomSPD300();
106
107     // This clas now has version 0 so that it will not be written to a root
108     // file. This is good since there are no longer any data members to this
109     // class. It is only designed to make it easer to define this standard
110     // SPD detector geometry.
111     ClassDef(AliITSgeomSPD300,0) // ITS SPD detector geometry class for 300X50 micron pixel size.
112
113 };
114 // Input and output function for standard C++ input/output.
115 ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
116 istream &operator>>(istream &os,AliITSgeomSPD300 &source);
117 #endif
118 //======================================================================
119
120 #ifndef ALIITSGEOMSPD425SHORT_H
121 #define ALIITSGEOMSPD425SHORT_H
122 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
123  * See cxx source for full Copyright notice                               */
124
125 /* $Id$ */
126
127 //#include "AliITSgeomSPD.h"
128
129
130 // temporary - this will migrate into the segmentation class
131
132
133 class AliITSgeomSPD425Short : public AliITSgeomSPD {
134
135  public:
136     AliITSgeomSPD425Short();
137     AliITSgeomSPD425Short(Int_t npar,Float_t *par);
138
139     // This clas now has version 0 so that it will not be written to a root
140     // file. This is good since there are no longer any data members to this
141     // class. It is only designed to make it easer to define this standard
142     // SPD detector geometry.
143     ClassDef(AliITSgeomSPD425Short,0) // ITS SPD detector geometry class for 425X50 micron pixel size Short version.
144
145 };
146 // Input and output function for standard C++ input/output.
147 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
148 istream &operator>>(istream &os,AliITSgeomSPD425Short &source);
149 #endif
150 //======================================================================
151
152 #ifndef ALIITSGEOMSPD425LONG_H
153 #define ALIITSGEOMSPD425LONG_H
154 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
155  * See cxx source for full Copyright notice                               */
156
157 /* $Id$ */
158
159 //#include "AliITSgeomSPD.h"
160
161
162 // temporary - this will migrate into the segmentation class
163
164
165 class AliITSgeomSPD425Long : public AliITSgeomSPD {
166
167  public:
168     AliITSgeomSPD425Long();
169
170     // This clas now has version 0 so that it will not be written to a root
171     // file. This is good since there are no longer any data members to this
172     // class. It is only designed to make it easer to define this standard
173     // SPD detector geometry.
174     ClassDef(AliITSgeomSPD425Long,0) // ITS SPD detector geometry class for 425X50 micron pixel size.
175
176 };
177 // Input and output function for standard C++ input/output.
178 ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
179 istream &operator>>(istream &os,AliITSgeomSPD425Long &source);
180 #endif