]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/README
Updated list of MUON libraries
[u/mrichter/AliRoot.git] / MUON / README
1 $Id$
2
3 ==========================================================
4 Please add  to this README file all information concerning 
5 config files, simulation, digitalization, clusterization, 
6 reconstruction and macro analysis
7
8 ==========================================================
9  How to check that your aliroot is working well
10 ==========================================================
11 There is a script file AlirootRun_MUONtest.sh which 
12 allows for simulating, reconstructing and making the
13 invariant analysis of the generated Upsilon (1S).
14 The used configuration file is Config.C in MUON 
15 directory.
16 You have to type :
17 source $ALICE_ROOT/MUON/AlirootRun_MUONtest.sh 
18 The results of this test are saved in test_out/ directory.
19 Please note that the CDB (Condition DataBase) is now always *required* 
20 to perform either simulation or reconstruction. For the moment, a version
21  of that CDB is stored in CVS, so you should have one already in MUON/Calib
22 subdirectories.
23
24 ==========================================================
25  How to check that your aliroot is working VERY well
26 ==========================================================
27 There is a script file AlirootRun_MUONlongtest.sh which
28 allows for simulating, reconstructing and making the
29 -+invariant analysis of the generated Upsilon (1S).
30 This script generates a large number of Upsilon (20k) 
31 in order to access differential quantities. 
32 The used configuration file is Config.C in MUON
33 directory.
34 One should really run this script to check if the MUON 
35 code can process a large number of events WITHOUT errors,
36 in particular before making important commits !!
37
38 You have to type :
39 $ALICE_ROOT/MUON/AlirootRun_MUONtestlong.sh
40 The results of this test are saved in testlong_out/ directory
41 and will be kept in CVS
42
43 (NOTE: the macros performing the calculations/plots MUONefficiency.C 
44 and MUONplotEfficiency.C are also able to handle J/Psi if 
45 Config.C is modified accordingly )
46
47 ==========================================================
48  How to run a MUON generation
49 ==========================================================
50 aliroot
51 root [0] gAlice->Run(10,"$ALICE_ROOT/MUON/Config.C");
52
53 1 single muon of 7 GeV/c in the MUON spectrometer 
54 acceptance will be simulated using geant3. 
55 Hit information will be store in the root file in the
56 execution directory.
57 If you want to change the option or to define a new directory
58 for hits, you have to do the following before:
59 root [0] gAlice->SetConfigFunction("Config( \"/home/martinez/aliroot/work_NewIO/test/\" , \"box\" );"); 
60
61 ============================================================
62  How to dump the content of Root data files 
63 ============================================================
64 To check the content of Root data files, the AliMUONData class
65 provides the functions to produce an ASCII output on the screen
66 which can be redirected on the file:
67
68 aliroot
69 root [0] AliMUONData data("galice.root");
70 root [1] data.DumpKine(5);       > dump.kine
71 root [2] data.DumpHits(5);       > dump.hits
72 root [3] data.DumpDigits(5);     > dump.digits
73 root [4] data.DumpSDigits(5);    > dump.sdigits
74 root [5] data.DumpRecPoints(5);  > dump.recpoints
75 root [6] data.DumpRecTrigger(5); > dump.rectrigger
76
77 If the event number in the function argument is not specified,
78 data are dumped for all events.
79
80
81 ============================================================
82  How to check the Geometry with the new Geometrical modeler
83  ftp://root.cern.ch/root/doc/chapter16.pdf
84  http://agenda.cern.ch/fullAgenda.php?ida=a05212
85 ============================================================
86 gAlice->Init("$ALICE_ROOT/MUON/Config.C");
87 gGeoManager->GetMasterVolume()->Draw();
88
89
90 ============================================================
91  How to check the overlap 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->CheckOverlaps();
97 gGeoManager->PrintOverlaps();
98
99 ============================================================
100  How to run MUONdisplay
101 ============================================================
102 First you need to perform a full simulation: 
103 generation, digitalisation and clusterisation
104 To run MUONdisplay with Root 5.04/00 you need to get a fix in
105 the gpad/src/TPad.cxx from Root CVS:
106  cvs update -r 1.200 gpad/src/TPad.cxx
107 and recompile root. 
108
109 .L $ALICE_ROOT/MUON/MUONdisplay.C
110 MUONdisplay(0,"galice.root")
111
112 ============================================================
113  Tracking parameters, cuts, energy loss and physics processes
114 ============================================================
115 Tracking parameters in MUON are automatically defined by GEANT
116 MUON takes the default values of CUTs  and physics processes
117 defined by the Config files, except for the gas mixture medium 
118 of the tracking chambers. The CUT's and physics processes of
119 the gas mixture medium  is then defined in the galice.cuts file
120 in the data directory. In particular ILOSS parameter MUST be
121 equal unity (1) in order simulate a realistic energy loss
122 distribution (mean value and fluctuations) in the active gas.
123
124 ============================================================
125  Tracking of particle in the magnetic field
126 ============================================================
127 GEANT has two ways for tracking charged particles in the 
128 magnetic field: HELIX et RKUTA.
129 HELIX is faster and works well if the gradient of magnetic 
130 field is small. 
131 For MUON, HELIX is a not a good approximation and we must 
132 use RKUTA to get the optimal mass resolution of the 
133 spectrometer. The choice of HELIX or RKUTA is done in the
134 config file when the magnetic field is defined:
135   AliMagFMaps* field = new AliMagFMaps("Maps","Maps", TRACKING, FACTOR, MAXB, AliMagFMaps::k5kG);
136   gAlice->SetField(field);
137 TRACKING must be 1 for RKUTA and 2 for HELIX (the default value for aliroot is 2 (HELIX))
138 FACTOR allows you to set the magnetic field to 0, just putting FACTOR=0. Default value is 1.
139 MAXB is the maximum magnetic field which is 10.T
140
141 ===========================================================
142  MUON cocktail for physics ..............
143 ===========================================================
144 There is a MUON cocktail generator of the muon sources in the
145 EVGEN directory. This class derives from AliGenCocktail.
146 In the init of this class I have filled the cocktail with 
147 the muon sources: J/Psi, Upsilon, Open Charm, Open Beauty, 
148 Pion, Kaons. The code needs only the production cross section 
149 at 4pi (for the moment this values are in the code since I 
150 prefere them do not be modified), and the code calculates the  
151 rate of particles in the acceptance, making the scaling based 
152 on the number of collisions for the hard probes and on the  
153 number of participants for soft sources: Pions and Kaons.
154
155 In the Genereate of this class all entries in the cocktail 
156 are called and we define a "primordial trigger" with requires 
157 a minimum number of muons above a Pt cut in the required acceptance.
158 In order to normalized to the real number of simulated events, 
159 there are 2 data members in the class fNsuceeded adn fNGenerate 
160 which tell us what is the biais source.
161
162 Enclose an example to use this generator:   
163 AliGenMUONCocktail * gener = new AliGenMUONCocktail();
164 gener->SetPtRange(1.,100.);       // Transverse momentum range  
165 gener->SetPhiRange(0.,360.);    // Azimuthal angle range 
166 gener->SetYRange(-4.0,-2.4);
167 gener->SetMuonPtCut(1.);
168 gener->SetMuonThetaCut(171.,178.);
169 gener->SetMuonMultiplicity(2);
170 gener->SetImpactParameterRange(0.,5.); // 10% most centra PbPb collisions
171 gener->SetVertexSmear(kPerTrack);  
172 gener->SetOrigin(0,0,0);        // Vertex position
173 gener->SetSigma(0,0,0.0);       // Sigma in (X,Y,Z) (cm) on IP position
174 gener->Init();
175  
176 ================================================================
177  csh Script for the full reconstruction with raw data generator
178 ================================================================
179 The rawdata generation and analysis is working with the new segmentation.
180 So the config file must use the version "AliMUONFactoryV3"
181
182 Generation
183 The method AliSimulation::SetWriteRawData("MUON") enables on 
184 the muon rawdata generation
185 aliroot -b << EOF  
186 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C")
187 MuonSim.SetMakeTrigger("MUON");
188 MuonSim.SetWriteRawData("MUON")
189 MuonSim.Run(10)
190 .q
191 EOF
192
193 Reconstruction
194 aliroot -b << EOF 
195 AliReconstruction MuonRec("galice.root");
196 MuonRec.SetInput("$YOUR_WORKING_DIRECTORY/");  Do not forget the slash at the end!
197 MuonRec.SetRunVertexFinder(kFALSE);
198 MuonRec.SetRunLocalReconstruction("MUON");
199 MuonRec.SetRunTracking("");
200 MuonRec.SetFillESD("MUON");
201 MuonRec.SetOption("MUON", "VS"); // to use VS cluster finder
202 // MuonRec.SetOption("MUON", "VS Original"); // to run VS and original track finder
203 // MuonRec.SetOption("MUON", "Combi"); // to run combined cluster / track finder
204 MMuonRec.Run();
205 .q
206 EOF
207
208 ============================================================
209  How to read & decode raw data 
210 ============================================================
211 These macros can read & decode DDL files, root and DATE files.
212 Nevertheless for the two latter, aliroot has to be compiled with DATE.
213
214 For tracker raw data
215 .includepath $ALICE_ROOT/STEER
216 .includepath $ALICE_ROOT/MUON
217 .includepath $ALICE_ROOT/RAW
218 .L $ALICE_ROOT/MUON/MUONRawStreamTracker.C+
219 MUONRawStreamTracker(maxEvent, firstDDL, lastDDL, rawFileName)
220
221 For trigger raw data
222 .includepath $ALICE_ROOT/STEER
223 .includepath $ALICE_ROOT/MUON
224 .includepath $ALICE_ROOT/RAW
225 .L $ALICE_ROOT/MUON/MUONRawStreamTrigger.C+ 
226 MUONRawStreamTrigger(maxEvent, firstDDL, lastDDL, rawFileName)
227
228 Default wise the macro read all DDL files from the current directory for 1000 events.
229 For root file rawFileName must end with .root, for date file rawFileName 
230 must be no extention. For DDL files you have to specified the directory 
231 where the raw0...n subdirectories are located:
232 MUONRawStreamTracker(maxEvent, "$YOUR_WORKING_DIRECTORY/"); //Do not forget the slash at the end!
233
234
235 ============================================================
236  How to run MUONRecoCheck macro
237 ============================================================
238
239 To check the muon reconstruction by comparing the reconstructed tracks
240 with the reference tracks made of "AliTrackReference" for the hits in chamber (0..9)
241 and kinematic informations (TreeK) for the vertex.
242 This macro can be used to check the track reconstruction e.g. efficiency,
243 momentum resolution ... but also to make physics analysis whenever
244 track identification is needed.   
245
246 To compile MUONRecoCheck.C
247 .includepath $ALICE_ROOT/STEER
248 .includepath $ALICE_ROOT/MUON
249 .L $ALICE_ROOT/MUON/MUONRecoCheck.C+
250
251 // To run MUONRecoCheck
252 MUONRecoCheck(nEvent,"geometry.root", "galice.root"); // nEvent = nb of events
253
254
255 ============================================================
256  How to run MUONTracker macro
257 ============================================================
258 To make the track reconstruction directly from AliTrackReference hits 
259 which are recorded in TrackRefs.root during the simulation.
260 It can be used to check the reconstruction without clusterization.      
261
262 To compile MUONTracker.C
263 .includepath $ALICE_ROOT/STEER
264 .includepath $ALICE_ROOT/MUON
265 .L $ALICE_ROOT/MUON/MUONTracker.C+
266
267 // To run MUONTracker
268 MUONTracker(iEventMin,iEventMax,"galice.root"); // iEventMin: first event
269
270 ===========================================================
271  Macro  MUONGenerateGeometryData.C
272 ===========================================================
273                                                 
274 Macro for generating the geometry data files
275
276 Geometry data files:
277 - MUON/data/volpath.dat file contains the volume paths 
278 for all alignable objects (modules & detection 
279 elements).
280 - MUON/data/transform.dat file contains the transformations
281 data (translation and rotation) for all alignable objects
282 (modules & detection elements)
283 - MUON/data/svmap.dat file contains all the information to link 
284 each geant volume (it can be extended to other virtual MC) with
285 a detection element. The point here is that a given detection
286 element, i.e. a slat chamber can consist of more geant volumes.
287 the correspondence is then defined in an input file.
288 Each time there is a change in the definition of MC geometry, these
289 input files must be re-generated via the macro  
290 MUONGenerateGeometryData.C
291
292 To be run from aliroot:
293 .x MUONGenerateGeometryData.C
294
295 The generated files do not replace the existing ones
296 but have different names (with extension ".out").
297 Replacement with new files has to be done manually.
298
299 ===========================================================
300  Macros to generate Mis-alignment data
301 ===========================================================
302                                                 
303 Macro for generating the geometry mis-alignment data: 
304 MakeMUONFullMisAlignment.C
305 MakeMUONResMisAlignment.C
306 MakeMUONZeroMisAlignment.C
307
308 To be run from aliroot:
309 .x MakeMUONFullMisAlignment.C etc.
310
311 If the environment variable TOCDB is not set to "kTRUE",
312 the misalignment data are generated in a local file:
313 (MUONFullMisalignment.root, etc.)
314
315 If the data are stored in CDB, the storage can be specified in 
316 the environment variable STORAGE. The misalignment data are then
317 generated in the CDB folder (defaults are ResMisAlignCDB and FullMisAlignCDB
318 in the working directory). Inside the local CDB the path for the
319 alignment data is (and must be) "MUON/Align/Data/".
320 Residual misalignment: Default is our current estimate of
321 misalignment after all our alignment procedure has been applied.
322 Full misalignment: Default is our current estimate of initial
323 misalignment.
324
325 ==========================================================
326 How to simulate events with misaligned geometry in local CDB
327 ==========================================================
328
329 If you want to use a misaligned geometry to simulate some
330 events you can use a local CDB. For this need to follow
331 the next steps:
332
333 - Generate misaligned data in local CDB.
334 You can use MUONGenerateGeometryData.C as described above in
335 the corresponding section. Let's assume you used the default
336 residual misalignment settings, then you have a local CDB in
337 your working directory called ResMisAlignCDB containing
338 misalignement data (ResMisAlignCDB/MUON/Align).
339
340 - Tell AliSimulation you want to use your local CDB for 
341 MUON/Align/Data
342 To do this you need to instantiate the AliCDBManager, set the
343 default storage and set the specific storage for MUON/Align/Data,
344 before instantiating AliSimulation (see for example the commented
345 lines AlirootRun_MUONtest.sh).
346
347 aliroot -b  >& testSim.out << EOF
348 AliCDBManager* man = AliCDBManager::Instance();
349 man->SetDefaultStorage("local://$ALICE_ROOT");
350 man->SetSpecificStorage("MUON/align/Data","local://ResMisAlignCDB");
351 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C");
352 MuonSim.SetWriteRawData("MUON");
353 MuonSim.Run(10);
354 .q
355 EOF
356
357 ==========================================================
358 How to check the alignment software
359 ==========================================================
360
361 The script AlirootRun_MUONtestAlign.sh  allows you to check the software for
362 the alignment with physics tracks. The script will:
363 - Generate a misaligned geometry in a local CDB (default FullMisAlignCDB)
364 - Simulate 1000 events using previously misaligned geometry
365 - Reconstruct the events using perfect geometry
366 - Run the alignment code over the above events using MUONAlignment.C
367
368 To run you need to type:
369 $ALICE_ROOT/MUON/AlirootRun_MUONtestAlign.sh
370
371 The results of the test are saved in test_align/ directory. The file measShifts.root
372 contains useful graphs for studying the alignment performances. A local CDB
373 containing the realigned geometry is also created (default is ReAlignCDB). The
374 file $ALICE_ROOT/MUON/data/transform2ReAlign.dat contains the
375 transformations describing the realigned geometry to be compared with the
376 used misaligned geometry $ALICE_ROOT/MUON/data/transform2.dat.
377
378 IMPORTANT NOTE: For a useful test of the alignment performances, the
379 order of 100 000 tracks is needed, it is then advisable to generate and
380 reconstruct enough events separately and run MUONAlignment.C providing a file list
381 afterwards.
382
383 ==========================================================
384  How to Merge events
385 ==========================================================
386
387 You can merge 2 types of simulated events. For example, 
388 you can simulate Hijing events, and then simulate muons
389 merging both.
390
391 Merging is done at the sdigits level, so Kinematics files 
392 of the merged events will just correspond to the 
393 Config.C simulated file (not to Config_HIJING.C).
394
395 You must, first, do the Hijing simulation and store it 
396 in directory $HIJING_SIM. Note that for merging you 
397 won't need Kinematics files of the Hijing simulation...
398
399 Hijing simulation
400
401 aliroot -b << EOF
402 AliSimulation HijingSim("$HIJING_SIM/Config_HIJING.C")
403 HijingSim.Run(5)
404 .q
405 EOF
406
407
408 Then you can do muon simulation and reconstruction
409 merging both simulated events. In next example, we are
410 merging 20 times each Hijing event in order to simulate 
411 100 muons merged with 5 Hijing events.
412
413
414 aliroot -b << EOF
415 AliSimulation MuonSim("$ALICE_ROOT/MUON/Config.C")
416 MuonSim.MergeWith("$HIJING_SIM/galice.root",20) //parameters are the Hijing simulation file and the number of times we use each Hijing event
417 MuonSim.Run(100) // number of muon (Config.C) events
418 .q
419 EOF
420
421
422 aliroot -b << EOF
423 TPluginManager * pluginmanager = gROOT->GetPluginManager()
424 pluginmanager->AddHandler("AliReconstructor","MUON","AliMUONReconstructor","MUON","AliMUONReconstructor()")
425 AliReconstruction  MuonRec("galice.root")
426 MuonRec.SetRunTracking("")
427 MuonRec.SetRunVertexFinder(kFALSE)
428 MuonRec.SetRunLocalReconstruction("MUON")
429 MuonRec.SetFillESD("MUON")
430 MuonRec.Run()
431 .q
432 EOF
433
434 ==========================================================
435  How to play with the CDB
436 ==========================================================
437
438 If you'd like to see how the CDB is created, please have a look at the 
439 MUONCDB.C (work in progress, though).
440
441 ==========================================================
442 ...on track numbering 
443 ==========================================================
444
445 All generated particles, including primary and secondary
446 particles are put on the stack. The secondary particles are kept
447 in the stack only if they gave a hit in *any* of the ALICE detectors
448 The number of all particles placed on the stack for a given event 
449 can be obtained with
450 Int_t nPart = AliStack::GetNtrack();
451 Looping from 0 to nPart via AliStack::Particle(ipart)
452 gives the particle listing as obtained from the particle generator (primaries) 
453 and Monte Carlo (secondaries).
454
455 The particle response in the detector, a hit, is registered
456 in the hits tree and the hits are filled with each primary track.
457 The total number of "tracks" (fills of the tree) can be obtained
458 with ntracks = AliMUONData::GetNtracks() and is usually smaller than "nPart".
459 Since particles can also deposit hits in other detectors than 
460 the MUON spectrometer, there will be many "tracks" (fills) in the hit-tree
461 without a hit in MUON.
462
463 The correspondence between "track ID" in the hits-tree ("itr") and the
464 particle ID for particles on the stack (i.e. generated particles) can be
465 obtained via:
466 for (Int_t itr = 0; itr < ntracks; itr++) {
467     MUONData->GetTrack(itr); //track "itr" of the hits-tree
468     Int_t nhitstot = MUONData->Hits()->GetEntriesFast();
469     AliMUONHit* mHit;    
470     for (Int_t ihit=0; ihit<nhitstot; ihit++) {
471        mHit = static_cast<AliMUONHit*>(MUONData->Hits()->At(ihit));
472        Int_t id = muonHit->Track(); //gives particle ID on stack
473        TParticle* particle = gAlice->Stack()->Particle(id);
474     }  
475 }
476
477 During the procedure to go from hits to digits, the hits 
478 are summed up such that more than one track can contribute
479 to a given digit. As a consequence the method
480 Int_t AliMUONDigit::Track(Int_t trackID)
481 takes an argument, where "trackID" runs from 0 to 
482 AliMUONDigit::Ntracks() to provide the reference to *all*
483 tracks that contributed to it. The returned track ID is the one 
484 referred to in the hit-tree. To know which is the generated particle
485 that deposited a given digit one has to follow the sequence of the kind:
486
487
488 mDigit = static_cast<AliMUONDigit*>(digits->At(idigit));
489 for (int tr = 0; tr < mDigit->Ntracks(); tr++){
490    Int_t hitTrackID = mDigit->Track(tr);
491    MUONData->GetTrack(hitTrackID);
492    mHit = static_cast<AliMUONHit*>(MUONData->Hits()->At(0));
493                                   //just take first hit of given track
494    Int_t numPart = mHit->Track(); //gives ID of particle on the stack
495    Int_t idTrack  = mHit->Particle(); //gives flavour code of the particle
496 }
497 In this example, for simplicity, only the first hit of a 
498 hit-track is used to check the particle ID.
499
500 ==========================================================
501 Macros for MC studies
502 ==========================================================
503
504 For MC studies the classes "AliMUONTrackLight" and "AliMUONPairLight" can be 
505 used in order to fill not only the single muon / dimuon's kinematics (charge, 
506 pT, rapidity, etc) at the generation AND reconstruction level, but also for 
507 "decoding" the Pythia output and for the storing of the single muon's history. 
508 This allows to tag if two muons of a given event come from a certain, well-defined 
509 process, such as J/psi, Upsilons, correlated open charm or open beauty or the 
510 low masses or if they are of uncorrelated origin. For open beauty/charm it also 
511 tags the creation process (pair creation, flavour excitation or gluon splitting). 
512 The classes also allow to tag feed-down or neutral B meson oscillation and 
513 has a method that checks whether the reconstructed track is a muon or not.
514
515 The macros ReadRecoCocktail.C, DecodeRecoCocktail.C and MergeMuonLight.C 
516 are examples how to use these two classes. DecodeRecoCocktail.C opens the 
517 generated files, loops over the events and fills an AliMUONTrackLight object 
518 for every reconstructed track for which the reference to its generated particle 
519 could be established, using the AliMUONRecoCheck class. 
520 It then takes the AliMUONTrackLight objects and forms - event by event - 
521 AliMUONPairLight objects, on a combinatorial basis. For a given event these 
522 objects are stored in respective TClonesArrays which are then stored in a tree. 
523 By default, the produced output file is called "MuonLight.root". 
524 This root file can then be taken by the macro "ReadRecoCocktail.C" that shows, 
525 on the example of the reconstructed mass and pT of the AliMUONPairLight object,
526 how to access the available information. For large statistics, in which many 
527 individual MuonLight.root files are produced, MergeMuonLight.C can be used 
528 to merge the files and produce one common output root file.
529
530 To read a generation/reconstrution from PDC06 preproduction, and write a file 
531 with a tree of AliMUONTrackLight / AliMUONPairLight :
532 go to the directory containing the generation/reconstruction. From there run
533 aliroot
534 .L DecodeRecoCocktail.C+
535 DecodeRecoCocktail();
536 .q
537
538 To read the file previously generated:
539 aliroot
540 .L ReadRecoCocktail.C+
541 ReadRecoCocktail();
542 .q
543
544 ===========================================================
545  How to reprocess trigger decision from already produced digits
546 ===========================================================
547 The MUONTrigger.C macro can be used to check the trigger algorithm w/o 
548 having to (re-)perform simulation and digitalization. 
549 It loads the digits, erase TreeR and store the current trigger output in 
550 TreeR.
551 The different trigger outputs can be compared by looking at the GLT branch 
552 of TreeD (filled during simulation) and the TC branch of TreeR (filled from 
553 a copy of TreeD during reconstruction or with this macro).
554 Note: rec points from tracking chamber will be lost.
555 Usage:
556 root [0] .L $ALICE_ROOT/MUON/MUONTrigger.C+
557 root [1] MUONTrigger()
558
559 ===========================================================
560  How to check integrated trigger efficiency
561 ===========================================================
562 The MUONTriggerEfficiency.C macro (included in the check scripts) calculates
563 the trigger efficiency for the 2 pt cuts. 
564 The output is stored in MUONTriggerEfficiency.out file.
565 Usage:
566 root [0] .L $ALICE_ROOT/MUON/MUONTriggerEfficiency.C+
567 root [1] MUONTriggerEfficiency()
568 For the CVS default version of the trigger LUT (i.e. lutAptLpt1Hpt1p7.root),
569 The reference for J/psi and Upsilon is as below
570  For 1000 Jpsi events with:
571     AliGenParam *gener = new AliGenParam(1, AliGenMUONlib::kJpsi);
572     gener->SetMomentumRange(0,999);
573     gener->SetPtRange(0,100.);
574     gener->SetPhiRange(0., 360.);
575     gener->SetCutOnChild(1);
576     gener->SetChildPhiRange(0.,360.);
577     gener->SetChildThetaRange(171.0,178.0);
578     gener->SetOrigin(0,0,0);          
579     gener->SetForceDecay(kDiMuon);
580     gener->SetTrackingFlag(1);
581  the output should be 
582   Efficiency Lpt cut = 0.7362 +/- 0.0391
583   Efficiency Hpt cut = 0.2662 +/- 0.0201
584  Similarly, for 1000 Upsilon events, the output should be
585   Efficiency Lpt cut = 0.9806 +/- 0.0457
586   Efficiency Hpt cut = 0.9537 +/- 0.0448
587
588 ===========================================================
589  How to check single muon trigger efficiency versus pt
590 ===========================================================
591 The MUONTriggerEfficiencyPt.C macro produces trigger single muon efficiency 
592 versus pt plots for the 2 pt cuts. 
593 Results are compared to the reference (red curves).   
594 To be used with (at least) 10000 events as follows
595    AliGenBox * gener = new AliGenBox(1);
596    gener->SetPtRange(0.,10.);
597    gener->SetPhiRange(0., 360.);         
598    gener->SetThetaRange(171.000,178.001);
599    gener->SetPart(13);           // or -13
600    gener->SetOrigin(0.,0., 0.);  
601    gener->SetSigma(0.0, 0.0, 0.0);     
602 Outputs are stored in MUONTriggerEfficiencyPt.gif/eps/out files
603 Important note: this macro works with one (real) muon track per event only
604 Usage:
605 root [0] .L $ALICE_ROOT/MUON/MUONTriggerEfficiencyPt.C+
606 root [1] MUONTriggerEfficiencyPt()
607
608 ===========================================================
609  How to process invariant mass spectra for J/psi or Upsilon
610 ===========================================================
611 The macro MUONmassPlot_ESD.C reads back the MUON ESD informations and compute 
612 the invariant mass spectra and corresponding uncorelated background. 
613 Moreover gives the number of event in the resonance peak and the number of triggers.
614 Usage:
615 root [0] .L $ALICE_ROOT/MUON/MUONmassPlot_ESD.C+
616 root [1] MUONmassPlot_ESD(ExtrapToVertex, 
617                         geoFilenam, filename
618                         FirstEvent, LastEvent, 
619                         esdFileName,
620                         ResType, Chi2Cut,
621                         PtCutMin, PtCutMax,
622                         massMin, massMax)
623
624 with:
625 ExtrapToVertex (default -1)
626       <0: no extrapolation;
627       =0: extrapolation to (0,0,0);
628       >0: extrapolation to ESDVertex if available, else to (0,0,0)
629 geoFilename (default "geometry.root") geometry file name needed to extrap to vertex
630 filename    (default "galice.root") galice root file name
631 FirstEvent  (default 0)
632 LastEvent   (default 10000)
633 esdFileName (default "AliESDs.root") esd root file name
634 ResType     (default 553):   553 for Upsilon, anything else for J/Psi
635 Chi2Cut     (default 100):   keep only tracks with chi2 per d.o.f. < Chi2Cut
636 PtCutMin    (default 1):     keep only tracks with transverse momentum > PtCutMin
637 PtCutMax    (default 10000): keep only tracks with transverse momentum < PtCutMax
638 massMin     (default 9.17 for Upsilon) keep only invariant masses with 
639 massMax     (default 9.77 for Upsilon) massMin < mass < massMax
640
641 ===========================================================
642  Still working ..............
643 ===========================================================