1 ===================================================
2 Code to include the muon information in the
3 creation of the standard AOD from the ESD
4 Roberta ARNALDI, Enrico SCOMPARIN Torino
5 ---------------------------------------------------------------
7 The following filter is used in the official analysis train, in order to copy the muon information from the ESD to the standard AOD.
9 1) AliAnalysisTaskESDMuonFilter.h --> analysis task to copy the muon information from the ESD to the standard AOD
10 2) AliAnalysisTaskESDMuonFilter.cxx --> analysis task to copy the muon information from the ESD to the standard AOD
12 In order to test the analysis train from the ESD to the Standard AOD production, the following macro is provided:
14 AnalysisTrainFromESDToAOD.C
17 Output files: standard AOD (+AOD tags)
19 Two wagons are attached to the analysis train:
20 1) $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C
21 2) $ALICE_ROOT/PWG3/muon/AddTaskTagCreation.C
23 Several 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
30 Runninng options tested:
31 1) GRID (with/without AliEn plugin)
34 If the AliEn plugin is required, the macro
35 CreateAlienHandler_FromESDToAOD.C
36 can be used, in order to configure the jdl.
38 AnalysisTrainFromESDToAOD.C is an updated version of the macro AnalysisTrainMuonLocal.C
39 (input file: ESD, output files standard AOD and the AOD tag file)
40 The main differences are related to implementations to be compliant with the analysis framework,
41 possibility to run on the grid with/without the Alien Plugin and possibility of adding the MC truth in a branch of the AOD.
43 The macro ReadAOD_MCBranch.C is an example on how to access MC information stored in the AOD.
45 ===================================================
46 Creation of the MUON-AOD from the standard AOD
47 Roberta ARNALDI, Enrico SCOMPARIN Torino
48 ---------------------------------------------------------------
50 Code to produce a muon-AOD, i.e. a replica of the standard AOD containing only events where
51 at least one muon in the dimuon spectrometer is present
53 1) AnalysisTrainFromStandardToMuonAODLocal.C --> macro to produce the MUON-AOD (it runs locally)
54 2) AliAnalysisTaskFromStandardToMuonAOD.h --> analysis task to replicate the AOD content for interesting events
55 3) AliAnalysisTaskFromStandardToMuonAOD.cxx --> analysis task to replicate the AOD content for interesting events
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)...
66 ===================================================
67 Calculation of the LUT
68 Bogdan VULPESCU, Clermont
69 ---------------------------------------------------------------
70 Analysis task for the calculation of the Look-up-Tables used by the MUON
73 Purpose: extract from ESD files track information (ESD track parameters and
74 matched local trigger decisions) and store in TNtuple; the ntuple is used
75 for building 2D histograms (transverse momentum / local deviation) which
76 afterwards enter calculation/optimization procedures for the selection of
77 LUT cuts for individual local boards and several transverse momenta.
79 This version is prepared for the use on the grid, see the JDL file.
83 AliAnalysisTaskLUT.cxx - source files of the analysis task
86 rootlutnt.sh - executable (script)
88 runCreateLUTNT.C - macro for setting the libraries environment and
89 execution of the main macro
91 analysisTaskLUTNT.C - main macro for the analysis
93 createLUTNT.jdl - JDL file
95 ===================================================
96 Analysis task for the calculation of the trigger chamber efficiency.
98 ----------------------------------------------------------------
100 Purpose: produce histograms for the trigger chamber efficiency determination
101 from MUON track info. The task works either with input ESD or AOD (default is ESD).
103 This version works either locally or on grid.
106 AliAnalysisTaskTrigChEff.cxx -source files of the analysis task
107 AliAnalysisTaskTrigChEff.h
109 AnalysisTrigChEff.C - main macro for analysis
112 - Preliminary: copy the following packages in the current working directory
119 If the packages are not present, create them:
127 .x AnalysisTrigChEff.C(kMlocal)
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).
132 - Grid test (interactive):
134 .x AnalysisTrigChEff.C(kMlocalGrid)
136 by default the macro searches for a wn.xml in the current directory, with the list
137 of grid files to analyse.
140 The macro creates the file MUON.TriggerEfficiencyMap.root
142 AliMUONTriggerEfficiencyCells effCells("MUON.TriggerEfficiencyMap.root")
143 effCells.DisplayEfficiency()
145 ===================================================
146 Analysis task for checking the consistency of ESD and AOD filling and contents.
147 Mercedes LOPEZ NORIEGA, Orsay
148 ----------------------------------------------------------------
150 Purpose:check the consistency between the ESDs and the AOD.
152 The task works locally and on the grid, there are two macros depending where
156 AliAnalysisTaskAODvsESD.cxx -source files of the analysis task
157 AliAnalysisTaskAODvsESD.h
159 AnalysisTrainMuonComp.C - macro for analysis on the grid
160 AnalysisTrainMuonCompLocal.C - macro for local analysis
163 1. Copy the following packages in the current working directory
173 .x AnalysisTrainMuonCompLocal.C
175 by default the macro searches for a tag file of ESDs in the
178 3. To run on the grid:
180 .x AnalysisTrainMuonComp.C
182 by default the macro searches for a wn.xml in the current directory, with the list
183 of grid files to analyse.
186 The macro creates the file AODvsESDoutput.root
187 It contains an Ntuple from the ESDs and Ntuple from the AODs and an inv. mass histo
190 ===================================================
191 Analysis task for extracting variables from the ESD for single muons
192 Nicole BASTID and Bogdan VULPESCU, Clermont-Ferrand
193 ----------------------------------------------------------------
195 Purpose: the output is an ntuple with single muon tracks selected variables; a
196 histogram collects the number of events in different trigger classes.
200 AliAnalysisTaskSingleMuESD.cxx - source files of the analysis task
201 AliAnalysisTaskSingleMuESD.h
203 RunSingleMuonAnalysisFromESD.C - macro to run the analysis (with xml input
204 collection and grid connection)
209 1. Copy the following packages in the current working directory
219 gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunAnalysis.C");
220 setupPar("STEERBase");
223 setupPar("ANALYSIS");
224 setupPar("ANALYSISalice");
225 setupPar("PWG3muon");
227 3. To analyse grid files, provide an XML collection file wn.xml and run
229 gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
230 RunSingleMuonAnalysisFromESD()
232 4. To analyse local files, modify RunSingleMuonAnalysisFromESD.C
235 chain->Add("/path_1_to/AliESDs.root");
236 chain->Add("/path_2_to/AliESDs.root");
237 chain->Add("/path_3_to/AliESDs.root");
240 and run (notice the "1" argument)
242 gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
243 RunSingleMuonAnalysisFromESD(1)
245 5. Check the results in SingleMuESD.root
247 Note: for some older runs (PDC08/LHC08t for instance) it is necessary to force
248 the values of the trigger mask, because the function
250 GetFiredTriggerClasses()
252 from AliESDEvent does not return the proper names of the muon trigger classes.
253 So one has to un-comment the line
255 task->SetTriggerType("MUON");
257 in the macro RunSingleMuonAnalysisFromESD.C, if the simulation was produced
258 with SetMakeTrigger("MUON")
260 This bug is fixed starting with the TRUNK from 14.11.2008
262 ===================================================
263 Analysis task for RecoCheck analysis of ESD and Kinematics
264 Bogdan VULPESCU, Clermont-Ferrand
265 ----------------------------------------------------------------
267 Purpose: the class MUON/AliMUONRecoCheck is used to extract single muon and
268 muon pair information in objects of type AliMUONTrackLight and
269 AliMUONPairLight. The output file is RecoCheck.root and contains a tree with
270 arrays of both objects.
274 AliAnalysisTaskRecoCheck.cxx - source files of the analysis task
275 AliAnalysisTaskRecoCheck.h
277 RunRecoCheck.C - macro to run the analysis (with xml input
278 collection and grid connection)
283 1. Run aliroot (not root!, the class is in the muondep library)
285 2. gROOT->LoadMacro("$ALICE_ROOT/PWG3/muondep/RunRecoCheck.C");
289 4. To analyse local files, modify RunRecoCheck.C
292 chain->Add("/path_1_to/AliESDs.root");
293 chain->Add("/path_2_to/AliESDs.root");
294 chain->Add("/path_3_to/AliESDs.root");
297 and run (notice the "1" argument)
301 5. Check results in RecoCheck.root
303 Note: the magnetic field is needed in order to initialize the tracker. The
304 corresponding field map is selected by looking at the value of the L3 current
305 stored in the GRP database which was used for the reconstruction.
307 ===================================================
308 Analysis task to correlate ESD tracks to their corresponding Monte Carlo data.
310 ---------------------------------------------------------------
312 The AliAnalysisTaskLinkToMC analysis task is used to correlate reconstructed tracks
313 found in ESDs to their corresponding MC track information found in the kinematics
314 tree. The the same algorithm is used as in MUON/AliMUONRecoCheck but without any
315 dependancy on MUON library code. This analysis task will copy out ESD MUON track
316 information into the AOD like AliAnalysisTaskESDMuonFilter does, however the MC
317 track label in the AOD track class is filled with the label of the corresponding
318 MC track. Thus, subsequent analysis tasks can easily find the correct MC track from
323 AliAnalysisTaskLinkToMC.h - The header file for the analysis task code.
324 AliAnalysisTaskLinkToMC.cxx - The source file for the analysis task code.
326 RunLinkToMCAnalysisExample.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
331 PlotEfficiency.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.
338 To run the analysis task in local mode with the example macro simply run the command
339 $ root RunLinkToMCAnalysisExample.C\(\"AliESDs.root\"\)
340 where AliESDs.root can be replaced with the full path and name of the appropriate ESD
341 file you wish to process. This command can also be run via AliRoot.
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 ---------------------------------------------------------------
350 IMPORTANT: The AliAnalysisTaskCreateMixedDimuons analysis task needs
351 the class AliEventPoolMuon.
353 In class AliEventPoolMuon the definition of the pools to be used
354 in the mixing is implemented. Up to now, it is possible to create
355 pools diving events by:
357 - forward muons multiplicity
358 - z-position of the primary vertex
360 In class AliAnalysisTaskCreateMixedDimuons the mixing is performed between
361 each pair of events which can be built up picking events from the internal
362 buffer: if the buffer contains n events, n(n-1)/2 mixed events are created
363 within the same call of the task.
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
376 AliAnalysisTaskCreateMixedDimuons.(h,cxx) - The analysis task class.
377 AliEventPoolMuon.(h,cxx) - The class implementing the pool.
379 AnalysisTrainCreateMixedDimuons.C - An example macro enabling connections between
380 the pool manager, the input event handler, the input and output containers,
381 via 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
388 To run the analysis task in local mode with the example macro, simply run
389 the AnalysisTrainCreateMixedDimuons.C macro (without compiling it) with
390 appropriate arguments.
392 ===============================================================================
393 Analysis Task for (di)muons continuum from heavy flavors
394 X. M. Zhang, Clermont-Ferrand and Wuhan
395 ===============================================================================
396 1) AliAnalysisTaskSEMuonsHF.h (.cxx) -- analysis class for (di)muons continuum
398 2) AliMuonsHFHeader.h (.cxx) -- class used to collect and save the information
399 at event level (eg. vertex position and trigger mask).
400 3) AliAODMuonTrack.h (.cxx) -- class used to extract and save information of
401 reconstracted muon tracks (from both AOD and ESD), selection the muon with
403 4) 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.
406 5) 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
410 6) 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.
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
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);
447 ===================================================
448 New task to mesure the spectrometer resolution
449 Philippe Pillot, Subatech
450 ---------------------------------------------------------------
451 1) 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
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.
457 Neverthless, 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).
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.
461 2) 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).
463 3) 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).