Updates by Ionut
[u/mrichter/AliRoot.git] / PWGPP / TRD / macros / AddTRDcheckESD.C
CommitLineData
6982e2cc 1
1ee39b3a 2#if ! defined (__CINT__) || defined (__MAKECINT__)
705f8b0a 3#include "AliLog.h"
1ee39b3a 4#include "AliAnalysisManager.h"
5#include "AliAnalysisDataContainer.h"
7698e7a4 6#include "AliAnalysisCuts.h"
7#include "AliESDtrackCuts.h"
2bfe5463 8#include "PWGPP/TRD/AliTRDcheckESD.h"
1ee39b3a 9#endif
10
7698e7a4 11AliESDtrackCuts* SetupESDcuts();
12
1ee39b3a 13void AddTRDcheckESD(AliAnalysisManager *mgr)
14{
3d2a3dff 15 //AliLog::SetClassDebugLevel("AliTRDcheckESD", 5);
6982e2cc 16 // AliInfo("aaaaaa6666666666");
76106bcc 17 AliTRDcheckESD *checkESD = new AliTRDcheckESD((char*)"TRDcheckESD");
7698e7a4 18 checkESD->SetRefTrackFilter(SetupESDcuts());
1ee39b3a 19 mgr->AddTask(checkESD);
99535225 20 Bool_t mc = mgr->GetMCtruthEventHandler();
21 checkESD->SetMC(mc);
36d21092 22 checkESD->SetCollision(/*kFALSE*/);
705f8b0a 23 checkESD->SetDebugLevel(0);
6982e2cc 24 checkESD->AddUserTrigger("WU");
25 checkESD->AddUserTrigger("QU");
26 checkESD->AddUserTrigger("SE");
27 checkESD->AddUserTrigger("JT");
28
3d83da78 29 mgr->ConnectInput(checkESD, 0, mgr->GetCommonInputContainer());
997f86cb 30 mgr->ConnectOutput(checkESD, 1, mgr->CreateContainer(checkESD->GetName(), TObjArray::Class(), AliAnalysisManager::kOutputContainer, Form("%s:TRD_Performance",mgr->GetCommonFileName())));
1ee39b3a 31}
32
7698e7a4 33AliESDtrackCuts* SetupESDcuts() {
34 // Setup ESD cuts for the TPC reference tracks
35 AliESDtrackCuts* esdCuts = new AliESDtrackCuts;
8642d6d9 36 esdCuts->SetPtRange(0.5, 100.0);
7698e7a4 37 esdCuts->SetEtaRange(-0.9, +0.9);
38 esdCuts->SetRequireTPCRefit(kTRUE);
39 esdCuts->SetAcceptKinkDaughters(kFALSE);
52f55ddb 40 esdCuts->SetMaxDCAToVertexXY(1.);
41 esdCuts->SetMaxDCAToVertexZ(3.);
7698e7a4 42 esdCuts->SetMinNClustersTPC(70);
6982e2cc 43 esdCuts->SetRequireITSRefit(kTRUE);
44 //esdCuts->SetClusterRequirementITS(AliESDtrackCuts::kSPD,AliESDtrackCuts::kAny);
7698e7a4 45 return esdCuts;
46}
47