]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
event printing removed
authormorsch <andreas.morsch@cern.ch>
Tue, 7 Oct 2014 15:09:42 +0000 (17:09 +0200)
committermorsch <andreas.morsch@cern.ch>
Tue, 7 Oct 2014 15:09:42 +0000 (17:09 +0200)
THerwig/AliGenHerwig.cxx
THerwig/AliGenHerwig.h

index f33112a4dc7d17384c9ec1529ddeaffc13acecaf..17c5c7a1abfe93beb58e2b6faaf7593d79a78b08 100644 (file)
@@ -1,4 +1,3 @@
-
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -64,6 +63,8 @@ ClassImp(AliGenHerwig)
     fMaxPr(10),
     fMaxErrors(1000),
     fEnSoft(1),
+    fEv1Pr(0),
+    fEv2Pr(0),
     fFileName(0),
     fEtaMinParton(-20.),     
     fEtaMaxParton(20.),     
@@ -102,6 +103,8 @@ AliGenHerwig::AliGenHerwig(Int_t npart)
     fMaxPr(10),
     fMaxErrors(1000),
     fEnSoft(1),
+    fEv1Pr(0),
+    fEv2Pr(0),
     fFileName(0),
     fEtaMinParton(-20.),     
     fEtaMaxParton(20.),     
@@ -126,6 +129,13 @@ AliGenHerwig::~AliGenHerwig()
 // Destructor
 }
 
+void AliGenHerwig::SetEventListRange(Int_t eventFirst, Int_t eventLast)
+{
+  fEv1Pr = eventFirst;
+  fEv2Pr = eventLast;
+  if ( fEv2Pr == -1 ) fEv2Pr = fEv1Pr;
+}
+
 void AliGenHerwig::Init()
 {
 // Initialisation
@@ -140,7 +150,6 @@ void AliGenHerwig::Init()
   fHerwig->SetPTMIN(fPtHardMin);
   fHerwig->SetPTMAX(fPtHardMax);
   fHerwig->SetPTRMS(fPtRMS);
-  printf("SetMAXPR %15d \n", fMaxPr);
   fHerwig->SetMAXPR(fMaxPr);
   fHerwig->SetMAXER(fMaxErrors);
   fHerwig->SetENSOF(fEnSoft);
@@ -302,6 +311,14 @@ void AliGenHerwig::Generate()
            if (!CheckParton(parton1, parton2))  continue ;
        } 
 
+       // 
+       if (gAlice) {
+           if (gAlice->GetEvNumber()>=fEv1Pr &&
+               gAlice->GetEvNumber()<=fEv2Pr) fHerwig->PrintEvt();
+
+       }
+
+       
        Int_t nc = 0;
        fNprimaries = 0;
        
index 87ed103afe4755ea8d8bbe654b6c24eec123f9d6..fc41f84adadac1859f946aebf6625f60e16e6e84 100644 (file)
@@ -56,6 +56,8 @@ class AliGenHerwig : public AliGenMC
     virtual void    SetEnSoft(Double_t e) {fEnSoft=e;}
 
     virtual void    SetHardProcessFile(TString filename) {fFileName=TString(filename);};
+    virtual void    SetEventListRange(Int_t eventFirst=-1, Int_t eventLast=-1);
+
     virtual Bool_t CheckParton(const TParticle* parton1, const TParticle* parton2);
 
     virtual void         GetPartonEtaRange(Float_t& etamin, Float_t& etamax) const
@@ -104,6 +106,8 @@ class AliGenHerwig : public AliGenMC
     Int_t       fMaxPr;          // maximum number of events to print out
     Int_t       fMaxErrors;      // maximum number of errors allowed
     Double_t    fEnSoft;          // change on soft energy distribution
+    Int_t       fEv1Pr;          // first event to be printed
+    Int_t       fEv2Pr;          // last event to be printed
     TString     fFileName;       //!Name of file to read from hard scattering
     Float_t     fEtaMinParton;         //Minimum eta of parton shower
     Float_t     fEtaMaxParton;         //Maximum eta of parton shower