]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PYTHIA6/AliPythia.cxx
EffC++ warnings corrected.
[u/mrichter/AliRoot.git] / PYTHIA6 / AliPythia.cxx
index 22b27e7c0450b7385a95f9e1a16286a80410035d..ba02c52167e80bf0d483be8f08250bc6451f6df8 100644 (file)
@@ -51,7 +51,14 @@ extern "C" void type_of_call pyevnw(){;}
 
 AliPythia* AliPythia::fgAliPythia=NULL;
 
-AliPythia::AliPythia()
+AliPythia::AliPythia():
+    fProcess(kPyMb),
+    fEcms(0.),
+    fStrucFunc(kCTEQ5L),
+    fXJet(0.),
+    fYJet(0.),
+    fGlauber(0),
+    fQuenchingWeights(0)
 {
 // Default Constructor
 //
@@ -62,6 +69,19 @@ AliPythia::AliPythia()
     fQuenchingWeights = 0;
 }
 
+AliPythia::AliPythia(const AliPythia& pythia):
+    fProcess(kPyMb),
+    fEcms(0.),
+    fStrucFunc(kCTEQ5L),
+    fXJet(0.),
+    fYJet(0.),
+    fGlauber(0),
+    fQuenchingWeights(0)
+{
+    // Copy Constructor
+    pythia.Copy(*this);
+}
+
 void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc)
 {
 // Initialise the process to generate 
@@ -81,9 +101,13 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     SetMDCY(Pycomp(3312),1,0);
     SetMDCY(Pycomp(3322),1,0);
     SetMDCY(Pycomp(3334),1,0);
-    //  select structure function 
+    // Select structure function 
     SetMSTP(52,2);
     SetMSTP(51,strucfunc);
+    // Particles produced in string fragmentation point directly to either of the two endpoints
+    // of the string (depending in the side they were generated from).
+    SetMSTU(16,2);
+
 //
 // Pythia initialisation for selected processes//
 //
@@ -146,24 +170,13 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSTP(88,2); 
 // (D=1)see can be used to form  baryons (BARYON JUNCTION)
        SetMSTJ(1,1);  
-       SetMSTP(51,kCTEQ5L);// CTEQ 5L        ! CTEQ5L pdf
-       SetMSTP(81,1);      // Multiple Interactions ON
-       SetMSTP(82,4);      // Double Gaussian Model         
-       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 dist. (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);      // Regulate gluon prod. mechanism
+       AtlasTuning();
        break;
     case kPyCharm:
        SetMSEL(4);
 //  heavy quark masses
 
        SetPMAS(4,1,1.2);
-       SetMSTU(16,2);
 //
 //    primordial pT
        SetMSTP(91,1);
@@ -174,7 +187,6 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
     case kPyBeauty:
        SetMSEL(5);
        SetPMAS(5,1,4.75);
-       SetMSTU(16,2);
        break;
     case kPyJpsi:
        SetMSEL(0);
@@ -221,22 +233,7 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSUB(94,1);             // double diffraction
        SetMSUB(95,1);             // low pt production
 
-//
-// ATLAS Tuning
-//
-       
-        SetMSTP(51, kCTEQ5L);      // CTEQ5L pdf
-       SetMSTP(81,1);             // Multiple Interactions ON
-       SetMSTP(82,4);             // Double Gaussian Model
-
-       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
+       AtlasTuning();
        break;
     case kPyMbNonDiffr:
 // Minimum Bias pp-Collisions
@@ -246,22 +243,20 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        SetMSEL(0);
        SetMSUB(95,1);             // low pt production
 
-//
-// ATLAS Tuning
-//
-       
-       SetMSTP(51,kCTEQ5L);       // CTEQ5L pdf
-       SetMSTP(81,1);             // Multiple Interactions ON
-       SetMSTP(82,4);             // Double Gaussian Model
-
-       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
+       AtlasTuning();
+       break;
+    case kPyMbMSEL1:
+       ConfigHeavyFlavor();
+// Intrinsic <kT^2>
+        SetMSTP(91,1);// Width (1=gaussian) primordial kT dist. inside hadrons
+        SetPARP(91,1.);     // <kT^2> = PARP(91,1.)^2
+        SetPARP(93,5.);     // Upper cut-off
+// Set Q-quark mass
+        SetPMAS(4,1,1.2);   // Charm quark mass
+        SetPMAS(5,1,4.78);  // Beauty quark mass
+       SetPARP(71,4.);     // Defaut value
+// Atlas Tuning
+       AtlasTuning();
        break;
     case kPyJets:
 //
@@ -284,43 +279,8 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
        break;
     case kPyCharmPbPbMNR:
     case kPyD0PbPbMNR:
-      // Tuning of Pythia parameters aimed to get a resonable agreement
-      // between with the NLO calculation by Mangano, Nason, Ridolfi for the
-      // c-cbar single inclusive and double differential distributions.
-      // This parameter settings are meant to work with Pb-Pb collisions
-      // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
-      // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
-      // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
-      // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,1.304);
-      SetPARP(93,6.52);
-
-      // Set c-quark mass
-      SetPMAS(4,1,1.2);
-
-      break;
     case kPyDPlusPbPbMNR:
+    case kPyDPlusStrangePbPbMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
       // c-cbar single inclusive and double differential distributions.
@@ -328,74 +288,18 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
+       ConfigHeavyFlavor();
       // Intrinsic <kT>
       SetMSTP(91,1);
       SetPARP(91,1.304);
       SetPARP(93,6.52);
-
       // Set c-quark mass
       SetPMAS(4,1,1.2);
-
       break;
     case kPyCharmpPbMNR:
     case kPyD0pPbMNR:
-      // Tuning of Pythia parameters aimed to get a resonable agreement
-      // between with the NLO calculation by Mangano, Nason, Ridolfi for the
-      // c-cbar single inclusive and double differential distributions.
-      // This parameter settings are meant to work with p-Pb collisions
-      // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
-      // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
-      // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
-      // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,1.16);
-      SetPARP(93,5.8);
-
-      // Set c-quark mass
-      SetPMAS(4,1,1.2);
-
-      break;
     case kPyDPluspPbMNR:
+    case kPyDPlusStrangepPbMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
       // c-cbar single inclusive and double differential distributions.
@@ -403,37 +307,19 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
+       ConfigHeavyFlavor();
       // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,1.16);
-      SetPARP(93,5.8);
-
+       SetMSTP(91,1);
+       SetPARP(91,1.16);
+       SetPARP(93,5.8);
+       
       // Set c-quark mass
-      SetPMAS(4,1,1.2);
-
+       SetPMAS(4,1,1.2);
       break;
     case kPyCharmppMNR:
     case kPyD0ppMNR:
+    case kPyDPlusppMNR:
+    case kPyDPlusStrangeppMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
       // c-cbar single inclusive and double differential distributions.
@@ -441,72 +327,42 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
+       ConfigHeavyFlavor();
       // Intrinsic <kT^2>
-      SetMSTP(91,1);
-      SetPARP(91,1.);
-      SetPARP(93,5.);
-
+       SetMSTP(91,1);
+       SetPARP(91,1.);
+       SetPARP(93,5.);
+       
       // Set c-quark mass
-      SetPMAS(4,1,1.2);
-
+       SetPMAS(4,1,1.2);
       break;
-    case kPyDPlusppMNR:
+    case kPyCharmppMNRwmi:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
       // c-cbar single inclusive and double differential distributions.
       // This parameter settings are meant to work with pp collisions
-      // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
-      // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
-      // has to be set to 2.1GeV. Example in ConfigCharmPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
-      // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-
+      // and with kCTEQ5L PDFs.
+      // Added multiple interactions according to ATLAS tune settings.
+      // To get a "reasonable" agreement with MNR results, events have to be 
+      // generated with the minimum ptHard (AliGenPythia::SetPtHard)
+      // set to 2.76 GeV.
+      // To get a "perfect" agreement with MNR results, events have to be 
+      // generated in four ptHard bins with the following relative 
+      // normalizations:
+      // 2.76-3 GeV: 25%
+      //    3-4 GeV: 40%
+      //    4-8 GeV: 29%
+      //     >8 GeV:  6%
+       ConfigHeavyFlavor();
       // Intrinsic <kT^2>
-      SetMSTP(91,1);
-      SetPARP(91,1.);
-      SetPARP(93,5.);
+       SetMSTP(91,1);
+       SetPARP(91,1.);
+       SetPARP(93,5.);
 
       // Set c-quark mass
-      SetPMAS(4,1,1.2);
-
-      break;
+       SetPMAS(4,1,1.2);
+       AtlasTuning();
+       break;
     case kPyBeautyPbPbMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
       // between with the NLO calculation by Mangano, Nason, Ridolfi for the
@@ -515,36 +371,16 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.75GeV. Example in ConfigBeautyPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
+       ConfigHeavyFlavor();
       // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-      SetPARP(67,1.0);
-      SetPARP(71,1.0);
-
+       SetPARP(67,1.0);
+       SetPARP(71,1.0);
       // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,2.035);
-      SetPARP(93,10.17);
-
+       SetMSTP(91,1);
+       SetPARP(91,2.035);
+       SetPARP(93,10.17);
       // Set b-quark mass
-      SetPMAS(5,1,4.75);
-
+       SetPMAS(5,1,4.75);
       break;
     case kPyBeautypPbMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
@@ -554,36 +390,16 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.75GeV. Example in ConfigBeautyPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
+       ConfigHeavyFlavor();
       // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-      SetPARP(67,1.0);
-      SetPARP(71,1.0);
-
+       SetPARP(67,1.0);
+       SetPARP(71,1.0);
       // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,1.60);
-      SetPARP(93,8.00);
-
+       SetMSTP(91,1);
+       SetPARP(91,1.60);
+       SetPARP(93,8.00);
       // Set b-quark mass
-      SetPMAS(5,1,4.75);
-
+       SetPMAS(5,1,4.75);
       break;
     case kPyBeautyppMNR:
       // Tuning of Pythia parameters aimed to get a resonable agreement
@@ -593,38 +409,51 @@ void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfun
       // (AliGenPythia::SetNuclei) and with kCTEQ4L PDFs.
       // To get a good agreement the minimum ptHard (AliGenPythia::SetPtHard)
       // has to be set to 2.75GeV. Example in ConfigBeautyPPR.C.
-
-      // All QCD processes
-      SetMSEL(1);
-
-      // No multiple interactions
-      SetMSTP(81,0);
-      SetPARP(81,0.0);
-      SetPARP(82,0.0);
-
-      // Initial/final parton shower on (Pythia default)
-      SetMSTP(61,1);
-      SetMSTP(71,1);
-
-      // 2nd order alpha_s
-      SetMSTP(2,2);
-
+       ConfigHeavyFlavor();
       // QCD scales
-      SetMSTP(32,2);
-      SetPARP(34,1.0);
-      SetPARP(67,1.0);
-      SetPARP(71,1.0);
-
-      // Intrinsic <kT>
-      SetMSTP(91,1);
-      SetPARP(91,1.);
-      SetPARP(93,5.);
+       SetPARP(67,1.0);
+       SetPARP(71,1.0);
+       
+       // Intrinsic <kT>
+       SetMSTP(91,1);
+       SetPARP(91,1.);
+       SetPARP(93,5.);
+       
+       // Set b-quark mass
+       SetPMAS(5,1,4.75);
+      break;
+     case kPyBeautyppMNRwmi:
+      // Tuning of Pythia parameters aimed to get a resonable agreement
+      // between with the NLO calculation by Mangano, Nason, Ridolfi for the
+      // b-bbar single inclusive and double differential distributions.
+      // This parameter settings are meant to work with pp collisions
+      // and with kCTEQ5L PDFs.
+      // Added multiple interactions according to ATLAS tune settings.
+      // To get a "reasonable" agreement with MNR results, events have to be 
+      // generated with the minimum ptHard (AliGenPythia::SetPtHard)
+      // set to 2.76 GeV.
+      // To get a "perfect" agreement with MNR results, events have to be 
+      // generated in four ptHard bins with the following relative 
+      // normalizations:
+      // 2.76-4 GeV:  5% 
+      //    4-6 GeV: 31%
+      //    6-8 GeV: 28%
+      //     >8 GeV: 36%
+        ConfigHeavyFlavor();
+      // QCD scales
+        SetPARP(67,1.0);
+        SetPARP(71,1.0);
+        
+        // Intrinsic <kT>
+        SetMSTP(91,1);
+        SetPARP(91,1.);
+        SetPARP(93,5.);
 
       // Set b-quark mass
-      SetPMAS(5,1,4.75);
+        SetPMAS(5,1,4.75);
 
-      break;
+        AtlasTuning();
+        break; 
     case kPyW:
 
       //Inclusive production of W+/-
@@ -1353,4 +1182,57 @@ void AliPythia::GetQuenchingParameters(Double_t& xp, Double_t& yp, Double_t z[4]
 
 }
 
+void AliPythia::ConfigHeavyFlavor()
+{
+    //
+    // Default configuration for Heavy Flavor production
+    //
+    // All QCD processes
+    //
+    SetMSEL(1);
+    
+    // No multiple interactions
+    SetMSTP(81,0);
+    // Initial/final parton shower on (Pythia default)
+    SetMSTP(61,1);
+    SetMSTP(71,1);
+    
+    // 2nd order alpha_s
+    SetMSTP(2,2);
+    
+    // QCD scales
+    SetMSTP(32,2);
+    SetPARP(34,1.0);
+}
+
+void AliPythia::AtlasTuning()
+{
+    //
+    // Configuration for the ATLAS tuning
+        SetMSTP(51, kCTEQ5L);      // CTEQ5L pdf
+       SetMSTP(81,1);             // Multiple Interactions ON
+       SetMSTP(82,4);             // Double Gaussian Model
+       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
+}
+
+AliPythia& AliPythia::operator=(const  AliPythia& rhs)
+{
+// Assignment operator
+    rhs.Copy(*this);
+    return *this;
+}
 
+ void AliPythia::Copy(TObject&) const
+{
+    //
+    // Copy 
+    //
+    Fatal("Copy","Not implemented!\n");
+}