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