New configuration for AliGenMUONCocktailpp
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Feb 2008 09:39:49 +0000 (09:39 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 16 Feb 2008 09:39:49 +0000 (09:39 +0000)
macros/Config_PDC06_MUON.C
macros/Config_PDC07_MBias_MUON.C

index 3555a53..8d38b89 100644 (file)
@@ -4,6 +4,7 @@
 // gAlice->SetConfigFunction("Config('$HOME','box');");
 // april 3rd: added L3 magnet 
 
+
 void Config(char directory[100]="", char option[6]="trg1mu")
 {
  
@@ -11,8 +12,15 @@ void Config(char directory[100]="", char option[6]="trg1mu")
 
   //=====================================================================
   //  Libraries required by geant321
+  //  gSystem->Load("liblhapdf.so");
+  //  gSystem->Load("libEGPythia6.so");
+  //  gSystem->Load("libPythia6.so");
+  //  gSystem->Load("libpythia6.so");
+  //  gSystem->Load("libAliPythia6.so");
+  
   gSystem->Load("libgeant321.so");
   new TGeant3TGeo("C++ Interface to Geant3");
+  
   //=======================================================================
 
   if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
@@ -97,6 +105,20 @@ void Config(char directory[100]="", char option[6]="trg1mu")
   //   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();
@@ -109,6 +131,10 @@ void Config(char directory[100]="", char option[6]="trg1mu")
       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(); 
   }
  
@@ -123,6 +149,10 @@ void Config(char directory[100]="", char option[6]="trg1mu")
       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(); 
   }
   //============================================================= 
@@ -200,3 +230,6 @@ void Config(char directory[100]="", char option[6]="trg1mu")
 Float_t EtaToTheta(Float_t arg){
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
+
+
+
index 2f52d28..4d2a35a 100644 (file)
@@ -12,7 +12,14 @@ void Config(char directory[100]="", char option[6]="trgAll")
     
   //=====================================================================
   //  Libraries required by geant321
+  //    gSystem->Load("liblhapdf.so");
+  //    gSystem->Load("libEGPythia6.so");
+  //    gSystem->Load("libPythia6.so");
+  //    gSystem->Load("libpythia6.so");
+  //    gSystem->Load("libAliPythia6.so");
+
     gSystem->Load("libgeant321.so");
+    
     new TGeant3TGeo("C++ Interface to Geant3");
   //=======================================================================
 
@@ -98,6 +105,21 @@ void Config(char directory[100]="", char option[6]="trgAll")
   //    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.);
@@ -109,6 +131,10 @@ void Config(char directory[100]="", char option[6]="trgAll")
        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(); 
     }
  
@@ -123,6 +149,10 @@ void Config(char directory[100]="", char option[6]="trgAll")
        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(); 
     }
     if (!strcmp(option,"trgAll")) {
@@ -135,6 +165,10 @@ void Config(char directory[100]="", char option[6]="trgAll")
        gener->SetOrigin(0.,0.,0.); 
        gener->SetSigma(0.,0.,5.3);
        gener->SetVertexSmear(kPerEvent);
+       Decay_t dt = gener->GetDecayModePythia();
+       AliGenPythia* pythia = PythiaForMUONCocktail(dt);
+       pythia->Init();     
+       gener->AddGenerator(pythia,"Pythia",1);
        gener->Init();
     }
   //============================================================= 
@@ -185,3 +219,4 @@ void Config(char directory[100]="", char option[6]="trgAll")
 Float_t EtaToTheta(Float_t arg){
     return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
+