]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
SetEventListRange setter added. Events in specified range are listed for
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2001 11:17:28 +0000 (11:17 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 Jun 2001 11:17:28 +0000 (11:17 +0000)
debugging. (Yuri Kharlov)

EVGEN/AliGenPythia.cxx
EVGEN/AliGenPythia.h

index 088ace7cd58933a567f33db3f16892064af2c797..418910ff5491e41b76239b3ffc4ccaabc26395d7 100644 (file)
 
 /*
 $Log$
+Revision 1.36  2001/03/30 07:05:49  morsch
+Final print-out in finish run.
+Write parton system for jet-production (preliminary solution).
+
 Revision 1.35  2001/03/09 13:03:40  morsch
 Process_t and Struc_Func_t moved to AliPythia.h
 
@@ -112,6 +116,7 @@ AliGenPythia::AliGenPythia()
 {
 // Default Constructor
   fDecayer = new AliDecayerPythia();
+  SetEventListRange();
 }
 
 AliGenPythia::AliGenPythia(Int_t npart)
@@ -135,6 +140,7 @@ AliGenPythia::AliGenPythia(Int_t npart)
     fDecayer = new AliDecayerPythia();
     // Set random number generator 
     sRandom=fRandom;
+    SetEventListRange();
 }
 
 AliGenPythia::AliGenPythia(const AliGenPythia & Pythia)
@@ -147,6 +153,15 @@ AliGenPythia::~AliGenPythia()
 // Destructor
 }
 
+void AliGenPythia::SetEventListRange(Int_t eventFirst, Int_t eventLast)
+{
+  // Set a range of event numbers, for which a table
+  // of generated particle will be printed
+  fDebugEventFirst = eventFirst;
+  fDebugEventLast  = eventLast;
+  if (fDebugEventLast==-1) fDebugEventLast=fDebugEventFirst;
+}
+
 void AliGenPythia::Init()
 {
 // Initialisation
@@ -272,7 +287,8 @@ void AliGenPythia::Generate()
     while(1)
     {
        fPythia->Pyevnt();
-//     fPythia->Pylist(1);
+       if (gAlice->GetEvNumber()>=fDebugEventFirst &&
+           gAlice->GetEvNumber()<=fDebugEventLast) fPythia->Pylist(1);
        fTrials++;
        fPythia->ImportParticles(particles,"All");
        Int_t np = particles->GetEntriesFast();
@@ -285,7 +301,6 @@ void AliGenPythia::Generate()
                Int_t ks = iparticle->GetStatusCode();
                kf = CheckPDGCode(iparticle->GetPdgCode());
                if (ks==21) continue;
-
                fChildWeight=(fDecayer->GetPartialBranchingRatio(kf))*fParentWeight;      
 //
 // Parent
index d3543c9f0df31d69c4168d3663ca92218a71652a..5057608d59bd2f227084cd1f59439f802e9a2e89 100644 (file)
@@ -23,6 +23,7 @@ class AliGenPythia : public AliGenerator
     virtual ~AliGenPythia();
     virtual void    Generate();
     virtual void    Init();
+    virtual void    SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
     // select process type
     virtual void    SetProcess(Process_t proc = kPyCharm) {fProcess = proc;}
     // select structure function
@@ -37,7 +38,7 @@ class AliGenPythia : public AliGenerator
     // treat protons as inside nuclei
     virtual void    SetNuclei(Int_t a1, Int_t a2);
     // get cross section of process
-    virtual Float_t GetXsection() {return fXsection;}
+    virtual Float_t GetXsection() {return fXsection;}      
     // Check PDG code
     virtual Int_t   CheckPDGCode(Int_t pdgcode);
     virtual void    FinishRun();
@@ -61,6 +62,8 @@ class AliGenPythia : public AliGenerator
     Int_t       fNucA2;         // mass number nucleus side 2
     Bool_t      fFullEvent;     // Write Full event if true
     AliDecayer  *fDecayer;      // ! pointer to the decayer instance
+    Int_t       fDebugEventFirst; // First event to debug
+    Int_t       fDebugEventLast;  // Last  event to debug
  private:
     // check if particle is selected as parent particle
     Bool_t ParentSelected(Int_t ip);