]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMC.cxx
We have implemented, in AliGenMuonlib.cxx, the possibility to generate JPsi events...
[u/mrichter/AliRoot.git] / EVGEN / AliGenMC.cxx
index 08b58eeaae4b95fbf693135ceed3d6267b7519c1..c35e1fd7b7f45f84e027bcbf32543d27746a4d26 100644 (file)
@@ -52,12 +52,6 @@ AliGenMC::AliGenMC()
      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),
@@ -65,6 +59,12 @@ AliGenMC::AliGenMC()
      fNprimaries(0)
 {
 // Default Constructor
+  fAProjectile = 1;
+  fZProjectile = 1;
+  fATarget = 1;
+  fZTarget = 1;
+  fProjectile = "P";
+  fTarget = "P";
 }
 
 AliGenMC::AliGenMC(Int_t npart)
@@ -87,12 +87,6 @@ AliGenMC::AliGenMC(Int_t npart)
      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),
@@ -101,7 +95,13 @@ AliGenMC::AliGenMC(Int_t npart)
 {
 //  Constructor
 // 
-    for (Int_t i=0; i<8; i++) fParentSelect[i]=fChildSelect[i]=0;
+  fAProjectile = 1;
+  fZProjectile = 1;
+  fATarget = 1;
+  fZTarget = 1;
+  fProjectile = "P";
+  fTarget = "P";
+  for (Int_t i=0; i<8; i++) fParentSelect[i]=fChildSelect[i]=0;
 }
 
 AliGenMC::~AliGenMC()
@@ -156,12 +156,16 @@ void AliGenMC::Init()
         fChildSelect[0]= 22;
         fChildSelect[1]= 11;
         break;
-
-    case kOmega:       
+    case kLambda:      
+       fChildSelect[0]= kProton;
+        fChildSelect[1]= 211;
+       break;
+    case kOmega:
     case kAll:
     case kAllMuonic:
     case kNoDecay:
     case kNoDecayHeavy:
+    case kNoDecayBeauty:
     case kNeutralPion:
        break;
     }
@@ -198,13 +202,17 @@ Bool_t AliGenMC::KinematicSelection(TParticle *particle, Int_t flag) const
 {
 // Perform kinematic selection
     Double_t pz    = particle->Pz();
-    Double_t  e    = particle->Energy();
     Double_t pt    = particle->Pt();
     Double_t p     = particle->P();
     Double_t theta = particle->Theta();
     Double_t mass  = particle->GetCalcMass();
     Double_t mt2   = pt * pt + mass * mass;
     Double_t phi   = particle->Phi();
+    Double_t e     = particle->Energy();
+    
+    if (e == 0.)     
+       e = TMath::Sqrt(p * p + mass * mass);
+
     
     Double_t y, y0;
 
@@ -361,7 +369,7 @@ void AliGenMC::Boost()
 //
 
     Double_t beta  = TMath::TanH(fDyBoost);
-    Double_t gamma = 1./TMath::Sqrt(1.-beta*beta);
+    Double_t gamma = 1./TMath::Sqrt((1.-beta)*(1.+beta));
     Double_t gb    = gamma * beta;
 
     //    printf("\n Boosting particles to lab frame %f %f %f", fDyBoost, beta, gamma);