]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EPOS/AliGenEpos.cxx
Added PDG db. updater, complete information in the header plus minor fixes
[u/mrichter/AliRoot.git] / EPOS / AliGenEpos.cxx
index dbf83eb43a793e1ea0214f6bd68a673e5a040984..46d7a7bc6598ec4c2d58356e900a4201ab053c8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * AliGenEpos.cpp
+ * AliGenEpos.cxx
  *
  *  ALICE event generator based on EPOS model from Klaus Werner
  *
@@ -10,6 +10,7 @@
 #include "AliGenEpos.h"
 #include "TEpos.h"
 #include "TParticle.h"
+#include "TMath.h"
 #include "AliLog.h"
 #include "AliGenEventHeader.h"
 #include "AliGenEposEventHeader.h"
@@ -20,7 +21,7 @@ AliGenEpos::AliGenEpos() : AliGenMC(),
                fBmin(0),
                fBmax(10000),
                fPhiMin(0),
-               fPhiMax(2*3.1415926),
+               fPhiMax(TMath::TwoPi()),
                fFilterModelOutput(kFALSE) {
        SetMC(new TEpos());
 }
@@ -29,7 +30,7 @@ AliGenEpos::AliGenEpos(Int_t npart) : AliGenMC(npart),
                fBmin(0),
                fBmax(10000),
                fPhiMin(0),
-               fPhiMax(2*3.1415926),
+               fPhiMax(TMath::TwoPi()),
                fFilterModelOutput(kFALSE) {
        SetMC(new TEpos());
 }
@@ -53,7 +54,7 @@ void AliGenEpos::Generate() {
          Float_t polar[3]   =   {0,0,0};
          Float_t origin0[3]  =   {0,0,0};
          Float_t origin[3]   =   {0,0,0};
-
+         fNprimaries = 0;
          Int_t nt  = 0; //output parameter for PushTrack
 
          Vertex();
@@ -76,7 +77,7 @@ void AliGenEpos::Generate() {
                  iparticle = (TParticle *) fParticles.At(i);
                  //Bool_t isNullEntry = iparticle->GetStatusCode() == 0;
                  //Bool_t isCommentOrUnknown = iparticle->GetStatusCode() > 2;
-                 Bool_t hasDecayed = iparticle->GetStatusCode() == 2;
+                 Bool_t hasDecayed = iparticle->GetStatusCode() >= 2;
                  Bool_t isFinalState = iparticle->GetStatusCode() == 1;
                  Int_t imo = iparticle->GetFirstMother();
                  Bool_t  hasMother = (imo >=0);
@@ -157,6 +158,7 @@ void AliGenEpos::Generate() {
 
        // Event Vertex
          header->SetPrimaryVertex(fVertex);
+         header->FillInternalFields(GetTEpos());
          AddHeader(header);
          fCollisionGeometry = (AliGenEposEventHeader*)  header;