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 //-------------------------------------------------------------------------
17 // Implementation of Class AliAODMCHeader
20 // Origin: Christian Klein-Boesing, CERN, Christian.Klein-Boesing@cern.ch
21 //-------------------------------------------------------------------------
23 #include "AliAODMCHeader.h"
26 ClassImp(AliAODMCHeader)
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");
33 //______________________________________________________________________________
35 AliAODMCHeader::AliAODMCHeader() :
41 ,fReactionPlaneAngle(0)
43 // default constructor
44 fVertex[0] = fVertex[1] = fVertex[2] = 0;
45 SetName(fgkStdBranchName.Data());
49 AliAODMCHeader::~AliAODMCHeader()
55 AliAODMCHeader::AliAODMCHeader(const AliAODMCHeader &header) :
57 ,fGenerator(header.fGenerator)
58 ,fImpactPar(header.fImpactPar)
59 ,fPtHard(header.fPtHard)
60 ,fEventType(header.fEventType)
61 ,fReactionPlaneAngle(header.fReactionPlaneAngle)
64 for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i];
65 SetName(header.fName);
66 SetTitle(header.fTitle);
69 AliAODMCHeader& AliAODMCHeader::operator=(const AliAODMCHeader &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;
77 fPtHard = header.fPtHard;
78 fEventType = header.fEventType;
79 fReactionPlaneAngle = header.fReactionPlaneAngle;
84 void AliAODMCHeader::Copy(TObject &obj) const {
86 // this overwrites the virtual TOBject::Copy()
87 // to allow run time copying without casting
91 AliAODMCHeader *robj = dynamic_cast<AliAODMCHeader*>(&obj);
92 if(!robj)return; // not an AliAODMCHeader
99 //______________________________________________________________________________
100 void AliAODMCHeader::Reset()
102 // reset all data members
107 fVertex[0] = fVertex[1] = fVertex[2] = 0;
108 fReactionPlaneAngle = 0;
111 //______________________________________________________________________________
112 void AliAODMCHeader::Print(const Option_t *) const
114 // Print some data members
115 Printf("MC EventHeader Generator: %s # EventType %d Vtx = (%3.3f,%3.3f,%3.3f) ptHard = %3.3f GeV Impact parameter %3.3f \n",
118 GetVtxX(),GetVtxY(),GetVtxZ(),GetPtHard(),
119 GetImpactParameter());