]>
Commit | Line | Data |
---|---|---|
0601d71e | 1 | // $Id$ |
2 | ||
3 | AliAnalysisTaskEMCALPhoton *AddTaskEMCALPhoton( | |
4 | Double_t clusTh=2, | |
0bbf66b9 | 5 | TString period="LHC11d", |
b4d8f626 | 6 | TString geoname="EMCAL_COMPLETEV1" |
0601d71e | 7 | ) |
1886fc1d | 8 | { |
9 | // Get the pointer to the existing analysis manager via the static access method. | |
10 | //============================================================================== | |
11 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
12 | if (!mgr) { | |
13 | ::Error("AddTaskEMCALPhoton", "No analysis manager to connect to."); | |
14 | return NULL; | |
15 | } | |
16 | ||
17 | // Create the task and configure it. | |
18 | //=========================================================================== | |
19 | AliAnalysisTaskEMCALPhoton* ana = new AliAnalysisTaskEMCALPhoton(""); | |
20 | ||
21 | ana->SelectCollisionCandidates( AliVEvent::kEMC1 | AliVEvent::kMB | AliVEvent::kEMC7 | AliVEvent::kINT7); | |
22 | ||
23 | Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL); | |
24 | ||
1886fc1d | 25 | ana->SetClusThreshold(clusTh); |
26 | ana->SetTrainMode(kTRUE); | |
27 | ana->SetGridMode(kTRUE); | |
28 | ana->SetMcMode(isMC); | |
29 | AliESDtrackCuts *cuts = new AliESDtrackCuts; | |
30 | cuts->SetMinNCrossedRowsTPC(50); | |
31 | cuts->SetMinRatioCrossedRowsOverFindableClustersTPC(0.7); | |
32 | cuts->SetMaxChi2PerClusterTPC(4); | |
33 | cuts->SetRequireTPCRefit(kTRUE); | |
34 | cuts->SetAcceptKinkDaughters(kTRUE); | |
35 | cuts->SetPtRange(0.2); | |
36 | cuts->SetEtaRange(-1.0,1.0); | |
37 | ana->SetTrackCuts(cuts); | |
38 | ||
39 | AliESDtrackCuts *cutsp = new AliESDtrackCuts; | |
40 | cutsp->SetMinNClustersTPC(70); | |
41 | cutsp->SetMinRatioCrossedRowsOverFindableClustersTPC(0.8); | |
42 | cutsp->SetMaxChi2PerClusterTPC(4); | |
43 | cutsp->SetRequireTPCRefit(kTRUE); | |
44 | cutsp->SetAcceptKinkDaughters(kFALSE); | |
45 | cutsp->SetMaxDCAToVertexZ(3.2); | |
46 | cutsp->SetMaxDCAToVertexXY(2.4); | |
47 | cutsp->SetDCAToVertex2D(kTRUE); | |
48 | cutsp->SetPtRange(0.2); | |
49 | cutsp->SetEtaRange(-1.0,1.0); | |
50 | ana->SetPrimTrackCuts(cutsp); | |
51 | ana->SetPeriod(period.Data()); | |
b4d8f626 | 52 | ana->SetGeoName(geoname.Data()); |
1886fc1d | 53 | mgr->AddTask(ana); |
54 | ||
55 | // Create ONLY the output containers for the data produced by the task. | |
56 | // Get and connect other common input/output containers via the manager as below | |
57 | //============================================================================== | |
58 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosEMCALPhoton", | |
59 | TList::Class(),AliAnalysisManager::kOutputContainer, | |
60 | Form("%s", AliAnalysisManager::GetCommonFileName())); | |
61 | ||
75e7f189 | 62 | AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("photon_ana_out", TTree::Class(), AliAnalysisManager::kOutputContainer, |
63 | Form("%s", AliAnalysisManager::GetCommonFileName())); | |
1886fc1d | 64 | mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer()); |
65 | mgr->ConnectOutput (ana, 1, coutput1 ); | |
55dcd0ae | 66 | mgr->ConnectOutput (ana, 2, coutput2 ); |
1886fc1d | 67 | |
68 | return ana; | |
69 | } |