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() :
43 ,fReactionPlaneAngle(0)
45 // default constructor
46 fVertex[0] = fVertex[1] = fVertex[2] = 0;
47 SetName(fgkStdBranchName.Data());
51 AliAODMCHeader::~AliAODMCHeader()
57 AliAODMCHeader::AliAODMCHeader(const AliAODMCHeader &header) :
59 ,fGenerator(header.fGenerator)
60 ,fImpactPar(header.fImpactPar)
61 ,fPtHard(header.fPtHard)
64 ,fEventType(header.fEventType)
65 ,fReactionPlaneAngle(header.fReactionPlaneAngle)
68 for(int i = 0;i<3;++i)fVertex[i] = header.fVertex[i];
69 SetName(header.fName);
70 SetTitle(header.fTitle);
73 AliAODMCHeader& AliAODMCHeader::operator=(const AliAODMCHeader &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;
81 fPtHard = header.fPtHard;
82 fXsection = header.fXsection;
83 fTrials = header.fTrials;
84 fEventType = header.fEventType;
85 fReactionPlaneAngle = header.fReactionPlaneAngle;
90 void AliAODMCHeader::Copy(TObject &obj) const {
92 // this overwrites the virtual TOBject::Copy()
93 // to allow run time copying without casting
97 AliAODMCHeader *robj = dynamic_cast<AliAODMCHeader*>(&obj);
98 if(!robj)return; // not an AliAODMCHeader
105 //______________________________________________________________________________
106 void AliAODMCHeader::Reset()
108 // reset all data members
115 fVertex[0] = fVertex[1] = fVertex[2] = 0;
116 fReactionPlaneAngle = 0;
119 //______________________________________________________________________________
120 void AliAODMCHeader::Print(const Option_t *) const
122 // Print some data members
123 Printf("MC EventHeader Generator: %s # EventType %d Vtx = (%3.3f,%3.3f,%3.3f) ptHard = %3.3f GeV Impact parameter %3.3f \n",
126 GetVtxX(),GetVtxY(),GetVtxZ(),GetPtHard(),
127 GetImpactParameter());