]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSgeomSPD.h
Updated selection in ReadFromTracks()
[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.
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.
85ostream &operator<<(ostream &os,AliITSgeomSPD &source);
86istream &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
8253cd9a 99
100class AliITSgeomSPD300 : public AliITSgeomSPD {
a3d834a0 101
58005f18 102 public:
8253cd9a 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.
113ostream &operator<<(ostream &os,AliITSgeomSPD300 &source);
114istream &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
8253cd9a 130
131class AliITSgeomSPD425Short : public AliITSgeomSPD {
132
133 public:
134 AliITSgeomSPD425Short();
e99dbc71 135 AliITSgeomSPD425Short(Int_t npar,Float_t *par);
8253cd9a 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.
145ostream &operator<<(ostream &os,AliITSgeomSPD425Short &source);
146istream &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
8253cd9a 162
163class 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.
a3d834a0 173
58005f18 174};
8253cd9a 175// Input and output function for standard C++ input/output.
176ostream &operator<<(ostream &os,AliITSgeomSPD425Long &source);
177istream &operator>>(istream &os,AliITSgeomSPD425Long &source);
58005f18 178#endif