]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Rapidity shift calculated in Init().
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Apr 2003 10:22:05 +0000 (10:22 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Apr 2003 10:22:05 +0000 (10:22 +0000)
EVGEN/AliGenMC.cxx
EVGEN/AliGenMC.h

index 539d6c8cfc0c599b8249dc2e4ae6e87c9e325811..2b87c64c7e8c35e6191eeceda7afe53a798383ff 100644 (file)
@@ -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();
index a2dd7069db6d8a91a957632f3d43bca02dc3e412..b7beacaebafee631795ef0b73331374bf1403b67 100644 (file)
@@ -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)