Bug fixed in the StepManager to account for the difference in the geometry tree for...
[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
58005f18 11
8253cd9a 12class TShape;
195d8dfe 13
8253cd9a 14class AliITSgeomSPD : public TObject {
a3d834a0 15
8253cd9a 16 public:
17 AliITSgeomSPD();
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;}
31b8cd63 25 virtual Float_t GetDx() const { // Get TBRIK Dx
8253cd9a 26 if(fShapeSPD!=0) return fShapeSPD->GetDx();
27 else return 0.0;}
31b8cd63 28 virtual Float_t GetDy() const {// Get TBRIK Dy
8253cd9a 29 if(fShapeSPD!=0) return fShapeSPD->GetDy();
30 else return 0.0;}
31b8cd63 31 virtual Float_t GetDz() const {// Get TBRIK Dz
8253cd9a 32 if(fShapeSPD!=0) return fShapeSPD->GetDz();
33 else return 0.0;}
8f74f9fa 34 virtual Int_t GetNbinsX() const {return fNbinx-1;} // returns the number of bins x
35 virtual Int_t GetNbinsZ() const {return fNbinz-1;} // returns the number of bins z
31b8cd63 36 virtual Float_t GetBinSizeX(Int_t i) const
8253cd9a 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.
31b8cd63 39 virtual Float_t GetBinSizeZ(Int_t i) const
8253cd9a 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.
31b8cd63 42 virtual Float_t GetBinLowEdgeX(Int_t i) const
8253cd9a 43 {if(i<fNbinx-1&&i>=0) return fLowBinEdgeX[i];
44 else return 0.0;}; // give size of bin i in x.
31b8cd63 45 virtual Float_t GetBinLowEdgeZ(Int_t i) const
8253cd9a 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);
31b8cd63 65 virtual void Print(ostream *os) const; // output streamer to standard out.
8253cd9a 66 virtual void Read(istream *is); // input streamer from standard in.
67
68 protected:
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
74
75 ClassDef(AliITSgeomSPD,1) // ITS SPD detector geometry class..
76
77};
78// Input and output function for standard C++ input/output.
79ostream &operator<<(ostream &os,AliITSgeomSPD &source);
80istream &operator>>(istream &os,AliITSgeomSPD &source);
81#endif
82//======================================================================
83
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 */
88
89/* $Id$ */
90
91//#include "AliITSgeomSPD.h"
92
8253cd9a 93
94class AliITSgeomSPD300 : public AliITSgeomSPD {
a3d834a0 95
58005f18 96 public:
8253cd9a 97 AliITSgeomSPD300();
98
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.
104
105};
106// Input and output function for standard C++ input/output.
107ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
108istream &operator>>(istream &os,AliITSgeomSPD300 &source);
109#endif
110//======================================================================
111
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 */
116
117/* $Id$ */
118
119//#include "AliITSgeomSPD.h"
120
121
122// temporary - this will migrate into the segmentation class
123
8253cd9a 124
125class AliITSgeomSPD425Short : public AliITSgeomSPD {
126
127 public:
128 AliITSgeomSPD425Short();
e99dbc71 129 AliITSgeomSPD425Short(Int_t npar,Float_t *par);
8253cd9a 130
131 // This clas now has version 0 so that it will not be written to a root
132 // file. This is good since there are no longer any data members to this
133 // class. It is only designed to make it easer to define this standard
134 // SPD detector geometry.
135 ClassDef(AliITSgeomSPD425Short,0) // ITS SPD detector geometry class for 425X50 micron pixel size Short version.
136
137};
138// Input and output function for standard C++ input/output.
139ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
140istream &operator>>(istream &os,AliITSgeomSPD425Short &source);
141#endif
142//======================================================================
143
144#ifndef ALIITSGEOMSPD425LONG_H
145#define ALIITSGEOMSPD425LONG_H
146/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
147 * See cxx source for full Copyright notice */
148
149/* $Id$ */
150
151//#include "AliITSgeomSPD.h"
152
153
154// temporary - this will migrate into the segmentation class
155
8253cd9a 156
157class AliITSgeomSPD425Long : public AliITSgeomSPD {
158
159 public:
160 AliITSgeomSPD425Long();
161
162 // This clas now has version 0 so that it will not be written to a root
163 // file. This is good since there are no longer any data members to this
164 // class. It is only designed to make it easer to define this standard
165 // SPD detector geometry.
166 ClassDef(AliITSgeomSPD425Long,0) // ITS SPD detector geometry class for 425X50 micron pixel size.
a3d834a0 167
58005f18 168};
8253cd9a 169// Input and output function for standard C++ input/output.
170ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
171istream &operator>>(istream &os,AliITSgeomSPD425Long &source);
58005f18 172#endif