]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - test/gun/Config.C
adapted macro to QAManager
[u/mrichter/AliRoot.git] / test / gun / Config.C
index 032b8fa43462cf812b97b5146ffe44c98c57c71b..0a72ff20bc758f9f047076d1a20317a109217b3e 100644 (file)
@@ -6,6 +6,7 @@
 
 #if !defined(__CINT__) || defined(__MAKECINT__)
 #include <Riostream.h>
+#include <TPDGCode.h>
 #include <TRandom.h>
 #include <TSystem.h>
 #include <TVirtualMC.h>
 #include "EVGEN/AliGenHIJINGpara.h"
 #include "EVGEN/AliGenFixed.h"
 #include "EVGEN/AliGenBox.h"
-#include "STEER/AliMagFMaps.h"
+#include "STEER/AliMagF.h"
 #include "STRUCT/AliBODY.h"
 #include "STRUCT/AliMAG.h"
-#include "STRUCT/AliABSOv0.h"
-#include "STRUCT/AliDIPOv2.h"
-#include "STRUCT/AliHALL.h"
+#include "STRUCT/AliABSOv3.h"
+#include "STRUCT/AliDIPOv3.h"
+#include "STRUCT/AliHALLv3.h"
 #include "STRUCT/AliFRAMEv2.h"
-#include "STRUCT/AliSHILv2.h"
-#include "STRUCT/AliPIPEv0.h"
-#include "ITS/AliITSvPPRasymmFMD.h"
+#include "STRUCT/AliSHILv3.h"
+#include "STRUCT/AliPIPEv3.h"
+#include "ITS/AliITSv11Hybrid.h"
 #include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv5T0.h"
-#include "HMPID/AliHMPIDv1.h"
-#include "ZDC/AliZDCv2.h"
+#include "TOF/AliTOFv6T0.h"
+#include "HMPID/AliHMPIDv3.h"
+#include "ZDC/AliZDCv3.h"
 #include "TRD/AliTRDv1.h"
 #include "TRD/AliTRDgeometry.h"
 #include "FMD/AliFMDv1.h"
@@ -40,7 +41,7 @@
 #include "PMD/AliPMDv1.h"
 #include "T0/AliT0v1.h"
 #include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv0.h"
+#include "ACORDE/AliACORDEv1.h"
 #include "VZERO/AliVZEROv7.h"
 #endif
 
@@ -68,6 +69,10 @@ void Config()
 
    // libraries required by geant321
 #if defined(__CINT__)
+    gSystem->Load("liblhapdf");
+    gSystem->Load("libEGPythia6");
+    gSystem->Load("libpythia6");
+    gSystem->Load("libAliPythia6");
     gSystem->Load("libgeant321");
 #endif
 
@@ -155,49 +160,49 @@ void Config()
     // Particle guns for the barrel part (taken from RichConfig)
 
     AliGenFixed *pG1=new AliGenFixed(1);
-    pG1->SetPart(2212);
+    pG1->SetPart(kProton);
     pG1->SetMomentum(2.5);
     pG1->SetTheta(109.5-3);
     pG1->SetPhi(10);
     gener->AddGenerator(pG1,"g1",1);
     
     AliGenFixed *pG2=new AliGenFixed(1);
-    pG2->SetPart(211);
+    pG2->SetPart(kPiPlus);
     pG2->SetMomentum(1.0);
     pG2->SetTheta( 90.0-3);
     pG2->SetPhi(10);
     gener->AddGenerator(pG2,"g2",1);
 
     AliGenFixed *pG3=new AliGenFixed(1);
-    pG3->SetPart(-211);
+    pG3->SetPart(kPiMinus);
     pG3->SetMomentum(1.5);
     pG3->SetTheta(109.5-3);
     pG3->SetPhi(30);
     gener->AddGenerator(pG3,"g3",1);
     
     AliGenFixed *pG4=new AliGenFixed(1);
-    pG4->SetPart(321);
+    pG4->SetPart(kKPlus);
     pG4->SetMomentum(0.7);
     pG4->SetTheta( 90.0-3);
     pG4->SetPhi(30);
     gener->AddGenerator(pG4,"g4",1);
     
     AliGenFixed *pG5=new AliGenFixed(1);
-    pG5->SetPart(-321);
+    pG5->SetPart(kKMinus);
     pG5->SetMomentum(1.0);
     pG5->SetTheta( 70.0-3);
     pG5->SetPhi(30);
     gener->AddGenerator(pG5,"g5",1);
     
     AliGenFixed *pG6=new AliGenFixed(1);
-    pG6->SetPart(-2212);
+    pG6->SetPart(kProtonBar);
     pG6->SetMomentum(2.5);
     pG6->SetTheta( 90.0-3);
     pG6->SetPhi(50);
     gener->AddGenerator(pG6,"g6",1);
     
     AliGenFixed *pG7=new AliGenFixed(1);
-    pG7->SetPart(-211);
+    pG7->SetPart(kPiMinus);
     pG7->SetMomentum(0.7);
     pG7->SetTheta( 70.0-3);
     pG7->SetPhi(50);
@@ -206,14 +211,14 @@ void Config()
     // Electrons for TRD
 
     AliGenFixed *pG8=new AliGenFixed(1);
-    pG8->SetPart(11);
+    pG8->SetPart(kElectron);
     pG8->SetMomentum(1.2);
     pG8->SetTheta( 95.0);
     pG8->SetPhi(190);
     gener->AddGenerator(pG8,"g8",1);
 
     AliGenFixed *pG9=new AliGenFixed(1);
-    pG9->SetPart(-11);
+    pG9->SetPart(kPositron);
     pG9->SetMomentum(1.2);
     pG9->SetTheta( 85.0);
     pG9->SetPhi(190);
@@ -225,7 +230,7 @@ void Config()
     gphos->SetMomentumRange(10,11.);
     gphos->SetPhiRange(270.5,270.7);
     gphos->SetThetaRange(90.5,90.7);
-    gphos->SetPart(22);
+    gphos->SetPart(kGamma);
     gener->AddGenerator(gphos,"GENBOX GAMMA for PHOS",1);
 
     // EMCAL
@@ -234,7 +239,7 @@ void Config()
     gemcal->SetMomentumRange(10,11.);
     gemcal->SetPhiRange(90.5,199.5);
     gemcal->SetThetaRange(90.5,90.7);
-    gemcal->SetPart(22);
+    gemcal->SetPart(kGamma);
     gener->AddGenerator(gemcal,"GENBOX GAMMA for EMCAL",1);
 
     // MUON
@@ -242,23 +247,63 @@ void Config()
     gmuon1->SetMomentumRange(20.,20.1);
     gmuon1->SetPhiRange(0., 360.);         
     gmuon1->SetThetaRange(171.000,178.001);
-    gmuon1->SetPart(13);           // Muons
+    gmuon1->SetPart(kMuonMinus);           // Muons
     gener->AddGenerator(gmuon1,"GENBOX MUON1",1);
 
     AliGenBox * gmuon2 = new AliGenBox(1);
     gmuon2->SetMomentumRange(20.,20.1);
     gmuon2->SetPhiRange(0., 360.);         
     gmuon2->SetThetaRange(171.000,178.001);
-    gmuon2->SetPart(-13);           // Muons
+    gmuon2->SetPart(kMuonPlus);           // Muons
     gener->AddGenerator(gmuon2,"GENBOX MUON1",1);
 
     //TOF
     AliGenFixed *gtof=new AliGenFixed(1);
-    gtof->SetPart(2212);
+    gtof->SetPart(kProton);
     gtof->SetMomentum(2.5);
     gtof->SetTheta(95);
-    pG1->SetPhi(340);
+    gtof->SetPhi(340);
     gener->AddGenerator(gtof,"Proton for TOF",1);
+
+    //FMD1
+    AliGenFixed *gfmd1=new AliGenFixed(1);
+    gfmd1->SetPart(kGamma);
+    gfmd1->SetMomentum(25);
+    gfmd1->SetTheta(1.8);
+    gfmd1->SetPhi(10);
+    gener->AddGenerator(gfmd1,"Gamma for FMD1",1);
+    
+    //FMD2i
+    AliGenFixed *gfmd2i=new AliGenFixed(1);
+    gfmd2i->SetPart(kPiPlus);
+    gfmd2i->SetMomentum(1.5);
+    gfmd2i->SetTheta(7.3);
+    gfmd2i->SetPhi(20);
+    gener->AddGenerator(gfmd2i,"Pi+ for FMD2i",1);
+    
+    //FMD2o
+    AliGenFixed *gfmd2o=new AliGenFixed(1);
+    gfmd2o->SetPart(kPiMinus);
+    gfmd2o->SetMomentum(1.5);
+    gfmd2o->SetTheta(16.1);
+    gfmd2o->SetPhi(30);
+    gener->AddGenerator(gfmd2o,"Pi- for FMD2o",1);
+    
+    //FMD3o
+    AliGenFixed *gfmd3o=new AliGenFixed(1);
+    gfmd3o->SetPart(kPiPlus);
+    gfmd3o->SetMomentum(1.5);
+    gfmd3o->SetTheta(163.9);
+    gfmd3o->SetPhi(40);
+    gener->AddGenerator(gfmd3o,"Pi+ for FMD3o",1);
+    
+    //FMD3i
+    AliGenFixed *gfmd3i=new AliGenFixed(1);
+    gfmd3i->SetPart(kPiMinus);
+    gfmd3i->SetMomentum(1.5);
+    gfmd3i->SetTheta(170.5);
+    gfmd3i->SetPhi(50);
+    gener->AddGenerator(gfmd3i,"Pi- for FMD3i",1);
     
     gener->Init();
 
@@ -269,10 +314,7 @@ void Config()
     //
     //gener->SetVertexSmear(perTrack); 
     // Field (L3 0.5 T)
-    AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 2);
-    field->SetL3ConstField(1); //Using const. field in the barrel if 0
-    gAlice->SetField(field);    
-
+    TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 2, 1., 1., 10., AliMagF::k5kG));
 
     Int_t   iABSO  =  1;
     Int_t   iDIPO  =  1;
@@ -311,21 +353,21 @@ void Config()
     if (iABSO)
     {
         //=================== ABSO parameters ============================
-        AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
+        AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
     }
 
     if (iDIPO)
     {
         //=================== DIPO parameters ============================
 
-        AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
+        AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
     }
 
     if (iHALL)
     {
         //=================== HALL parameters ============================
 
-        AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
+        AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
     }
 
 
@@ -334,13 +376,14 @@ void Config()
         //=================== FRAME parameters ============================
 
         AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
+       FRAME->SetHoles(1);
     }
 
     if (iSHIL)
     {
         //=================== SHIL parameters ============================
 
-        AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
+        AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
     }
 
 
@@ -348,62 +391,14 @@ void Config()
     {
         //=================== PIPE parameters ============================
 
-        AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
+        AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
     }
  
-    if(iITS) {
-
-    //=================== ITS parameters ============================
-    //
-    // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
-    // almost all other detectors. This involves the fact that the ITS geometry
-    // still has several options to be followed in parallel in order to determine
-    // the best set-up which minimizes the induced background. All the geometries
-    // available to date are described in the following. Read carefully the comments
-    // and use the default version (the only one uncommented) unless you are making
-    // comparisons and you know what you are doing. In this case just uncomment the
-    // ITS geometry you want to use and run Aliroot.
-    //
-    // Detailed geometries:         
-    //
-    //
-    //
-       AliITSvPPRasymmFMD *ITS  = new AliITSvPPRasymmFMD("ITS","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
-       ITS->SetThicknessDet1(200.);   // detector thickness on layer 1 must be in the range [100,300]
-       ITS->SetThicknessDet2(200.);   // detector thickness on layer 2 must be in the range [100,300]
-       ITS->SetThicknessChip1(150.);  // chip thickness on layer 1 must be in the range [150,300]
-       ITS->SetThicknessChip2(150.);  // chip thickness on layer 2 must be in the range [150,300]
-       ITS->SetRails(0);              // 1 --> rails in ; 0 --> rails out
-       ITS->SetCoolingFluid(1);       // 1 --> water ; 0 --> freon
+    if (iITS)
+    {
+        //=================== ITS parameters ============================
 
-    //
-    // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful 
-    // for reconstruction !):
-    //                                                     
-    //
-    //AliITSvPPRcoarseasymm *ITS  = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
-    //ITS->SetRails(0);                // 1 --> rails in ; 0 --> rails out
-    //ITS->SetSupportMaterial(0);      // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
-    //
-    //AliITS *ITS  = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
-    //ITS->SetRails(0);                // 1 --> rails in ; 0 --> rails out
-    //ITS->SetSupportMaterial(0);      // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
-    //                      
-    //
-    //
-    // Geant3 <-> EUCLID conversion
-    // ============================
-    //
-    // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
-    // media to two ASCII files (called by default ITSgeometry.euc and
-    // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
-    // The default (=0) means that you dont want to use this facility.
-    //
-     ITS->SetEUCLID(0);  
+       AliITS *ITS  = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
     }
 
     if (iTPC)
@@ -415,18 +410,14 @@ void Config()
 
     if (iTOF) {
         //=================== TOF parameters ============================
-       AliTOF *TOF = new AliTOFv5T0("TOF", "normal TOF");
-       // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
-       // starting at 6h in positive direction
-       Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
-       TOF->SetTOFSectors(TOFSectors);
+       AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
      }
 
 
     if (iHMPID)
     {
         //=================== HMPID parameters ===========================
-        AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
+        AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
 
     }
 
@@ -435,7 +426,7 @@ void Config()
     {
         //=================== ZDC parameters ============================
 
-        AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
+        AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
     }
 
     if (iTRD)
@@ -493,13 +484,13 @@ void Config()
     if (iEMCAL)
     {
         //=================== EMCAL parameters ============================
-        AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
+        AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
     }
 
      if (iACORDE)
     {
         //=================== ACORDE parameters ============================
-        AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
+        AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
     }
 
      if (iVZERO)