adding the option for hybrid tracks global+global constrained as well as global+TPC...
[u/mrichter/AliRoot.git] / PWG4 / macros / runESDQA_CAF.C
1 void runESDQA_CAF(Char_t *dataset = "/PWG0/COMMON/LHC08c11_10TeV_0.5T", Int_t max_evt=200000)
2 {
3     TProof::Open("lxb6046");
4
5     /*
6     gProof->UploadPackage("AF-v4-14.par");
7     gProof->EnablePackage("AF-v4-14");
8     */
9     //    gProof->ClearPackages();
10     gProof->UploadPackage("${ALICE_ROOT}/STEERBase.par");
11     gProof->EnablePackage("STEERBase");
12     gProof->UploadPackage("${ALICE_ROOT}/ESD.par");
13     gProof->EnablePackage("ESD");
14     gProof->UploadPackage("${ALICE_ROOT}/AOD.par");
15     gProof->EnablePackage("AOD");
16     gProof->UploadPackage("${ALICE_ROOT}/ANALYSIS.par");
17     gProof->EnablePackage("ANALYSIS");
18     gProof->UploadPackage("${ALICE_ROOT}/ANALYSISalice.par");
19     gProof->EnablePackage("ANALYSISalice");
20     gProof->UploadPackage("${ALICE_ROOT}/JETAN.par");
21     gProof->EnablePackage("JETAN");
22
23     gProof->UploadPackage("${ALICE_ROOT}/PWG4JetTasks.par");
24     gProof->EnablePackage("PWG4JetTasks");
25     
26     // Make the analysis manager
27
28     //
29     // Chain from CAF
30
31
32     AliAnalysisManager *mgr  = new AliAnalysisManager("ESDAODHists");
33
34     mgr->SetDebugLevel(2);
35     //AliLog::EnableDebug(kTRUE);
36     //AliLog::SetGlobalLogLevel(2);
37
38
39     // Set of cuts
40     // 
41     // standard
42 /*
43     AliESDtrackCuts* esdTrackCutsL = new AliESDtrackCuts("AliESDtrackCuts", "Loose");
44     esdTrackCutsL->SetMinNClustersTPC(50);
45     esdTrackCutsL->SetMaxChi2PerClusterTPC(3.5);
46     esdTrackCutsL->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
47     esdTrackCutsL->SetRequireTPCRefit(kTRUE);
48     esdTrackCutsL->SetMinNsigmaToVertex(3);
49     esdTrackCutsL->SetRequireSigmaToVertex(kTRUE);
50     esdTrackCutsL->SetAcceptKingDaughters(kFALSE);
51     //
52     // hard
53     AliESDtrackCuts* esdTrackCutsH = new AliESDtrackCuts("AliESDtrackCuts", "Hard");
54     esdTrackCutsH->SetMinNClustersTPC(100);
55     esdTrackCutsH->SetMaxChi2PerClusterTPC(2.0);
56     esdTrackCutsH->SetMaxCovDiagonalElements(2,2,0.5,0.5,2);
57     esdTrackCutsH->SetRequireTPCRefit(kTRUE);
58     esdTrackCutsH->SetMinNsigmaToVertex(2);
59     esdTrackCutsH->SetRequireSigmaToVertex(kTRUE);
60     esdTrackCutsH->SetAcceptKingDaughters(kFALSE);
61     //
62     AliAnalysisFilter* trackFilter = new AliAnalysisFilter("trackFilter");
63     trackFilter->AddCuts(esdTrackCutsL);
64     trackFilter->AddCuts(esdTrackCutsH);
65     //
66 */  
67
68     // Take it from the library no need to compile directly
69     // Standalone does not need ANALYISalice/AOD/JETAN/PWG4JetsTasks
70     //    gProof->Load("AliAnaESDSpectraQA.cxx++g");
71
72     AliAnaESDSpectraQA *pwg4QA = new AliAnaESDSpectraQA("ESDSpectraQA");
73     mgr->AddTask(pwg4QA);
74
75     AliESDInputHandler *esdHandler = new AliESDInputHandler;
76     //esdHandler->SetInactiveBranches("FMD CaloCluster");
77     mgr->SetInputEventHandler(esdHandler);
78
79     AliMCEventHandler* mcH = new AliMCEventHandler;
80     mgr->SetMCtruthEventHandler(mcH);
81
82
83     // Create containers for input/output
84     // Top ESD container
85     AliAnalysisDataContainer *cin_esd = mgr->GetCommonInputContainer();
86
87     //AliAnalysisDataContainer *cout_aodex = mgr->CreateContainer("cAodEx", TTree::Class(),
88 //                                                            AliAnalysisManager::kExchangeContainer, "default");
89
90     // Histos
91     AliAnalysisDataContainer *cout_hist = mgr->CreateContainer("qa_hists", TList::Class(),
92     //AliAnalysisDataContainer *cout_hist = mgr->CreateContainer("qa_hists", TObjArray::Class(),
93                                                               AliAnalysisManager::kOutputContainer, "PWG4QAHists.root");
94
95     mgr->ConnectInput (pwg4QA,  0, cin_esd );
96     mgr->ConnectOutput (pwg4QA,  0, cout_hist );
97    //
98     // Run the analysis
99     //    
100     mgr->InitAnalysis();
101     mgr->PrintStatus();
102     //mgr->StartAnalysis("local",chain);
103     mgr->StartAnalysis("proof", dataset, max_evt);
104     //delete mgr;
105 }