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