]>
Commit | Line | Data |
---|---|---|
7cbb1928 | 1 | //-------------------------------------------------------------------------- |
2 | // Base macro for submitting muon Resolution analysis. | |
3 | // | |
4 | // In case it is not run with full aliroot, it needs the following libraries: | |
4bc96904 | 5 | // - libSTEERBase |
6 | // - libESD | |
7 | // - libAOD | |
8 | // - libANALYSIS | |
9 | // - libANALYSISalice | |
10 | // - libGui | |
11 | // - libMinuit | |
12 | // - libProofPlayer | |
13 | // - libXMLParser | |
14 | // - libRAWDatabase | |
15 | // - libCDB | |
16 | // - libSTEER | |
17 | // - libMUONcore | |
18 | // - libMUONmapping | |
19 | // - libMUONcalib | |
20 | // - libMUONgeometry | |
21 | // - libMUONtrigger | |
22 | // - libMUONraw | |
23 | // - libMUONbase | |
24 | // - libMUONrec | |
25 | // - libCORRFW | |
26 | // - libPWGHFbase | |
27 | // - libPWGmuondep | |
7cbb1928 | 28 | // |
00612ffc | 29 | // It also needs to load magnetic field, mapping, geometry (+alignment), and reconstruction parameters from the OCDB |
30 | // | |
31 | // The task reads ESDs | |
32 | // Intermediate results are stored in a file chamberResolution_step<#step>.root | |
33 | // Final results are stored in the file results.root | |
7cbb1928 | 34 | // |
35 | // Author: Philippe Pillot - SUBATECH Nantes | |
36 | //-------------------------------------------------------------------------- | |
37 | ||
00612ffc | 38 | void LoadAlirootLocally(TString& extraLibs); |
7cbb1928 | 39 | |
00612ffc | 40 | //______________________________________________________________________________ |
41 | void RunMuonResolution(TString smode = "local", TString inputFileName = "AliESDs.root", | |
09233fcd | 42 | TString rootVersion = "v5-34-01-1", TString alirootVersion = "v5-03-57-AN", Int_t nSteps = 5, |
00612ffc | 43 | Bool_t selectPhysics = kFALSE, Bool_t selectTrigger = kFALSE, Bool_t matchTrig = kTRUE, |
44 | Bool_t applyAccCut = kTRUE, Double_t minMomentum = 0., Bool_t correctForSystematics = kTRUE, | |
09233fcd | 45 | Int_t extrapMode = 1, Bool_t shiftHalfCh = kFALSE, Bool_t shiftDE = kFALSE, Int_t nevents = 1234567890) |
7cbb1928 | 46 | { |
47 | /// Compute the cluster resolution by studying cluster-track residual, deconvoluting from track resolution | |
00612ffc | 48 | /// - smode = "local" or "proof" |
49 | /// - inputFileName = an ESD root file or a list of ESDs or a collection of ESDs or a dataset in proof mode | |
09233fcd | 50 | /// - rootVersion = version of root package to enable on AAF (only used in proof mode) |
00612ffc | 51 | /// - alirootVersion = version of aliroot package to enable on AAF (only used in proof mode) |
52 | /// - nSteps = number of times to task is run (at each step it starts with the chamber resolution obtained in the previous one) | |
53 | /// - selectPhysics : apply or not the physics selection | |
54 | /// - selectTrigger : select only muon trigger events or not (the type of trigger can eventually be changed) | |
55 | /// - matchTrigger : select only the tracks matching the trigger or not | |
56 | /// - applyAccCut : select only the tracks passing the Rabs and the eta cut or not | |
57 | /// - minMomentum : select only the tracks with a total momentum above this value | |
58 | /// - if correctForSystematics == kTRUE: the systematic shifts of the residuals is included in the resolution | |
59 | /// - if extrapMode == 0: extrapolate from the closest cluster | |
60 | /// - if extrapMode == 1: extrapolate from the previous cluster except between stations 2-3-4 | |
61 | /// - nevents = maximum number of processed events | |
62 | ||
63 | // Load libraries locally | |
09233fcd | 64 | TString extraLibs = "RAWDatabase:CDB:STEER:MUONcore:MUONmapping:MUONcalib:MUONgeometry:MUONtrigger:MUONraw:MUONbase:MUONrec:CORRFW:PWGmuon:PWGPPMUONdep"; |
00612ffc | 65 | LoadAlirootLocally(extraLibs); |
66 | ||
67 | // compile analysis macro locally | |
fe0324de | 68 | gROOT->LoadMacro("$ALICE_ROOT/PWGPP/MUON/dep/MuonResolution.C++g"); |
09233fcd | 69 | MuonResolution(smode, inputFileName, rootVersion, alirootVersion, nSteps, selectPhysics, selectTrigger, matchTrig, |
70 | applyAccCut, minMomentum, correctForSystematics, extrapMode, shiftHalfCh, shiftDE, nevents, extraLibs); | |
7cbb1928 | 71 | |
00612ffc | 72 | } |
73 | ||
74 | //______________________________________________________________________________ | |
75 | void LoadAlirootLocally(TString& extraLibs) | |
76 | { | |
77 | /// Load libraries locally | |
7cbb1928 | 78 | |
00612ffc | 79 | // Load common libraries |
7cbb1928 | 80 | gSystem->Load("libVMC"); |
4070f709 | 81 | gSystem->Load("libTree"); |
82 | gSystem->Load("libPhysics"); | |
83 | gSystem->Load("libMinuit"); | |
84 | gSystem->Load("libXMLParser"); | |
85 | gSystem->Load("libGui"); | |
7cbb1928 | 86 | gSystem->Load("libSTEERBase"); |
87 | gSystem->Load("libESD"); | |
88 | gSystem->Load("libAOD"); | |
89 | gSystem->Load("libANALYSIS"); | |
90 | gSystem->Load("libANALYSISalice"); | |
91 | ||
92 | // Load additional libraries | |
93 | gSystem->Load("libProofPlayer"); | |
7cbb1928 | 94 | TObjArray* libs = extraLibs.Tokenize(":"); |
95 | for (Int_t i = 0; i < libs->GetEntriesFast(); i++) | |
96 | gSystem->Load(Form("lib%s",static_cast<TObjString*>(libs->UncheckedAt(i))->GetName())); | |
00612ffc | 97 | delete libs; |
7cbb1928 | 98 | |
00612ffc | 99 | // Load lib for final mchview display |
100 | gSystem->Load("libMUONgraphics"); | |
7cbb1928 | 101 | |
ce874155 | 102 | // Add AliRoot includes to compile the macro |
00612ffc | 103 | gROOT->ProcessLine(".include $ALICE_ROOT/include"); |
104 | gROOT->ProcessLine(".include $ALICE_ROOT/MUON"); | |
105 | gROOT->ProcessLine(".include $ALICE_ROOT/MUON/mapping"); | |
09233fcd | 106 | gROOT->ProcessLine(".include $ALICE_ROOT/PWG/muon"); |
00612ffc | 107 | gROOT->ProcessLine(".include $ALICE_ROOT/ANALYSIS/macros"); |
7cbb1928 | 108 | |
7cbb1928 | 109 | } |
110 |