]>
Commit | Line | Data |
---|---|---|
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 | ||
26 | ClassImp(AliESDRun) | |
27 | ||
28 | //______________________________________________________________________________ | |
29 | AliESDRun::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 | //______________________________________________________________________________ | |
41 | AliESDRun::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 | //______________________________________________________________________________ | |
54 | AliESDRun& 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 | ||
69 | void 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 | //______________________________________________________________________________ | |
82 | void 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 | ||
92 | void 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 |