]>
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, | |
fcfc76cf | 10 | Double_t pTrg2max = 8.0, |
222d8ddc | 11 | // Double_t alpha = TMath::Pi(), |
12 | Double_t alphaB2B = TMath::Pi(), | |
13 | TString effLoc = "") | |
a75de518 | 14 | { |
15 | ||
16 | Bool_t UseFbits = kTRUE; | |
17 | ||
18 | //____________________________________| Correlation class setting.. | |
19 | AliAnalysisTaskDiJetCorrelations *dijetcorrelations = new AliAnalysisTaskDiJetCorrelations(""); | |
222d8ddc | 20 | dijetcorrelations->SelectCollisionCandidates(AliVEvent::kMB); |
a75de518 | 21 | dijetcorrelations->SetSystem(ppOrPbPb); //PbPb = kTRUE |
22 | dijetcorrelations->SetSEorME(SEorME); //kTRUE for mixed events | |
23 | if(SEorME)dijetcorrelations->SetMESettings(500, 25000, 8); //evt,track,minMixEvents | |
24 | dijetcorrelations->SetTrigger1PTValue(pTrg1min, pTrg1max); //GeV/c | |
25 | dijetcorrelations->SetTrigger2PTValue(pTrg2min, pTrg2max); //GeV/c | |
26 | dijetcorrelations->SetFilterBit(UseFbits); | |
27 | if(UseFbits)dijetcorrelations->SetFilterType(272); | |
222d8ddc | 28 | if(ppOrPbPb)dijetcorrelations->SetCentralityRange(0., 100); // 0-100% |
a75de518 | 29 | dijetcorrelations->SetDataType(kTRUE); //track Data/MC tracks=1 or MC Part=0? |
30 | dijetcorrelations->SetVarCentBin(kTRUE); // kTRUE have some trouble ! FIX ME | |
31 | dijetcorrelations->SetVarPtBin(kTRUE); // kTRUE have some trouble ! FIX ME | |
222d8ddc | 32 | // dijetcorrelations->SetAlphaAngle(alphaB2B); |
33 | if(effLoc!="")dijetcorrelations->SetEffCorrection(GetEfficiencyCorr(effLoc)); | |
34 | dijetcorrelations->SetAlphaAngle(alphaB2B); | |
35 | ||
36 | ||
37 | ||
a75de518 | 38 | // Create containers for input/output |
39 | TString finDirname = "_DiJetMayCERN"; | |
40 | TString inname = "cinputDiJetCorrelations"; | |
41 | TString outBasicname = "coutputDiJetBasicPlots"; | |
42 | TString outCorrname = "coutputDiJetCorrHistos"; | |
43 | ||
44 | finDirname += suffixName.Data(); | |
45 | inname += finDirname.Data(); | |
46 | outBasicname += finDirname.Data(); | |
47 | outCorrname += finDirname.Data(); | |
48 | ||
49 | ||
50 | // Get the pointer to the existing analysis manager via the static access method. | |
51 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
52 | if (!mgr) { | |
53 | cout<<"AddTaskDiJetCorrelations", "No analysis manager to connect to."<<endl; | |
54 | } | |
55 | ||
56 | mgr->AddTask(dijetcorrelations); | |
57 | ||
58 | //Input and Output Slots: | |
59 | AliAnalysisDataContainer *cinputDiJetCorrelations = mgr->CreateContainer(inname,TChain::Class(), AliAnalysisManager::kInputContainer); | |
60 | //TString outputfile = AliAnalysisManager::GetCommonFileName(); | |
61 | //outputfile += ":PWGCF_Di_Jet_Corr"; | |
fcfc76cf | 62 | TString outputfile = AliAnalysisManager::GetCommonFileName();//"resultsDiJetCorrelationsT112to16T25to8Dec8.root"; |
a75de518 | 63 | |
64 | ||
65 | AliAnalysisDataContainer *coutputDiJetCorrelations1 = mgr->CreateContainer(outBasicname,TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); | |
66 | AliAnalysisDataContainer *coutputDiJetCorrelations2 = mgr->CreateContainer(outCorrname,TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); | |
67 | ||
68 | ||
69 | mgr->ConnectInput(dijetcorrelations,0,mgr->GetCommonInputContainer()); | |
70 | mgr->ConnectOutput(dijetcorrelations,1,coutputDiJetCorrelations1); | |
71 | mgr->ConnectOutput(dijetcorrelations,2,coutputDiJetCorrelations2); | |
72 | ||
73 | return dijetcorrelations; | |
74 | ||
75 | } | |
fcfc76cf | 76 | |
77 | ||
222d8ddc | 78 | /* |
fcfc76cf | 79 | //loads the efficiency correction |
80 | TH3F *GetEfficiencyCorr(TString effLoc){ | |
81 | ||
82 | TFile* f = 0x0; | |
83 | f = TFile::Open(effLoc.Data()); | |
84 | if(!f){ | |
85 | Printf("%s%d no input data",(char*)__FILE__,__LINE__); | |
86 | return; | |
87 | } | |
88 | ||
89 | TH3F *tmp1 = (TH3F*)f->Get("hpTetaCentRec"); | |
90 | if(!tmp1){ | |
91 | Printf("%s%d Couldn't find hpTetaCentRec",(char*)__FILE__,__LINE__); | |
92 | return; | |
93 | } | |
94 | ||
222d8ddc | 95 | return (TH3F*)tmp1->Clone("fEffHist3D"); |
fcfc76cf | 96 | } |
222d8ddc | 97 | */ |