From: morsch Date: Tue, 8 Apr 2003 10:22:05 +0000 (+0000) Subject: Rapidity shift calculated in Init(). X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=36d770d988a132d9dd3e2d5655970ad2d0969661;p=u%2Fmrichter%2FAliRoot.git Rapidity shift calculated in Init(). --- diff --git a/EVGEN/AliGenMC.cxx b/EVGEN/AliGenMC.cxx index 539d6c8cfc0..2b87c64c7e8 100644 --- a/EVGEN/AliGenMC.cxx +++ b/EVGEN/AliGenMC.cxx @@ -15,6 +15,9 @@ /* $Log$ +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 @@ -158,6 +161,12 @@ void AliGenMC::Init() 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))); + } } @@ -341,17 +350,17 @@ Int_t AliGenMC::CheckPDGCode(Int_t pdgcode) const return pdgcode; } -void AliGenMC::Boost(Float_t dy) +void AliGenMC::Boost() { // // Boost cms into LHC lab frame // - Double_t beta = TMath::TanH(dy); + 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", dy, beta, gamma); + printf("\n Boosting particles to lab frame %f %f %f", fDyBoost, beta, gamma); Int_t i; Int_t np = fParticles->GetEntriesFast(); diff --git a/EVGEN/AliGenMC.h b/EVGEN/AliGenMC.h index a2dd7069db6..b7beacaebaf 100644 --- a/EVGEN/AliGenMC.h +++ b/EVGEN/AliGenMC.h @@ -54,11 +54,11 @@ class AliGenMC : public AliGenerator virtual void SetNumberOfAcceptedParticles(Int_t NumberOfAcceptedParticles=2) {fNumberOfAcceptedParticles = NumberOfAcceptedParticles;} virtual Bool_t CheckAcceptanceGeometry(Int_t np, TClonesArray* particles); - virtual void SetProjectile(TString proj="A", Int_t a=208, Int_t z=82) + virtual void SetProjectile(TString proj="P", Int_t a = 1, Int_t z = 1) {fProjectile = proj; fAProjectile = a; fZProjectile = z;} - virtual void SetTarget(TString tar="A", Int_t a=208, Int_t z=82) + virtual void SetTarget(TString tar="P", Int_t a = 1, Int_t z = 1) {fTarget = tar; fATarget = a; fZTarget = z;} - virtual void Boost(Float_t dy); + virtual void Boost(); protected: // check if particle is selected as parent particle @@ -92,7 +92,7 @@ class AliGenMC : public AliGenerator Int_t fZTarget; // Target Z TString fProjectile; // Projectile TString fTarget; // Target - + Double_t fDyBoost; // dy for boost into lab frame AliGeometry * fGeometryAcceptance; // Geometry to which particles must be simulated Int_t fPdgCodeParticleforAcceptanceCut; // Abs(PDG Code) of the particle to which the GeometryAcceptance must be applied Int_t fNumberOfAcceptedParticles; // Number of accepted particles in GeometryAcceptance with the right Abs(PdgCode)