1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.8 2000/10/02 16:32:43 barbera
19 Forward declaration added
21 Revision 1.2.4.8 2000/10/02 15:53:49 barbera
22 Forward declaration added
24 Revision 1.7 2000/07/10 16:07:18 fca
25 Release version of ITS code
27 Revision 1.2.4.2 2000/03/04 23:55:59 nilsen
28 Fixed up the comments/documentation
30 Revision 1.2.4.1 2000/01/12 19:03:32 nilsen
31 This is the version of the files after the merging done in December 1999.
32 See the ReadMe110100.txt file for details
34 Revision 1.2 1999/09/29 09:24:20 fca
35 Introduction of the Copyright and cvs Log
44 #include "AliITSgeomSSD.h"
46 ClassImp(AliITSgeomSSD)
47 AliITSgeomSSD::AliITSgeomSSD(const Float_t *box,Float_t ap,Float_t an,
48 Int_t np,Float_t *p,Int_t nn,Float_t *n){
49 ////////////////////////////////////////////////////////////////////////
50 // Standard Constructor. *box={dx,dy,dz}, ap=anode angle, an=cathode angle,
51 // nn= number of cathodes+1,*n= array of cathode low edges+highest edge,
52 // np= number of anodes+1, *p= array of anode low edges+lighest edge.
53 ///////////////////////////////////////////////////////////////////////
56 fShapeSSD = new TBRIK("ActiveSSD","Active volume of SSD","SSD SI DET",
57 box[0],box[1],box[2]);
58 if(fLowEdgeP!=0) delete fLowEdgeP;
59 if(fLowEdgeN!=0) delete fLowEdgeN;
64 fLowEdgeP = new Float_t[fNp];
65 fLowEdgeN = new Float_t[fNn];
66 for(i=0;i<fNp;i++) fLowEdgeP[i] = p[i];
67 for(i=0;i<fNn;i++) fLowEdgeN[i] = n[i];
69 //______________________________________________________________________
70 AliITSgeomSSD::~AliITSgeomSSD(){
73 delete fLowEdgeP; fLowEdgeP = 0;
74 delete fLowEdgeN; fLowEdgeN = 0;
75 delete fShapeSSD; fShapeSSD = 0;
81 AliITSgeomSSD::AliITSgeomSSD(const AliITSgeomSSD &source){
82 ////////////////////////////////////////////////////////////////////////
84 ////////////////////////////////////////////////////////////////////////
87 if(this == &source) return;
88 this->fShapeSSD = new TBRIK(*(source.fShapeSSD));
89 this->fNp = source.fNp;
90 this->fNn = source.fNn;
93 this->fAngleP = source.fAngleP;
94 this->fAngleN = source.fAngleN;
95 fLowEdgeP = new Float_t[fNp];
96 fLowEdgeN = new Float_t[fNn];
97 for(i=0;i<fNp;i++) this->fLowEdgeP[i] = source.fLowEdgeP[i];
98 for(i=0;i<fNn;i++) this->fLowEdgeN[i] = source.fLowEdgeN[i];
102 AliITSgeomSSD& AliITSgeomSSD::operator=(const AliITSgeomSSD &source) {
103 ////////////////////////////////////////////////////////////////////////
104 // assignment operator
105 ////////////////////////////////////////////////////////////////////////
108 if(this == &source) return *this;
109 this->fShapeSSD = new TBRIK(*(source.fShapeSSD));
110 this->fNp = source.fNp;
111 this->fNn = source.fNn;
114 this->fAngleP = source.fAngleP;
115 this->fAngleN = source.fAngleN;
116 fLowEdgeP = new Float_t[fNp];
117 fLowEdgeN = new Float_t[fNn];
118 for(i=0;i<fNp;i++) this->fLowEdgeP[i] = source.fLowEdgeP[i];
119 for(i=0;i<fNn;i++) this->fLowEdgeN[i] = source.fLowEdgeN[i];
122 //______________________________________________________________________
123 void AliITSgeomSSD::Local2Det(Float_t x,Float_t z,Int_t &a,Int_t &c){
127 // project on to bonding edges.
128 d = x*TMath::Cos(fAngleP)+z*TMath::Sin(fAngleP);
129 b = x*TMath::Cos(fAngleN)+z*TMath::Sin(fAngleN);
130 if(d<fLowEdgeP[0]) i=-1;
131 else for(i=0;i<fNp;i++){
132 if(fLowEdgeP[i]<d) break;
135 if(b<fLowEdgeN[0]) i=-1;
136 else for(i=0;i<fNn;i++){
137 if(fLowEdgeN[i]<b) break;
142 //______________________________________________________________________
143 void AliITSgeomSSD::Det2Local(Int_t a,Int_t c,Float_t &x,Float_t &z){
149 //______________________________________________________________________
150 void AliITSgeomSSD::Print(ostream *os){
151 ////////////////////////////////////////////////////////////////////////
152 // Standard output format for this class.
153 ////////////////////////////////////////////////////////////////////////
157 fmt = os->setf(ios::scientific); // set scientific floating point output
158 *os << "TBRIK" << " ";
159 *os << setprecision(16) << GetDx() << " ";
160 *os << setprecision(16) << GetDy() << " ";
161 *os << setprecision(16) << GetDz() << " ";
162 *os << fNp << " " << fNn << " ";
163 *os << setprecision(16) << fAngleP << " ";
164 *os << setprecision(16) << fAngleN << " ";
165 for(i=0;i<fNp;i++) *os << setprecision(16) << fLowEdgeP[i] << " ";
166 for(i=0;i<fNn;i++) *os << setprecision(16) << fLowEdgeN[i] << " ";
168 os->flags(fmt); // reset back to old formating.
171 //______________________________________________________________________
172 void AliITSgeomSSD::Read(istream *is){
173 ////////////////////////////////////////////////////////////////////////
174 // Standard input format for this class.
175 ////////////////////////////////////////////////////////////////////////
181 *is >> dx >> dy >> dz;
182 if(fShapeSSD!=0) delete fShapeSSD;
183 fShapeSSD = new TBRIK("ActiveSSD","Active volume of SSD","SSD SI DET",
186 *is >> fAngleP >> fAngleN;
187 if(fLowEdgeP !=0) delete fLowEdgeP;
188 if(fLowEdgeN !=0) delete fLowEdgeN;
189 fLowEdgeP = new Float_t[fNp];
190 fLowEdgeN = new Float_t[fNn];
191 for(i=0;0<fNp;i++) *is >> fLowEdgeP[i];
192 for(i=0;i<fNn;i++) *is >> fLowEdgeN[i];
195 //----------------------------------------------------------------------
196 ostream &operator<<(ostream &os,AliITSgeomSSD &p){
197 ////////////////////////////////////////////////////////////////////////
198 // Standard output streaming function.
199 ////////////////////////////////////////////////////////////////////////
204 //----------------------------------------------------------------------
205 istream &operator>>(istream &is,AliITSgeomSSD &r){
206 ////////////////////////////////////////////////////////////////////////
207 // Standard input streaming function.
208 ////////////////////////////////////////////////////////////////////////
213 //======================================================================
218 //#include "AliITSgeomSSD175.h"
220 ClassImp(AliITSgeomSSD175)
222 AliITSgeomSSD175::AliITSgeomSSD175() : AliITSgeomSSD(){
223 ////////////////////////////////////////////////////////////////////////
224 // default constructor
225 ////////////////////////////////////////////////////////////////////////
226 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
227 // Size of sensitive detector area x,y(thickness),z
228 const Float_t kangle = 0.0175; // angle in rad. of anode and cathodes
229 const Float_t kpitch = 0.0095;// cm anode separation.
230 const Int_t kNstrips = 768; // number of anode or cathode strips.
231 Float_t *leA,*leC; // array of low edges anode and cathorde.
234 leA = new Float_t[kNstrips+1];
235 leC = new Float_t[kNstrips+1];
237 leA[1] = -kpitch*(0.5*kNstrips-1);
239 leC[1] = kpitch*(0.5*kNstrips-1);
240 for(i=1;i<kNstrips;i++){
241 leA[i+1] = leA[i] + kpitch;
242 leC[i+1] = leC[i] - kpitch;
244 leA[kNstrips] = kDxyz[0];
245 leC[kNstrips] = -kDxyz[0];
246 // cout << "AliITSgeomSSD175 default creator called: start" << endl;
247 AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangle,-kangle,
248 kNstrips+1,leA,kNstrips+1,leC);
251 // cout << "AliITSgeomSSD175 default creator called: end" << endl;
253 //________________________________________________________________________
254 ostream &operator<<(ostream &os,AliITSgeomSSD175 &p){
255 ////////////////////////////////////////////////////////////////////////
256 // Standard output streaming function.
257 ////////////////////////////////////////////////////////////////////////
262 //----------------------------------------------------------------------
263 istream &operator>>(istream &is,AliITSgeomSSD175 &r){
264 ////////////////////////////////////////////////////////////////////////
265 // Standard input streaming function.
266 ////////////////////////////////////////////////////////////////////////
271 //======================================================================
276 //#include "AliITSgeomSSD275and75.h"
278 ClassImp(AliITSgeomSSD275and75)
280 AliITSgeomSSD275and75::AliITSgeomSSD275and75() : AliITSgeomSSD(){
281 ////////////////////////////////////////////////////////////////////////
282 // default constructor
283 ////////////////////////////////////////////////////////////////////////
284 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
285 // Size of sensitive detector area x,y(thickness),z
286 const Float_t kangleA = 0.0275; // angle in rad. of anode and cathodes
287 const Float_t kangleC = 0.0075; // angle in rad. of anode and cathodes
288 const Float_t kpitch = 0.0095;// cm anode separation.
289 const Int_t kNstrips = 768; // number of anode or cathode strips.
290 Float_t *leA,*leC; // array of low edges anode and cathorde.
293 leA = new Float_t[kNstrips+1];
294 leC = new Float_t[kNstrips+1];
296 leA[1] = -kpitch*(0.5*kNstrips-1);
298 leC[1] = kpitch*(0.5*kNstrips-1);
299 for(i=1;i<kNstrips;i++){
300 leA[i+1] = leA[i] + kpitch;
301 leC[i+1] = leC[i] - kpitch;
303 leA[kNstrips] = kDxyz[0];
304 leC[kNstrips] = -kDxyz[0];
305 // cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
306 AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangleA,kangleC,
307 kNstrips+1,leA,kNstrips+1,leC);
310 // cout << "AliITSgeomSSD275and75 default creator called: end" << endl;
312 //________________________________________________________________________
313 ostream &operator<<(ostream &os,AliITSgeomSSD275and75 &p){
314 ////////////////////////////////////////////////////////////////////////
315 // Standard output streaming function.
316 ////////////////////////////////////////////////////////////////////////
321 //----------------------------------------------------------------------
322 istream &operator>>(istream &is,AliITSgeomSSD275and75 &r){
323 ////////////////////////////////////////////////////////////////////////
324 // Standard input streaming function.
325 ////////////////////////////////////////////////////////////////////////
330 //======================================================================
334 //#include "AliITSgeomSSD75and275.h"
336 ClassImp(AliITSgeomSSD75and275)
338 AliITSgeomSSD75and275::AliITSgeomSSD75and275() : AliITSgeomSSD(){
339 ////////////////////////////////////////////////////////////////////////
340 // default constructor
341 ////////////////////////////////////////////////////////////////////////
342 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
343 // Size of sensitive detector area x,y(thickness),z
344 const Float_t kangleA = 0.0075; // angle in rad. of anode and cathodes
345 const Float_t kangleC = 0.0275; // angle in rad. of anode and cathodes
346 const Float_t kpitch = 0.0095;// cm anode separation.
347 const Int_t kNstrips = 768; // number of anode or cathode strips.
348 Float_t *leA,*leC; // array of low edges anode and cathorde.
351 leA = new Float_t[kNstrips+1];
352 leC = new Float_t[kNstrips+1];
354 leA[1] = -kpitch*(0.5*kNstrips-1);
356 leC[1] = kpitch*(0.5*kNstrips-1);
357 for(i=1;i<kNstrips;i++){
358 leA[i+1] = leA[i] + kpitch;
359 leC[i+1] = leC[i] - kpitch;
361 leA[kNstrips] = kDxyz[0];
362 leC[kNstrips] = -kDxyz[0];
363 // cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
364 AliITSgeomSSD::AliITSgeomSSD(kDxyz,kangleA,kangleC,
365 kNstrips+1,leA,kNstrips+1,leC);
368 // cout << "AliITSgeomSSD275and75 default creator called: end" << endl;
370 //________________________________________________________________________
371 ostream &operator<<(ostream &os,AliITSgeomSSD75and275 &p){
372 ////////////////////////////////////////////////////////////////////////
373 // Standard output streaming function.
374 ////////////////////////////////////////////////////////////////////////
379 //----------------------------------------------------------------------
380 istream &operator>>(istream &is,AliITSgeomSSD75and275 &r){
381 ////////////////////////////////////////////////////////////////////////
382 // Standard input streaming function.
383 ////////////////////////////////////////////////////////////////////////
388 //======================================================================