changing from printf to AliDebug
[u/mrichter/AliRoot.git] / PWG0 / dNdEta / testAnalysis2.C
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
11 testAnalysis2(Char_t* dataDir, Int_t nRuns=20)
12 {
13   gSystem->Load("libPWG0base");
14
15   TChain* chain = CreateESDChain(dataDir, nRuns);
16
17   // ########################################################
18   // selection of esd tracks
19   AliESDtrackCuts* esdTrackCuts = new AliESDtrackCuts();
20   esdTrackCuts->DefineHistograms(1);
21
22   esdTrackCuts->SetMinNClustersTPC(50);
23   esdTrackCuts->SetMaxChi2PerClusterTPC(3.5);
24   esdTrackCuts->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
25   esdTrackCuts->SetRequireTPCRefit(kTRUE);
26
27   esdTrackCuts->SetMinNsigmaToVertex(3);
28   esdTrackCuts->SetAcceptKingDaughters(kFALSE);
29
30   chain->GetUserInfo()->Add(esdTrackCuts);
31
32   dNdEtaCorrection* dNdEtaCorrection = new dNdEtaCorrection();
33   dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
34   dNdEtaCorrection->RemoveEdges(2,0,2);
35
36   chain->GetUserInfo()->Add(dNdEtaCorrection);
37
38   AliLog::SetClassDebugLevel("AlidNdEtaAnalysisSelector", AliLog::kWarning);
39   
40   chain->Process("AlidNdEtaAnalysisSelector.cxx+");
41 }