]>
Commit | Line | Data |
---|---|---|
95e5b6b5 | 1 | AliAnalysisTaskSEJPSItoEle *AddTaskJPSItoEle(char* fileout = "AliAOD.Jpsitoele.root") |
2 | { | |
3 | //*********************************************************************************************** | |
4 | // Test macro for the AliAnalysisTaskSEJPSItoEle | |
5 | // Starting from AliAOD.root + AliAOD.VertexingHF.root with HF + like sign candidates, | |
6 | // it produces a specific AliAODjpsi.root file with a replica of J/psi->e+e- candidates only | |
7 | // (and references to the corresponding decay tracks) + several histograms for | |
8 | // both unlike sign and like sign candidates. | |
9 | // | |
10 | // C.Di Giglio, carmelo.digiglio@ba.infn.it | |
11 | //*********************************************************************************************** | |
12 | ||
13 | // Get the pointer to the existing analysis manager via the static access method. | |
14 | //============================================================================== | |
15 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
16 | if (!mgr) { | |
17 | ::Error("AddTaskBtoJPSItoEle", "No analysis manager to connect to."); | |
18 | return NULL; | |
19 | } | |
20 | ||
21 | AliAODHandler* aodHandler = new AliAODHandler(); | |
22 | aodHandler->SetOutputFileName(fileout); | |
23 | ||
24 | mgr->SetOutputEventHandler(aodHandler); | |
25 | mgr-> SetDebugLevel(10); | |
26 | ||
27 | AliAnalysisTaskSEJPSItoEle *hJPSItoEleTask = new AliAnalysisTaskSEJPSItoEle("AOD_JPSItoEle_filter"); | |
28 | hJPSItoEleTask->SetDebugLevel(2); | |
29 | ||
30 | Double_t ptCuts[2] = {0.,500.}; // the cut is on the J/psi pT (--> change this) | |
31 | hJPSItoEleTask->SetPtCuts(ptCuts); | |
32 | hJPSItoEleTask->SetAODMCInfo(kFALSE); // only for sim | |
33 | ||
34 | mgr->AddTask(hJPSItoEleTask); | |
35 | ||
36 | mgr->ConnectInput(hJPSItoEleTask,0,mgr->GetCommonInputContainer()); | |
37 | ||
38 | AliAnalysisDataContainer *coutput0 = mgr->CreateContainer("tree",TTree::Class(), | |
39 | AliAnalysisManager::kOutputContainer, | |
40 | "default"); | |
41 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histos",TList::Class(), | |
42 | AliAnalysisManager::kOutputContainer, | |
43 | "JPSItoEleHistos.root"); | |
44 | mgr->ConnectOutput(hJPSItoEleTask,0,coutput0); | |
45 | mgr->ConnectOutput(hJPSItoEleTask,1,coutput1); | |
46 | return hJPSItoEleTask; | |
47 | } |