]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliGenPythia.cxx
Setter for Pythia Tune.
[u/mrichter/AliRoot.git] / PYTHIA6 / AliGenPythia.cxx
index d7c462dc67a80d100c05803e408b6ebdbeb62c62..947bf64ba7c7f9b85f52484c4652873caed3ffa0 100644 (file)
@@ -52,6 +52,7 @@ ClassImp(AliGenPythia)
 AliGenPythia::AliGenPythia():
     AliGenMC(),
     fProcess(kPyCharm),          
+    fItune(-1),
     fStrucFunc(kCTEQ5L), 
     fKineBias(0.),
     fTrials(0),
@@ -80,6 +81,7 @@ AliGenPythia::AliGenPythia():
     fQuench(0),
     fQhat(0.),
     fLength(0.),
+    fImpact(0.),
     fPtKick(1.),
     fFullEvent(kTRUE),
     fDecayer(new AliDecayerPythia()),
@@ -146,6 +148,7 @@ AliGenPythia::AliGenPythia():
 AliGenPythia::AliGenPythia(Int_t npart)
     :AliGenMC(npart),
      fProcess(kPyCharm),          
+     fItune(-1),
      fStrucFunc(kCTEQ5L), 
      fKineBias(0.),
      fTrials(0),
@@ -174,6 +177,7 @@ AliGenPythia::AliGenPythia(Int_t npart)
      fQuench(kFALSE),
      fQhat(0.),
      fLength(0.),
+     fImpact(0.),
      fPtKick(1.),
      fFullEvent(kTRUE),
      fDecayer(new AliDecayerPythia()),
@@ -371,7 +375,7 @@ void AliGenPythia::Init()
        fRL = 0x0;
     }
  //
-    fPythia->ProcInit(fProcess,fEnergyCMS,fStrucFunc);
+    fPythia->ProcInit(fProcess,fEnergyCMS,fStrucFunc, fItune);
     //  Forward Paramters to the AliPythia object
     fDecayer->SetForceDecay(fForceDecay);    
 // Switch off Heavy Flavors on request  
@@ -533,15 +537,9 @@ void AliGenPythia::Init()
        fPythia->SetPARJ(200, 1.);
        fPythia->SetPARJ(198, fQhat);
        fPythia->SetPARJ(199, fLength);
-       
-       fPythia->SetMSTJ(41, 1);  // QCD radiation only
        fPythia->SetMSTJ(42, 2);  // angular ordering
        fPythia->SetMSTJ(44, 2);  // option to run alpha_s
-       //fPythia->SetMSTJ(47, 0);  // No correction back to hard scattering element
-       //fPythia->SetMSTJ(50, 0);  // No coherence in first branching
        fPythia->SetPARJ(82, 1.); // Cut off for parton showers
-       //    MSTJ(41) must NOT be 11 or 12, as then FSR may go through PYPTFS
-       //   (kt-ordered cascade) in which medium effects have not been introduced.
     }
 }
 
@@ -583,7 +581,8 @@ void AliGenPythia::Generate()
            Double_t bimp;
            // Quenching comes through medium-modified splitting functions.
            AliFastGlauber::Instance()->GetRandomBHard(bimp);
-           fPythia->SetPARJ(197,bimp);
+           fPythia->SetPARJ(197, bimp);
+           fImpact = bimp;
        } 
 //
 // Either produce new event or read partons from file
@@ -940,7 +939,9 @@ Int_t  AliGenPythia::GenerateMB()
 
       Int_t pdg  = 11; //electron
 
-      Float_t pt, eta, phi;
+      Float_t pt  = 0.;
+      Float_t eta = 0.;
+      Float_t phi = 0.;
       for (i=0; i< np; i++) {
        TParticle* iparticle = (TParticle *) fParticles.At(i);
        if(iparticle->GetStatusCode()==1 && TMath::Abs(iparticle->GetPdgCode())==pdg && 
@@ -1281,7 +1282,7 @@ void AliGenPythia::MakeHeader()
            AliFastGlauber::Instance()->GetSavedI0I1(i0i1);
            xp = xy[0];
            yp = xy[1];
-           ((AliGenPythiaEventHeader*) fHeader)->SetInMediumLength(2. * i0i1[1] / i0i1[0]);
+           ((AliGenPythiaEventHeader*) fHeader)->SetImpactParameter(fImpact);
        }
        
            ((AliGenPythiaEventHeader*) fHeader)->SetXYJet(xp, yp);