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() :
36 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
37 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;
40 //______________________________________________________________________________
41 AliESDRun::AliESDRun(const AliESDRun &esd) :
43 fMagneticField(esd.fMagneticField),
44 fPeriodNumber(esd.fPeriodNumber),
45 fRunNumber(esd.fRunNumber),
46 fRecoVersion(esd.fRecoVersion)
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];
53 //______________________________________________________________________________
54 AliESDRun& AliESDRun::operator=(const AliESDRun &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];
69 void AliESDRun::SetDiamond(const AliESDVertex *vertex) {
70 // set the interaction diamond
71 fDiamondXY[0]=vertex->GetXv();
72 fDiamondXY[1]=vertex->GetYv();
74 vertex->GetCovMatrix(cov);
75 fDiamondCovXY[0]=cov[0];
76 fDiamondCovXY[1]=cov[1];
77 fDiamondCovXY[2]=cov[2];
81 //______________________________________________________________________________
82 void AliESDRun::Print(const Option_t *) const
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",
89 printf("Event from reconstruction version %d \n",fRecoVersion);
92 void AliESDRun::Reset()
99 for (Int_t i=0; i<2; i++) fDiamondXY[i]=0.;
100 for (Int_t i=0; i<3; i++) fDiamondCovXY[i]=0.;