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