]>
Commit | Line | Data |
---|---|---|
50837721 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
88cb7938 | 18 | ========================================================== |
19 | Please add to this README file all information concerning | |
20 | config files, simulation, digitalization, clusterization, | |
21 | reconstruction and macro analysis | |
22 | ||
6b1e4b22 | 23 | ========================================================== |
24 | How to check that your aliroot is working well | |
25 | ========================================================== | |
8c4c70f6 | 26 | There is a script file AlirootRun_MUONtest.sh which |
6b1e4b22 | 27 | allows for simulating, reconstructing and making the |
28 | invariant analysis of the generated Upsilon (1S). | |
29 | The used configuration file is Config.C in MUON | |
30 | directory. | |
8c4c70f6 | 31 | You have to type : |
32 | source $ALICE_ROOT/MUON/AlirootRun_MUONtest.sh | |
33 | The results of this test are saved in test_out/ directory | |
6b1e4b22 | 34 | |
88cb7938 | 35 | ========================================================== |
7985603c | 36 | How to run a MUON generation |
88cb7938 | 37 | ========================================================== |
38 | aliroot | |
fc1fafa5 | 39 | root [0] gAlice->Run(10,"$ALICE_ROOT/MUON/Config.C"); |
88cb7938 | 40 | |
41 | 1 single muon of 7 GeV/c in the MUON spectrometer | |
42 | acceptance will be simulated using geant3. | |
43 | Hit information will be store in the root file in the | |
44 | execution directory. | |
88cb7938 | 45 | If you want to change the option or to define a new directory |
46 | for hits, you have to do the following before: | |
47 | root [0] gAlice->SetConfigFunction("Config( \"/home/martinez/aliroot/work_NewIO/test/\" , \"box\" );"); | |
48 | ||
88cb7938 | 49 | ============================================================ |
50 | How to run MUONCheck macro | |
51 | ============================================================ | |
52 | To check the content of a root data file, the MUONCheck | |
53 | provides a ascii output on screen. | |
54 | ||
55 | To compile MUONCheck.C | |
2058bf30 | 56 | .includepath $ALICE_ROOT/STEER |
57 | .includepath $ALICE_ROOT/MUON | |
bf485fb9 | 58 | .includepath $ALICE_ROOT/MUON/mapping |
2058bf30 | 59 | .L $ALICE_ROOT/MUON/MUONCheck.C++ |
bf17dbfd | 60 | To Load |
61 | gSystem->Load("$ALICE_ROOT/MUON/MUONCheck_C.so") | |
2058bf30 | 62 | |
278a86d5 | 63 | To print Kine : (default file is galice.root ) |
7d6677d7 | 64 | MUONkine() or MUONkine(##,"galice.root") for the event number ## |
88cb7938 | 65 | |
66 | To print hits : (default file is galice.root if not MUONhits("toto.root""); ) | |
7d6677d7 | 67 | MUONhits() or MUONhits(##,"galice.root") for the event number ## |
88cb7938 | 68 | |
69 | To print digits : (default file is galice.root) | |
7d6677d7 | 70 | MUONdigits() or MUONdigits(##,"galice.root") for the event number ## |
88cb7938 | 71 | |
72 | To print rawcluster : (default file is galice.root) | |
7d6677d7 | 73 | MUONrecpoints() or MUONrecpoints(##,"galice.root") for the event number ## |
88cb7938 | 74 | |
75 | To print trigger : (default file is galice.root) | |
7d6677d7 | 76 | MUONrectrigger() or MUONrectrigger(##,"galice.root") for the event number ## |
2b32c661 | 77 | |
78 | .... | |
88cb7938 | 79 | |
02d8f072 | 80 | ============================================================ |
6570c14d | 81 | How to check the Geometry |
02d8f072 | 82 | ============================================================ |
fc1fafa5 | 83 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); |
02d8f072 | 84 | .L $ALICE/geant3/TGeant3/G3GUI.C |
85 | G3GUI() | |
86 | ||
6570c14d | 87 | ============================================================ |
88 | How to check the Geometry with the new Geometrical modeler | |
89 | ftp://root.cern.ch/root/doc/chapter16.pdf | |
90 | http://agenda.cern.ch/fullAgenda.php?ida=a05212 | |
91 | ============================================================ | |
92 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); | |
93 | gGeoManager->GetMasterVolume()->Draw(); | |
94 | ||
02d8f072 | 95 | |
b3ba6823 | 96 | ============================================================ |
97 | How to check the overlap with the new Geometrical modeler | |
98 | ftp://root.cern.ch/root/doc/chapter16.pdf | |
99 | http://agenda.cern.ch/fullAgenda.php?ida=a05212 | |
100 | ============================================================ | |
101 | gAlice->Init("$ALICE_ROOT/MUON/Config.C"); | |
102 | gGeoManager->CheckOverlaps(); | |
103 | gGeoManager->PrintOverlaps(); | |
104 | ||
7985603c | 105 | ============================================================ |
106 | How to run MUONdisplay | |
107 | ============================================================ | |
1eccde20 | 108 | First you need to perform a full simulation: |
7985603c | 109 | generation, digitalisation and clusterisation |
cd0f8cc8 | 110 | To run MUONdisplay with Root 5.04/00 you need to get a fix in |
111 | the gpad/src/TPad.cxx from Root CVS: | |
112 | cvs update -r 1.200 gpad/src/TPad.cxx | |
113 | and recompile root. | |
114 | ||
7985603c | 115 | .L $ALICE_ROOT/MUON/MUONdisplay.C |
116 | MUONdisplay(0,"galice.root") | |
117 | ||
02d8f072 | 118 | ============================================================ |
119 | Tracking parameters, cuts, energy loss and physics processes | |
120 | ============================================================ | |
121 | Tracking parameters in MUON are automatically defined by GEANT | |
122 | MUON takes the default values of CUTs and physics processes | |
123 | defined by the Config files, except for the gas mixture medium | |
124 | of the tracking chambers. The CUT's and physics processes of | |
125 | the gas mixture medium is then defined in the galice.cuts file | |
126 | in the data directory. In particular ILOSS parameter MUST be | |
127 | equal unity (1) in order simulate a realistic energy loss | |
128 | distribution (mean value and fluctuations) in the active gas. | |
a88eb0d0 | 129 | |
130 | ============================================================ | |
131 | Tracking of particle in the magnetic field | |
132 | ============================================================ | |
133 | GEANT has two ways for tracking charged particles in the | |
134 | magnetic field: HELIX et RKUTA. | |
135 | HELIX is faster and works well if the gradient of magnetic | |
136 | field is small. | |
137 | For MUON, HELIX is a not a good approximation and we must | |
138 | use RKUTA to get the optimal mass resolution of the | |
139 | spectrometer. The choice of HELIX or RKUTA is done in the | |
140 | config file when the magnetic field is defined: | |
141 | AliMagFMaps* field = new AliMagFMaps("Maps","Maps", TRACKING, FACTOR, MAXB, AliMagFMaps::k4kG); | |
142 | gAlice->SetField(field); | |
143 | TRACKING must be 1 for RKUTA and 2 for HELIX (the default value for aliroot is 2 (HELIX)) | |
144 | FACTOR allows you to set the magnetic field to 0, just putting FACTOR=0. Default value is 1. | |
145 | MAXB is the maximum magnetic field which is 10.T | |
2b32c661 | 146 | |
f4f795ed | 147 | =========================================================== |
148 | MUON cocktail for physics .............. | |
149 | =========================================================== | |
150 | There is a MUON cocktail generator of the muon sources in the | |
151 | EVGEN directory. This class derives from AliGenCocktail. | |
152 | In the init of this class I have filled the cocktail with | |
153 | the muon sources: J/Psi, Upsilon, Open Charm, Open Beauty, | |
154 | Pion, Kaons. The code needs only the production cross section | |
155 | at 4pi (for the moment this values are in the code since I | |
156 | prefere them do not be modified), and the code calculates the | |
157 | rate of particles in the acceptance, making the scaling based | |
158 | on the number of collisions for the hard probes and on the | |
159 | number of participants for soft sources: Pions and Kaons. | |
160 | ||
161 | In the Genereate of this class all entries in the cocktail | |
162 | are called and we define a "primordial trigger" with requires | |
163 | a minimum number of muons above a Pt cut in the required acceptance. | |
164 | In order to normalized to the real number of simulated events, | |
165 | there are 2 data members in the class fNsuceeded adn fNGenerate | |
166 | which tell us what is the biais source. | |
167 | ||
168 | Enclose an example to use this generator: | |
169 | AliGenMUONCocktail * gener = new AliGenMUONCocktail(); | |
170 | gener->SetPtRange(1.,100.); // Transverse momentum range | |
171 | gener->SetPhiRange(0.,360.); // Azimuthal angle range | |
172 | gener->SetYRange(-4.0,-2.4); | |
173 | gener->SetMuonPtCut(1.); | |
174 | gener->SetMuonThetaCut(171.,178.); | |
175 | gener->SetMuonMultiplicity(2); | |
35e21dec | 176 | gener->SetImpactParameterRange(0.,5.); // 10% most centra PbPb collisions |
f4f795ed | 177 | gener->SetVertexSmear(kPerTrack); |
178 | gener->SetOrigin(0,0,0); // Vertex position | |
179 | gener->SetSigma(0,0,0.0); // Sigma in (X,Y,Z) (cm) on IP position | |
180 | gener->Init(); | |
181 | ||
a2da7817 | 182 | ================================================================ |
69be760c | 183 | csh Script for the full reconstruction with raw data generator |
a2da7817 | 184 | ================================================================ |
185 | The rawdata generation and analysis is working with the new segmentation. | |
186 | So the config file must use the version "AliMUONFactoryV3" | |
187 | ||
188 | Generation | |
189 | The method AliSimulation::SetWriteRawData("MUON") enables on | |
190 | the muon rawdata generation | |
191 | aliroot -b << EOF | |
192 | AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C") | |
193 | MuonSim.SetWriteRawData("MUON") | |
194 | MuonSim.Run(10) | |
195 | .q | |
196 | EOF | |
197 | ||
198 | Reconstruction | |
199 | aliroot -b << EOF | |
200 | AliReconstruction MuonRec("galice.root"); | |
201 | MuonRec.SetInput("$YOUR_WORKING_DIRECTORY/"); Do not forget the slash at the end! | |
202 | MuonRec.SetRunVertexFinder(kFALSE); | |
203 | MuonRec.SetRunLocalReconstruction("MUON"); | |
204 | MuonRec.SetRunTracking(""); | |
205 | MuonRec.SetFillESD("MUON"); | |
8e0ae46c | 206 | MuonRec.SetOption("MUON", "VS"); // to use VS cluster finder |
207 | // MuonRec.SetOption("MUON", "VS Original"); // to run VS and original track finder | |
208 | // MuonRec.SetOption("MUON", "Combi"); // to run combined cluster / track finder | |
209 | MMuonRec.Run(); | |
a2da7817 | 210 | .q |
211 | EOF | |
212 | ||
a88eb0d0 | 213 | |
b8dc484b | 214 | |
215 | ============================================================ | |
216 | How to run MUONRecoCheck macro | |
217 | ============================================================ | |
218 | To check the muon reconstruction by comparing the reconstructed tracks | |
219 | with the reference tracks made of "AliTrackReference" for the hits and | |
220 | kinematic informations (TParticle) for the vertex. | |
221 | This macro can be used to check the track reconstruction e.g. efficiency, | |
222 | momentum resolution ... but also to make physics analysis whenever | |
223 | track identification is needed. | |
224 | ||
225 | To compile MUONRecoCheck.C | |
226 | .includepath $ALICE_ROOT/STEER | |
227 | .includepath $ALICE_ROOT/MUON | |
228 | .L $ALICE_ROOT/MUON/MUONRecoCheck.C+ | |
229 | ||
230 | // To run MUONRecoCheck | |
231 | MUONRecoCheck(nEvent,"galice.root"); // nEvent = nb of events | |
232 | ||
29fc2c86 | 233 | |
234 | ============================================================ | |
235 | How to run MUONTracker macro | |
236 | ============================================================ | |
237 | To make the track reconstruction directly from AliTrackReference hits | |
238 | which are recorded in TrackRefs.root during the simulation. | |
239 | It can be used to check the reconstruction without clusterization. | |
240 | ||
241 | To compile MUONTracker.C | |
242 | .includepath $ALICE_ROOT/STEER | |
243 | .includepath $ALICE_ROOT/MUON | |
244 | .L $ALICE_ROOT/MUON/MUONTracker.C+ | |
245 | ||
246 | // To run MUONTracker | |
247 | MUONTracker(iEventMin,iEventMax,"galice.root"); // iEventMin: first event | |
fc1fafa5 | 248 | |
249 | =========================================================== | |
250 | Macro MUONGenerateGeometryData.C | |
251 | =========================================================== | |
252 | ||
253 | Macro for generating the geometry data files: | |
65087afe | 254 | (transform.dat, svmap.dat). |
255 | - MUON/data/transform.dat file contains all the information | |
fc1fafa5 | 256 | about the transformation (traslation + rotation) needed for |
257 | the positionning of each detection element of the MUON | |
258 | spectrometer. | |
65087afe | 259 | - MUON/data/svmap.dat file contains all the information to link |
fc1fafa5 | 260 | each geant volume (it can be extended to other virtual MC) with |
261 | a detection element. The point here is that a given detection | |
262 | element, i.e. a slat chamber consists of many geant volumes. | |
263 | the correspondence is then defined in an input file. | |
65087afe | 264 | Each time there is a change in the definition of MC geometry, these |
fc1fafa5 | 265 | input files must be re-generated via the macro |
266 | MUONGenerateGeometryData.C | |
267 | ||
268 | To be run from aliroot: | |
269 | .x MUONGenerateGeometryData.C | |
270 | ||
271 | The generated files do not replace the existing ones | |
272 | but have different names (with extension ".out"). | |
65087afe | 273 | Replacement with new files has to be done manually. |
29fc2c86 | 274 | |
275 | ||
cd85a354 | 276 | ========================================================== |
277 | How to Merge events | |
278 | ========================================================== | |
279 | ||
280 | You can merge 2 types of simulated events. For example, | |
281 | you can simulate Hijing events, and then simulate muons | |
282 | merging both. | |
283 | ||
284 | Merging is done at the sdigits level, so Kinematics files | |
285 | of the merged events will just correspond to the | |
286 | Config.C simulated file (not to Config_HIJING.C). | |
287 | ||
288 | You must, first, do the Hijing simulation and store it | |
289 | in directory $HIJING_SIM. Note that for merging you | |
290 | won't need Kinematics files of the Hijing simulation... | |
291 | ||
292 | Hijing simulation | |
293 | ||
294 | aliroot -b << EOF | |
295 | AliSimulation HijingSim("$HIJING_SIM/Config_HIJING.C") | |
296 | HijingSim.Run(5) | |
297 | .q | |
298 | EOF | |
299 | ||
300 | ||
301 | Then you can do muon simulation and reconstruction | |
302 | merging both simulated events. In next example, we are | |
303 | merging 20 times each Hijing event in order to simulate | |
304 | 100 muons merged with 5 Hijing events. | |
305 | ||
306 | ||
307 | aliroot -b << EOF | |
308 | AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C") | |
309 | MuonSim.MergeWith("$HIJING_SIM/galice.root",20) //parameters are the Hijing simulation file and the number of times we use each Hijing event | |
310 | MuonSim.Run(100) // number of muon (Config.C) events | |
311 | .q | |
312 | EOF | |
313 | ||
314 | ||
315 | aliroot -b << EOF | |
316 | TPluginManager * pluginmanager = gROOT->GetPluginManager() | |
317 | pluginmanager->AddHandler("AliReconstructor","MUON","AliMUONReconstructor","MUON","AliMUONReconstructor()") | |
318 | AliReconstruction MuonRec("galice.root") | |
319 | MuonRec.SetRunTracking("") | |
320 | MuonRec.SetRunVertexFinder(kFALSE) | |
321 | MuonRec.SetRunLocalReconstruction("MUON") | |
322 | MuonRec.SetFillESD("MUON") | |
323 | MuonRec.Run() | |
324 | .q | |
325 | EOF | |
326 | ||
88cb7938 | 327 | =========================================================== |
328 | Still working .............. | |
329 | =========================================================== |