1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 #include "AliESDRun.h"
17 #include "AliESDVertex.h"
19 //-------------------------------------------------------------------------
20 // Implementation Class AliESDRun
23 // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
24 //-------------------------------------------------------------------------
28 //______________________________________________________________________________
29 AliESDRun::AliESDRun() :
35 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
36 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
39 //______________________________________________________________________________
40 AliESDRun::AliESDRun(const AliESDRun &esd) :
42 fRunNumber(esd.fRunNumber),
43 fPeriodNumber(esd.fPeriodNumber),
44 fRecoVersion(esd.fRecoVersion),
45 fMagneticField(esd.fMagneticField)
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];
52 //______________________________________________________________________________
53 AliESDRun& AliESDRun::operator=(const AliESDRun &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];
68 void AliESDRun::SetDiamond(const AliESDVertex *vertex) {
69 // set the interaction diamond
70 fDiamondXY[0]=vertex->GetXv();
71 fDiamondXY[1]=vertex->GetYv();
73 vertex->GetCovMatrix(cov);
74 fDiamondCovXY[0]=cov[0];
75 fDiamondCovXY[1]=cov[1];
76 fDiamondCovXY[2]=cov[2];
80 //______________________________________________________________________________
81 void AliESDRun::Print(const Option_t *) const
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",
88 printf("Event from reconstruction version %d \n",fRecoVersion);
91 void AliESDRun::Reset()
98 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
99 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;