/*
$Log$
+Revision 1.16 2003/04/08 10:22:05 morsch
+Rapidity shift calculated in Init().
+
+Revision 1.15 2003/04/04 08:13:26 morsch
+Boost method added.
+
+Revision 1.14 2003/01/14 10:50:19 alibrary
+Cleanup of STEER coding conventions
+
+Revision 1.13 2002/10/14 14:55:35 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
+Revision 1.5.4.2 2002/07/24 08:56:28 alibrary
+Updating EVGEN on TVirtulaMC
+
+Revision 1.12 2002/07/19 11:42:33 morsch
+Use CalcMass()
+
Revision 1.11 2002/06/06 15:26:24 morsch
Correct child-selection for kPhiKK
// decay products and particle selection.
// andreas.morsch@cern.ch
-#include "AliGenMC.h"
-#include "AliPDG.h"
#include <TMath.h>
+#include <TPDGCode.h>
#include <TParticle.h>
+#include "AliGenMC.h"
+
ClassImp(AliGenMC)
AliGenMC::AliGenMC()
SetGeometryAcceptance();
SetPdgCodeParticleforAcceptanceCut();
SetNumberOfAcceptedParticles();
+ SetTarget();
+ SetProjectile();
}
AliGenMC::AliGenMC(Int_t npart)
SetGeometryAcceptance();
SetPdgCodeParticleforAcceptanceCut();
SetNumberOfAcceptedParticles();
+ SetTarget();
+ SetProjectile();
}
AliGenMC::AliGenMC(const AliGenMC & mc)
case kNoDecayHeavy:
break;
}
+
+ if (fZTarget != 0 && fAProjectile != 0)
+ {
+ fDyBoost = - 0.5 * TMath::Log(Double_t(fZProjectile) * Double_t(fATarget) /
+ (Double_t(fZTarget) * Double_t(fAProjectile)));
+ }
}
//non diffractive state -- return code unchanged
return pdgcode;
}
+
+void AliGenMC::Boost()
+{
+//
+// Boost cms into LHC lab frame
+//
+
+ Double_t beta = TMath::TanH(fDyBoost);
+ Double_t gamma = 1./TMath::Sqrt(1.-beta*beta);
+ Double_t gb = gamma * beta;
+
+ // printf("\n Boosting particles to lab frame %f %f %f", fDyBoost, beta, gamma);
+
+ Int_t i;
+ Int_t np = fParticles->GetEntriesFast();
+ for (i = 0; i < np; i++)
+ {
+ TParticle* iparticle = (TParticle*) fParticles->At(i);
+
+ Double_t e = iparticle->Energy();
+ Double_t px = iparticle->Px();
+ Double_t py = iparticle->Py();
+ Double_t pz = iparticle->Pz();
+
+ Double_t eb = gamma * e - gb * pz;
+ Double_t pzb = -gb * e + gamma * pz;
+
+ iparticle->SetMomentum(px, py, pzb, eb);
+ }
+}
+
+
AliGenMC& AliGenMC::operator=(const AliGenMC& rhs)
{