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