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