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