]>
Commit | Line | Data |
---|---|---|
dce1b636 | 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 | //------------------------------------------------------------------------- | |
17 | // Implementation of Class AliAODMCHeader | |
18 | // Header data | |
19 | // for the ESD | |
20 | // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch | |
21 | //------------------------------------------------------------------------- | |
22 | ||
23 | #include "AliAODMCHeader.h" | |
24 | ||
25 | ||
26 | ClassImp(AliAODMCHeader) | |
27 | ||
28 | // Without a trailing dot root does not support | |
29 | // direct drawing of some variables if the name is not unique on top label | |
30 | // bnrach e.g. fEventType is found here and in AliAODHeader.... | |
31 | TString AliAODMCHeader::fgkStdBranchName("mcHeader"); | |
32 | ||
33 | //______________________________________________________________________________ | |
34477296 | 34 | |
dce1b636 | 35 | AliAODMCHeader::AliAODMCHeader() : |
36 | AliVHeader() | |
37 | ,fGenerator("") | |
38 | ,fImpactPar(0) | |
0fd37a1f | 39 | ,fPtHard(0) |
210dd0f3 | 40 | ,fXsection(0) |
41 | ,fTrials(0) | |
dce1b636 | 42 | ,fEventType(0) |
34477296 | 43 | ,fReactionPlaneAngle(0) |
dce1b636 | 44 | { |
45 | // default constructor | |
46 | fVertex[0] = fVertex[1] = fVertex[2] = 0; | |
47 | SetName(fgkStdBranchName.Data()); | |
48 | } | |
49 | ||
50 | ||
51 | AliAODMCHeader::~AliAODMCHeader() | |
52 | { | |
53 | // destructor | |
54 | } | |
55 | ||
56 | ||
57 | AliAODMCHeader::AliAODMCHeader(const AliAODMCHeader &header) : | |
58 | AliVHeader(header) | |
59 | ,fGenerator(header.fGenerator) | |
60 | ,fImpactPar(header.fImpactPar) | |
0fd37a1f | 61 | ,fPtHard(header.fPtHard) |
210dd0f3 | 62 | ,fXsection(0) |
63 | ,fTrials(0) | |
dce1b636 | 64 | ,fEventType(header.fEventType) |
34477296 | 65 | ,fReactionPlaneAngle(header.fReactionPlaneAngle) |
dce1b636 | 66 | { |
67 | // copy constructor | |
68 | for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i]; | |
69 | SetName(header.fName); | |
70 | SetTitle(header.fTitle); | |
71 | } | |
72 | ||
73 | AliAODMCHeader& AliAODMCHeader::operator=(const AliAODMCHeader &header) | |
74 | { | |
75 | // assigment operator | |
76 | if(this!=&header) { | |
77 | AliVHeader::operator=(header); | |
78 | fGenerator = header.fGenerator; | |
79 | for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i]; | |
80 | fImpactPar = header.fImpactPar; | |
0fd37a1f | 81 | fPtHard = header.fPtHard; |
210dd0f3 | 82 | fXsection = header.fXsection; |
83 | fTrials = header.fTrials; | |
dce1b636 | 84 | fEventType = header.fEventType; |
34477296 | 85 | fReactionPlaneAngle = header.fReactionPlaneAngle; |
dce1b636 | 86 | } |
87 | return *this; | |
88 | } | |
89 | ||
90 | void AliAODMCHeader::Copy(TObject &obj) const { | |
91 | ||
92 | // this overwrites the virtual TOBject::Copy() | |
93 | // to allow run time copying without casting | |
94 | // in AliESDEvent | |
95 | ||
96 | if(this==&obj)return; | |
97 | AliAODMCHeader *robj = dynamic_cast<AliAODMCHeader*>(&obj); | |
98 | if(!robj)return; // not an AliAODMCHeader | |
99 | *robj = *this; | |
100 | ||
101 | } | |
102 | ||
103 | ||
104 | ||
105 | //______________________________________________________________________________ | |
106 | void AliAODMCHeader::Reset() | |
107 | { | |
108 | // reset all data members | |
109 | fGenerator = ""; | |
110 | fImpactPar = 0; | |
111 | fEventType = 0; | |
0fd37a1f | 112 | fPtHard = 0; |
210dd0f3 | 113 | fXsection = 0; |
114 | fTrials = 0; | |
dce1b636 | 115 | fVertex[0] = fVertex[1] = fVertex[2] = 0; |
34477296 | 116 | fReactionPlaneAngle = 0; |
dce1b636 | 117 | } |
118 | ||
119 | //______________________________________________________________________________ | |
120 | void AliAODMCHeader::Print(const Option_t *) const | |
121 | { | |
122 | // Print some data members | |
0fd37a1f | 123 | Printf("MC EventHeader Generator: %s # EventType %d Vtx = (%3.3f,%3.3f,%3.3f) ptHard = %3.3f GeV Impact parameter %3.3f \n", |
dce1b636 | 124 | GetGeneratorName(), |
125 | GetEventType(), | |
0fd37a1f | 126 | GetVtxX(),GetVtxY(),GetVtxZ(),GetPtHard(), |
dce1b636 | 127 | GetImpactParameter()); |
128 | } | |
129 |