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