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