]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDRun.cxx
Changes needed by the new TRD tracker (Alex)
[u/mrichter/AliRoot.git] / STEER / AliESDRun.cxx
CommitLineData
d5ebf00e 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#include "AliESDRun.h"
17#include "AliESDVertex.h"
18
19//-------------------------------------------------------------------------
20// Implementation Class AliESDRun
21// Run by run data
22// for the ESD
23// Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
24//-------------------------------------------------------------------------
25
26ClassImp(AliESDRun)
27
28//______________________________________________________________________________
29AliESDRun::AliESDRun() :
694aad0c 30 TObject(),
31 fMagneticField(0),
d5ebf00e 32 fPeriodNumber(0),
694aad0c 33 fRunNumber(0),
34 fRecoVersion(0)
d5ebf00e 35{
36 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
37 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
38}
39
40//______________________________________________________________________________
41AliESDRun::AliESDRun(const AliESDRun &esd) :
42 TObject(esd),
694aad0c 43 fMagneticField(esd.fMagneticField),
d5ebf00e 44 fPeriodNumber(esd.fPeriodNumber),
694aad0c 45 fRunNumber(esd.fRunNumber),
46 fRecoVersion(esd.fRecoVersion)
d5ebf00e 47{
48 // Copy constructor
49 for (Int_t i=0; i<2; i++) fDiamondXY[i]=esd.fDiamondXY[i];
50 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=esd.fDiamondCovXY[i];
51}
52
53//______________________________________________________________________________
54AliESDRun& AliESDRun::operator=(const AliESDRun &esd)
55{
56 // assigment operator
57 if(this!=&esd) {
58 TObject::operator=(esd);
59 fRunNumber=esd.fRunNumber;
60 fPeriodNumber=esd.fPeriodNumber;
61 fRecoVersion=esd.fRecoVersion;
62 fMagneticField=esd.fMagneticField;
63 for (Int_t i=0; i<2; i++) fDiamondXY[i]=esd.fDiamondXY[i];
64 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=esd.fDiamondCovXY[i];
65 }
66 return *this;
67}
68
69void AliESDRun::SetDiamond(const AliESDVertex *vertex) {
70 // set the interaction diamond
71 fDiamondXY[0]=vertex->GetXv();
72 fDiamondXY[1]=vertex->GetYv();
73 Double32_t cov[6];
74 vertex->GetCovMatrix(cov);
75 fDiamondCovXY[0]=cov[0];
76 fDiamondCovXY[1]=cov[1];
77 fDiamondCovXY[2]=cov[2];
78}
79
80
81//______________________________________________________________________________
82void AliESDRun::Print(const Option_t *) const
83{
84 // Print some data members
85 printf("Mean vertex in RUN %d: X=%.4f Y=%.4f cm\n",
86 GetRunNumber(),GetDiamondX(),GetDiamondY());
87 printf("Magnetic field = %f T\n",
88 GetMagneticField());
89 printf("Event from reconstruction version %d \n",fRecoVersion);
90}
91
92void AliESDRun::Reset()
93{
94 // reset data members
95 fRunNumber = 0;
96 fPeriodNumber = 0;
97 fRecoVersion = 0;
98 fMagneticField = 0;
99 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
100 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
101}
102