]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG3/READMEmuon
- Added Method for the consistency of the chip numbering in both reading
[u/mrichter/AliRoot.git] / PWG3 / READMEmuon
index b42cc9e3e0e80c96a4d894f273c366befcdd1002..ab744dfece0d0ed34fb87e6ab4deefd56cd72e53 100644 (file)
@@ -4,33 +4,60 @@
   Roberta ARNALDI, Enrico SCOMPARIN Torino
 ---------------------------------------------------------------
 
-Code to copy the muon information from the ESD to the standard AOD. 
+The following filter is used in the official analysis train, in order to copy the muon information from the ESD to the standard AOD.
 
-1) AnalysisTrainMuonLocal.C --> macro to run locally the AliAnalysisTaskESDMuonFilter. 
-                                It creates a standard AOD from the ESD
-2) AliAnalysisTaskESDMuonFilter.h  --> analysis task to copy the muon information from the ESD to the standard AOD
-3) AliAnalysisTaskESDMuonFilter.cxx --> analysis task to copy the muon information from the ESD to the standard AOD
-4) libPWG3muon.pkg
-5) PWG3muonLinkDef.h 
+1) AliAnalysisTaskESDMuonFilter.h  --> analysis task to copy the muon information from the ESD to the standard AOD
+2) AliAnalysisTaskESDMuonFilter.cxx --> analysis task to copy the muon information from the ESD to the standard AOD
 
+In order to test the analysis train from the ESD to the Standard AOD production, the following macro is provided:
+
+  AnalysisTrainFromESDToAOD.C
+
+Input file: ESD
+Output files: standard AOD (+AOD tags)
+
+Two wagons are attached to the analysis train: 
+   1) $ALICE_ROOT/ANALYSIS/macros/AddTaskESDFilter.C 
+   2) $ALICE_ROOT/PWG3/muon/AddTaskTagCreation.C 
+
+Several flags can be activated: 
+   1) iESDfilter: to activate, using AddTaskESDFilter.C, the copy of the ESD information into the AOD.
+      In AddTaskESDFilter.C there is the possibility to apply cuts on the tracks and muon tracks in order
+      to reject them before filling the AOD. 
+   2) iAODAddMCBranch: to activate the inclusion of the MC branch (containing Kinematics info) into a branch of the AOD 
+   3) iAODTagCreation: to activate, using AddTaskTagCreation.C, the AOD tag creation
+      
+Runninng options tested: 
+   1) GRID (with/without AliEn plugin)
+   2) LOCAL 
+
+If the AliEn plugin is required, the macro 
+   CreateAlienHandler_FromESDToAOD.C
+can be used, in order to configure the jdl.
+
+AnalysisTrainFromESDToAOD.C is an updated version of the macro AnalysisTrainMuonLocal.C 
+(input file: ESD, output files standard AOD and the AOD tag file)
+The main differences are related to implementations to be compliant with the analysis framework,
+possibility to run on the grid with/without the Alien Plugin and possibility of adding the MC truth in a branch of the AOD.
+
+The macro ReadAOD_MCBranch.C is an example on how to access MC information stored in the AOD.
+   
 ===================================================
   Creation of the MUON-AOD from the standard AOD
   Roberta ARNALDI, Enrico SCOMPARIN Torino
 ---------------------------------------------------------------
 
 Code to produce a muon-AOD, i.e. a replica of the standard AOD containing only events where 
-at least one muon is present
+at least one muon in the dimuon spectrometer is present
 
 1) AnalysisTrainFromStandardToMuonAODLocal.C --> macro to produce the MUON-AOD (it runs locally)
 2) AliAnalysisTaskFromStandardToMuonAOD.h  --> analysis task to replicate the AOD content for interesting events
 3) AliAnalysisTaskFromStandardToMuonAOD.cxx --> analysis task to replicate the AOD content for interesting events
-4) libPWG3muon.pkg
-5) PWG3muonLinkDef.h 
 
-- The input files are the ESD (used only for tag creation) and the standard AOD.
-  Tags files are created from all the ESD/AOD files placed in a directory,  
-  given as an argument to the macro, and in its subdirectories.
-- The selection of the muon events is based on the AOD tags.
+- The input files are the standard AOD and the AOD tag file.
+  The AOD tag file can be created in the previous step from ESD to Standard AOD, using AnalysisTrainMuonLocal.C, or it can be
+  produced on the fly with this macro.
+- Events containing at least one muon in the muon spectrometer can be selected using the AOD tag files.
 - The contents of the MUON-AOD can be defined by the user in the AnalysisTrainFromStandardToMuonAODLocal.C
   macro with some settings as
   SetNeedsTracksBranchReplication(), SetNeedsVerticesBranchReplication() 
@@ -114,3 +141,251 @@ The macro creates the file MUON.TriggerEfficiencyMap.root
 aliroot
 AliMUONTriggerEfficiencyCells effCells("MUON.TriggerEfficiencyMap.root")
 effCells.DisplayEfficiency()
+
+===================================================
+ Analysis task for checking the consistency of ESD and AOD filling and contents.
+ Mercedes LOPEZ NORIEGA, Orsay
+----------------------------------------------------------------
+
+Purpose:check the consistency between the ESDs and the AOD.
+
+The task works locally and on the grid, there are two macros depending where
+you want to run
+
+Files:
+AliAnalysisTaskAODvsESD.cxx   -source files of the analysis task
+AliAnalysisTaskAODvsESD.h
+
+AnalysisTrainMuonComp.C       - macro for analysis on the grid
+AnalysisTrainMuonCompLocal.C  - macro for local analysis
+
+To run the check:
+1. Copy the following packages in the current working directory
+  - STEERBase.par
+  - ESD.par
+  - AOD.par
+  - ANALYSIS.par
+  - ANALYSISalice.par
+  - PWG3muon.par
+
+2. To run locally:
+  root
+  .x AnalysisTrainMuonCompLocal.C
+
+  by default the macro searches for a tag file of ESDs in the 
+  working directory
+
+3. To run on the grid:
+  root
+  .x AnalysisTrainMuonComp.C
+
+  by default the macro searches for a wn.xml in the current directory, with the list
+  of grid files to analyse.
+
+4. Display results:
+The macro creates the file AODvsESDoutput.root
+It contains an Ntuple from the ESDs and Ntuple from the AODs and an inv. mass histo 
+for each case
+
+===================================================
+ Analysis task for extracting variables from the ESD for single muons
+ Nicole BASTID and Bogdan VULPESCU, Clermont-Ferrand
+----------------------------------------------------------------
+
+Purpose: the output is an ntuple with single muon tracks selected variables; a
+histogram collects the number of events in different trigger classes.
+
+Files:
+
+AliAnalysisTaskSingleMuESD.cxx  - source files of the analysis task
+AliAnalysisTaskSingleMuESD.h
+
+RunSingleMuonAnalysisFromESD.C  - macro to run the analysis (with xml input
+                                  collection and grid connection)
+
+
+How to run:
+
+1. Copy the following packages in the current working directory
+  - STEERBase.par
+  - ESD.par
+  - AOD.par
+  - ANALYSIS.par
+  - ANALYSISalice.par
+  - PWG3muon.par
+
+2. Run root
+
+gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunAnalysis.C");
+setupPar("STEERBase"); 
+setupPar("ESD"); 
+setupPar("AOD"); 
+setupPar("ANALYSIS"); 
+setupPar("ANALYSISalice"); 
+setupPar("PWG3muon");
+
+3. To analyse grid files, provide an XML collection file wn.xml and run
+
+gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
+RunSingleMuonAnalysisFromESD()
+
+4. To analyse local files, modify RunSingleMuonAnalysisFromESD.C
+
+  } else {
+    chain->Add("/path_1_to/AliESDs.root");
+    chain->Add("/path_2_to/AliESDs.root");
+    chain->Add("/path_3_to/AliESDs.root");
+  }
+
+and run (notice the "1" argument)
+
+gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/RunSingleMuonAnalysisFromESD.C");
+RunSingleMuonAnalysisFromESD(1)
+
+5. Check the results in SingleMuESD.root
+
+Note: for some older runs (PDC08/LHC08t for instance) it is necessary to force 
+the values of the trigger mask, because the function 
+
+GetFiredTriggerClasses()
+
+from AliESDEvent does not return the proper names of the muon trigger classes.
+So one has to un-comment the line
+
+task->SetTriggerType("MUON");
+
+in the macro RunSingleMuonAnalysisFromESD.C, if the simulation was produced 
+with SetMakeTrigger("MUON")
+
+This bug is fixed starting with the TRUNK from 14.11.2008
+
+===================================================
+ Analysis task for RecoCheck analysis of ESD and Kinematics
+ Bogdan VULPESCU, Clermont-Ferrand
+----------------------------------------------------------------
+
+Purpose: the class MUON/AliMUONRecoCheck is used to extract single muon and
+muon pair information in objects of type AliMUONTrackLight and 
+AliMUONPairLight. The output file is RecoCheck.root and contains a tree with
+arrays of both objects.
+
+Files:
+
+AliAnalysisTaskRecoCheck.cxx  - source files of the analysis task
+AliAnalysisTaskRecoCheck.h
+
+RunRecoCheck.C  - macro to run the analysis (with xml input
+                  collection and grid connection)
+
+
+How to run:
+
+1. Run aliroot (not root!, the class is in the muondep library)
+
+2. gROOT->LoadMacro("$ALICE_ROOT/PWG3/muondep/RunRecoCheck.C");
+
+3. RunRecoCheck()
+
+4. To analyse local files, modify RunRecoCheck.C
+
+  } else {
+    chain->Add("/path_1_to/AliESDs.root");
+    chain->Add("/path_2_to/AliESDs.root");
+    chain->Add("/path_3_to/AliESDs.root");
+  }
+
+and run (notice the "1" argument)
+
+RunRecoCheck(1)
+
+5. Check results in RecoCheck.root
+
+Note: the magnetic field is needed in order to initialize the tracker. The
+corresponding field map is selected by looking at the value of the L3 current
+stored in the GRP database which was used for the reconstruction.
+
+===================================================
+ Analysis task to correlate ESD tracks to their corresponding Monte Carlo data.
+ Artur Szostak, INFN
+---------------------------------------------------------------
+
+The AliAnalysisTaskLinkToMC analysis task is used to correlate reconstructed tracks
+found in ESDs to their corresponding MC track information found in the kinematics
+tree. The the same algorithm is used as in MUON/AliMUONRecoCheck but without any
+dependancy on MUON library code. This analysis task will copy out ESD MUON track
+information into the AOD like AliAnalysisTaskESDMuonFilter does, however the MC
+track label in the AOD track class is filled with the label of the corresponding
+MC track. Thus, subsequent analysis tasks can easily find the correct MC track from
+the label.
+
+Files:
+
+AliAnalysisTaskLinkToMC.h    - The header file for the analysis task code.
+AliAnalysisTaskLinkToMC.cxx  - The source file for the analysis task code.
+
+RunLinkToMCAnalysisExample.C - An example macro for running the analysis task in
+  local mode over simulated data. The macro takes one argument which is the name
+  of the ESD file to process. By default it uses AliESDs.root in the current working
+  directory.
+
+PlotEfficiency.C  - This macro can be used to quickly check the control histograms
+  which are generated by RunLinkToMCAnalysisExample.C by default. The macro simply
+  calculates the reconstruction efficiency from the found and findable track histograms
+  that are filled by the analysis task.
+
+How to run:
+
+To run the analysis task in local mode with the example macro simply run the command
+ $ root RunLinkToMCAnalysisExample.C\(\"AliESDs.root\"\)
+where AliESDs.root can be replaced with the full path and name of the appropriate ESD
+file you wish to process. This command can also be run via AliRoot.
+
+
+===================================================
+ Analysis task to create mixed AOD events, containing a 
+ pair of muon tracks coming from two different real AOD events.
+ Alessandro De Falco and Antonio Uras, INFN Cagliari 
+---------------------------------------------------------------
+
+IMPORTANT: The AliAnalysisTaskCreateMixedDimuons analysis task needs
+           the class AliEventPoolMuon.
+
+In class AliEventPoolMuon the definition of the pools to be used 
+in the mixing is implemented. Up to now, it is possible to create 
+pools diving events by:
+ - total multiplicity
+ - forward muons multiplicity
+ - z-position of the primary vertex
+
+In class AliAnalysisTaskCreateMixedDimuons the mixing is performed between
+each pair of events which can be built up picking events from the internal 
+buffer: if the buffer contains n events, n(n-1)/2 mixed events are created 
+within the same call of the task.
+
+Some more details:
+ - the mixing task asks a completely fresh buffer for each call
+ - the mixing task creates output events from scratch
+ - output events are filled with two muon tracks (picked randomly
+   from the events being mixed and a vertex having its z-position in the middle
+   of the z-vertex bin defining the pool. Due to technical reasons,
+   the tracks are NOT connected with the vertex
+ - standard AOD are created as output, nearly completely empty
+
+Files:
+
+AliAnalysisTaskCreateMixedDimuons.(h,cxx)  - The analysis task class.
+AliEventPoolMuon.(h,cxx)                   - The class implementing the pool.
+
+AnalysisTrainCreateMixedDimuons.C - An example macro enabling connections between
+the pool manager, the input event handler, the input and output containers, 
+via the Analysis Manager. Input arguments: - directory containing AOD tag file
+                                           - name of the output file
+                                           - number of events to be loaded
+                                             in the internal buffer
+
+How to run:
+
+To run the analysis task in local mode with the example macro, simply run
+the AnalysisTrainCreateMixedDimuons.C macro (without compiling it) with 
+appropriate arguments.
+