]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
forgot to remove the file
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index cc0b47e640c4503b31a1ab7e0fbbc8b1d5beb341..3c199428e5e98ff0e0e28e0d09b5a11c749f9a6b 100644 (file)
@@ -33,6 +33,8 @@ ClassImp(AliPythia)
 # define pyquen pyquen_
 # define pyevnw pyevnw_
 # define pyshowq pyshowq_
+# define pytune  pytune_
+# define py2ent  py2ent_
 # define type_of_call
 #else
 # define pyclus PYCLUS
@@ -41,6 +43,8 @@ ClassImp(AliPythia)
 # define pyquen PYQUEN
 # define pyevnw PYEVNW
 # define pyshowq PYSHOWQ
+# define pytune  PYTUNE
+# define py2ent  PY2ENT
 # define type_of_call _stdcall
 #endif
 
@@ -51,6 +55,8 @@ extern "C" void type_of_call pyrobo(Int_t &, Int_t &, Double_t &, Double_t &, Do
 extern "C" void type_of_call pyquen(Double_t &, Int_t &, Double_t &);
 extern "C" void type_of_call pyevnw(){;}
 extern "C" void type_of_call pyshowq(Int_t &, Int_t &, Double_t &);
+extern "C" void type_of_call pytune(Int_t &);
+extern "C" void type_of_call py2ent(Int_t &, Int_t&, Int_t&, Double_t&);
 
 //_____________________________________________________________________________
 
@@ -65,7 +71,8 @@ AliPythia::AliPythia():
     fNGmax(30),
     fZmax(0.97),
     fGlauber(0),
-    fQuenchingWeights(0)
+    fQuenchingWeights(0),
+    fItune(-1)
 {
 // Default Constructor
 //
@@ -87,18 +94,21 @@ AliPythia::AliPythia(const AliPythia& pythia):
     fNGmax(30),
     fZmax(0.97),
     fGlauber(0),
-    fQuenchingWeights(0)
+    fQuenchingWeights(0),
+    fItune(-1)
 {
     // Copy Constructor
     pythia.Copy(*this);
 }
 
-void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
+void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc, Int_t itune)
 {
 // Initialise the process to generate 
     if (!AliPythiaRndm::GetPythiaRandom()) 
       AliPythiaRndm::SetPythiaRandom(GetRandom());
     
+    fItune = itune;
+    
     fProcess = process;
     fEcms = energy;
     fStrucFunc = strucfunc;
@@ -246,6 +256,20 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
 
        AtlasTuning();
        break;
+       
+    case kPyMbAtlasTuneMC09:
+// Minimum Bias pp-Collisions
+//
+//   
+//      select Pythia min. bias model
+       SetMSEL(0);
+       SetMSUB(92,1);             // single diffraction AB-->XB
+       SetMSUB(93,1);             // single diffraction AB-->AX
+       SetMSUB(94,1);             // double diffraction
+       SetMSUB(95,1);             // low pt production
+
+       AtlasTuning_MC09();
+       break;
 
     case kPyMbWithDirectPhoton:
 // Minimum Bias pp-Collisions with direct photon processes added 
@@ -278,7 +302,6 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSUB(93,1);             // single diffraction AB-->AX
        SetMSUB(94,1);             // double diffraction
        SetMSUB(95,1);             // low pt production
-
        break;
     case kPyLhwgMb:
 // Les Houches Working Group 05 Minimum Bias pp-Collisions: hep-ph/0604120
@@ -342,7 +365,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetPARP(85,0.90) ;         // Regulates gluon prod. mechanism
        SetPARP(86,0.95);          // Regulates gluon prod. mechanism
        SetPARP(89,1800.);         // [GeV]   Ref. energy
-       SetPARP(90,0.25);          // 2*epsilon (exponent in power law)
+       SetPARP(90,0.25);         // 2*epsilon (exponent in power law)
        break;
     case kPyDirectGamma:
        SetMSEL(10);
@@ -492,6 +515,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        // Set b-quark mass
        SetPMAS(5,1,4.75);
       break;
+     case kPyBeautyJets:
      case kPyBeautyppMNRwmi:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
@@ -575,6 +599,11 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     }
 //
 //  Initialize PYTHIA
+//
+//  Select the tune
+    if (itune > -1) Pytune(itune);
+    
+//  
     SetMSTP(41,1);   // all resonance decays switched on
     Initialize("CMS","p","p",fEcms);
     
@@ -686,6 +715,48 @@ void AliPythia::Pyrobo(Int_t imi, Int_t ima, Double_t the, Double_t phi, Double_
     pyrobo(imi, ima, the, phi, bex, bey, bez);
 }
 
+void AliPythia::Pytune(Int_t itune)
+{
+/*
+C
+C ITUNE    NAME (detailed descriptions below)
+C     0 Default : No settings changed => linked Pythia version's defaults.
+C ====== Old UE, Q2-ordered showers ==========================================
+C   100       A : Rick Field's CDF Tune A 
+C   101      AW : Rick Field's CDF Tune AW
+C   102      BW : Rick Field's CDF Tune BW
+C   103      DW : Rick Field's CDF Tune DW
+C   104     DWT : Rick Field's CDF Tune DW with slower UE energy scaling
+C   105      QW : Rick Field's CDF Tune QW (NB: needs CTEQ6.1M pdfs externally)
+C   106 ATLAS-DC2: Arthur Moraes' (old) ATLAS tune (ATLAS DC2 / Rome)
+C   107     ACR : Tune A modified with annealing CR
+C   108      D6 : Rick Field's CDF Tune D6 (NB: needs CTEQ6L pdfs externally)
+C   109     D6T : Rick Field's CDF Tune D6T (NB: needs CTEQ6L pdfs externally)
+C ====== Intermediate Models =================================================
+C   200    IM 1 : Intermediate model: new UE, Q2-ordered showers, annealing CR
+C   201     APT : Tune A modified to use pT-ordered final-state showers
+C ====== New UE, interleaved pT-ordered showers, annealing CR ================
+C   300      S0 : Sandhoff-Skands Tune 0 
+C   301      S1 : Sandhoff-Skands Tune 1
+C   302      S2 : Sandhoff-Skands Tune 2
+C   303     S0A : S0 with "Tune A" UE energy scaling
+C   304    NOCR : New UE "best try" without colour reconnections
+C   305     Old : New UE, original (primitive) colour reconnections
+C   306 ATLAS-CSC: Arthur Moraes' (new) ATLAS tune (needs CTEQ6L externally)
+C ======= The Uppsala models =================================================
+C   ( NB! must be run with special modified Pythia 6.215 version )
+C   ( available from http://www.isv.uu.se/thep/MC/scigal/        )
+C   400   GAL 0 : Generalized area-law model. Old parameters
+C   401   SCI 0 : Soft-Colour-Interaction model. Old parameters
+C   402   GAL 1 : Generalized area-law model. Tevatron MB retuned (Skands)
+*/
+    pytune(itune);
+}
+
+void AliPythia::Py2ent(Int_t idx, Int_t pdg1, Int_t pdg2, Double_t p){
+  // Inset 2-parton system at line idx
+  py2ent(idx, pdg1, pdg2, p);
+}
 
 
 void AliPythia::InitQuenching(Float_t cMin, Float_t cMax, Float_t k, Int_t iECMethod, Float_t zmax, Int_t ngmax)
@@ -1311,18 +1382,53 @@ void AliPythia::AtlasTuning()
 {
     //
     // Configuration for the ATLAS tuning
-        SetMSTP(51, AliStructFuncType::PDFsetIndex(kCTEQ5L));      // CTEQ5L pdf
-       SetMSTP(81,1);             // Multiple Interactions ON
-       SetMSTP(82,4);             // Double Gaussian Model
-       SetPARP(81,1.9);           // Min. pt for multiple interactions (default in 6.2-14) 
-       SetPARP(82,1.8);           // [GeV]    PT_min at Ref. energy
-       SetPARP(89,1000.);         // [GeV]   Ref. energy
-       SetPARP(90,0.16);          // 2*epsilon (exponent in power law)
-       SetPARP(83,0.5);           // Core density in proton matter distribution (def.value)
-       SetPARP(84,0.5);           // Core radius
-       SetPARP(85,0.33);          // Regulates gluon prod. mechanism
-       SetPARP(86,0.66);          // Regulates gluon prod. mechanism
-       SetPARP(67,1);             // Regulates Initial State Radiation
+    if (fItune > -1) return;
+    printf("ATLAS TUNE \n");
+    
+    SetMSTP(51, AliStructFuncType::PDFsetIndex(kCTEQ5L));      // CTEQ5L pdf
+    SetMSTP(81,1);             // Multiple Interactions ON
+    SetMSTP(82,4);             // Double Gaussian Model
+    SetPARP(81,1.9);           // Min. pt for multiple interactions (default in 6.2-14) 
+    SetPARP(82,1.8);           // [GeV]    PT_min at Ref. energy
+    SetPARP(89,1000.);         // [GeV]   Ref. energy
+    SetPARP(90,0.16);          // 2*epsilon (exponent in power law)
+    SetPARP(83,0.5);           // Core density in proton matter distribution (def.value)
+    SetPARP(84,0.5);           // Core radius
+    SetPARP(85,0.33);          // Regulates gluon prod. mechanism
+    SetPARP(86,0.66);          // Regulates gluon prod. mechanism
+    SetPARP(67,1);             // Regulates Initial State Radiation
+}
+
+void AliPythia::AtlasTuning_MC09()
+{
+    //
+    // Configuration for the ATLAS tuning
+    if (fItune > -1) return;
+    printf("ATLAS New TUNE MC09\n");
+    SetMSTP(81,21);             // treatment for MI, ISR, FSR and beam remnants: MI on, new model
+    SetMSTP(82, 4);             // Double Gaussian Model
+    SetMSTP(52, 2);             // External PDF
+    SetMSTP(51, 20650);         // MRST LO*
+  
+    
+    SetMSTP(70, 0);             // (was 2: def manual 1, def code 0) virtuality scale for ISR 
+    SetMSTP(72, 1);             // (was 0: def 1) maximum scale for FSR
+    SetMSTP(88, 1);             // (was 0: def 1) strategy for qq junction to di-quark or baryon in beam remnant
+    SetMSTP(90, 0);             // (was 1: def 0) strategy of compensate the primordial kT
+
+    SetPARP(78, 0.3);           // the amount of color reconnection in the final state
+    SetPARP(80, 0.1);           // probability of color partons kicked out from beam remnant
+    SetPARP(82, 2.3);           // [GeV]    PT_min at Ref. energy    
+    SetPARP(83, 0.8);           // Core density in proton matter distribution (def.value)    
+    SetPARP(84, 0.7);           // Core radius
+    SetPARP(90, 0.25);          //  2*epsilon (exponent in power law)
+    SetPARJ(81, 0.29);          // (was 0.14: def 0.29) Labmda value in running alpha_s for parton showers
+
+    SetMSTP(95, 6);
+    SetPARJ(41, 0.3);           // a and b parameters of the symmm. Lund FF
+    SetPARJ(42, 0.58);
+    SetPARJ(46, 0.75);          // mod. of the Lund FF for heavy end-point quarks
+    SetPARP(89,1800.);         // [GeV]   Ref. energy
 }
 
 AliPythia& AliPythia::operator=(const  AliPythia& rhs)