dc740de4 |
1 | /* $Id$ */ |
2 | |
75e130df |
3 | // |
4 | // Script to test the dN/dEta analysis using the dNdEtaAnalysis and |
5 | // dNdEtaCorrection classes. Note that there is a cut on the events, |
6 | // so the measurement will be biassed. |
7 | // |
8 | // implementation with TSelector |
9 | // |
10 | |
11 | #include "../CreateESDChain.C" |
5fbd0b17 |
12 | #include "CreatedNdEta.C" |
75e130df |
13 | |
fcf2fb36 |
14 | testAnalysis2(Char_t* dataDir, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE) |
75e130df |
15 | { |
16 | gSystem->Load("libPWG0base"); |
17 | |
e6a87095 |
18 | TChain* chain = CreateESDChainFromDir(dataDir, nRuns, offset); |
75e130df |
19 | |
20 | // ######################################################## |
21 | // selection of esd tracks |
22 | AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts(); |
23 | esdTrackCuts->DefineHistograms(1); |
24 | |
25 | esdTrackCuts->SetMinNClustersTPC(50); |
26 | esdTrackCuts->SetMaxChi2PerClusterTPC(3.5); |
27 | esdTrackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2); |
28 | esdTrackCuts->SetRequireTPCRefit(kTRUE); |
29 | |
30 | esdTrackCuts->SetMinNsigmaToVertex(3); |
31 | esdTrackCuts->SetAcceptKingDaughters(kFALSE); |
32 | |
33 | chain->GetUserInfo()->Add(esdTrackCuts); |
34 | |
dded7a68 |
35 | if (aMC == kFALSE) |
36 | { |
37 | dNdEtaCorrection* dNdEtaCorrection = new dNdEtaCorrection(); |
38 | dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction"); |
dc740de4 |
39 | dNdEtaCorrection->RemoveEdges(2, 0, 2); |
dded7a68 |
40 | |
41 | chain->GetUserInfo()->Add(dNdEtaCorrection); |
42 | } |
37dbb69e |
43 | |
dc740de4 |
44 | TString selectorName = ((aMC == kFALSE) ? "AlidNdEtaAnalysisESDSelector" : "AlidNdEtaAnalysisMCSelector"); |
4dd2ad81 |
45 | AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo); |
46 | |
fcf2fb36 |
47 | selectorName += ".cxx++"; |
48 | if (aDebug != kFALSE) |
49 | selectorName += "g"; |
50 | |
dafef3c8 |
51 | TStopwatch timer; |
52 | timer.Start(); |
53 | |
fcf2fb36 |
54 | chain->Process(selectorName); |
dafef3c8 |
55 | |
56 | timer.Stop(); |
57 | timer.Print(); |
5fbd0b17 |
58 | |
59 | CreatedNdEta(aMC ? kFALSE : kTRUE); |
75e130df |
60 | } |