]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG0/dNdEta/testAnalysis2.C
Modification of the trigger fields in the event tag (Panos)
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / testAnalysis2.C
CommitLineData
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"
12
fcf2fb36 13testAnalysis2(Char_t* dataDir, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE)
75e130df 14{
15 gSystem->Load("libPWG0base");
16
e6a87095 17 TChain* chain = CreateESDChainFromDir(dataDir, nRuns, offset);
75e130df 18
19 // ########################################################
20 // selection of esd tracks
21 AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts();
22 esdTrackCuts->DefineHistograms(1);
23
24 esdTrackCuts->SetMinNClustersTPC(50);
25 esdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
26 esdTrackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
27 esdTrackCuts->SetRequireTPCRefit(kTRUE);
28
29 esdTrackCuts->SetMinNsigmaToVertex(3);
30 esdTrackCuts->SetAcceptKingDaughters(kFALSE);
31
32 chain->GetUserInfo()->Add(esdTrackCuts);
33
dded7a68 34 if (aMC == kFALSE)
35 {
36 dNdEtaCorrection* dNdEtaCorrection = new dNdEtaCorrection();
37 dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
dc740de4 38 dNdEtaCorrection->RemoveEdges(2, 0, 2);
dded7a68 39
40 chain->GetUserInfo()->Add(dNdEtaCorrection);
41 }
37dbb69e 42
dc740de4 43 TString selectorName = ((aMC == kFALSE) ? "AlidNdEtaAnalysisESDSelector" : "AlidNdEtaAnalysisMCSelector");
4dd2ad81 44 AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);
45
fcf2fb36 46 selectorName += ".cxx++";
47 if (aDebug != kFALSE)
48 selectorName += "g";
49
dafef3c8 50 TStopwatch timer;
51 timer.Start();
52
fcf2fb36 53 chain->Process(selectorName);
dafef3c8 54
55 timer.Stop();
56 timer.Print();
75e130df 57}