]>
Commit | Line | Data |
---|---|---|
3773435b | 1 | AliAnalysisTaskEmcalDiJetResponse* AddTaskEmcalDiJetResponse(TString kTracksName = "PicoTracks", |
2 | TString kClusName = "caloClusterCorr", | |
3 | TString kMCTracksName = "MCParticles", | |
4 | Double_t R = 0.4, | |
5 | Double_t ptminTrack = 0.15, | |
6 | Double_t etminClus = 0.3, | |
7 | Int_t rhoType = 0, | |
8 | TString trigClass = "", | |
9 | const char *CentEst = "V0A", | |
10 | Int_t pSel = AliVEvent::kINT7, | |
bb84b374 | 11 | Int_t matchFullCh = AliAnalysisTaskEmcalDiJetBase::kNoMatching, |
6ab30d5f | 12 | Double_t ptTrackBias = 0., |
13 | Int_t responseVar = 0, | |
e50460de | 14 | Int_t corrType = AliAnalysisTaskEmcalDiJetBase::kCorrelateTwo, |
15 | Float_t nefCut = 0.95 | |
3773435b | 16 | ) { |
17 | ||
18 | enum AlgoType {kKT, kANTIKT}; | |
19 | enum JetType {kFULLJETS, kCHARGEDJETS, kNEUTRALJETS}; | |
20 | ||
21 | // #### Define manager and data container names | |
22 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
23 | if (!mgr) { | |
24 | ::Error("AddTaskEmcalDiJet", "No analysis manager to connect to."); | |
25 | return NULL; | |
26 | } | |
27 | ||
28 | // Check the analysis type using the event handlers connected to the analysis manager. | |
29 | //============================================================================== | |
30 | if (!mgr->GetInputEventHandler()) | |
31 | { | |
32 | ::Error("AddTaskEmcalDiJet", "This task requires an input event handler"); | |
33 | return NULL; | |
34 | } | |
35 | ||
36 | // #### Add necessary jet finder tasks | |
37 | gROOT->LoadMacro("$ALICE_ROOT/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJet.C"); | |
38 | ||
39 | AliEmcalJetTask* jetFinderTaskFull = AddTaskEmcalJet(kTracksName, kClusName, kANTIKT, R, kFULLJETS, ptminTrack, etminClus); | |
40 | AliEmcalJetTask* jetFinderTaskCharged = AddTaskEmcalJet(kTracksName, kClusName, kANTIKT, R, kCHARGEDJETS, ptminTrack, etminClus); | |
41 | ||
42 | AliEmcalJetTask* jetFinderTaskFullMC = AddTaskEmcalJet(kMCTracksName ,"", kANTIKT, R, kFULLJETS, kPartLevPtCut, kPartLevPtCut); | |
43 | AliEmcalJetTask* jetFinderTaskChargedMC = AddTaskEmcalJet(kMCTracksName ,"", kANTIKT, R, kCHARGEDJETS, kPartLevPtCut, kPartLevPtCut); | |
44 | ||
45 | ||
46 | TString strJetsFull = jetFinderTaskFull->GetName(); | |
47 | TString strJetsCh = jetFinderTaskCharged->GetName(); | |
48 | ||
49 | TString strJetsFullMC = jetFinderTaskFullMC->GetName(); | |
50 | TString strJetsChMC = jetFinderTaskChargedMC->GetName(); | |
51 | ||
52 | ||
6ab30d5f | 53 | TString wagonName = Form("DiJetResponse_%s_%s_Rho%dTC%sMatch%dHadTrig%dRV%d",strJetsFull.Data(),strJetsFullMC.Data(),rhoType,trigClass.Data(),matchFullCh,(Int_t)(ptTrackBias),responseVar); |
3773435b | 54 | |
55 | //Configure DiJet task | |
e50460de | 56 | AliAnalysisTaskEmcalDiJetResponse *taskDiJet = new AliAnalysisTaskEmcalDiJetResponse(wagonName.Data()); |
3773435b | 57 | |
58 | Printf("strJetsFull: %s",strJetsFull.Data()); | |
59 | Printf("strJetsCh: %s",strJetsCh.Data()); | |
60 | ||
6ab30d5f | 61 | taskDiJet->SetIsPythiaPtHard(kTRUE); |
62 | ||
63 | taskDiJet->SetJetCorrelationType(corrType); | |
64 | ||
3773435b | 65 | taskDiJet->SetContainerFull(0); |
66 | taskDiJet->SetContainerCharged(1); | |
67 | taskDiJet->SetContainerFullMC(2); | |
68 | taskDiJet->SetContainerChargedMC(3); | |
69 | ||
70 | taskDiJet->AddParticleContainer(kTracksName.Data()); | |
71 | taskDiJet->AddClusterContainer(kClusName.Data()); | |
72 | ||
3773435b | 73 | taskDiJet->AddJetContainer(strJetsFull.Data(),"EMCAL",R); |
74 | taskDiJet->AddJetContainer(strJetsCh.Data(),"TPC",R); | |
75 | taskDiJet->AddJetContainer(strJetsFullMC.Data(),"EMCAL",R); | |
76 | taskDiJet->AddJetContainer(strJetsChMC.Data(),"TPC",R); | |
77 | ||
9e5eee5d | 78 | taskDiJet->SetZLeadingCut(0.98,0.98,0); |
79 | taskDiJet->SetZLeadingCut(0.98,0.98,2); | |
80 | ||
e50460de | 81 | taskDiJet->SetNEFCut(0.,nefCut,0); |
82 | taskDiJet->SetNEFCut(0.,nefCut,2); | |
83 | ||
bb84b374 | 84 | for(Int_t i=0; i<4; i++) { |
eca9052c | 85 | taskDiJet->SetPercAreaCut(0.6, i); |
bb84b374 | 86 | taskDiJet->SetPtBiasJetTrack(ptTrackBias,i); |
87 | } | |
3773435b | 88 | |
89 | taskDiJet->SetRhoType(rhoType); | |
90 | ||
91 | taskDiJet->SetCentralityEstimator(CentEst); | |
92 | ||
93 | taskDiJet->SelectCollisionCandidates(pSel); | |
94 | ||
95 | taskDiJet->SetFullChargedMatchingType(matchFullCh); | |
96 | ||
97 | taskDiJet->SetDoChargedCharged(kTRUE); | |
98 | taskDiJet->SetDoFullCharged(kTRUE); | |
99 | taskDiJet->SetMatchFullCharged(kTRUE); | |
100 | ||
6ab30d5f | 101 | taskDiJet->SetResponseVar(responseVar); |
102 | ||
3773435b | 103 | mgr->AddTask(taskDiJet); |
104 | ||
105 | //Connnect input | |
106 | mgr->ConnectInput (taskDiJet, 0, mgr->GetCommonInputContainer() ); | |
107 | ||
108 | //Connect output | |
109 | AliAnalysisDataContainer *coutput1 = 0x0; | |
110 | ||
6ab30d5f | 111 | TString contName(wagonName); |
112 | contName += "_histos"; | |
3773435b | 113 | |
6ab30d5f | 114 | // TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data()); |
115 | TString outputfile = Form("%s",AliAnalysisManager::GetCommonFileName()); | |
3773435b | 116 | |
6ab30d5f | 117 | coutput1 = mgr->CreateContainer(contName.Data(), TList::Class(),AliAnalysisManager::kOutputContainer,outputfile); |
3773435b | 118 | |
119 | mgr->ConnectOutput(taskDiJet,1,coutput1); | |
120 | ||
121 | return taskDiJet; | |
122 | } |