]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- Updates necessary for newio.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Sep 2003 12:37:02 +0000 (12:37 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 24 Sep 2003 12:37:02 +0000 (12:37 +0000)
- Possibility to call quenching routine.

PYTHIA6/AliGenPythia.cxx
PYTHIA6/AliGenPythia.h

index ca6d66853664bc52f733aba5d76ef2f1d93d8bcd..549c6ca3066b9f1208020415b74b8f0d0c22e4fc 100644 (file)
@@ -38,6 +38,8 @@
 #include "AliPythia.h"
 #include "AliPythiaRndm.h"
 #include "AliRun.h"
+#include "AliStack.h"
+#include "AliRunLoader.h"
 
 ClassImp(AliGenPythia)
 
@@ -56,6 +58,8 @@ AliGenPythia::AliGenPythia()
   SetGammaPhiRange();
   SetGammaEtaRange();
   SetPtKick();
+  SetQuench();
+  
   fSetNuclei = kFALSE;
   if (!AliPythiaRndm::GetPythiaRandom()) 
     AliPythiaRndm::SetPythiaRandom(GetRandom());
@@ -92,6 +96,7 @@ AliGenPythia::AliGenPythia(Int_t npart)
     SetGammaPhiRange();
     SetGammaEtaRange();
     SetJetReconstructionMode();
+    SetQuench();
     SetPtKick();
     // Options determining what to keep in the stack (Heavy flavour generation)
     fStackFillOpt = kFlavorSelection; // Keep particle with selected flavor
@@ -304,7 +309,19 @@ void AliGenPythia::Generate()
 //  event loop    
     while(1)
     {
+       if (fQuench) {
+           fPythia->SetMSTJ(1, 0);
+       }
+
        fPythia->Pyevnt();
+
+       if (fQuench) {
+           fPythia->Quench();
+           fPythia->SetMSTJ(1, 1);
+           fPythia->Pyexec();
+       }
+       
+       
        if (gAlice->GetEvNumber()>=fDebugEventFirst &&
            gAlice->GetEvNumber()<=fDebugEventLast) fPythia->Pylist(1);
        fTrials++;
@@ -707,12 +724,12 @@ void  AliGenPythia::LoadEvent()
 // Load event into Pythia Common Block
 //
  
-
-    Int_t npart = (Int_t) (gAlice->TreeK())->GetEntries(); 
+    AliRunLoader* rl = AliRunLoader::GetRunLoader();
+    Int_t npart = (rl->Stack())-> GetNprimary();
    (fPythia->GetPyjets())->N = npart;
 
     for (Int_t part = 0; part < npart; part++) {
-       TParticle *MPart = gAlice->Particle(part);
+       TParticle *MPart = (rl->Stack())->Particle(part);
        Int_t kf     = MPart->GetPdgCode();
        Int_t ks     = MPart->GetStatusCode();
        Float_t px = MPart->Px();
index 075b88ffdad842a95eb2a9621bc8053d0dfc90e7..d1a4ffc43c287f905bf1a5004d6bc2b4f407f291 100644 (file)
@@ -85,7 +85,10 @@ class AliGenPythia : public AliGenMC
     virtual void SetCountMode(const CountMode_t mode) {
       fCountMode = mode;
     }
+
+    virtual void SetQuench(Int_t flag = 0) {fQuench = flag;}
     
+           
     // get cross section of process
     virtual Float_t GetXsection() const {return fXsection;}
     // get triggered jets
@@ -144,6 +147,7 @@ class AliGenPythia : public AliGenMC
     Float_t     fYHardMax;          //higher y-hard cut
     Int_t       fGinit;             //initial state gluon radiation
     Int_t       fGfinal;            //final state gluon radiation
+    Int_t       fQuench;            //Flag for quenching
     Float_t     fPtKick;            //Transverse momentum kick
     Bool_t      fFullEvent;         //!Write Full event if true
     AliDecayer  *fDecayer;          //!Pointer to the decayer instance