]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - macros/Config_PDC06_MUON.C
Remove fastjet include files; do not build libFASTJETAN if there is no fastjet on...
[u/mrichter/AliRoot.git] / macros / Config_PDC06_MUON.C
index f61659590c9ccec5fa798d547d856ef65c2949be..080f57875e18749d6429dcc157d0015e3b7b597d 100644 (file)
@@ -2,18 +2,27 @@
 // Tuned for p+p min biais and quarkonia production (AliGenMUONCocktailpp)
 // Remember to define the directory and option
 // gAlice->SetConfigFunction("Config('$HOME','box');");
+// april 3rd: added L3 magnet 
 
-void Config(char directory[100]="", char option[6]="trg2mu")
+void LoadPythia();
+
+void Config(char directory[100]="", char option[6]="trg1mu")
 {
  
   static Int_t sseed = 0; // Set 0 to use the current time
 
   //=====================================================================
-  //  Libraries required by geant321
+  LoadPythia();
   gSystem->Load("libgeant321.so");
   new TGeant3TGeo("C++ Interface to Geant3");
+  
   //=======================================================================
 
+  if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
+    AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+    AliCDBManager::Instance()->SetRun(0);
+  }
+  
   // Set Random Number seed
   gRandom->SetSeed(sseed);
 
@@ -29,9 +38,16 @@ void Config(char directory[100]="", char option[6]="trg2mu")
     return;
   }
   rl->SetCompressionLevel(2);
-  rl->SetNumberOfEventsPerFile(100);
+  rl->SetNumberOfEventsPerFile(1000);
   gAlice->SetRunLoader(rl);
+  // gAlice->SetGeometryFromFile("geometry.root");
+  // gAlice->SetGeometryFromCDB();
   
+  //=======================================================================
+  // Set the trigger configuration
+  AliSimulation::Instance()->SetTriggerConfig("p-p");
+  cout<<"Trigger configuration is set to  p-p"<<endl;
+
   //=======================================================================
   // Set External decayer
   TVirtualMCDecayer *decayer = new AliDecayerPythia();
@@ -84,18 +100,36 @@ void Config(char directory[100]="", char option[6]="trg2mu")
   //   External Radius (in cm)
   //    183.,  245.,  395.,  560., 563., 850., 900.  
   //=======================================================================
+    AliGenPythia* PythiaForMUONCocktail(Decay_t dt)
+       {
+           AliGenPythia *pythia = new AliGenPythia(1);
+           pythia->SetProcess(kPyMbMSEL1);
+           pythia->SetStrucFunc(kCTEQ5L);
+           pythia->SetEnergyCMS(14000.);
+           pythia->SetForceDecay(dt);
+           pythia->SetPtRange(0.,100.);
+           pythia->SetYRange(-8.,8.);
+           pythia->SetPhiRange(0.,360.);
+           pythia->SetPtHard(2.76,-1.0);
+           pythia->SwitchHFOff();
+           return pythia;
+       }
 
   if (!strcmp(option,"trg2mu")) {
     AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
       gener->SetPtRange(0.,100.);
       gener->SetYRange(-4.,-2.4);
-      gener->SetPhiRange(0., 360.);
+      gener->SetPhiRange(0.,360.);
       gener->SetMuonMultiplicity(2);  
-      gener->SetMuonPtCut(1.);
+      gener->SetMuonPtCut(0.5);
       gener->SetMuonThetaRange(171.,178.);      
       gener->SetOrigin(0.,0.,0.); 
       gener->SetSigma(0.,0.,5.);
       gener->SetVertexSmear(kPerEvent);
+      Decay_t dt = gener->GetDecayModePythia(dt);
+      AliGenPythia* pythia = PythiaForMUONCocktail(dt);
+      pythia->Init();     
+      gener->AddGenerator(pythia,"Pythia",1);
       gener->Init(); 
   }
  
@@ -103,43 +137,77 @@ void Config(char directory[100]="", char option[6]="trg2mu")
     AliGenMUONCocktailpp *gener = new AliGenMUONCocktailpp();
       gener->SetPtRange(0.,100.);
       gener->SetYRange(-4.,-2.4);
-      gener->SetPhiRange(0., 360.);
+      gener->SetPhiRange(0.,360.);
       gener->SetMuonMultiplicity(1);  
-      gener->SetMuonPtCut(1.);
+      gener->SetMuonPtCut(0.5);
       gener->SetMuonThetaRange(171.,178.);      
       gener->SetOrigin(0.,0.,0.); 
       gener->SetSigma(0.,0.,5.);
       gener->SetVertexSmear(kPerEvent);
+      Decay_t dt = gener->GetDecayModePythia();
+      AliGenPythia* pythia = PythiaForMUONCocktail(dt);
+      pythia->Init();     
+      gener->AddGenerator(pythia,"Pythia",1);
       gener->Init(); 
   }
   //============================================================= 
-  // Field (L3 0.4 T)
-  AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., AliMagFMaps::k4kG);
+  // Field (L3 0.5 T) outside dimuon spectrometer
+  AliMagF* field = new AliMagF("Maps","Maps",1.,1.,AliMagF::k5kG);
   field->SetL3ConstField(0); // Using const. field in the barrel 
-  gAlice->SetField(field);
+  TGeoGlobalMagField::Instance()->SetField(field);
+
+  Int_t   iITS = 1;
+  Int_t   iZDC = 1;
+  Int_t   iFMD = 1;
+  Int_t   iPHOS = 1;
+  Int_t   iPMD = 1;
+  Int_t   iT0 = 1;
+  Int_t   iVZERO = 1;
 
-  Int_t   iITS   =  1;
   rl->CdGAFile();
 
   //=================== Alice BODY parameters =============================
   AliBODY *BODY = new AliBODY("BODY","Alice envelop");
   //=================== ABSO parameters ============================
-  AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
+  AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
   //=================== DIPO parameters ============================
-  AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
+  AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
   //================== HALL parameters ============================
-  AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
+  AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
   //================== The L3 Magnet ==============================
   AliMAG *MAG = new AliMAG("MAG", "L3 Magnet");
   //=================== PIPE parameters ============================
-  AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
+  AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
   //=================== SHIL parameters ============================
-  AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
+  AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
   //=================== ITS parameters =============================
   if(iITS) {
-      AliITSvPPRasymmFMD *ITS  = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
+      AliITS *ITS  = new AliITSv11("ITS","ITS v11");
+  }
+ //=================== ZDC parameters =============================
+  if(iZDC) {
+      AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
+  }      
+ //=================== FMD parameters =============================
+  if(iFMD) {
+      AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
+  }
+ //=================== PHOS  parameters =============================
+  if(iPHOS) {
+      AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
+  }
+ //=================== PMD parameters =============================
+  if(iPMD) {
+      AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
+  }
+ //=================== T0 parameters =============================  
+  if (iT0) {
+      AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
+  }
+ //=================== VZERO parameters =============================
+  if (iVZERO) {
+      AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
   }
-
 
   //=================== MUON Subsystem ===========================
   cout << ">>> Config.C: Creating AliMUONv1 ..."<<endl;
@@ -157,3 +225,15 @@ void Config(char directory[100]="", char option[6]="trg2mu")
 Float_t EtaToTheta(Float_t arg){
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
+
+
+void LoadPythia()
+{
+    // Load Pythia related libraries
+    gSystem->Load("liblhapdf.so");      // Parton density functions
+    gSystem->Load("libEGPythia6.so");   // TGenerator interface
+    gSystem->Load("libpythia6.so");     // Pythia
+    gSystem->Load("libAliPythia6.so");  // ALICE specific implementations
+}
+
+