]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSgeomSPD.h
Static data member fgTop replaced with the static function GetTop();
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSPD.h
CommitLineData
a3d834a0 1#ifndef ALIITSGEOMSPD_H
2#define ALIITSGEOMSPD_H
3da30618 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id$ */
58005f18 7
8253cd9a 8#include <TObject.h>
9#include <TBRIK.h>
195d8dfe 10
85f1e34a 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////////////////////////////////////////////////////////////////////////
58005f18 17
8253cd9a 18class TShape;
195d8dfe 19
8253cd9a 20class AliITSgeomSPD : public TObject {
a3d834a0 21
8253cd9a 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;}
31b8cd63 31 virtual Float_t GetDx() const { // Get TBRIK Dx
8253cd9a 32 if(fShapeSPD!=0) return fShapeSPD->GetDx();
33 else return 0.0;}
31b8cd63 34 virtual Float_t GetDy() const {// Get TBRIK Dy
8253cd9a 35 if(fShapeSPD!=0) return fShapeSPD->GetDy();
36 else return 0.0;}
31b8cd63 37 virtual Float_t GetDz() const {// Get TBRIK Dz
8253cd9a 38 if(fShapeSPD!=0) return fShapeSPD->GetDz();
39 else return 0.0;}
8f74f9fa 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
31b8cd63 42 virtual Float_t GetBinSizeX(Int_t i) const
8253cd9a 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.
31b8cd63 45 virtual Float_t GetBinSizeZ(Int_t i) const
8253cd9a 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.
31b8cd63 48 virtual Float_t GetBinLowEdgeX(Int_t i) const
8253cd9a 49 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i];
50 else return 0.0;}; // give size of bin i in x.
31b8cd63 51 virtual Float_t GetBinLowEdgeZ(Int_t i) const
8253cd9a 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);
31b8cd63 71 virtual void Print(ostream *os) const; // output streamer to standard out.
8253cd9a 72 virtual void Read(istream *is); // input streamer from standard in.
d2f55a22 73 virtual void Print(Option_t *option="") const {TObject::Print(option);}
74 virtual Int_t Read(const char *name) {return TObject::Read(name);}
8253cd9a 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.
87ostream &operator<<(ostream &os,AliITSgeomSPD &source);
88istream &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
8253cd9a 101
102class AliITSgeomSPD300 : public AliITSgeomSPD {
a3d834a0 103
58005f18 104 public:
8253cd9a 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.
115ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
116istream &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
8253cd9a 132
133class AliITSgeomSPD425Short : public AliITSgeomSPD {
134
135 public:
136 AliITSgeomSPD425Short();
e99dbc71 137 AliITSgeomSPD425Short(Int_t npar,Float_t *par);
8253cd9a 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.
147ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
148istream &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
8253cd9a 164
165class 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.
a3d834a0 175
58005f18 176};
8253cd9a 177// Input and output function for standard C++ input/output.
178ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
179istream &operator>>(istream &os,AliITSgeomSPD425Long &source);
58005f18 180#endif