Bug in strip unit geometry is corrected
[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() :
30 fRunNumber(0),
31 fPeriodNumber(0),
32 fRecoVersion(0),
33 fMagneticField(0)
34{
35 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
36 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
37}
38
39//______________________________________________________________________________
40AliESDRun::AliESDRun(const AliESDRun &esd) :
41 TObject(esd),
42 fRunNumber(esd.fRunNumber),
43 fPeriodNumber(esd.fPeriodNumber),
44 fRecoVersion(esd.fRecoVersion),
45 fMagneticField(esd.fMagneticField)
46{
47 // Copy constructor
48 for (Int_t i=0; i<2; i++) fDiamondXY[i]=esd.fDiamondXY[i];
49 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=esd.fDiamondCovXY[i];
50}
51
52//______________________________________________________________________________
53AliESDRun& AliESDRun::operator=(const AliESDRun &esd)
54{
55 // assigment operator
56 if(this!=&esd) {
57 TObject::operator=(esd);
58 fRunNumber=esd.fRunNumber;
59 fPeriodNumber=esd.fPeriodNumber;
60 fRecoVersion=esd.fRecoVersion;
61 fMagneticField=esd.fMagneticField;
62 for (Int_t i=0; i<2; i++) fDiamondXY[i]=esd.fDiamondXY[i];
63 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=esd.fDiamondCovXY[i];
64 }
65 return *this;
66}
67
68void AliESDRun::SetDiamond(const AliESDVertex *vertex) {
69 // set the interaction diamond
70 fDiamondXY[0]=vertex->GetXv();
71 fDiamondXY[1]=vertex->GetYv();
72 Double32_t cov[6];
73 vertex->GetCovMatrix(cov);
74 fDiamondCovXY[0]=cov[0];
75 fDiamondCovXY[1]=cov[1];
76 fDiamondCovXY[2]=cov[2];
77}
78
79
80//______________________________________________________________________________
81void AliESDRun::Print(const Option_t *) const
82{
83 // Print some data members
84 printf("Mean vertex in RUN %d: X=%.4f Y=%.4f cm\n",
85 GetRunNumber(),GetDiamondX(),GetDiamondY());
86 printf("Magnetic field = %f T\n",
87 GetMagneticField());
88 printf("Event from reconstruction version %d \n",fRecoVersion);
89}
90
91void AliESDRun::Reset()
92{
93 // reset data members
94 fRunNumber = 0;
95 fPeriodNumber = 0;
96 fRecoVersion = 0;
97 fMagneticField = 0;
98 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
99 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
100}
101