]>
Commit | Line | Data |
---|---|---|
793ff80c | 1 | void Config() |
2 | { | |
3 | ||
4 | new AliGeant3("C++ Interface to Geant3"); | |
5 | ||
6 | // Create the output file | |
7 | TFile *rootfile = new TFile("TRD_test.root","recreate"); | |
8 | rootfile->SetCompressionLevel(2); | |
9 | ||
10 | // Define the monte carlo | |
11 | TGeant3 *geant3 = (TGeant3*) gMC; | |
12 | ||
13 | // Set external decayer | |
14 | AliDecayer* decayer = new AliDecayerPythia(); | |
15 | decayer->SetForceDecay(all); | |
16 | decayer->Init(); | |
17 | gMC->SetExternalDecayer(decayer); | |
18 | ||
19 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* | |
20 | geant3->SetTRIG(1); // Number of events to be processed | |
21 | geant3->SetSWIT(4,10); | |
22 | geant3->SetDEBU(0,0,1); | |
23 | //geant3->SetSWIT(2,2); | |
24 | geant3->SetDCAY(1); | |
25 | geant3->SetPAIR(1); | |
26 | geant3->SetCOMP(1); | |
27 | geant3->SetPHOT(1); | |
28 | geant3->SetPFIS(0); | |
29 | geant3->SetDRAY(0); | |
30 | geant3->SetANNI(1); | |
31 | geant3->SetBREM(1); | |
32 | geant3->SetMUNU(1); | |
33 | geant3->SetCKOV(1); | |
34 | geant3->SetHADR(1); // Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
35 | geant3->SetLOSS(2); | |
36 | geant3->SetMULS(1); | |
37 | geant3->SetRAYL(1); | |
38 | geant3->SetAUTO(1); // Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
39 | geant3->SetABAN(0); // Restore 3.16 behaviour for abandoned tracks | |
40 | geant3->SetOPTI(2); // Select optimisation level for GEANT geometry searches (0,1,2) | |
41 | geant3->SetERAN(5.e-7); | |
42 | ||
43 | Float_t cut = 1.e-3; // 1MeV cut by default | |
44 | Float_t tofmax = 1.e10; | |
45 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
46 | geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax); | |
47 | ||
48 | // ************* STEERING parameters FOR ALICE SIMULATION ************** | |
49 | // --- Specify event type to be tracked through the ALICE setup | |
50 | // --- All positions are in cm, angles in degrees, and P and E in GeV | |
51 | //AliGenHIJINGpara *gener = new AliGenHIJINGpara(250); | |
52 | AliGenBox *gener = new AliGenBox(100); | |
53 | gener->SetMomentumRange(1.0,3.0); | |
54 | gener->SetPhiRange(80.0,100.0); | |
55 | gener->SetThetaRange(70.0,110.0); | |
56 | gener->SetPart(11); // Only electrons | |
57 | gener->SetOrigin(0,0,0); // Vertex position | |
58 | gener->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position | |
59 | gener->Init(); | |
60 | ||
61 | //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
62 | gAlice->SetField(-999,2); | |
63 | ||
64 | Int_t iMAG = 1; | |
65 | Int_t iITS = 1; | |
66 | Int_t iTPC = 1; | |
67 | Int_t iTRD = 1; | |
68 | Int_t iABSO = 1; | |
69 | Int_t iDIPO = 1; | |
70 | Int_t iHALL = 1; | |
71 | Int_t iFRAME = 1; | |
72 | Int_t iSHIL = 1; | |
73 | Int_t iPIPE = 1; | |
74 | ||
75 | //=================== Alice BODY parameters ============================= | |
76 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
77 | ||
78 | if (iMAG) { | |
79 | //=================== MAG parameters ============================ | |
80 | // --- Start with Magnet since detector layouts may be depending --- | |
81 | // --- on the selected Magnet dimensions --- | |
82 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
83 | } | |
84 | ||
85 | if (iABSO) { | |
86 | //=================== ABSO parameters ============================ | |
87 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); | |
88 | } | |
89 | ||
90 | if (iDIPO) { | |
91 | //=================== DIPO parameters ============================ | |
92 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
93 | } | |
94 | ||
95 | if (iHALL) { | |
96 | //=================== HALL parameters ============================ | |
97 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
98 | } | |
99 | ||
100 | if (iFRAME) { | |
101 | //=================== FRAME parameters ============================ | |
102 | AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame"); | |
103 | } | |
104 | ||
105 | if (iSHIL) { | |
106 | //=================== SHIL parameters ============================ | |
107 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); | |
108 | } | |
109 | ||
110 | if (iPIPE) { | |
111 | //=================== PIPE parameters ============================ | |
112 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); | |
113 | } | |
114 | ||
115 | if (iITS) { | |
116 | //=================== ITS parameters ============================ | |
117 | // | |
118 | // EUCLID is a flag to output (=1) both geometry and media to two ASCII files | |
119 | // (called by default ITSgeometry.euc and ITSgeometry.tme) in a format | |
120 | // understandable to the CAD system EUCLID. The default (=0) means that you | |
121 | // dont want to use this facility. | |
122 | // | |
123 | AliITS *ITS = new AliITSv5("ITS","normal ITS"); | |
124 | ITS->SetEUCLID(0); | |
125 | } | |
126 | ||
127 | if (iTPC) { | |
128 | //============================ TPC parameters ================================ | |
129 | // --- This allows the user to specify sectors for the SLOW (TPC geometry 2) | |
130 | // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper) | |
131 | // --- sectors are specified, any value other than that requires at least one | |
132 | // --- sector (lower or upper)to be specified! | |
133 | // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0) | |
134 | // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0) | |
135 | // --- SecLows - number of lower sectors specified (up to 6) | |
136 | // --- SecUps - number of upper sectors specified (up to 12) | |
137 | // --- Sens - sensitive strips for the Slow Simulator !!! | |
138 | // --- This does NOT work if all S or L-sectors are specified, i.e. | |
139 | // --- if SecAL or SecAU < 0 | |
140 | // | |
141 | // | |
142 | //----------------------------------------------------------------------------- | |
143 | ||
144 | gROOT->LoadMacro("SetTPCParam.C"); | |
145 | AliTPCParam *param = SetTPCParam(); | |
146 | AliTPC *TPC = new AliTPCv1("TPC","Default"); //v1 is default | |
147 | TPC->SetParam(param); // pass the parameter object to the TPC | |
148 | ||
149 | // set gas mixture | |
150 | TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.); | |
151 | TPC->SetSecAL(4); | |
152 | TPC->SetSecAU(4); | |
153 | TPC->SetSecLows(1, 2, 3, 19, 20, 21); | |
154 | TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1); | |
155 | TPC->SetSens(1); | |
156 | ||
157 | if (TPC->IsVersion()==1) param->Write(param->GetTitle()); | |
158 | ||
159 | } | |
160 | ||
161 | if (iTRD) { | |
162 | //=================== TRD parameters ============================ | |
163 | ||
164 | AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator"); | |
165 | TRD->SetSensChamber(2); | |
166 | TRD->SetSensSector(13); | |
167 | ||
168 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) | |
169 | TRD->SetGasMix(1); | |
170 | ||
171 | // Set to detailed display | |
172 | TRD->SetDisplayType(1); | |
173 | ||
174 | // Switch on TR | |
175 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
176 | ||
177 | } | |
178 | ||
179 | } |