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