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