]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRecPoint.cxx
Field conversion factor added.
[u/mrichter/AliRoot.git] / ITS / AliITSRecPoint.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.3.12.1  2002/10/14 13:14:08  hristov
19 Updating VirtualMC to v3-09-02
20
21 Revision 1.4  2002/09/09 17:28:02  nilsen
22 Added class iostreamer funcionality and Print and Read functions. cleaned
23 up files.
24
25 */
26 ////////////////////////////////////////////////
27 //  Reconstructed point class for set:ITS     //
28 ////////////////////////////////////////////////
29
30
31 #include "AliITSRecPoint.h"
32 ClassImp(AliITSRecPoint)
33
34 AliITSRecPoint::AliITSRecPoint() {
35     // default creator
36     fTracks[0]=fTracks[1]=fTracks[2]=-3; 
37     fX=fZ=fQ=fdEdX=0.;
38     fSigmaX2=fSigmaZ2=0.;
39 }
40 //----------------------------------------------------------------------
41 void AliITSRecPoint::Print(ostream *os){
42     ////////////////////////////////////////////////////////////////////////
43     // Standard output format for this class.
44     ////////////////////////////////////////////////////////////////////////
45 #if defined __GNUC__
46 #if __GNUC__ > 2
47     ios::fmtflags fmt;
48 #else
49     Int_t fmt;
50 #endif
51 #else
52 #if defined __ICC
53     ios::fmtflags fmt;
54 #else
55     Int_t fmt;
56 #endif
57 #endif
58  
59     fmt = os->setf(ios::fixed);  // set fixed floating point output
60     *os << fTracks[0]<< " " << fTracks[1] << " " << fTracks[2] << " ";
61     *os << fX << " " << fZ << " " << fQ << " ";
62     fmt = os->setf(ios::scientific); // set scientific for dEdX.
63     *os << fdEdX << " ";
64     fmt = os->setf(ios::fixed); // every fixed
65     *os << fSigmaX2 << " " << fSigmaZ2;
66     os->flags(fmt); // reset back to old formating.
67     return;
68 }
69 //----------------------------------------------------------------------
70 void AliITSRecPoint::Read(istream *is){
71 ////////////////////////////////////////////////////////////////////////
72 // Standard input format for this class.
73 ////////////////////////////////////////////////////////////////////////
74  
75
76     *is >> fTracks[0] >> fTracks[1] >> fTracks[2] >> fX >> fZ >> fQ;
77     *is >> fdEdX >> fSigmaX2 >> fSigmaZ2;
78     return;
79 }
80 //----------------------------------------------------------------------
81 ostream &operator<<(ostream &os,AliITSRecPoint &p){
82 ////////////////////////////////////////////////////////////////////////
83 // Standard output streaming function.
84 ////////////////////////////////////////////////////////////////////////
85  
86     p.Print(&os);
87     return os;
88 }
89 //----------------------------------------------------------------------
90 istream &operator>>(istream &is,AliITSRecPoint &r){
91 ////////////////////////////////////////////////////////////////////////
92 // Standard input streaming function.
93 ////////////////////////////////////////////////////////////////////////
94  
95     r.Read(&is);
96     return is;
97 }
98 //----------------------------------------------------------------------