possibility to cut on the pt of candidate (Rossella)
[u/mrichter/AliRoot.git] / PWG3 / READMEmuon
CommitLineData
267d502e 1===================================================
643fea24 2 Code to include the muon information in the
3 creation of the standard AOD from the ESD
4 Roberta ARNALDI, Enrico SCOMPARIN Torino
28d9f4b3 5---------------------------------------------------------------
6
643fea24 7The following filter is used in the official analysis train, in order to copy the muon information from the ESD to the standard AOD.
8
91) AliAnalysisTaskESDMuonFilter.h --> analysis task to copy the muon information from the ESD to the standard AOD
102) AliAnalysisTaskESDMuonFilter.cxx --> analysis task to copy the muon information from the ESD to the standard AOD
11
af2b48fb 12In order to test the analysis train from the ESD to the Standard AOD production, the following macro is provided:
643fea24 13
af2b48fb 14 AnalysisTrainFromESDToAOD.C
15
16Input file: ESD
17Output files: standard AOD (+AOD tags)
18
19Two wagons are attached to the analysis train:
20 1) $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C
21 2) $ALICE_ROOT/PWG3/muon/AddTaskTagCreation.C
22
23Several flags can be activated:
24 1) iESDfilter: to activate, using AddTaskESDFilter.C, the copy of the ESD information into the AOD.
25 In AddTaskESDFilter.C there is the possibility to apply cuts on the tracks and muon tracks in order
26 to reject them before filling the AOD.
27 2) iAODAddMCBranch: to activate the inclusion of the MC branch (containing Kinematics info) into a branch of the AOD
28 3) iAODTagCreation: to activate, using AddTaskTagCreation.C, the AOD tag creation
29
30Runninng options tested:
31 1) GRID (with/without AliEn plugin)
32 2) LOCAL
33
34If the AliEn plugin is required, the macro
35 CreateAlienHandler_FromESDToAOD.C
36can be used, in order to configure the jdl.
37
38AnalysisTrainFromESDToAOD.C is an updated version of the macro AnalysisTrainMuonLocal.C
39(input file: ESD, output files standard AOD and the AOD tag file)
40The main differences are related to implementations to be compliant with the analysis framework,
41possibility to run on the grid with/without the Alien Plugin and possibility of adding the MC truth in a branch of the AOD.
42
43The macro ReadAOD_MCBranch.C is an example on how to access MC information stored in the AOD.
643fea24 44
45===================================================
46 Creation of the MUON-AOD from the standard AOD
47 Roberta ARNALDI, Enrico SCOMPARIN Torino
48---------------------------------------------------------------
49
50Code to produce a muon-AOD, i.e. a replica of the standard AOD containing only events where
51at least one muon in the dimuon spectrometer is present
52
531) AnalysisTrainFromStandardToMuonAODLocal.C --> macro to produce the MUON-AOD (it runs locally)
542) AliAnalysisTaskFromStandardToMuonAOD.h --> analysis task to replicate the AOD content for interesting events
553) AliAnalysisTaskFromStandardToMuonAOD.cxx --> analysis task to replicate the AOD content for interesting events
56
57- The input files are the standard AOD and the AOD tag file.
58 The AOD tag file can be created in the previous step from ESD to Standard AOD, using AnalysisTrainMuonLocal.C, or it can be
59 produced on the fly with this macro.
60- Events containing at least one muon in the muon spectrometer can be selected using the AOD tag files.
61- The contents of the MUON-AOD can be defined by the user in the AnalysisTrainFromStandardToMuonAODLocal.C
62 macro with some settings as
63 SetNeedsTracksBranchReplication(), SetNeedsVerticesBranchReplication()
64 (defined in STEER/AliAODHandler.h)...
28d9f4b3 65
267d502e 66===================================================
67 Calculation of the LUT
68 Bogdan VULPESCU, Clermont
28d9f4b3 69---------------------------------------------------------------
39280342 70Analysis task for the calculation of the Look-up-Tables used by the MUON
71trigger algorithm
72
73Purpose: extract from ESD files track information (ESD track parameters and
74matched local trigger decisions) and store in TNtuple; the ntuple is used
75for building 2D histograms (transverse momentum / local deviation) which
76afterwards enter calculation/optimization procedures for the selection of
77LUT cuts for individual local boards and several transverse momenta.
78
79This version is prepared for the use on the grid, see the JDL file.
80
81Files:
82
83AliAnalysisTaskLUT.cxx - source files of the analysis task
84AliAnalysisTaskLUT.h
85
86rootlutnt.sh - executable (script)
87
88runCreateLUTNT.C - macro for setting the libraries environment and
89 execution of the main macro
90
91analysisTaskLUTNT.C - main macro for the analysis
92
93createLUTNT.jdl - JDL file
39280342 94
267d502e 95===================================================
96 Analysis task for the calculation of the trigger chamber efficiency.
97 Diego STOCCO, Torino
98----------------------------------------------------------------
99
100Purpose: produce histograms for the trigger chamber efficiency determination
101from MUON track info. The task works either with input ESD or AOD (default is ESD).
102
103This version works either locally or on grid.
104
105Files:
106AliAnalysisTaskTrigChEff.cxx -source files of the analysis task
107AliAnalysisTaskTrigChEff.h
108
109AnalysisTrigChEff.C - main macro for analysis
110
111Test analysis:
112- Preliminary: copy the following packages in the current working directory
113 - STEERBase.par
114 - ESD.par
115 - AOD.par
116 - ANALYSIS.par
117 - ANALYSISalice.par
76b2028b 118 - PWG3muon.par
267d502e 119If the packages are not present, create them:
120cd $ALICE_ROOT
121make STEERBase.par
122make ESD.par
123...
124
125 - Local test:
126 root
127 .x AnalysisTrigChEff.C(kMlocal)
128
129 by default the macro searches for ESD in $ALICE_ROOT/MUON/test_out.100
130 The directory is generated by MUON/AlirootRun_MUONtest.sh (see README in MUON).
131
132 - Grid test (interactive):
133 root
134 .x AnalysisTrigChEff.C(kMlocalGrid)
135
136 by default the macro searches for a wn.xml in the current directory, with the list
137 of grid files to analyse.
138
139- Display results:
140The macro creates the file MUON.TriggerEfficiencyMap.root
141aliroot
142AliMUONTriggerEfficiencyCells effCells("MUON.TriggerEfficiencyMap.root")
143effCells.DisplayEfficiency()
fe9005e3 144
145===================================================
146 Analysis task for checking the consistency of ESD and AOD filling and contents.
147 Mercedes LOPEZ NORIEGA, Orsay
148----------------------------------------------------------------
149
150Purpose:check the consistency between the ESDs and the AOD.
151
152The task works locally and on the grid, there are two macros depending where
153you want to run
154
155Files:
156AliAnalysisTaskAODvsESD.cxx -source files of the analysis task
157AliAnalysisTaskAODvsESD.h
158
159AnalysisTrainMuonComp.C - macro for analysis on the grid
160AnalysisTrainMuonCompLocal.C - macro for local analysis
161
162To run the check:
1631. Copy the following packages in the current working directory
164 - STEERBase.par
165 - ESD.par
166 - AOD.par
167 - ANALYSIS.par
168 - ANALYSISalice.par
169 - PWG3muon.par
170
1712. To run locally:
172 root
173 .x AnalysisTrainMuonCompLocal.C
174
175 by default the macro searches for a tag file of ESDs in the
176 working directory
177
1783. To run on the grid:
179 root
180 .x AnalysisTrainMuonComp.C
181
182 by default the macro searches for a wn.xml in the current directory, with the list
183 of grid files to analyse.
184
1854. Display results:
186The macro creates the file AODvsESDoutput.root
187It contains an Ntuple from the ESDs and Ntuple from the AODs and an inv. mass histo
188for each case
509204ee 189
190===================================================
191 Analysis task for extracting variables from the ESD for single muons
192 Nicole BASTID and Bogdan VULPESCU, Clermont-Ferrand
193----------------------------------------------------------------
194
195Purpose: the output is an ntuple with single muon tracks selected variables; a
196histogram collects the number of events in different trigger classes.
197
198Files:
199
200AliAnalysisTaskSingleMuESD.cxx - source files of the analysis task
201AliAnalysisTaskSingleMuESD.h
202
203RunSingleMuonAnalysisFromESD.C - macro to run the analysis (with xml input
204 collection and grid connection)
205
206
207How to run:
208
2091. Copy the following packages in the current working directory
210 - STEERBase.par
211 - ESD.par
212 - AOD.par
213 - ANALYSIS.par
214 - ANALYSISalice.par
215 - PWG3muon.par
216
2172. Run root
218
219gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunAnalysis.C");
220setupPar("STEERBase");
221setupPar("ESD");
222setupPar("AOD");
223setupPar("ANALYSIS");
224setupPar("ANALYSISalice");
225setupPar("PWG3muon");
226
2273. To analyse grid files, provide an XML collection file wn.xml and run
228
229gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
230RunSingleMuonAnalysisFromESD()
231
2324. To analyse local files, modify RunSingleMuonAnalysisFromESD.C
233
234 } else {
235 chain->Add("/path_1_to/AliESDs.root");
236 chain->Add("/path_2_to/AliESDs.root");
237 chain->Add("/path_3_to/AliESDs.root");
238 }
239
240and run (notice the "1" argument)
241
242gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
243RunSingleMuonAnalysisFromESD(1)
244
2455. Check the results in SingleMuESD.root
246
247Note: for some older runs (PDC08/LHC08t for instance) it is necessary to force
248the values of the trigger mask, because the function
249
250GetFiredTriggerClasses()
251
252from AliESDEvent does not return the proper names of the muon trigger classes.
253So one has to un-comment the line
254
255task->SetTriggerType("MUON");
256
257in the macro RunSingleMuonAnalysisFromESD.C, if the simulation was produced
258with SetMakeTrigger("MUON")
259
260This bug is fixed starting with the TRUNK from 14.11.2008
261
587dd11c 262===================================================
263 Analysis task for RecoCheck analysis of ESD and Kinematics
264 Bogdan VULPESCU, Clermont-Ferrand
265----------------------------------------------------------------
266
267Purpose: the class MUON/AliMUONRecoCheck is used to extract single muon and
268muon pair information in objects of type AliMUONTrackLight and
269AliMUONPairLight. The output file is RecoCheck.root and contains a tree with
270arrays of both objects.
271
272Files:
273
274AliAnalysisTaskRecoCheck.cxx - source files of the analysis task
275AliAnalysisTaskRecoCheck.h
276
277RunRecoCheck.C - macro to run the analysis (with xml input
278 collection and grid connection)
279
280
281How to run:
282
2831. Run aliroot (not root!, the class is in the muondep library)
284
2852. gROOT->LoadMacro("$ALICE_ROOT/PWG3/muondep/RunRecoCheck.C");
286
2873. RunRecoCheck()
288
2894. To analyse local files, modify RunRecoCheck.C
290
291 } else {
292 chain->Add("/path_1_to/AliESDs.root");
293 chain->Add("/path_2_to/AliESDs.root");
294 chain->Add("/path_3_to/AliESDs.root");
295 }
296
297and run (notice the "1" argument)
298
299RunRecoCheck(1)
300
3015. Check results in RecoCheck.root
509204ee 302
587dd11c 303Note: the magnetic field is needed in order to initialize the tracker. The
304corresponding field map is selected by looking at the value of the L3 current
305stored in the GRP database which was used for the reconstruction.
509204ee 306
4c904d93 307===================================================
308 Analysis task to correlate ESD tracks to their corresponding Monte Carlo data.
309 Artur Szostak, INFN
310---------------------------------------------------------------
311
312The AliAnalysisTaskLinkToMC analysis task is used to correlate reconstructed tracks
313found in ESDs to their corresponding MC track information found in the kinematics
314tree. The the same algorithm is used as in MUON/AliMUONRecoCheck but without any
315dependancy on MUON library code. This analysis task will copy out ESD MUON track
316information into the AOD like AliAnalysisTaskESDMuonFilter does, however the MC
317track label in the AOD track class is filled with the label of the corresponding
318MC track. Thus, subsequent analysis tasks can easily find the correct MC track from
319the label.
320
321Files:
322
323AliAnalysisTaskLinkToMC.h - The header file for the analysis task code.
324AliAnalysisTaskLinkToMC.cxx - The source file for the analysis task code.
325
326RunLinkToMCAnalysisExample.C - An example macro for running the analysis task in
327 local mode over simulated data. The macro takes one argument which is the name
328 of the ESD file to process. By default it uses AliESDs.root in the current working
329 directory.
330
331PlotEfficiency.C - This macro can be used to quickly check the control histograms
332 which are generated by RunLinkToMCAnalysisExample.C by default. The macro simply
333 calculates the reconstruction efficiency from the found and findable track histograms
334 that are filled by the analysis task.
335
336How to run:
337
338To run the analysis task in local mode with the example macro simply run the command
339 $ root RunLinkToMCAnalysisExample.C\(\"AliESDs.root\"\)
340where AliESDs.root can be replaced with the full path and name of the appropriate ESD
341file you wish to process. This command can also be run via AliRoot.
342
94af0645 343
344===================================================
345 Analysis task to create mixed AOD events, containing a
346 pair of muon tracks coming from two different real AOD events.
347 Alessandro De Falco and Antonio Uras, INFN Cagliari
348---------------------------------------------------------------
349
350IMPORTANT: The AliAnalysisTaskCreateMixedDimuons analysis task needs
351 the class AliEventPoolMuon.
352
353In class AliEventPoolMuon the definition of the pools to be used
354in the mixing is implemented. Up to now, it is possible to create
355pools diving events by:
356 - total multiplicity
357 - forward muons multiplicity
358 - z-position of the primary vertex
359
360In class AliAnalysisTaskCreateMixedDimuons the mixing is performed between
361each pair of events which can be built up picking events from the internal
362buffer: if the buffer contains n events, n(n-1)/2 mixed events are created
363within the same call of the task.
364
365Some more details:
366 - the mixing task asks a completely fresh buffer for each call
367 - the mixing task creates output events from scratch
368 - output events are filled with two muon tracks (picked randomly
369 from the events being mixed and a vertex having its z-position in the middle
370 of the z-vertex bin defining the pool. Due to technical reasons,
371 the tracks are NOT connected with the vertex
372 - standard AOD are created as output, nearly completely empty
373
374Files:
375
376AliAnalysisTaskCreateMixedDimuons.(h,cxx) - The analysis task class.
377AliEventPoolMuon.(h,cxx) - The class implementing the pool.
378
379AnalysisTrainCreateMixedDimuons.C - An example macro enabling connections between
380the pool manager, the input event handler, the input and output containers,
381via the Analysis Manager. Input arguments: - directory containing AOD tag file
382 - name of the output file
383 - number of events to be loaded
384 in the internal buffer
385
386How to run:
387
388To run the analysis task in local mode with the example macro, simply run
389the AnalysisTrainCreateMixedDimuons.C macro (without compiling it) with
390appropriate arguments.
391
4292b3b6 392===============================================================================
393Analysis Task for (di)muons continuum from heavy flavors
394X. M. Zhang, Clermont-Ferrand and Wuhan
395===============================================================================
3961) AliAnalysisTaskSEMuonsHF.h (.cxx) -- analysis class for (di)muons continuum
397 from heavy flavors.
3982) AliMuonsHFHeader.h (.cxx) -- class used to collect and save the information
399 at event level (eg. vertex position and trigger mask).
4003) AliAODMuonTrack.h (.cxx) -- class used to extract and save information of
401 reconstracted muon tracks (from both AOD and ESD), selection the muon with
402 the set cuts.
4034) AliAODMuonPair.h (.cxx) -- class used to extract and save information of
404 muon pairs (both for like-sign and unlike-sign), the corresponding two
405 single muon tracks are linked by TRef.
4065) AliMCMuonTrack.h (.cxx) -- inherit from AliAODMuonTrack, class used to
407 extract and save the Monte-Carlo information of reconstracted muon tracks,
408 the generated kinematics and the history of the muon are filled in this
409 class.
4106) AliMCMuonPair.h (.cxx) -- inherit from AliAODMuonPair, class used to
411 extract and save the information of muon pair at Monte-Carlo level, the
412 relation between two muons can be obtain from this class.
413
414- the input of AOD and ESD are detected automatically.
415- three analysis modes:
416 mode0, analyze both single muon and dimuon
417 mode1, analyze only the single muon
418 mode2, analyze only the dimuon
419- two kinds of outputs:
420 - histogram, histograms for single muon and/or dimuon will be outputed
421 according to different running mode. Events with unreconstructed vertex
422 are discarded, cuts are set for (di)muons selection.
423 - tree, if flag for output tree switch on, tree with braches of event header
424 and/or single muon and/or dimuon will be gotten according to different
425 running mode. All events and all recontructed tracks are used to fill the
426 tree.
427- running with and without MC information:
428 - without MC information, AliAODMuonTrack and/or AliAODMuonPair are/is used
429 and filled in the tree (if switch on), output the histograms just with
430 reconstructed information.
431 - with MC information, AliMCMuonTrack and/or AliMCMuonPair are/is used and
432 filled in the tree (if switch on), additional histograms for different
433 single muon and/or dimuon source are outputed.
434 - at present the methods used to get the MC information from ESD is not
435 implemented for they depend on the MUON module. Although, we still keep
436 these codes in AliMCMuonTrack for private running, more details can be
437 found in AliMCMuonTrack.cxx
438- all the flags and cuts are set in AddTaskMuonsHF.C
439 Int_t mode = 0; \\ = 0 analyze both single muon and dimuon
440 \\ = 1 analyze the single muon only
441 \\ = 2 analyze the dimuon only
442 Bool_t isMC = kTRUE; \\ get MC information
443 Bool_t isTree = kFALSE; \\ flag for tree output
444 AliAnalysisTaskSEMuonsHF *taskMuonsHF = AddTaskMuonsHF(mode, isMC, isTree);
7cbb1928 445
446
447===================================================
448 New task to mesure the spectrometer resolution
449 Philippe Pillot, Subatech
450---------------------------------------------------------------
4511) Compute the cluster resolution per chamber, half chamber and detection element by using 2 methods:
452 a) combining the cluster-track residuals obtained with and without using the cluster to reconstruct the track
453 b) subtracting the track resolution component to the cluster-track residual obtained without using the cluster to reconstruct the track
454
455- In principle, this task should be run iteratively, using the chamber resolution computed in the step n-1 to weight the clusters when refitting the tracks in the step n.
456--> The macro RunMuonResolution.C gives an example on how to do it locally or in PROOF.
457Neverthless, the convergence is quite fast so it can also be run only once provided that the starting chamber resolutions are closed to the real one (e.g. to monitor the variation of the resolution with time).
458
459- If not specified by user when initializing the task, the starting chamber resolution is taken from the recoParam. In addition, the task load several data from the OCDB (mapping, magnetic field...) so the default storage must be properly set.
460
4612) Return the momentum, transverse momentum and angular resolutions of the reconstructed tracks at first cluster and at vertex (i.e. including absorber effects). These resolutions are computed by using the chamber resolutions given as input (i.e. the ones from the step n-1 or the starting ones).
462
4633) Finally, it is possible to re-align the clusters before computing the resolution, by providing the OCDB path to the old and new alignment data (see comments in the code for more details).