]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITShit.cxx
Removing obsolete macros
[u/mrichter/AliRoot.git] / ITS / AliITShit.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.20 2002/10/22 14:45:42 alibrary
19Introducing Riostream.h
20
4ae5bbc4 21Revision 1.19 2002/10/14 14:57:00 hristov
22Merging the VirtualMC branch to the main development branch (HEAD)
23
b9d0a01d 24Revision 1.13.6.3 2002/08/28 15:06:50 alibrary
25Updating to v3-09-01
26
27Revision 1.18 2002/08/07 18:37:53 nilsen
28Removed endl from print function. should be supplied by user as wanted.
29
000d397e 30Revision 1.17 2002/06/20 09:10:14 hristov
31Data member ft0 initialized
32
1e96b53e 33Revision 1.16 2002/06/19 21:12:37 nilsen
34Fixed bug with non-zero-ed new data members in constructors. Thanks Jiri
35for finding it and pointing it out.
36
07265b7c 37Revision 1.15 2002/06/12 18:59:47 nilsen
38Added Starting track location to hit class and related changes to modules.
39This is at present still fully backwards compatible since starting hits
40are still written to the file. When aliroot v4.0 will be released, this
41backwards compatiblity will be broken by removing the enterence hit, and making
42the nessesary changes to module at that time.
43
7e3ded1b 44Revision 1.14 2002/05/19 18:17:03 hristov
45Changes needed by ICC/IFC compiler (Intel)
46
94831058 47Revision 1.13 2002/03/09 18:35:35 nilsen
48Added functions to print out Hit data members.
49
e11d9a3a 50Revision 1.12 2002/03/08 16:05:05 nilsen
51Standeard io streamers added to make debugging et al. easier.
52
3dbb2c95 53Revision 1.11 2001/01/30 09:23:13 hristov
54Streamers removed (R.Brun)
55
a8a6107b 56Revision 1.10 2001/01/26 20:01:19 hristov
57Major upgrade of AliRoot code
58
2ab0c725 59Revision 1.9 2000/10/02 16:32:51 barbera
60Automatic streamer used and forward declarations added
61
339150e6 62Revision 1.3.4.7 2000/10/02 15:54:49 barbera
63Automatic streamer used and forward declarations added
64
65Revision 1.8 2000/09/22 12:35:21 nilsen
66Traps placed incase it is used without a properly initilized AliITSgeom class.
67
4fc5ed2d 68Revision 1.7 2000/07/10 16:07:18 fca
69Release version of ITS code
70
b2340bbf 71Revision 1.3.4.2 2000/03/04 23:43:57 nilsen
72Fixed up the comments/documentation.
73
74Revision 1.3.4.1 2000/01/12 19:03:32 nilsen
75This is the version of the files after the merging done in December 1999.
76See the ReadMe110100.txt file for details
77
78Revision 1.3 1999/09/29 09:24:20 fca
79Introduction of the Copyright and cvs Log
80
4c039060 81*/
82
4ae5bbc4 83#include <Riostream.h>
58005f18 84
85#include <TMath.h>
86#include <TRandom.h>
87#include <TVector.h>
88#include <TGeometry.h>
89#include <TNode.h>
90#include <TTUBE.h>
4fc5ed2d 91#include "TParticle.h"
58005f18 92
b2340bbf 93#include "AliRun.h"
58005f18 94#include "AliITS.h"
4fc5ed2d 95#include "AliITSgeom.h"
58005f18 96#include "AliITShit.h"
58005f18 97
98
99ClassImp(AliITShit)
100////////////////////////////////////////////////////////////////////////
101// Version: 0
102// Written by Rene Brun, Federico Carminati, and Roberto Barbera
103//
104// Version: 1
105// Modified and documented by Bjorn S. Nilsen
106// July 11 1999
107//
108// AliITShit is the hit class for the ITS. Hits are the information
109// that comes from a Monte Carlo at each step as a particle mass through
110// sensitive detector elements as particles are transported through a
111// detector.
112//
113//Begin_Html
114/*
a92b2b7d 115<img src="picts/ITS/AliITShit_Class_Diagram.gif">
58005f18 116</pre>
117<br clear=left>
118<font size=+2 color=red>
119<p>This show the relasionships between the ITS hit class and the rest of Aliroot.
120</font>
121<pre>
122*/
123//End_Html
b2340bbf 124////////////////////////////////////////////////////////////////////////
125// Inline Member functions:
126//
127// AliITShit()
128// The default creator of the AliITShit class.
129//
130// ~AliITShit()
131// The default destructor of the AliITShit class.
132//
133// int GetTrack()
134// See AliHit for a full description. Returns the track number fTrack
135// for this hit.
136//
137// SetTrack(int track)
138// See AliHit for a full description. Sets the track number fTrack
139// for this hit.
140//
141// Int_t GetTrackStatus()
142// Returns the value of the track status flag fStatus. This flag
143// indicates the track status at the time of creating this hit. It is
144// made up of the following 8 status bits from highest order to lowest
145// order bits
146// 0 : IsTrackAlive(): IsTrackStop():IsTrackDisappeared():
147// IsTrackOut():IsTrackExiting():IsTrackEntering():IsTrackInside() .
148// See AliMC for a description of these functions. If the function is
149// true then the bit is set to one, otherwise it is zero.
150//
151// Bool_t StatusInside()
152// Returns kTRUE if the particle producing this hit is still inside
153// the present volume. Returns kFalse if this particle will be in another
154// volume. {bit IsTrackInside is set or not}
155//
156// Bool_t StatusEntering()
157// Returns kTRUE if the particle producing this hit is has just enterd
158// the present volume. Returns kFalse otherwise. {bit IsTrackEntering is
159// set or not}
160//
161// Bool_t StatusExiting()
162// Returns kTRUE if the particle producing this hit is will exit
163// the present volume. Returns kFalse otherwise. {bit IsTrackExiting is set
164// or not}
165//
166// Bool_t StatusOut()
167// Returns kTRUE if the particle producing this hit is goint exit the
168// simulation. Returns kFalse otherwise. {bit IsTrackOut is set or not}
169//
170// Bool_t StatusDisappeared()
171// Returns kTRUE if the particle producing this hit is going to "disappear"
172// for example it has interacted producing some other particles. Returns
173// kFalse otherwise. {bit IsTrackOut is set or not}
174//
175// Bool_t StatusStop()
176// Returns kTRUE if the particle producing this hit is has dropped below
177// its energy cut off producing some other particles. Returns kFalse otherwise.
178// {bit IsTrackOut is set or not}
179//
180// Bool_t StatuAlives()
181// Returns kTRUE if the particle producing this hit is going to continue
182// to be transported. Returns kFalse otherwise. {bit IsTrackOut is set or not}
183//
184// Int_t GetLayer()
185// Returns the layer number, fLayer, for this hit.
186//
187// Int_t GetLadder()
188// Returns the ladder number, fLadder, for this hit.
189//
190// Int_t GetDetector()
191// Returns the detector number, fDet, for this hit.
192//
193// GetDetectorID(Int_t &layer, Int_t &ladder, Int_t &detector)
194// Returns the layer, ladder, and detector numbers, fLayer fLadder fDet,
195// in one call.
196//
197// Float_t GetIonization()
198// Returns the energy lost, fDestep, by the particle creating this hit,
199// in the units defined by the Monte Carlo.
200//
201// GetPositionG(Float_t &x, Float_t &y, Float_t &z)
202// Returns the global position, fX fY fZ, of this hit, in the units
203// define by the Monte Carlo.
204//
205// GetPositionG(Double_t &x, Double_t &y, Double_t &z)
206// Returns the global position, fX fY fZ, of this hit, in the units
207// define by the Monte Carlo.
208//
209// GetPositionG(Float_t &x, Float_t &y, Float_t &z, Float_t &tof)
210// Returns the global position and time of flight, fX fY fZ fTof, of
211// this hit, in the units define by the Monte Carlo.
212//
213// GetPositionG(Double_t &x,Double_t &y,Double_t &z,Double_t &tof)
214// Returns the global position and time of flight, fX fY fZ fTof, of
215// this hit, in the units define by the Monte Carlo.
216//
217// GetPositionL(Double_t &x,Double_t &y,Double_t &z)
218// Returns the local position, fX fY fZ, of this hit in the coordiante
219// of this module, in the units define by the Monte Carlo.
220//
221// GetPositionG(Double_t &x,Double_t &y,Double_t &z,Double_t &tof)
222// Returns the local position and time of flight, fX fY fZ fTof, of
223// this hit in the coordinates of this module, in the units define by the
224// Monte Carlo.
225//
226// Float_t GetXG()
227// Returns the global x position in the units defined by the Monte Carlo.
228//
229// Float_t GetYG()
230// Returns the global y position in the units defined by the Monte Carlo.
231//
232// Float_t GetYG()
233// Returns the global z position in the units defined by the Monte Carlo.
234//
235// Float_t GetTOF()
236// Returns the time of flight, fTof, of this hit, in the units defined
237// by the Monte Carlo.
238//
239// GetMomentumG(Float_t &px, Float_t &py, Float_t &pz)
240// Returns the global momentum, fPx fPy fPz, of the particle that made
241// this hit, in the units define by the Monte Carlo.
242//
243// GetMomentumG(Double_t &px,Double_t &py,Double_t &pz)
244// Returns the global momentum, fPx fPy fPz, of the particle that made
245// this hit, in the units define by the Monte Carlo.
246//
247// GetMomentumL(Double_t &px,Double_t &py,Double_t &pz)
248// Returns the momentum, fPx fPy fPz in coordinate appropreate for this
249// specific module, in the units define by the Monte Carlo.
250//
251// Float_t GetPXG()
252// Returns the global X momentum in the units defined by the Monte Carlo.
253//
254// Float_t GetPYG()
255// Returns the global Y momentum in the units defined by the Monte Carlo.
256//
257// Float_t GetPZG()
258// Returns the global Z momentum in the units defined by the Monte Carlo.
259//
260////////////////////////////////////////////////////////////////////////
58005f18 261//_____________________________________________________________________________
7e3ded1b 262AliITShit::AliITShit():AliHit(){
263 // Default Constructor
264 // Zero data member just to be safe.
265 // Intputs:
266 // none.
267 // Outputs:
268 // none.
269 // Return:
270 // A default created AliITShit class.
271
272 fStatus = 0; // Track Status
273 fLayer = 0; // Layer number
274 fLadder = 0; // Ladder number
275 fDet = 0; // Detector number
276 fPx = 0.0; // PX of particle at the point of the hit
277 fPy = 0.0; // PY of particle at the point of the hit
278 fPz = 0.0; // PZ of particle at the point of the hit
279 fDestep = 0.0; // Energy deposited in the current step
280 fTof = 0.0; // Time of flight at the point of the hit
07265b7c 281 fStatus0 = 0; // zero status bit by default.
7e3ded1b 282 fx0 = 0.0; // Starting point of this step
283 fy0 = 0.0; // Starting point of this step
284 fz0 = 0.0; // Starting point of this step
285 ft0 = 0.0; // Starting point of this step
286}
287AliITShit::AliITShit(Int_t shunt,Int_t track,Int_t *vol,Float_t edep,
288 Float_t tof,TLorentzVector &x,TLorentzVector &x0,
289 TLorentzVector &p) : AliHit(shunt, track){
290////////////////////////////////////////////////////////////////////////
291// Create ITS hit
292// The creator of the AliITShit class. The variables shunt and
293// track are passed to the creator of the AliHit class. See the AliHit
294// class for a full description. In the units of the Monte Carlo
295////////////////////////////////////////////////////////////////////////
296 // Intputs:
297 // Int_t shunt See AliHit
298 // Int_t track Track number, see AliHit
299 // Int_t *vol Array of integer hit data,
300 // vol[0] Layer where the hit is, 1-6 typicaly
301 // vol[1] Ladder where the hit is.
302 // vol[2] Detector number where the hit is
303 // vol[3] Set of status bits
304 // vol[4] Set of status bits at start
305 // Outputs:
306 // none.
307 // Return:
308 // A default created AliITShit class.
309
310 fLayer = vol[0]; // Layer number
311 fLadder = vol[2]; // Ladder number
312 fDet = vol[1]; // Detector number
313 fStatus = vol[3]; // Track status flags
314 fStatus0 = vol[4]; // Track status flag for start position.
315 fX = x.X(); // Track X global position
316 fY = x.Y(); // Track Y global position
317 fZ = x.Z(); // Track Z global position
318 fPx = p.Px(); // Track X Momentum
319 fPy = p.Py(); // Track Y Momentum
320 fPz = p.Pz(); // Track Z Momentum
321 fDestep = edep; // Track dE/dx for this step
322 fTof = tof ; // Track Time of Flight for this step
323 fx0 = x0.X(); // Track X global position
324 fy0 = x0.Y(); // Track Y global position
325 fz0 = x0.Z(); // Track Z global position
1e96b53e 326 ft0 = x0.T(); // Starting point of this step
7e3ded1b 327}
328//______________________________________________________________________
58005f18 329AliITShit::AliITShit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits):
b2340bbf 330 AliHit(shunt, track){
331////////////////////////////////////////////////////////////////////////
332// Create ITS hit
333// The creator of the AliITShit class. The variables shunt and
334// track are passed to the creator of the AliHit class. See the AliHit
335// class for a full description. the integer array *vol contains, in order,
336// fLayer = vol[0], fDet = vol[1], fLadder = vol[2], fStatus = vol[3].
337// The array *hits contains, in order, fX = hits[0], fY = hits[1],
338// fZ = hits[2], fPx = hits[3], fPy = hits[4], fPz = hits[5],
339// fDestep = hits[6], and fTof = hits[7]. In the units of the Monte Carlo
340////////////////////////////////////////////////////////////////////////
7e3ded1b 341 // Intputs:
342 // Int_t shunt See AliHit
343 // Int_t track Track number, see AliHit
344 // Int_t *vol Array of integer hit data,
345 // vol[0] Layer where the hit is, 1-6 typicaly
346 // vol[1] Ladder where the hit is.
347 // vol[2] Detector number where the hit is
348 // vol[3] Set of status bits
349 // Float_t *hits Array of hit information
350 // hits[0] X global position of this hit
351 // hits[1] Y global position of this hit
352 // hits[2] Z global position of this hit
353 // hits[3] Px global position of this hit
354 // hits[4] Py global position of this hit
355 // hits[5] Pz global position of this hit
356 // hits[6] Energy deposited by this step
357 // hits[7] Time of flight of this particle at this step
358 // Outputs:
359 // none.
360 // Return:
361 // A standard created AliITShit class.
58005f18 362 fLayer = vol[0]; // Layer number
363 fLadder = vol[2]; // Ladder number
364 fDet = vol[1]; // Detector number
365 fStatus = vol[3]; // Track status flags
7e3ded1b 366 fX = hits[0]; // Track X global position
367 fY = hits[1]; // Track Y global position
368 fZ = hits[2]; // Track Z global position
58005f18 369 fPx = hits[3]; // Track X Momentum
370 fPy = hits[4]; // Track Y Momentum
371 fPz = hits[5]; // Track Z Momentum
372 fDestep = hits[6]; // Track dE/dx for this step
373 fTof = hits[7]; // Track Time of Flight for this step
07265b7c 374 fStatus0 = 0;// Track Status of Starting point
375 fx0 = 0.0; // Starting point of this step
376 fy0 = 0.0; // Starting point of this step
377 fz0 = 0.0; // Starting point of this step
378 ft0 = 0.0; // Starting point of this step
58005f18 379}
b2340bbf 380//______________________________________________________________________
58005f18 381void AliITShit::GetPositionL(Float_t &x,Float_t &y,Float_t &z){
b2340bbf 382////////////////////////////////////////////////////////////////////////
383// Returns the position of this hit in the local coordinates of this
384// module, and in the units of the Monte Carlo.
385////////////////////////////////////////////////////////////////////////
58005f18 386 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
387 Float_t g[3],l[3];
388
389 g[0] = fX;
390 g[1] = fY;
391 g[2] = fZ;
4fc5ed2d 392 if(gm) {
393 gm->GtoL(fLayer,fLadder,fDet,g,l);
394 x = l[0];
395 y = l[1];
396 z = l[2];
397 } else {
398 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
399 // AliITSv7 - SDD case
400 x=fX;
401 y=fZ;
402 z=fY;
403 }
58005f18 404 return;
405}
b2340bbf 406//______________________________________________________________________
58005f18 407void AliITShit::GetPositionL(Float_t &x,Float_t &y,Float_t &z,Float_t &tof){
b2340bbf 408////////////////////////////////////////////////////////////////////////
409// Returns the position and time of flight of this hit in the local
410// coordinates of this module, and in the units of the Monte Carlo.
411////////////////////////////////////////////////////////////////////////
58005f18 412 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
413 Float_t g[3],l[3];
414
415 g[0] = fX;
416 g[1] = fY;
417 g[2] = fZ;
4fc5ed2d 418 if(gm) {
419 gm->GtoL(fLayer,fLadder,fDet,g,l);
420 x = l[0];
421 y = l[1];
422 z = l[2];
423 } else {
424 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
425 // AliITSv7 - SDD case
426 x=fX;
427 y=fZ;
428 z=fY;
429 }
58005f18 430 tof = fTof;
431 return;
432}
b2340bbf 433//______________________________________________________________________
58005f18 434Float_t AliITShit::GetXL(){
b2340bbf 435////////////////////////////////////////////////////////////////////////
436// Returns the x position of this hit in the local coordinates of this
437// module, and in the units of the Monte Carlo.
438////////////////////////////////////////////////////////////////////////
58005f18 439 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
440 Float_t g[3],l[3];
441
442 g[0] = fX;
443 g[1] = fY;
444 g[2] = fZ;
4fc5ed2d 445 if(gm) {
446 gm->GtoL(fLayer,fLadder,fDet,g,l);
447 return l[0];
448 } else {
449 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
450 return fX;
451 }
58005f18 452}
b2340bbf 453//______________________________________________________________________
58005f18 454Float_t AliITShit::GetYL(){
b2340bbf 455////////////////////////////////////////////////////////////////////////
456// Returns the y position of this hit in the local coordinates of this
457// module, and in the units of the Monte Carlo.
458////////////////////////////////////////////////////////////////////////
58005f18 459 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
460 Float_t g[3],l[3];
461
462 g[0] = fX;
463 g[1] = fY;
464 g[2] = fZ;
4fc5ed2d 465 if (gm) {
466 gm->GtoL(fLayer,fLadder,fDet,g,l);
467 return l[1];
468 } else {
469 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
470 return fZ;
471 }
58005f18 472}
b2340bbf 473//______________________________________________________________________
58005f18 474Float_t AliITShit::GetZL(){
b2340bbf 475////////////////////////////////////////////////////////////////////////
476// Returns the z position of this hit in the local coordinates of this
477// module, and in the units of the Monte Carlo.
478////////////////////////////////////////////////////////////////////////
58005f18 479 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
480 Float_t g[3],l[3];
481
482 g[0] = fX;
483 g[1] = fY;
484 g[2] = fZ;
4fc5ed2d 485 if(gm) {
486 gm->GtoL(fLayer,fLadder,fDet,g,l);
487 return l[2];
488 } else {
489 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
490 return fY;
491 }
58005f18 492}
b2340bbf 493//______________________________________________________________________
58005f18 494void AliITShit::GetMomentumL(Float_t &px,Float_t &py,Float_t &pz){
b2340bbf 495////////////////////////////////////////////////////////////////////////
496// Returns the momentum of this hit in the local coordinates of this
497// module, and in the units of the Monte Carlo.
498////////////////////////////////////////////////////////////////////////
58005f18 499 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
500 Float_t g[3],l[3];
501
502 g[0] = fPx;
503 g[1] = fPy;
504 g[2] = fPz;
4fc5ed2d 505 if (gm) {
506 gm->GtoLMomentum(fLayer,fLadder,fDet,g,l);
507 px = l[0];
508 py = l[1];
509 pz = l[2];
510 } else {
511 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
512 px=fPx;
513 py=fPy;
514 pz=fPz;
515 }
58005f18 516 return;
517}
b2340bbf 518//______________________________________________________________________
519Float_t AliITShit::GetPXL(){
520////////////////////////////////////////////////////////////////////////
521// Returns the X momentum of this hit in the local coordinates of this
522// module, and in the units of the Monte Carlo.
523////////////////////////////////////////////////////////////////////////
524 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
525 Float_t g[3],l[3];
526
527 g[0] = fPx;
528 g[1] = fPy;
529 g[2] = fPz;
4fc5ed2d 530 if (gm) {
531 gm->GtoLMomentum(fLayer,fLadder,fDet,g,l);
532 return l[0];
533 } else {
534 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
535 return fPx;
536 }
b2340bbf 537}
538//______________________________________________________________________
539Float_t AliITShit::GetPYL(){
540////////////////////////////////////////////////////////////////////////
541// Returns the Y momentum of this hit in the local coordinates of this
542// module, and in the units of the Monte Carlo.
543////////////////////////////////////////////////////////////////////////
544 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
545 Float_t g[3],l[3];
546
547 g[0] = fPx;
548 g[1] = fPy;
549 g[2] = fPz;
4fc5ed2d 550 if (gm) {
551 gm->GtoLMomentum(fLayer,fLadder,fDet,g,l);
552 return l[1];
553 } else {
554 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
555 return fPy;
556 }
557
b2340bbf 558}
559//______________________________________________________________________
560Float_t AliITShit::GetPZL(){
561////////////////////////////////////////////////////////////////////////
562// Returns the Z momentum of this hit in the local coordinates of this
563// module, and in the units of the Monte Carlo.
564////////////////////////////////////////////////////////////////////////
565 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
566 Float_t g[3],l[3];
567
568 g[0] = fPx;
569 g[1] = fPy;
570 g[2] = fPz;
4fc5ed2d 571 if (gm) {
572 gm->GtoLMomentum(fLayer,fLadder,fDet,g,l);
573 return l[2];
574 } else {
575 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
576 return fPz;
577 }
578
b2340bbf 579}
580//___________________________________________________________________________;
581Int_t AliITShit::GetModule(){
582////////////////////////////////////////////////////////////////////////
583// Returns the module index number of the module where this hit was in.
584////////////////////////////////////////////////////////////////////////
585 AliITSgeom *gm = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom();
586
4fc5ed2d 587 if (gm) return gm->GetModuleIndex(fLayer,fLadder,fDet);
588 else {
589 Error("AliITShit","NULL pointer to the geometry! return smth else",gm);
590 return 0;
591 }
b2340bbf 592}
593//______________________________________________________________________
594TParticle * AliITShit::GetParticle(){
595////////////////////////////////////////////////////////////////////////
596// Returns the pointer to the TParticle for the particle that created
597// this hit. From the TParticle all kinds of information about this
598// particle can be found. See the TParticle class.
599////////////////////////////////////////////////////////////////////////
2ab0c725 600 return gAlice->Particle(GetTrack());
3dbb2c95 601}
602//----------------------------------------------------------------------
603void AliITShit::Print(ostream *os){
604////////////////////////////////////////////////////////////////////////
605// Standard output format for this class.
606////////////////////////////////////////////////////////////////////////
607#if defined __GNUC__
608#if __GNUC__ > 2
609 ios::fmtflags fmt;
610#else
611 Int_t fmt;
612#endif
94831058 613#else
d9f43611 614#if defined __ICC || defined __ECC
94831058 615 ios::fmtflags fmt;
3dbb2c95 616#else
617 Int_t fmt;
94831058 618#endif
3dbb2c95 619#endif
620
621 fmt = os->setf(ios::scientific); // set scientific floating point output
e11d9a3a 622 *os << fTrack << " " << fX << " " << fY << " " << fZ << " ";
3dbb2c95 623 fmt = os->setf(ios::hex); // set hex for fStatus only.
624 *os << fStatus << " ";
625 fmt = os->setf(ios::dec); // every thing else decimel.
626 *os << fLayer << " " << fLadder << " " << fDet << " ";;
627 *os << fPx << " " << fPy << " " << fPz << " ";
628 *os << fDestep << " " << fTof;
000d397e 629 *os << " " << fx0 << " " << fy0 << " " << fz0;
630// *os << " " << endl;
3dbb2c95 631 os->flags(fmt); // reset back to old formating.
632 return;
633}
634//----------------------------------------------------------------------
635void AliITShit::Read(istream *is){
636////////////////////////////////////////////////////////////////////////
637// Standard input format for this class.
638////////////////////////////////////////////////////////////////////////
639
e11d9a3a 640
641 *is >> fTrack >> fX >> fY >> fZ;
3dbb2c95 642 *is >> fStatus >> fLayer >> fLadder >> fDet >> fPx >> fPy >> fPz >>
643 fDestep >> fTof;
7e3ded1b 644 *is >> fx0 >> fy0 >> fz0;
3dbb2c95 645 return;
646}
647//----------------------------------------------------------------------
648ostream &operator<<(ostream &os,AliITShit &p){
649////////////////////////////////////////////////////////////////////////
650// Standard output streaming function.
651////////////////////////////////////////////////////////////////////////
652
653 p.Print(&os);
654 return os;
655}
656//----------------------------------------------------------------------
657istream &operator>>(istream &is,AliITShit &r){
658////////////////////////////////////////////////////////////////////////
659// Standard input streaming function.
660////////////////////////////////////////////////////////////////////////
661
662 r.Read(&is);
663 return is;
b2340bbf 664}
3dbb2c95 665//----------------------------------------------------------------------