]>
Commit | Line | Data |
---|---|---|
74d31ce3 | 1 | // |
2 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
3 | #include <Riostream.h> | |
9bb2665f | 4 | #include <TPDGCode.h> |
74d31ce3 | 5 | #include <TRandom.h> |
6 | #include <TSystem.h> | |
7 | #include <TVirtualMC.h> | |
8 | #include <TGeant3.h> | |
9 | #include "STEER/AliRunLoader.h" | |
10 | #include "STEER/AliRun.h" | |
11 | #include "STEER/AliConfig.h" | |
12 | #include "PYTHIA6/AliDecayerPythia.h" | |
13 | #include "EVGEN/AliGenCocktail.h" | |
14 | #include "EVGEN/AliGenHIJINGpara.h" | |
74d31ce3 | 15 | #include "STRUCT/AliBODY.h" |
74d31ce3 | 16 | #include "STRUCT/AliABSOv0.h" |
17 | #include "STRUCT/AliDIPOv2.h" | |
18 | #include "STRUCT/AliHALL.h" | |
19 | #include "STRUCT/AliFRAMEv2.h" | |
20 | #include "STRUCT/AliSHILv2.h" | |
21 | #include "STRUCT/AliPIPEv0.h" | |
22 | #include "ITS/AliITSvSPD02.h" | |
23 | #endif | |
24 | ||
25 | Float_t EtaToTheta(Float_t arg){ | |
26 | return (180./TMath::Pi())*2.*atan(exp(-arg)); | |
27 | } | |
28 | //------------------------------------------------------------------ | |
29 | void Config(){ | |
30 | // Set Random Number seed | |
31 | // gRandom->SetSeed(12345); | |
32 | // libraries required by geant321 | |
33 | #if defined(__CINT__) | |
34 | gSystem->Load("libgeant321"); | |
35 | #endif | |
36 | new TGeant3("C++ Interface to Geant3"); | |
37 | AliRunLoader *rl = 0; | |
38 | rl = AliRunLoader::Open("galice.root", | |
f5a857b2 | 39 | AliConfig::GetDefaultEventFolderName(),"recreate"); |
74d31ce3 | 40 | if (rl == 0x0){ |
41 | gAlice->Fatal("Config.C","Can not instatiate the Run Loader"); | |
42 | return; | |
43 | } // end if rl==0x0 | |
44 | rl->SetCompressionLevel(2); | |
45 | rl->SetNumberOfEventsPerFile(1000); | |
46 | gAlice->SetRunLoader(rl); | |
47 | // | |
48 | // Set External decayer | |
49 | TVirtualMCDecayer *decayer = new AliDecayerPythia(); | |
50 | decayer->SetForceDecay(kAll); | |
51 | decayer->Init(); | |
52 | gMC->SetExternalDecayer(decayer); | |
53 | //======================================================================= | |
54 | gMC->SetProcess("DCAY",1); | |
55 | gMC->SetProcess("PAIR",1); | |
56 | gMC->SetProcess("COMP",1); | |
57 | gMC->SetProcess("PHOT",1); | |
58 | gMC->SetProcess("PFIS",0); | |
59 | gMC->SetProcess("DRAY",0); | |
60 | gMC->SetProcess("ANNI",1); | |
61 | gMC->SetProcess("BREM",1); | |
62 | gMC->SetProcess("MUNU",1); | |
63 | gMC->SetProcess("CKOV",1); | |
64 | gMC->SetProcess("HADR",1); | |
65 | gMC->SetProcess("LOSS",2); | |
66 | gMC->SetProcess("MULS",1); | |
67 | gMC->SetProcess("RAYL",1); | |
68 | Float_t cut = 1.e-3; // 1MeV cut by default | |
69 | Float_t tofmax = 1.e10; | |
70 | gMC->SetCut("CUTGAM", cut); | |
71 | gMC->SetCut("CUTELE", cut); | |
72 | gMC->SetCut("CUTNEU", cut); | |
73 | gMC->SetCut("CUTHAD", cut); | |
74 | gMC->SetCut("CUTMUO", cut); | |
75 | gMC->SetCut("BCUTE", cut); | |
76 | gMC->SetCut("BCUTM", cut); | |
77 | gMC->SetCut("DCUTE", cut); | |
78 | gMC->SetCut("DCUTM", cut); | |
79 | gMC->SetCut("PPCUTM", cut); | |
80 | gMC->SetCut("TOFMAX", tofmax); | |
81 | int nParticles = 1; | |
82 | if (gSystem->Getenv("CONFIG_NPARTICLES")){ | |
83 | nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); | |
84 | } // end if | |
85 | //********************************************* | |
86 | // Example for Moving Particle Gun * | |
87 | //********************************************* | |
88 | AliGenBox *gener = new AliGenBox(nParticles); | |
a25a8daa | 89 | gener->SetMomentumRange(300.,301.); |
74d31ce3 | 90 | gener->SetPhiRange(0,0.1); |
91 | gener->SetThetaRange(0.0, .1); | |
a25a8daa | 92 | gener->SetOrigin(0.,0.,-800.); |
74d31ce3 | 93 | //vertex position |
94 | gener->SetSigma(0.1,0.1,0.0); //Sigma in (X,Y,Z) (cm) on IP position | |
9bb2665f | 95 | gener->SetPart(kPiPlus); |
74d31ce3 | 96 | gener->Init(); |
97 | // Activate this line if you want the vertex smearing to happen | |
98 | // track by track | |
99 | // | |
100 | //gener->SetVertexSmear(perTrack); | |
101 | // Field (L3 0.4 T) | |
102 | //gAlice->SetField(field); | |
103 | ||
104 | Int_t iHALL = 0; | |
105 | Int_t iITS = 1; | |
106 | rl->CdGAFile(); | |
107 | //=================== Alice BODY parameters ============================= | |
108 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
109 | ||
110 | if (iHALL){ | |
111 | //=================== HALL parameters ============================ | |
112 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); | |
113 | } // end if | |
114 | if(iITS) { | |
115 | //=================== ITS parameters ============================ | |
116 | AliITSvSDD03 *ITS = new AliITSvSDD03("SDD test beam 2003",2003); | |
117 | } | |
118 | return; | |
119 | } |