]>
Commit | Line | Data |
---|---|---|
a75de518 | 1 | |
2 | // $Id: AddTaskDiJetCorrelations.C | |
3 | ||
4 | AliAnalysisTaskDiJetCorrelations *AddTaskDiJetCorrelations(TString suffixName="", | |
5 | Bool_t SEorME = kTRUE, | |
6 | Bool_t ppOrPbPb = kTRUE, | |
7 | Double_t pTrg1min = 12.0, | |
8 | Double_t pTrg1max = 16.0, | |
9 | Double_t pTrg2min = 5.0, | |
10 | Double_t pTrg2max = 8.0) | |
11 | { | |
12 | ||
13 | Bool_t UseFbits = kTRUE; | |
14 | ||
15 | //____________________________________| Correlation class setting.. | |
16 | AliAnalysisTaskDiJetCorrelations *dijetcorrelations = new AliAnalysisTaskDiJetCorrelations(""); | |
17 | dijetcorrelations-> | |
18 | (AliVEvent::kMB); | |
19 | dijetcorrelations->SetSystem(ppOrPbPb); //PbPb = kTRUE | |
20 | dijetcorrelations->SetSEorME(SEorME); //kTRUE for mixed events | |
21 | if(SEorME)dijetcorrelations->SetMESettings(500, 25000, 8); //evt,track,minMixEvents | |
22 | dijetcorrelations->SetTrigger1PTValue(pTrg1min, pTrg1max); //GeV/c | |
23 | dijetcorrelations->SetTrigger2PTValue(pTrg2min, pTrg2max); //GeV/c | |
24 | dijetcorrelations->SetFilterBit(UseFbits); | |
25 | if(UseFbits)dijetcorrelations->SetFilterType(272); | |
26 | if(ppOrPbPb)dijetcorrelations->SetCentralityRange(0., 100.1); // 0-100% | |
27 | dijetcorrelations->SetDataType(kTRUE); //track Data/MC tracks=1 or MC Part=0? | |
28 | dijetcorrelations->SetVarCentBin(kTRUE); // kTRUE have some trouble ! FIX ME | |
29 | dijetcorrelations->SetVarPtBin(kTRUE); // kTRUE have some trouble ! FIX ME | |
30 | ||
31 | // Create containers for input/output | |
32 | TString finDirname = "_DiJetMayCERN"; | |
33 | TString inname = "cinputDiJetCorrelations"; | |
34 | TString outBasicname = "coutputDiJetBasicPlots"; | |
35 | TString outCorrname = "coutputDiJetCorrHistos"; | |
36 | ||
37 | finDirname += suffixName.Data(); | |
38 | inname += finDirname.Data(); | |
39 | outBasicname += finDirname.Data(); | |
40 | outCorrname += finDirname.Data(); | |
41 | ||
42 | ||
43 | // Get the pointer to the existing analysis manager via the static access method. | |
44 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
45 | if (!mgr) { | |
46 | cout<<"AddTaskDiJetCorrelations", "No analysis manager to connect to."<<endl; | |
47 | } | |
48 | ||
49 | mgr->AddTask(dijetcorrelations); | |
50 | ||
51 | //Input and Output Slots: | |
52 | AliAnalysisDataContainer *cinputDiJetCorrelations = mgr->CreateContainer(inname,TChain::Class(), AliAnalysisManager::kInputContainer); | |
53 | //TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
54 | //outputfile += ":PWGCF_Di_Jet_Corr"; | |
55 | TString outputfile = "resultsDiJetCorrelationsT112to16T25to8Dec8.root"; | |
56 | ||
57 | ||
58 | AliAnalysisDataContainer *coutputDiJetCorrelations1 = mgr->CreateContainer(outBasicname,TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); | |
59 | AliAnalysisDataContainer *coutputDiJetCorrelations2 = mgr->CreateContainer(outCorrname,TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); | |
60 | ||
61 | ||
62 | mgr->ConnectInput(dijetcorrelations,0,mgr->GetCommonInputContainer()); | |
63 | mgr->ConnectOutput(dijetcorrelations,1,coutputDiJetCorrelations1); | |
64 | mgr->ConnectOutput(dijetcorrelations,2,coutputDiJetCorrelations2); | |
65 | ||
66 | return dijetcorrelations; | |
67 | ||
68 | } |