X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVGEN%2FAliGenMC.cxx;h=554dc173b8cb3a8202a2384582285609bfa77f4d;hb=6b1b1a3b8165270a75f7abf285462f696e7e6e30;hp=a3ff1e849bc36348609928f47b692026d2b9dc78;hpb=56d4723979f163f5fdb63c66bdaf9e2da058e8dc;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVGEN/AliGenMC.cxx b/EVGEN/AliGenMC.cxx index a3ff1e849bc..554dc173b8c 100644 --- a/EVGEN/AliGenMC.cxx +++ b/EVGEN/AliGenMC.cxx @@ -21,63 +21,87 @@ // decay products and particle selection. // andreas.morsch@cern.ch +#include #include #include #include #include "AliGenMC.h" +#include "AliRun.h" +#include "AliGeometry.h" ClassImp(AliGenMC) AliGenMC::AliGenMC() - :AliGenerator() + :AliGenerator(), + fParticles(0), + fParentSelect(8), + fChildSelect(8), + fCutOnChild(0), + fChildPtMin(0.), + fChildPtMax(1.e10), + fChildPMin(0.), + fChildPMax(1.e10), + fChildPhiMin(0.), + fChildPhiMax(2. * TMath::Pi()), + fChildThetaMin(0.), + fChildThetaMax(TMath::Pi()), + fChildYMin(-12.), + fChildYMax(12.), + fXingAngleX(0.), + fXingAngleY(0.), + fForceDecay(kAll), + fMaxLifeTime(1.e-15), + fAProjectile(1), + fZProjectile(1), + fATarget(1), + fZTarget(1), + fProjectile("P"), + fTarget("P"), + fDyBoost(0.), + fGeometryAcceptance(0), + fPdgCodeParticleforAcceptanceCut(0), + fNumberOfAcceptedParticles(0), + fNprimaries(0) { // Default Constructor - SetCutOnChild(); - SetChildMomentumRange(); - SetChildPtRange(); - SetChildPhiRange(); - SetChildThetaRange(); - SetChildYRange(); - SetMaximumLifetime(); - SetGeometryAcceptance(); - SetPdgCodeParticleforAcceptanceCut(); - SetNumberOfAcceptedParticles(); - SetTarget(); - SetProjectile(); - fParentSelect.Set(8); - fChildSelect.Set(8); - fForceDecay = kAll; } AliGenMC::AliGenMC(Int_t npart) - :AliGenerator(npart) + :AliGenerator(npart), + fParticles(0), + fParentSelect(8), + fChildSelect(8), + fCutOnChild(0), + fChildPtMin(0.), + fChildPtMax(1.e10), + fChildPMin(0.), + fChildPMax(1.e10), + fChildPhiMin(0.), + fChildPhiMax(2. * TMath::Pi()), + fChildThetaMin(0.), + fChildThetaMax(TMath::Pi()), + fChildYMin(-12.), + fChildYMax(12.), + fXingAngleX(0.), + fXingAngleY(0.), + fForceDecay(kAll), + fMaxLifeTime(1.e-15), + fAProjectile(1), + fZProjectile(1), + fATarget(1), + fZTarget(1), + fProjectile("P"), + fTarget("P"), + fDyBoost(0.), + fGeometryAcceptance(0), + fPdgCodeParticleforAcceptanceCut(0), + fNumberOfAcceptedParticles(0), + fNprimaries(0) { // Constructor - SetCutOnChild(); - SetChildMomentumRange(); - SetChildPtRange(); - SetChildPhiRange(); - SetChildThetaRange(); - SetChildYRange(); // - fParentSelect.Set(8); - fChildSelect.Set(8); for (Int_t i=0; i<8; i++) fParentSelect[i]=fChildSelect[i]=0; - SetMaximumLifetime(); - SetGeometryAcceptance(); - SetPdgCodeParticleforAcceptanceCut(); - SetNumberOfAcceptedParticles(); - SetTarget(); - SetProjectile(); - fForceDecay = kAll; -} - -AliGenMC::AliGenMC(const AliGenMC & mc): - AliGenerator(mc) -{ -// Copy constructor - mc.Copy(*this); } AliGenMC::~AliGenMC() @@ -90,6 +114,7 @@ void AliGenMC::Init() // // Initialization switch (fForceDecay) { + case kBSemiElectronic: case kSemiElectronic: case kDiElectron: case kBJpsiDiElectron: @@ -97,15 +122,23 @@ void AliGenMC::Init() fChildSelect[0] = kElectron; break; case kHardMuons: + case kBSemiMuonic: case kSemiMuonic: case kDiMuon: case kBJpsiDiMuon: case kBPsiPrimeDiMuon: case kPiToMu: case kKaToMu: + case kWToMuon: + case kWToCharmToMuon: + case kZDiMuon: + case kZDiElectron: fChildSelect[0]=kMuonMinus; break; + case kWToCharm: + break; case kHadronicD: + case kHadronicDWithout4Bodies: fChildSelect[0]=kPiPlus; fChildSelect[1]=kKPlus; break; @@ -117,8 +150,10 @@ void AliGenMC::Init() break; case kOmega: case kAll: + case kAllMuonic: case kNoDecay: case kNoDecayHeavy: + case kNeutralPion: break; } @@ -340,21 +375,12 @@ void AliGenMC::Boost() } } - - -AliGenMC& AliGenMC::operator=(const AliGenMC& rhs) -{ -// Assignment operator - rhs.Copy(*this); - return *this; -} - -void AliGenMC::Copy(TObject&) const +void AliGenMC::AddHeader(AliGenEventHeader* header) { - // - // Copy - // - Fatal("Copy","Not implemented!\n"); + // Passes header either to the container or to gAlice + if (fContainer) { + fContainer->AddHeader(header); + } else { + gAlice->SetGenEventHeader(header); + } } - -