]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliAODMCHeader.cxx
- Change in ProcessFloatAll method for calculating statistical quantities for
[u/mrichter/AliRoot.git] / STEER / AliAODMCHeader.cxx
CommitLineData
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
26ClassImp(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....
31TString AliAODMCHeader::fgkStdBranchName("mcHeader");
32
33//______________________________________________________________________________
34477296 34
dce1b636 35AliAODMCHeader::AliAODMCHeader() :
36 AliVHeader()
37 ,fGenerator("")
38 ,fImpactPar(0)
0fd37a1f 39 ,fPtHard(0)
dce1b636 40 ,fEventType(0)
34477296 41 ,fReactionPlaneAngle(0)
dce1b636 42{
43 // default constructor
44 fVertex[0] = fVertex[1] = fVertex[2] = 0;
45 SetName(fgkStdBranchName.Data());
46}
47
48
49AliAODMCHeader::~AliAODMCHeader()
50{
51 // destructor
52}
53
54
55AliAODMCHeader::AliAODMCHeader(const AliAODMCHeader &header) :
56 AliVHeader(header)
57 ,fGenerator(header.fGenerator)
58 ,fImpactPar(header.fImpactPar)
0fd37a1f 59 ,fPtHard(header.fPtHard)
dce1b636 60 ,fEventType(header.fEventType)
34477296 61 ,fReactionPlaneAngle(header.fReactionPlaneAngle)
dce1b636 62{
63 // copy constructor
64 for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i];
65 SetName(header.fName);
66 SetTitle(header.fTitle);
67}
68
69AliAODMCHeader& AliAODMCHeader::operator=(const AliAODMCHeader &header)
70{
71 // assigment operator
72 if(this!=&header) {
73 AliVHeader::operator=(header);
74 fGenerator = header.fGenerator;
75 for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i];
76 fImpactPar = header.fImpactPar;
0fd37a1f 77 fPtHard = header.fPtHard;
dce1b636 78 fEventType = header.fEventType;
34477296 79 fReactionPlaneAngle = header.fReactionPlaneAngle;
dce1b636 80 }
81 return *this;
82}
83
84void AliAODMCHeader::Copy(TObject &obj) const {
85
86 // this overwrites the virtual TOBject::Copy()
87 // to allow run time copying without casting
88 // in AliESDEvent
89
90 if(this==&obj)return;
91 AliAODMCHeader *robj = dynamic_cast<AliAODMCHeader*>(&obj);
92 if(!robj)return; // not an AliAODMCHeader
93 *robj = *this;
94
95}
96
97
98
99//______________________________________________________________________________
100void AliAODMCHeader::Reset()
101{
102 // reset all data members
103 fGenerator = "";
104 fImpactPar = 0;
105 fEventType = 0;
0fd37a1f 106 fPtHard = 0;
dce1b636 107 fVertex[0] = fVertex[1] = fVertex[2] = 0;
34477296 108 fReactionPlaneAngle = 0;
dce1b636 109}
110
111//______________________________________________________________________________
112void AliAODMCHeader::Print(const Option_t *) const
113{
114 // Print some data members
0fd37a1f 115 Printf("MC EventHeader Generator: %s # EventType %d Vtx = (%3.3f,%3.3f,%3.3f) ptHard = %3.3f GeV Impact parameter %3.3f \n",
dce1b636 116 GetGeneratorName(),
117 GetEventType(),
0fd37a1f 118 GetVtxX(),GetVtxY(),GetVtxZ(),GetPtHard(),
dce1b636 119 GetImpactParameter());
120}
121