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 */
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 ////////////////////////////////////////////////////////////////////////
20 class AliITSgeomSPD : public TObject {
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 new TBRIK(fName.Data(),
31 fTitle.Data(),fMat.Data(),GetDx(),GetDy(),GetDz());}
32 virtual Float_t GetDx() const {return fDx;} // Get TBRIK Dx
33 virtual Float_t GetDy() const {return fDy;}// Get TBRIK Dy
34 virtual Float_t GetDz() const {return fDz;}// Get TBRIK Dz
35 virtual Int_t GetNbinsX() const {return fNbinx-1;} // returns the number of bins x
36 virtual Int_t GetNbinsZ() const {return fNbinz-1;} // returns the number of bins z
37 virtual Float_t GetBinSizeX(Int_t i) const
38 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i+1]-fLowBinEdgeX[i];
39 else return 0.0;}; // give size of bin i in x.
40 virtual Float_t GetBinSizeZ(Int_t i) const
41 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeZ[i+1]-fLowBinEdgeZ[i];
42 else return 0.0;}; // give size of bin i in z.
43 virtual Float_t GetBinLowEdgeX(Int_t i) const
44 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i];
45 else return 0.0;}; // give size of bin i in x.
46 virtual Float_t GetBinLowEdgeZ(Int_t i) const
47 {if(i<fNbinz-1&&i>=0) return fLowBinEdgeZ[i];
48 else return 0.0;}; // give size of bin i in z.
49 virtual void InitLowBinEdgeX(){// allocate memory for fLowBinEdgeX.
50 if(fLowBinEdgeX!=0) delete[] fLowBinEdgeX;
51 if(fNbinx>0) fLowBinEdgeX = new Float_t[fNbinx];else fLowBinEdgeX = 0;}
52 virtual void InitLowBinEdgeZ(){// allocate memory for fLowBinEdgeZ.
53 if(fLowBinEdgeZ!=0) delete[] fLowBinEdgeZ;
54 if(fNbinz>0) fLowBinEdgeZ = new Float_t[fNbinz];else fLowBinEdgeZ = 0;}
55 virtual void SetShape(const char *name,const char *title,const char *mat,
56 Float_t dx,Float_t dy,Float_t 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.
67 virtual void Print(Option_t *option="") const {TObject::Print(option);}
68 virtual Int_t Read(const char *name) {return TObject::Read(name);}
71 TString fName; // Object name Replacement for TBRIK
72 TString fTitle; // Ojbect title Replacement for TBRIK
73 TString fMat; // Object material name Replacement for TBRIK
74 Float_t fDx; // half length in z Replacement for TBRIK
75 Float_t fDy; // half length in y Replacement for TBRIK
76 Float_t fDz; // half length in z Replacement for TBRIK
77 Int_t fNbinx; // the number of elements in fLowBinEdgeX (#bins-1)
78 Int_t fNbinz; // the number of elements in fLowBinEdgeZ (#bins-1)
79 Float_t *fLowBinEdgeX; //[fNbinx] Array of X lower bin edges for the pixels
80 Float_t *fLowBinEdgeZ; //[fNbinz] Array of Z lower bin edges for the pixels
82 ClassDef(AliITSgeomSPD,2) // ITS SPD detector geometry class..
85 // Input and output function for standard C++ input/output.
86 ostream &operator<<(ostream &os,AliITSgeomSPD &source);
87 istream &operator>>(istream &os,AliITSgeomSPD &source);
89 //======================================================================
91 #ifndef ALIITSGEOMSPD300_H
92 #define ALIITSGEOMSPD300_H
93 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
94 * See cxx source for full Copyright notice */
98 //#include "AliITSgeomSPD.h"
101 class AliITSgeomSPD300 : public AliITSgeomSPD {
106 // This clas now has version 0 so that it will not be written to a root
107 // file. This is good since there are no longer any data members to this
108 // class. It is only designed to make it easer to define this standard
109 // SPD detector geometry.
110 ClassDef(AliITSgeomSPD300,0) // ITS SPD detector geometry class for 300X50 micron pixel size.
113 // Input and output function for standard C++ input/output.
114 ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
115 istream &operator>>(istream &os,AliITSgeomSPD300 &source);
117 //======================================================================
119 #ifndef ALIITSGEOMSPD425SHORT_H
120 #define ALIITSGEOMSPD425SHORT_H
121 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
122 * See cxx source for full Copyright notice */
126 //#include "AliITSgeomSPD.h"
129 // temporary - this will migrate into the segmentation class
132 class AliITSgeomSPD425Short : public AliITSgeomSPD {
135 AliITSgeomSPD425Short();
136 AliITSgeomSPD425Short(Int_t npar,Float_t *par);
138 // This clas now has version 0 so that it will not be written to a root
139 // file. This is good since there are no longer any data members to this
140 // class. It is only designed to make it easer to define this standard
141 // SPD detector geometry.
142 ClassDef(AliITSgeomSPD425Short,0) // ITS SPD detector geometry class for 425X50 micron pixel size Short version.
145 // Input and output function for standard C++ input/output.
146 ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
147 istream &operator>>(istream &os,AliITSgeomSPD425Short &source);
149 //======================================================================
151 #ifndef ALIITSGEOMSPD425LONG_H
152 #define ALIITSGEOMSPD425LONG_H
153 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
154 * See cxx source for full Copyright notice */
158 //#include "AliITSgeomSPD.h"
161 // 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);