]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSgeomSSD.cxx
Field conversion factor added.
[u/mrichter/AliRoot.git] / ITS / AliITSgeomSSD.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/*
17$Log$
4ae5bbc4 18Revision 1.16 2002/10/14 14:57:00 hristov
19Merging the VirtualMC branch to the main development branch (HEAD)
20
b9d0a01d 21Revision 1.14.6.1 2002/06/10 17:51:15 hristov
22Merged with v3-08-02
23
24Revision 1.15 2002/05/19 18:17:03 hristov
25Changes needed by ICC/IFC compiler (Intel)
26
94831058 27Revision 1.14 2001/11/19 16:17:03 nilsen
28Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
29bugs found by Rene require more work to fix. Will be fixed soon.
30
cd77595e 31Revision 1.13 2001/10/12 22:07:20 nilsen
32A patch for C++ io manipulation functions so that they will work both
33with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
34other platforms.
35
431a7819 36Revision 1.12 2001/08/24 21:06:37 nilsen
37Added more documentation, fixed up some coding violations, and some
38forward declorations.
39
85f1e34a 40Revision 1.11 2001/05/16 08:17:49 hristov
41Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
42
e99dbc71 43Revision 1.10 2001/02/09 00:00:57 nilsen
44Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
45bugs in iostream based streamers used to read and write .det files. Fixed
46some detector sizes. Fixed bugs in some default-special constructors.
47
31b8cd63 48Revision 1.9 2001/02/03 00:00:30 nilsen
49New version of AliITSgeom and related files. Now uses automatic streamers,
50set up for new formatted .det file which includes detector information.
51Additional smaller modifications are still to come.
52
8253cd9a 53Revision 1.8 2000/10/02 16:32:43 barbera
54Forward declaration added
55
92c19c36 56Revision 1.2.4.8 2000/10/02 15:53:49 barbera
57Forward declaration added
58
59Revision 1.7 2000/07/10 16:07:18 fca
60Release version of ITS code
61
a3d834a0 62Revision 1.2.4.2 2000/03/04 23:55:59 nilsen
63Fixed up the comments/documentation
64
65Revision 1.2.4.1 2000/01/12 19:03:32 nilsen
66This is the version of the files after the merging done in December 1999.
67See the ReadMe110100.txt file for details
68
69Revision 1.2 1999/09/29 09:24:20 fca
70Introduction of the Copyright and cvs Log
71
4c039060 72*/
85f1e34a 73
74////////////////////////////////////////////////////////////////////////
75// This class is for the Silicon Strip Detector, SSD, specific geometry.
76// It is being replaced by AliITSsegmentationSSD class. This file also
77// constains classes derived from AliITSgeomSSD which do nothing but
78// initilize this one with predefined values.
79////////////////////////////////////////////////////////////////////////
80
4ae5bbc4 81#include <Riostream.h>
8253cd9a 82#include <stdlib.h>
83#include <TShape.h>
84#include <TBRIK.h>
85
58005f18 86#include "AliITSgeomSSD.h"
87
88ClassImp(AliITSgeomSSD)
31b8cd63 89
90
91AliITSgeomSSD::AliITSgeomSSD(){
92// Default constructor
93 fShapeSSD = 0;
94 fNp = 0;
95 fNn = 0;
96 fLowEdgeP = 0;
97 fLowEdgeN = 0;
98 fAngleP = 0.0;
99 fAngleN = 0.0;
100}
101//----------------------------------------------------------------------
8253cd9a 102AliITSgeomSSD::AliITSgeomSSD(const Float_t *box,Float_t ap,Float_t an,
103 Int_t np,Float_t *p,Int_t nn,Float_t *n){
a3d834a0 104////////////////////////////////////////////////////////////////////////
8253cd9a 105// Standard Constructor. *box={dx,dy,dz}, ap=anode angle, an=cathode angle,
106// nn= number of cathodes+1,*n= array of cathode low edges+highest edge,
107// np= number of anodes+1, *p= array of anode low edges+lighest edge.
31b8cd63 108///////////////////////////////////////////////////////////////////////
109 fShapeSSD = 0;
110 fNp = 0;
111 fNn = 0;
112 fLowEdgeP = 0;
113 fLowEdgeN = 0;
114 fAngleP = 0.0;
115 fAngleN = 0.0;
116 ResetSSD(box,ap,an,np,p,nn,n);
117}
118//----------------------------------------------------------------------
119void AliITSgeomSSD::ResetSSD(const Float_t *box,Float_t ap,Float_t an,
120 Int_t np,Float_t *p,Int_t nn,Float_t *n){
121////////////////////////////////////////////////////////////////////////
122// Standard Filler. *box={dx,dy,dz}, ap=anode angle, an=cathode angle,
123// nn= number of cathodes+1,*n= array of cathode low edges+highest edge,
124// np= number of anodes+1, *p= array of anode low edges+lighest edge.
8253cd9a 125///////////////////////////////////////////////////////////////////////
126 Int_t i;
a3d834a0 127
128 fShapeSSD = new TBRIK("ActiveSSD","Active volume of SSD","SSD SI DET",
8253cd9a 129 box[0],box[1],box[2]);
31b8cd63 130// if(fLowEdgeP!=0) delete fLowEdgeP;
131// if(fLowEdgeN!=0) delete fLowEdgeN;
8253cd9a 132 fNp = np;
133 fNn = nn;
134 fAngleP = ap;
135 fAngleN = an;
136 fLowEdgeP = new Float_t[fNp];
137 fLowEdgeN = new Float_t[fNn];
138 for(i=0;i<fNp;i++) fLowEdgeP[i] = p[i];
139 for(i=0;i<fNn;i++) fLowEdgeN[i] = n[i];
140}
141//______________________________________________________________________
142AliITSgeomSSD::~AliITSgeomSSD(){
143 // Destructor.
144
cd77595e 145 if(fLowEdgeP) delete [] fLowEdgeP; fLowEdgeP = 0;
146 if(fLowEdgeN) delete [] fLowEdgeN; fLowEdgeN = 0;
147 if(fShapeSSD) delete fShapeSSD; fShapeSSD = 0;
8253cd9a 148 fNp = 0;
149 fNn = 0;
150 fAngleP = 0.0;
151 fAngleN = 0.0;
58005f18 152}
4024ebf6 153AliITSgeomSSD::AliITSgeomSSD(const AliITSgeomSSD &source){
154////////////////////////////////////////////////////////////////////////
155// copy constructor
156////////////////////////////////////////////////////////////////////////
8253cd9a 157 Int_t i;
4024ebf6 158
8253cd9a 159 if(this == &source) return;
93a31784 160 this->fShapeSSD = new TBRIK(*(source.fShapeSSD));
8253cd9a 161 this->fNp = source.fNp;
162 this->fNn = source.fNn;
163 delete fLowEdgeP;
164 delete fLowEdgeN;
165 this->fAngleP = source.fAngleP;
166 this->fAngleN = source.fAngleN;
167 fLowEdgeP = new Float_t[fNp];
168 fLowEdgeN = new Float_t[fNn];
169 for(i=0;i<fNp;i++) this->fLowEdgeP[i] = source.fLowEdgeP[i];
170 for(i=0;i<fNn;i++) this->fLowEdgeN[i] = source.fLowEdgeN[i];
4024ebf6 171 return;
172}
173
174AliITSgeomSSD& AliITSgeomSSD::operator=(const AliITSgeomSSD &source) {
175////////////////////////////////////////////////////////////////////////
176// assignment operator
177////////////////////////////////////////////////////////////////////////
8253cd9a 178 Int_t i;
4024ebf6 179
8253cd9a 180 if(this == &source) return *this;
93a31784 181 this->fShapeSSD = new TBRIK(*(source.fShapeSSD));
8253cd9a 182 this->fNp = source.fNp;
183 this->fNn = source.fNn;
184 delete fLowEdgeP;
185 delete fLowEdgeN;
186 this->fAngleP = source.fAngleP;
187 this->fAngleN = source.fAngleN;
188 fLowEdgeP = new Float_t[fNp];
189 fLowEdgeN = new Float_t[fNn];
190 for(i=0;i<fNp;i++) this->fLowEdgeP[i] = source.fLowEdgeP[i];
191 for(i=0;i<fNn;i++) this->fLowEdgeN[i] = source.fLowEdgeN[i];
4024ebf6 192 return *this;
193}
8253cd9a 194//______________________________________________________________________
195void AliITSgeomSSD::Local2Det(Float_t x,Float_t z,Int_t &a,Int_t &c){
85f1e34a 196 // Given a GEANT detector local coordinate, cm, this function returns
197 // the detector specific P and N side strip numbers.
198 // Inputs are:
199 // Float_t x Geant detector local x coordinate in cm
200 // Float_t z Geant detector local z coordinate in cm
201 // outputs are:
202 // Int_t &a Detector anode strip number (P side)
203 // Int_t &c Detector cathode strip number (N side)
8253cd9a 204 Float_t d,b;
205 Int_t i;
206
207 // project on to bonding edges.
208 d = x*TMath::Cos(fAngleP)+z*TMath::Sin(fAngleP);
209 b = x*TMath::Cos(fAngleN)+z*TMath::Sin(fAngleN);
210 if(d<fLowEdgeP[0]) i=-1;
211 else for(i=0;i<fNp;i++){
212 if(fLowEdgeP[i]<d) break;
213 } // end for i
214 a = i;
215 if(b<fLowEdgeN[0]) i=-1;
216 else for(i=0;i<fNn;i++){
217 if(fLowEdgeN[i]<b) break;
218 } // end for i
219 c = i;
220 return;
221}
222//______________________________________________________________________
223void AliITSgeomSSD::Det2Local(Int_t a,Int_t c,Float_t &x,Float_t &z){
224// Float_t d,b;
225// Int_t i;
4024ebf6 226
8253cd9a 227 return;
228}
229//______________________________________________________________________
31b8cd63 230void AliITSgeomSSD::Print(ostream *os) const {
8253cd9a 231////////////////////////////////////////////////////////////////////////
232// Standard output format for this class.
233////////////////////////////////////////////////////////////////////////
8253cd9a 234 Int_t i;
431a7819 235#if defined __GNUC__
236#if __GNUC__ > 2
237 ios::fmtflags fmt;
238#else
239 Int_t fmt;
240#endif
94831058 241#else
242#if defined __ICC
243 ios::fmtflags fmt;
431a7819 244#else
245 Int_t fmt;
94831058 246#endif
431a7819 247#endif
8253cd9a 248
249 fmt = os->setf(ios::scientific); // set scientific floating point output
250 *os << "TBRIK" << " ";
251 *os << setprecision(16) << GetDx() << " ";
252 *os << setprecision(16) << GetDy() << " ";
253 *os << setprecision(16) << GetDz() << " ";
254 *os << fNp << " " << fNn << " ";
255 *os << setprecision(16) << fAngleP << " ";
256 *os << setprecision(16) << fAngleN << " ";
257 for(i=0;i<fNp;i++) *os << setprecision(16) << fLowEdgeP[i] << " ";
258 for(i=0;i<fNn;i++) *os << setprecision(16) << fLowEdgeN[i] << " ";
259 *os << endl;
260 os->flags(fmt); // reset back to old formating.
261 return;
262}
263//______________________________________________________________________
264void AliITSgeomSSD::Read(istream *is){
265////////////////////////////////////////////////////////////////////////
266// Standard input format for this class.
267////////////////////////////////////////////////////////////////////////
268 Float_t dx,dy,dz;
269 Int_t i;
270 char shp[20];
4024ebf6 271
8253cd9a 272 *is >> shp;
273 *is >> dx >> dy >> dz;
274 if(fShapeSSD!=0) delete fShapeSSD;
275 fShapeSSD = new TBRIK("ActiveSSD","Active volume of SSD","SSD SI DET",
276 dx,dy,dz);
277 *is >> fNp >> fNn;
278 *is >> fAngleP >> fAngleN;
279 if(fLowEdgeP !=0) delete fLowEdgeP;
280 if(fLowEdgeN !=0) delete fLowEdgeN;
281 fLowEdgeP = new Float_t[fNp];
282 fLowEdgeN = new Float_t[fNn];
31b8cd63 283 for(i=0;i<fNp;i++) *is >> fLowEdgeP[i];
8253cd9a 284 for(i=0;i<fNn;i++) *is >> fLowEdgeN[i];
285 return;
286}
287//----------------------------------------------------------------------
288ostream &operator<<(ostream &os,AliITSgeomSSD &p){
289////////////////////////////////////////////////////////////////////////
290// Standard output streaming function.
291////////////////////////////////////////////////////////////////////////
4024ebf6 292
8253cd9a 293 p.Print(&os);
294 return os;
295}
296//----------------------------------------------------------------------
297istream &operator>>(istream &is,AliITSgeomSSD &r){
298////////////////////////////////////////////////////////////////////////
299// Standard input streaming function.
300////////////////////////////////////////////////////////////////////////
4024ebf6 301
8253cd9a 302 r.Read(&is);
303 return is;
304}
305//======================================================================
306/*
307$Log$
4ae5bbc4 308Revision 1.16 2002/10/14 14:57:00 hristov
309Merging the VirtualMC branch to the main development branch (HEAD)
310
b9d0a01d 311Revision 1.14.6.1 2002/06/10 17:51:15 hristov
312Merged with v3-08-02
313
314Revision 1.15 2002/05/19 18:17:03 hristov
315Changes needed by ICC/IFC compiler (Intel)
316
94831058 317Revision 1.14 2001/11/19 16:17:03 nilsen
318Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
319bugs found by Rene require more work to fix. Will be fixed soon.
320
cd77595e 321Revision 1.13 2001/10/12 22:07:20 nilsen
322A patch for C++ io manipulation functions so that they will work both
323with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
324other platforms.
325
431a7819 326Revision 1.12 2001/08/24 21:06:37 nilsen
327Added more documentation, fixed up some coding violations, and some
328forward declorations.
329
85f1e34a 330Revision 1.11 2001/05/16 08:17:49 hristov
331Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
332
e99dbc71 333Revision 1.10 2001/02/09 00:00:57 nilsen
334Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
335bugs in iostream based streamers used to read and write .det files. Fixed
336some detector sizes. Fixed bugs in some default-special constructors.
337
31b8cd63 338Revision 1.9 2001/02/03 00:00:30 nilsen
339New version of AliITSgeom and related files. Now uses automatic streamers,
340set up for new formatted .det file which includes detector information.
341Additional smaller modifications are still to come.
342
8253cd9a 343*/
4024ebf6 344
8253cd9a 345//#include "AliITSgeomSSD175.h"
4024ebf6 346
8253cd9a 347ClassImp(AliITSgeomSSD175)
4024ebf6 348
8253cd9a 349AliITSgeomSSD175::AliITSgeomSSD175() : AliITSgeomSSD(){
350////////////////////////////////////////////////////////////////////////
351// default constructor
352////////////////////////////////////////////////////////////////////////
353 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
354 // Size of sensitive detector area x,y(thickness),z
355 const Float_t kangle = 0.0175; // angle in rad. of anode and cathodes
356 const Float_t kpitch = 0.0095;// cm anode separation.
357 const Int_t kNstrips = 768; // number of anode or cathode strips.
358 Float_t *leA,*leC; // array of low edges anode and cathorde.
359 Int_t i;
360
361 leA = new Float_t[kNstrips+1];
362 leC = new Float_t[kNstrips+1];
363 leA[0] = -kDxyz[0];
364 leA[1] = -kpitch*(0.5*kNstrips-1);
365 leC[0] = kDxyz[0];
366 leC[1] = kpitch*(0.5*kNstrips-1);
367 for(i=1;i<kNstrips;i++){
368 leA[i+1] = leA[i] + kpitch;
369 leC[i+1] = leC[i] - kpitch;
370 } // end for i
371 leA[kNstrips] = kDxyz[0];
372 leC[kNstrips] = -kDxyz[0];
373// cout << "AliITSgeomSSD175 default creator called: start" << endl;
31b8cd63 374 AliITSgeomSSD::ResetSSD(kDxyz,kangle,-kangle,
8253cd9a 375 kNstrips+1,leA,kNstrips+1,leC);
376 delete leA;
377 delete leC;
378// cout << "AliITSgeomSSD175 default creator called: end" << endl;
379}
380//________________________________________________________________________
381ostream &operator<<(ostream &os,AliITSgeomSSD175 &p){
382////////////////////////////////////////////////////////////////////////
383// Standard output streaming function.
384////////////////////////////////////////////////////////////////////////
4024ebf6 385
8253cd9a 386 p.Print(&os);
387 return os;
388}
389//----------------------------------------------------------------------
390istream &operator>>(istream &is,AliITSgeomSSD175 &r){
391////////////////////////////////////////////////////////////////////////
392// Standard input streaming function.
393////////////////////////////////////////////////////////////////////////
4024ebf6 394
8253cd9a 395 r.Read(&is);
396 return is;
397}
398//======================================================================
399/*
400$Log$
4ae5bbc4 401Revision 1.16 2002/10/14 14:57:00 hristov
402Merging the VirtualMC branch to the main development branch (HEAD)
403
b9d0a01d 404Revision 1.14.6.1 2002/06/10 17:51:15 hristov
405Merged with v3-08-02
406
407Revision 1.15 2002/05/19 18:17:03 hristov
408Changes needed by ICC/IFC compiler (Intel)
409
94831058 410Revision 1.14 2001/11/19 16:17:03 nilsen
411Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
412bugs found by Rene require more work to fix. Will be fixed soon.
413
cd77595e 414Revision 1.13 2001/10/12 22:07:20 nilsen
415A patch for C++ io manipulation functions so that they will work both
416with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
417other platforms.
418
431a7819 419Revision 1.12 2001/08/24 21:06:37 nilsen
420Added more documentation, fixed up some coding violations, and some
421forward declorations.
422
85f1e34a 423Revision 1.11 2001/05/16 08:17:49 hristov
424Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
425
e99dbc71 426Revision 1.10 2001/02/09 00:00:57 nilsen
427Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
428bugs in iostream based streamers used to read and write .det files. Fixed
429some detector sizes. Fixed bugs in some default-special constructors.
430
31b8cd63 431Revision 1.9 2001/02/03 00:00:30 nilsen
432New version of AliITSgeom and related files. Now uses automatic streamers,
433set up for new formatted .det file which includes detector information.
434Additional smaller modifications are still to come.
435
8253cd9a 436*/
4024ebf6 437
8253cd9a 438//#include "AliITSgeomSSD275and75.h"
4024ebf6 439
8253cd9a 440ClassImp(AliITSgeomSSD275and75)
4024ebf6 441
8253cd9a 442AliITSgeomSSD275and75::AliITSgeomSSD275and75() : AliITSgeomSSD(){
443////////////////////////////////////////////////////////////////////////
444// default constructor
445////////////////////////////////////////////////////////////////////////
e99dbc71 446}
447//----------------------------------------------------------------------
448AliITSgeomSSD275and75::AliITSgeomSSD275and75(Int_t npar,Float_t *par) :
449 AliITSgeomSSD(){
85f1e34a 450 // Default constructor for AliITSgeomSSD with strip angles of
451 // 275 miliradians and 75 miliradians. This constructor initlizes
452 // AliITSgeomSSD with the correct values. This is the miror image
453 // of the AliITSgeomSSD75and275 class.
8253cd9a 454 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
455 // Size of sensitive detector area x,y(thickness),z
456 const Float_t kangleA = 0.0275; // angle in rad. of anode and cathodes
457 const Float_t kangleC = 0.0075; // angle in rad. of anode and cathodes
458 const Float_t kpitch = 0.0095;// cm anode separation.
459 const Int_t kNstrips = 768; // number of anode or cathode strips.
460 Float_t *leA,*leC; // array of low edges anode and cathorde.
461 Int_t i;
462
463 leA = new Float_t[kNstrips+1];
464 leC = new Float_t[kNstrips+1];
465 leA[0] = -kDxyz[0];
466 leA[1] = -kpitch*(0.5*kNstrips-1);
467 leC[0] = kDxyz[0];
468 leC[1] = kpitch*(0.5*kNstrips-1);
469 for(i=1;i<kNstrips;i++){
470 leA[i+1] = leA[i] + kpitch;
471 leC[i+1] = leC[i] - kpitch;
472 } // end for i
473 leA[kNstrips] = kDxyz[0];
474 leC[kNstrips] = -kDxyz[0];
475// cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
e99dbc71 476 AliITSgeomSSD::ResetSSD(par,kangleA,kangleC,
8253cd9a 477 kNstrips+1,leA,kNstrips+1,leC);
478 delete leA;
479 delete leC;
480// cout << "AliITSgeomSSD275and75 default creator called: end" << endl;
481}
482//________________________________________________________________________
483ostream &operator<<(ostream &os,AliITSgeomSSD275and75 &p){
484////////////////////////////////////////////////////////////////////////
485// Standard output streaming function.
486////////////////////////////////////////////////////////////////////////
4024ebf6 487
8253cd9a 488 p.Print(&os);
489 return os;
490}
491//----------------------------------------------------------------------
492istream &operator>>(istream &is,AliITSgeomSSD275and75 &r){
493////////////////////////////////////////////////////////////////////////
494// Standard input streaming function.
495////////////////////////////////////////////////////////////////////////
4024ebf6 496
8253cd9a 497 r.Read(&is);
498 return is;
499}
500//======================================================================
501/*
502$Log$
4ae5bbc4 503Revision 1.16 2002/10/14 14:57:00 hristov
504Merging the VirtualMC branch to the main development branch (HEAD)
505
b9d0a01d 506Revision 1.14.6.1 2002/06/10 17:51:15 hristov
507Merged with v3-08-02
508
509Revision 1.15 2002/05/19 18:17:03 hristov
510Changes needed by ICC/IFC compiler (Intel)
511
94831058 512Revision 1.14 2001/11/19 16:17:03 nilsen
513Applyed fixes to bugs found by Rene Brun. With many thanks. Some additonal
514bugs found by Rene require more work to fix. Will be fixed soon.
515
cd77595e 516Revision 1.13 2001/10/12 22:07:20 nilsen
517A patch for C++ io manipulation functions so that they will work both
518with GNU gcc 2.96 and GNU gcc 3.01 compilers. Needs to be tested with
519other platforms.
520
431a7819 521Revision 1.12 2001/08/24 21:06:37 nilsen
522Added more documentation, fixed up some coding violations, and some
523forward declorations.
524
85f1e34a 525Revision 1.11 2001/05/16 08:17:49 hristov
526Bug fixed in the StepManager to account for the difference in the geometry tree for the ITS pixels. This fixes both the funny distribution of pixel coordinates and the missing hits/digits/points in many sectors of the ITS pixel barrel. Also included is a patch to properly get and use the detector dimensions through out the ITS code. (B.Nilsen)
527
e99dbc71 528Revision 1.10 2001/02/09 00:00:57 nilsen
529Fixed compatibility problem with HP unix {ios::fmtflags -> Int_t}. Fixed
530bugs in iostream based streamers used to read and write .det files. Fixed
531some detector sizes. Fixed bugs in some default-special constructors.
532
31b8cd63 533Revision 1.9 2001/02/03 00:00:30 nilsen
534New version of AliITSgeom and related files. Now uses automatic streamers,
535set up for new formatted .det file which includes detector information.
536Additional smaller modifications are still to come.
537
8253cd9a 538*/
539//#include "AliITSgeomSSD75and275.h"
4024ebf6 540
8253cd9a 541ClassImp(AliITSgeomSSD75and275)
4024ebf6 542
8253cd9a 543AliITSgeomSSD75and275::AliITSgeomSSD75and275() : AliITSgeomSSD(){
544////////////////////////////////////////////////////////////////////////
545// default constructor
546////////////////////////////////////////////////////////////////////////
e99dbc71 547}
548AliITSgeomSSD75and275::AliITSgeomSSD75and275(Int_t npar,Float_t *par) :
549 AliITSgeomSSD(){
85f1e34a 550 // Default constructor for AliITSgeomSSD with strip angles of
551 // 75 miliradians and 275 miliradians. This constructor initlizes
552 // AliITSgeomSSD with the correct values. This is the miror image
553 // of the AliITSgeomSSD275and75 class.
8253cd9a 554 const Float_t kDxyz[] ={3.6500,0.0150,2.000};//cm. (Geant 3.12 units)
555 // Size of sensitive detector area x,y(thickness),z
556 const Float_t kangleA = 0.0075; // angle in rad. of anode and cathodes
557 const Float_t kangleC = 0.0275; // angle in rad. of anode and cathodes
558 const Float_t kpitch = 0.0095;// cm anode separation.
559 const Int_t kNstrips = 768; // number of anode or cathode strips.
560 Float_t *leA,*leC; // array of low edges anode and cathorde.
561 Int_t i;
562
563 leA = new Float_t[kNstrips+1];
564 leC = new Float_t[kNstrips+1];
565 leA[0] = -kDxyz[0];
566 leA[1] = -kpitch*(0.5*kNstrips-1);
567 leC[0] = kDxyz[0];
568 leC[1] = kpitch*(0.5*kNstrips-1);
569 for(i=1;i<kNstrips;i++){
570 leA[i+1] = leA[i] + kpitch;
571 leC[i+1] = leC[i] - kpitch;
572 } // end for i
573 leA[kNstrips] = kDxyz[0];
574 leC[kNstrips] = -kDxyz[0];
575// cout << "AliITSgeomSSD275and75 default creator called: start" << endl;
e99dbc71 576 AliITSgeomSSD::ResetSSD(par,kangleA,kangleC,
8253cd9a 577 kNstrips+1,leA,kNstrips+1,leC);
578 delete leA;
579 delete leC;
580// cout << "AliITSgeomSSD275and75 default creator called: end" << endl;
581}
582//________________________________________________________________________
583ostream &operator<<(ostream &os,AliITSgeomSSD75and275 &p){
584////////////////////////////////////////////////////////////////////////
585// Standard output streaming function.
586////////////////////////////////////////////////////////////////////////
4024ebf6 587
8253cd9a 588 p.Print(&os);
589 return os;
590}
591//----------------------------------------------------------------------
592istream &operator>>(istream &is,AliITSgeomSSD75and275 &r){
593////////////////////////////////////////////////////////////////////////
594// Standard input streaming function.
595////////////////////////////////////////////////////////////////////////
4024ebf6 596
8253cd9a 597 r.Read(&is);
598 return is;
599}
600//======================================================================