]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSgeomSSD.h
Include forward declaration of AliITSRad
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.h
1 #ifndef ALIITSGEOMSSD_H
2 #define ALIITSGEOMSSD_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 class TShape;
12
13 class AliITSgeomSSD : public TObject {
14
15  public:
16     AliITSgeomSSD(); // default constructor
17     AliITSgeomSSD(const Float_t *box,Float_t ap,Float_t an,
18                   Int_t np,Float_t *p,Int_t nn,Float_t *n); // Constructor
19     virtual ~AliITSgeomSSD(); // Destructor
20     AliITSgeomSSD(const AliITSgeomSSD &source);// copy constructor
21     virtual AliITSgeomSSD& operator=(const AliITSgeomSSD &source); // = opt.
22     void ResetSSD(const Float_t *box,Float_t ap,Float_t an,
23                   Int_t np,Float_t *p,Int_t nn,Float_t *n); // Filler
24     virtual TShape *GetShape() const {return fShapeSSD;}// get shape
25     virtual Float_t GetDx() const {if(fShapeSSD!=0) return fShapeSSD->GetDx();
26                     else return 0.0;}// get Dx
27     virtual Float_t GetDy() const {if(fShapeSSD!=0) return fShapeSSD->GetDy();
28                     else return 0.0;}// get Dy
29     virtual Float_t GetDz() const {if(fShapeSSD!=0) return fShapeSSD->GetDz();
30                     else return 0.0;}// get Dz
31     virtual Int_t GetNAnodes() const {return fNp-1;}//the number of Anodes "P"
32     virtual Int_t GetNCathodess() const {return fNn-1;}//the number of Cathodes "N"
33     virtual Float_t GetAnodePitch(Int_t i=0) const { //anode pitch for anode i
34         if(i>=0&&i<fNp) return fLowEdgeP[i+1]-fLowEdgeP[i];else return 0.0;}
35     virtual Float_t GetCathodePitch(Int_t i=0) const { // cathode pitch for cathode i
36         if(i>0&&i<fNn) return fLowEdgeN[1]-fLowEdgeN[0];else return 0.0;}
37     virtual Float_t GetAnodeAngle() const {return fAngleP;}//anode strip angle.
38     virtual Float_t GetCathodeAngle() const {return fAngleN;}//cathode strip angle.
39     virtual void SetShape(char *name,char *title,char *mat,
40                           Float_t dx,Float_t dy,Float_t dz){
41         // defines TBRIK with given paramters
42         fShapeSSD = new TBRIK(name,title,mat,dx,dy,dz);};
43     virtual void SetNAnodes(Int_t n) {// sets the number of Anodes "P" and
44         // allocates array of low edges.
45         fNp=n+1;delete fLowEdgeP;fLowEdgeP = new Float_t[fNp];}
46     virtual void SetNCathotess(Int_t n) {// sets the number of Anodes "N" and 
47         // allocates array of low edges.
48         fNn=n+1;delete fLowEdgeN;fLowEdgeN =new  Float_t[fNn];}
49     virtual void SetAnodeLowEdges(Float_t *p){// sets Anode low edges +1.
50         for(Int_t i=0;i<fNp;i++)fLowEdgeP[i]=p[i];}
51     virtual void SetCathodeLowEdges(Float_t *p){// sets Cathodes low edges +1.
52         for(Int_t i=0;i<fNn;i++)fLowEdgeN[i]=p[i];}
53     virtual void SetAnodeAngle(Float_t a){fAngleP=a;} //sets anode angle.
54     virtual void SetCathodeAngle(Float_t a){fAngleN=a;}//sets cathode  angle.
55
56     virtual void Local2Det(Float_t x,Float_t z,Int_t &a,Int_t &c);
57     virtual void Det2Local(Int_t a,Int_t c,Float_t &x,Float_t &z);
58
59     virtual void Print(ostream *os) const;  // Output streamer to standard out.
60     virtual void Read(istream *is);   // Input streamer to standard in.
61
62  protected:
63     // -+-> x
64     //  |
65     //  V
66     //  z
67     TBRIK *fShapeSSD; // comment
68     Int_t   fNp;      // Number of Anode strips.
69     Int_t   fNn;      // Number of Cathode strips.
70     Float_t *fLowEdgeP;  //[fNp] Anode side strip pitch angle==0.
71     Float_t *fLowEdgeN;  //[fNn] Cathode side strip pich angle==0.
72     Float_t fAngleP;  // Anode side strip angle (rad).
73     Float_t fAngleN;  // Cathode side strip angle (rad).
74     // or what other or different information that is needed.
75     
76     ClassDef(AliITSgeomSSD,1) // ITS SSD detector geometry class
77
78 };
79 // Input and output function for standard C++ input/output.
80 ostream &operator<<(ostream &os,AliITSgeomSSD &source);
81 istream &operator>>(istream &os,AliITSgeomSSD &source);
82 #endif
83 //======================================================================
84 #ifndef ALIITSGEOMSSD175_H
85 #define ALIITSGEOMSSD175_H
86 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
87  * See cxx source for full Copyright notice                               */
88
89 /*
90   $Id$
91 */
92
93 //#include "AliITSgeomSSD.h"
94
95
96 class TShape;
97
98 class AliITSgeomSSD175 : public AliITSgeomSSD {
99
100  public:
101     AliITSgeomSSD175();
102
103     // This clas now has version 0 so that it will not be written to a root
104     // file. This is good since there are no longer any data members to this
105     // class. It is only designed to make it easer to define this standard
106     // SDD detector geometry.
107     ClassDef(AliITSgeomSSD175,0) // ITS SSD detector with stips at +- 0.0175 rad.
108
109 };
110 // Input and output function for standard C++ input/output.
111 ostream &operator<<(ostream &os,AliITSgeomSSD175 &source);
112 istream &operator>>(istream &os,AliITSgeomSSD175 &source);
113 #endif
114 //======================================================================
115 #ifndef ALIITSGEOMSSD27575_H
116 #define ALIITSGEOMSSD27575_H
117 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
118  * See cxx source for full Copyright notice                               */
119
120 /*
121   $Id$
122 */
123
124 //#include "AliITSgeomSSD.h"
125
126
127 class TShape;
128
129 class AliITSgeomSSD275and75 : public AliITSgeomSSD {
130
131  public:
132     AliITSgeomSSD275and75();
133     AliITSgeomSSD275and75(Int_t npar,Float_t *par);
134
135     // This clas now has version 0 so that it will not be written to a root
136     // file. This is good since there are no longer any data members to this
137     // class. It is only designed to make it easer to define this standard
138     // SDD detector geometry.
139     ClassDef(AliITSgeomSSD275and75,0) // ITS SSD detector with 0.0275 and 0.0075 rad strip angles.
140
141 };
142 // Input and output function for standard C++ input/output.
143 ostream &operator<<(ostream &os,AliITSgeomSSD275and75 &source);
144 istream &operator>>(istream &os,AliITSgeomSSD275and75 &source);
145 #endif
146 //======================================================================
147 #ifndef ALIITSGEOMSSD75275_H
148 #define ALIITSGEOMSSD75275_H
149 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
150  * See cxx source for full Copyright notice                               */
151
152 /*
153   $Id$
154 */
155
156 //#include "AliITSgeomSSD.h"
157
158 class TShape;
159
160 class AliITSgeomSSD75and275 : public AliITSgeomSSD {
161
162  public:
163     AliITSgeomSSD75and275();
164     AliITSgeomSSD75and275(Int_t npar,Float_t *par);
165
166     // This clas now has version 0 so that it will not be written to a root
167     // file. This is good since there are no longer any data members to this
168     // class. It is only designed to make it easer to define this standard
169     // SSD detector geometry.
170     ClassDef(AliITSgeomSSD75and275,0) // ITS SSD detector geometry class for 0.0075 and 0.0275 rad angled strips.
171
172 };
173 // Input and output function for standard C++ input/output.
174 ostream &operator<<(ostream &os,AliITSgeomSSD75and275 &source);
175 istream &operator>>(istream &os,AliITSgeomSSD75and275 &source);
176 #endif