]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenMC.cxx
Change to prevent from uncorrect reading of pedestal data by the DAs
[u/mrichter/AliRoot.git] / EVGEN / AliGenMC.cxx
index 61166d587fc9384b0eeeaa3a78f464213487a6b7..cefaa40bcda14929a3a2142df6f3270fa8f70aaf 100644 (file)
@@ -52,20 +52,19 @@ 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),
      fNumberOfAcceptedParticles(0),
-     fNprimaries(0),
-     fEnergyCMS(0)
+     fNprimaries(0)
 {
 // Default Constructor
+  fAProjectile = 1;
+  fZProjectile = 1;
+  fATarget = 1;
+  fZTarget = 1;
+  fProjectile = "P";
+  fTarget = "P";
 }
 
 AliGenMC::AliGenMC(Int_t npart)
@@ -88,22 +87,21 @@ 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),
      fNumberOfAcceptedParticles(0),
-     fNprimaries(0),
-     fEnergyCMS(0)
+     fNprimaries(0)
 {
 //  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()
@@ -158,8 +156,11 @@ 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:
@@ -200,13 +201,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;
 
@@ -363,7 +368,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);