]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - macros/Config_PythiaHeavyFlavours.C
New method to set the CTP trigger mask
[u/mrichter/AliRoot.git] / macros / Config_PythiaHeavyFlavours.C
index 95656268f0886a8eda93a134b3733244979b8479..d28b551863934aa62c1544b44edca642ac808d0f 100644 (file)
@@ -6,10 +6,10 @@
 // Mangano, Nason and Ridolfi.                                       //
 //                                                                   //
 // For details and for the NORMALIZATION of the yields see:          //
-// - "Charm and beauty production at the LHC", ALICE note submitted  //
-//   and available at: http://www.pd.infn.it/alipd/Docs.html         //
-// - Current version of the ALICE PPR (Chapter 6.5)                  //
-//   at: http://alice.web.cern.ch/Alice/ppr/web/CurrentVersion.html  //
+//   N.Carrer and A.Dainese,                                         //
+//   "Charm and beauty production at the LHC",                       //
+//   ALICE-INT-2003-019, [arXiv:hep-ph/0311225];                     //
+//   PPR Chapter 6.6, CERN/LHCC 2005-030 (2005).                     //
 //*******************************************************************//
 #if !defined(__CINT__) || defined(__MAKECINT__)
 #include <Riostream.h>
@@ -32,9 +32,9 @@
 #include "STRUCT/AliFRAMEv2.h"
 #include "STRUCT/AliSHILv2.h"
 #include "STRUCT/AliPIPEv0.h"
-#include "ITS/AliITSvPPRasymm.h"
+#include "ITS/AliITSvPPRasymmFMD.h"
 #include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv4T0.h"
+#include "TOF/AliTOFv5T0.h"
 #include "RICH/AliRICHv1.h"
 #include "ZDC/AliZDCv1.h"
 #include "TRD/AliTRDv1.h"
 //--- Heavy Flavour Production ---
 enum ProcessHvFl_t 
 {
-  kCharmPbPb5500,  kCharmpPb8800,  kCharmpp14000,
+  kCharmPbPb5500,  kCharmpPb8800,  kCharmpp14000,  kCharmpp14000wmi,
   kD0PbPb5500,     kD0pPb8800,     kD0pp14000,
-  kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000
+  kDPlusPbPb5500,  kDPluspPb8800,  kDPluspp14000,
+  kDPlusStrangePbPb5500, kDPlusStrangepPb8800, kDPlusStrangepp14000,
+  kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi
 };
 //--- Decay Mode ---
 enum DecayHvFl_t 
@@ -76,7 +78,7 @@ AliGenPythia *PythiaHVQ(ProcessHvFl_t proc);
 static ProcessHvFl_t procHvFl = kCharmPbPb5500;
 static DecayHvFl_t   decHvFl  = kNature; 
 static YCut_t        ycut     = kFull;
-static Mag_t         mag      = k4kG; 
+static Mag_t         mag      = k5kG; 
 // nEvts = -1  : you get 1 QQbar pair and all the fragmentation and 
 //               decay chain
 // nEvts = N>0 : you get N charm / beauty Hadrons 
@@ -85,6 +87,25 @@ Int_t nEvts = -1;
 //       = kFALSE: only final heavy hadrons and their decays stored
 Bool_t stars = kTRUE;
 
+// To be used only with kCharmppMNRwmi and kBeautyppMNRwmi
+// To get a "reasonable" agreement with MNR results, events have to be 
+// generated with the minimum ptHard 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:
+//  CHARM
+// 2.76-3 GeV: 25%
+//    3-4 GeV: 40%
+//    4-8 GeV: 29%
+//     >8 GeV:  6%
+//  BEAUTY
+// 2.76-4 GeV:  5% 
+//    4-6 GeV: 31%
+//    6-8 GeV: 28%
+//     >8 GeV: 36%
+Float_t ptHardMin =  2.76;
+Float_t ptHardMax = -1.;
+
 
 // Comment line
 static TString comment;
@@ -101,15 +122,16 @@ void Config()
   UInt_t seed=curtime-procid;
 
   //  gRandom->SetSeed(seed);
+  //  cerr<<"Seed for random number generation= "<<seed<<endl; 
   gRandom->SetSeed(12345);
-  cerr<<"Seed for random number generation= "<<seed<<endl; 
+  
 
   // libraries required by geant321
 #if defined(__CINT__)
   gSystem->Load("libgeant321");
 #endif
 
-  new TGeant3("C++ Interface to Geant3");
+  new TGeant3TGeo("C++ Interface to Geant3");
 
   //=======================================================================
   //  Create the output file
@@ -119,7 +141,7 @@ void Config()
 
   cout<<"Config.C: Creating Run Loader ..."<<endl;
   rl = AliRunLoader::Open("galice.root",
-                         AliConfig::fgkDefaultEventFolderName,
+                         AliConfig::GetDefaultEventFolderName(),
                          "recreate");
   if (rl == 0x0)
     {
@@ -246,7 +268,7 @@ void Config()
 
   pythia->SetTrackingFlag(0);
   // Specify GEANT tracking limits (Rmax, Zmax)
-  //gAlice->TrackingLimits(90.,1.0e10);
+  //gAlice->GetMCApp()->TrackingLimits(90.,1.0e10);
 
 
   pythia->Init();
@@ -263,6 +285,7 @@ void Config()
   printf("\n \n Comment: %s \n \n", comment.Data());
     
   AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., mag);
+  field->SetL3ConstField(0); //Using const. field in the barrel
   rl->CdGAFile();
   gAlice->SetField(field);    
 
@@ -358,7 +381,7 @@ void Config()
     //
     //AliITS *ITS  = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
     //
-    AliITSvPPRasymm *ITS  = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
+    AliITSvPPRasymmFMD *ITS  = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
     ITS->SetMinorVersion(2);                                         // don't touch this parameter if you're not an ITS developer
     ITS->SetReadDet(kFALSE);                                         // don't touch this parameter if you're not an ITS developer
     ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det");  // don't touch this parameter if you're not an ITS developer
@@ -408,35 +431,14 @@ void Config()
   
 
   if(iTPC) {
-    //============================ TPC parameters ================================
-    // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
-    // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
-    // --- sectors are specified, any value other than that requires at least one 
-    // --- sector (lower or upper)to be specified!
-    // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
-    // ---           sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
-    // --- SecLows - number of lower sectors specified (up to 6)
-    // --- SecUps - number of upper sectors specified (up to 12)
-    // --- Sens - sensitive strips for the Slow Simulator !!!
-    // --- This does NOT work if all S or L-sectors are specified, i.e.
-    // --- if SecAL or SecAU < 0
-    //
-    //
-    //-----------------------------------------------------------------------------
-
-    //  gROOT->LoadMacro("SetTPCParam.C");
-    //  AliTPCParam *param = SetTPCParam();
+    //============================ TPC parameters ===================
     AliTPC *TPC  = new AliTPCv2("TPC","Default");
-    // All sectors included 
-    TPC->SetSecAL(-1);
-    TPC->SetSecAU(-1);
-
   }
 
 
   if(iTOF) {
     //=================== TOF parameters ============================
-    AliTOF *TOF  = new AliTOFv4T0("TOF","normal TOF");
+    AliTOF *TOF  = new AliTOFv5T0("TOF","normal TOF");
   }
 
   if(iRICH) {
@@ -466,10 +468,6 @@ void Config()
     // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
     TRD->SetGasMix(1);
   
-    // With hole in front of PHOS
-    TRD->SetPHOShole();
-    // With hole in front of RICH
-    TRD->SetRICHhole();
     // Switch on TR
     AliTRDsim *TRDsim = TRD->CreateTR();
   }
@@ -552,6 +550,14 @@ AliGenPythia *PythiaHVQ(ProcessHvFl_t proc) {
     gener->SetPtHard(2.1,-1.0);
     gener->SetEnergyCMS(14000.);
     break;
+  case kCharmpp14000wmi:
+    comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
+    gener = new AliGenPythia(-1);
+    gener->SetProcess(kPyCharmppMNRwmi);
+    gener->SetStrucFunc(kCTEQ5L);
+    gener->SetPtHard(ptHardMin,ptHardMax);
+    gener->SetEnergyCMS(14000.);
+    break;
   case kD0PbPb5500:
     comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
     gener = new AliGenPythia(nEvts);
@@ -579,9 +585,63 @@ AliGenPythia *PythiaHVQ(ProcessHvFl_t proc) {
     gener->SetPtHard(2.1,-1.0);
     gener->SetEnergyCMS(14000.);
     break;
+  case kDPlusPbPb5500:
+    comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPlusPbPbMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(5500.);
+    gener->SetNuclei(208,208);
+    break;
+  case kDPluspPb8800:
+    comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPluspPbMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(8800.);
+    gener->SetProjectile("P",1,1);
+    gener->SetTarget("Pb",208,82);
+    break;
+  case kDPluspp14000:
+    comment = comment.Append(" DPlus in pp at 14 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPlusppMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(14000.);
+    break;
+ case kDPlusStrangePbPb5500:
+    comment = comment.Append(" DPlusStrange in Pb-Pb at 5.5 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPlusStrangePbPbMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(5500.);
+    gener->SetNuclei(208,208);
+    break;
+  case kDPlusStrangepPb8800:
+    comment = comment.Append(" DPlusStrange in p-Pb at 8.8 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPlusStrangepPbMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(8800.);
+    gener->SetProjectile("P",1,1);
+    gener->SetTarget("Pb",208,82);
+    break;
+  case kDPlusStrangepp14000:
+    comment = comment.Append(" DPlusStrange in pp at 14 TeV");
+    gener = new AliGenPythia(nEvts);
+    gener->SetProcess(kPyDPlusStrangeppMNR);
+    gener->SetStrucFunc(kCTEQ4L);
+    gener->SetPtHard(2.1,-1.0);
+    gener->SetEnergyCMS(14000.);
+    break;
   case kBeautyPbPb5500:
     comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
-    AliGenPythia *gener = new AliGenPythia(nEvts);
+    gener = new AliGenPythia(nEvts);
     gener->SetProcess(kPyBeautyPbPbMNR);
     gener->SetStrucFunc(kCTEQ4L);
     gener->SetPtHard(2.75,-1.0);
@@ -606,6 +666,14 @@ AliGenPythia *PythiaHVQ(ProcessHvFl_t proc) {
     gener->SetPtHard(2.75,-1.0);
     gener->SetEnergyCMS(14000.);
     break;
+  case kBeautypp14000wmi:
+    comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
+    gener = new AliGenPythia(-1);
+    gener->SetProcess(kPyBeautyppMNRwmi);
+    gener->SetStrucFunc(kCTEQ5L);
+    gener->SetPtHard(ptHardMin,ptHardMax);
+    gener->SetEnergyCMS(14000.);
+    break;
   }
 
   return gener;