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