]>
Commit | Line | Data |
---|---|---|
3b7aa4ba | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | //Draw 3-Particle correlations plots (using output of AliAnalysisTaskDiHadron) | |
16 | //Author: Jason Glyndwr Ulery, ulery@uni-frankfurt.de | |
17 | ||
18 | #ifndef __CINT__ | |
19 | #include <TF1.h> | |
20 | #include <TF2.h> | |
21 | #include "TSystem.h" | |
22 | #include <iostream> | |
23 | #include <TH1.h> | |
24 | #include <TH2.h> | |
25 | #include <TH3.h> | |
26 | #include <TRandom.h> | |
27 | #include <fstream> | |
28 | #include "TList.h" | |
29 | #include "TArrayF.h" | |
30 | #endif | |
31 | void Draw3Particle(float TPt1, float TPt2, float APt1, float APt2, float Cent1, float Cent2, int LSign=0){//ptWeighted 0 no weight, 1 weighted, 2 <pt>; Lsign 0-all, 1-like-sign 2-unlike-sign | |
32 | gROOT->Reset(); | |
33 | gROOT->LoadMacro("Util9.C"); | |
34 | Style(1); | |
35 | int SaveRoot=1; | |
36 | int SavePS=1; | |
37 | int SavePDF=0; | |
38 | float ZYACent=1.5;//-0to-1.99 2-particle stripes -2 two-particle 3-D min, -3 3-particle PhiPhi Min | |
39 | float ZYAWidth=0.2; | |
40 | int ReBinPhi=1; | |
41 | int ReBinEta=1; | |
42 | int DrawAsHisto=0; | |
43 | int noTitle=1; | |
44 | int SaveMacro=0; | |
45 | int SaveText=1; | |
46 | int DrawMC=1; | |
47 | int EffMethod=0;//0 no correction, 1 angle dependent, 2 use mix for triggered, 3 <1>, 4 fits, 5 fits with VariablePtLimit | |
48 | //int SaveEffFits=1; | |
49 | char *fileType=".gif"; | |
50 | ||
51 | //char *Folder="2010-08-17/LHC10b_7pass2"; | |
52 | //char *Folder="2010-08-17/LHC10c_900pass2"; | |
53 | //char *Folder="2010-08-17/LHC10c6_900Pythia"; | |
54 | char *Folder="2010-08-17/7Pythia_LHC10b5"; | |
55 | ||
56 | //char *EffFolder="2010-08-17/LHC10c6_900Pythia"; | |
57 | char *EffFolder="2010-08-17/7Pythia_LHC10b5"; | |
58 | ||
59 | char *cPt[3]={"","Pt","MPt"}; | |
60 | char *cDelta[2]={"Delta",""}; | |
61 | char *csign[3]={"","LS","ULS"}; | |
62 | char name[300]; | |
63 | char inName[100]; | |
64 | char effName[100]; | |
65 | sprintf(inName,"%s/julery_DiHadron.root",Folder); | |
66 | sprintf(effName,"%s/julery_DiHadron.root",EffFolder); | |
67 | cout << inName << endl; | |
68 | cout << effName << endl; | |
69 | char *titArray[2]={"","_NoTitle"}; | |
70 | char *histArray[2]={"","_Histo"}; | |
71 | ||
72 | Float_t MPt[4];//<pt>, error <pt>, # of triggers | |
73 | Float_t MPt2[4]; | |
74 | Float_t TrigSum=0, TrigSum2=0; | |
75 | ||
76 | TH1F *hPhiRaw=new TH1F("hPhiRaw","",1,0,1); | |
77 | TH1F *hPhiCorr=new TH1F("hPhiCorr","",1,0,1); | |
78 | TH1F *hPhiEff=new TH1F("hPhiEff","",1,0,1); | |
79 | TH1F *hPhiMC=new TH1F("hPhiMC","",1,0,1); | |
80 | TH1F *hPhiMixRaw=new TH1F("hPhiMixRaw","",1,0,1); | |
81 | TH1F *hPhiMixCorr=new TH1F("hPhiMixCorr","",1,0,1); | |
82 | TH1F *hPhiMixEff=new TH1F("hPhiMixEff","",1,0,1); | |
83 | TH1F *hPhiMixMC=new TH1F("hPhiMixMC","",1,0,1); | |
84 | ||
85 | TH1F *hEtaNRaw=new TH1F("hEtaNRaw","",1,0,1); | |
86 | TH1F *hEtaNCorr=new TH1F("hEtaNCorr","",1,0,1); | |
87 | TH1F *hEtaNEff=new TH1F("hEtaNEff","",1,0,1); | |
88 | TH1F *hEtaNMC=new TH1F("hEtaNMC","",1,0,1); | |
89 | TH1F *hEtaNMixRaw=new TH1F("hEtaNMixRaw","",1,0,1); | |
90 | TH1F *hEtaNMixCorr=new TH1F("hEtaNMixCorr","",1,0,1); | |
91 | TH1F *hEtaNMixEff=new TH1F("hEtaNMixEff","",1,0,1); | |
92 | TH1F *hEtaNMixMC=new TH1F("hEtaNMixMC","",1,0,1); | |
93 | ||
94 | TH1F *hEtaARaw=new TH1F("hEtaARaw","",1,0,1); | |
95 | TH1F *hEtaACorr=new TH1F("hEtaACorr","",1,0,1); | |
96 | TH1F *hEtaAEff=new TH1F("hEtaAEff","",1,0,1); | |
97 | TH1F *hEtaAMC=new TH1F("hEtaAMC","",1,0,1); | |
98 | TH1F *hEtaAMixRaw=new TH1F("hEtaAMixRaw","",1,0,1); | |
99 | TH1F *hEtaAMixCorr=new TH1F("hEtaAMixCorr","",1,0,1); | |
100 | TH1F *hEtaAMixEff=new TH1F("hEtaAMixEff","",1,0,1); | |
101 | TH1F *hEtaAMixMC=new TH1F("hEtaAMixMC","",1,0,1); | |
102 | ||
103 | TH2F *hPhiEtaRaw=new TH2F("hPhiEtaRaw","",1,0,1,1,0,1); | |
104 | TH2F *hPhiEtaCorr=new TH2F("hPhiEtaCorr","",1,0,1,1,0,1); | |
105 | TH2F *hPhiEtaEff=new TH2F("hPhiEtaEff","",1,0,1,1,0,1); | |
106 | TH2F *hPhiEtaMC=new TH2F("hPhiEtaMC","",1,0,1,1,0,1); | |
107 | TH2F *hPhiEtaMixRaw=new TH2F("hPhiEtaMixRaw","",1,0,1,1,0,1); | |
108 | TH2F *hPhiEtaMixCorr=new TH2F("hPhiEtaMixCorr","",1,0,1,1,0,1); | |
109 | TH2F *hPhiEtaMixEff=new TH2F("hPhiEtaMixEff","",1,0,1,1,0,1); | |
110 | TH2F *hPhiEtaMixMC=new TH2F("hPhiEtaMixMC","",1,0,1,1,0,1); | |
111 | TH1F *hMult=new TH1F("hMult","",1,0,1); | |
112 | TH1F *hTMult=new TH1F("hTMult","",1,0,1); | |
113 | TH1F *hNTrig=new TH1F("hNTrig","Number of Triggers",1,-0.5,0.5); | |
114 | ||
115 | TH2F *hPhiPhiRaw=new TH2F("hPhiPhiRaw","",1,0,1,1,0,1); | |
116 | TH2F *hPhiPhiCorr=new TH2F("hPhiPhiCorr","",1,0,1,1,0,1); | |
117 | TH2F *hPhiPhiEff=new TH2F("hPhiPhiEff","",1,0,1,1,0,1); | |
118 | TH2F *hPhiPhiMC=new TH2F("hPhiPhiMC","",1,0,1,1,0,1); | |
119 | TH2F *hPhiPhiSSRaw=new TH2F("hPhiPhiSSRaw","",1,0,1,1,0,1); | |
120 | TH2F *hPhiPhiSSCorr=new TH2F("hPhiPhiSSCorr","",1,0,1,1,0,1); | |
121 | TH2F *hPhiPhiSSEff=new TH2F("hPhiPhiSSEff","",1,0,1,1,0,1); | |
122 | TH2F *hPhiPhiSSMC=new TH2F("hPhiPhiSSMC","",1,0,1,1,0,1); | |
123 | TH2F *hPhiPhiMixRaw=new TH2F("hPhiPhiMixRaw","",1,0,1,1,0,1); | |
124 | TH2F *hPhiPhiMixCorr=new TH2F("hPhiPhiMixCorr","",1,0,1,1,0,1); | |
125 | TH2F *hPhiPhiMixEff=new TH2F("hPhiPhiMixEff","",1,0,1,1,0,1); | |
126 | TH2F *hPhiPhiMixMC=new TH2F("hPhiPhiMixMC","",1,0,1,1,0,1); | |
127 | ||
128 | TH2F *hEtaEtaRaw=new TH2F("hEtaEtaRaw","",1,0,1,1,0,1); | |
129 | TH2F *hEtaEtaCorr=new TH2F("hEtaEtaCorr","",1,0,1,1,0,1); | |
130 | TH2F *hEtaEtaEff=new TH2F("hEtaEtaEff","",1,0,1,1,0,1); | |
131 | TH2F *hEtaEtaMC=new TH2F("hEtaEtaMC","",1,0,1,1,0,1); | |
132 | TH2F *hEtaEtaSSRaw=new TH2F("hEtaEtaSSRaw","",1,0,1,1,0,1); | |
133 | TH2F *hEtaEtaSSCorr=new TH2F("hEtaEtaSSCorr","",1,0,1,1,0,1); | |
134 | TH2F *hEtaEtaSSEff=new TH2F("hEtaEtaSSEff","",1,0,1,1,0,1); | |
135 | TH2F *hEtaEtaSSMC=new TH2F("hEtaEtaSSMC","",1,0,1,1,0,1); | |
136 | TH2F *hEtaEtaMixRaw=new TH2F("hEtaEtaMixRaw","",1,0,1,1,0,1); | |
137 | TH2F *hEtaEtaMixCorr=new TH2F("hEtaEtaMixCorr","",1,0,1,1,0,1); | |
138 | TH2F *hEtaEtaMixEff=new TH2F("hEtaEtaMixEff","",1,0,1,1,0,1); | |
139 | TH2F *hEtaEtaMixMC=new TH2F("hEtaEtaMixMC","",1,0,1,1,0,1); | |
140 | ||
141 | TH1F *hPhiPhiNOn=new TH1F("hPhiPhiNOn","",1,0,1); | |
142 | TH1F *hPhiPhiAOn=new TH1F("hPhiPhiAOn","",1,0,1); | |
143 | TH1F *hPhiPhiNOff=new TH1F("hPhiPhiNOff","",1,0,1); | |
144 | TH1F *hPhiPhiAOff=new TH1F("hPhiPhiAOff","",1,0,1); | |
145 | ||
146 | TH1F *hEtaEtaNOn=new TH1F("hEtaEtaNOn","",1,0,1); | |
147 | TH1F *hEtaEtaNOff=new TH1F("hEtaEtaNOff","",1,0,1); | |
148 | ||
149 | //TH1F *hNEvents=new TH1F("hNEvents","Number of Events & In Selected Cent",2,-0.5,1.5); | |
150 | ||
151 | TF1 *ZeroLine=new TF1("ZeroLine","[0]",-2,7); | |
152 | ZeroLine->SetParameter(0,0); | |
153 | ZeroLine->SetLineStyle(2); | |
154 | TF1 *fit1=new TF1("fit1","1/sqrt(2*3.1415926)*([0]/[1]*(exp(-0.5*pow(x/[1],2))+exp(-0.5*pow((x-6.29185)/[1],2)))+[2]/[3]*(exp(-0.5*pow((x-3.14159)/[3],2))+exp(-0.5*pow((x+3.14159)/[3],2))))+[4]"); | |
155 | fit1->SetParameters(.1,.2,.1,.35,.1); | |
156 | fit1->SetParNames("Near-Yield", "Near-Width","Away-Yield","Away-Width","Bg-Level"); | |
157 | TF1 *fit2=new TF1("fit2","1/sqrt(2*3.1415926)*([0]/[1]*(exp(-0.5*pow(x/[1],2))))+[2]"); | |
158 | fit2->SetParameters(.1,.2,.1); | |
159 | fit2->SetParNames("Near-Yield", "Near-Width","Bg-Level"); | |
160 | ||
161 | int VariablePtLimit=0;//if 1 and EffMethod==4 then a variable upper limit on the associated pt is used | |
162 | if(EffMethod==5)VariablePtLimit=1; | |
163 | ||
164 | TFile *inFile=new TFile(inName); | |
165 | TList *inList=inFile->Get("julery_DiHadron"); | |
166 | //sprintf(xname,"fHistNEvents_C%d",xCent); | |
167 | TH1F *hNEvents=(TH1F*)inList->FindObject("fHistNEvents_C0"); | |
168 | //cout << "Number of Events: " << hNEvents->GetBinContent(1) << endl; | |
169 | TFile *effFile=new TFile(effName); | |
170 | TList *effList=effFile->Get("julery_DiHadron"); | |
171 | for(int Cent=Cent1;Cent<=Cent2;Cent++){ | |
172 | MakeProjections(TPt1,TPt2,APt1,APt2,Cent,inList,hPhiRaw,hPhiMixRaw,hEtaNRaw,hEtaNMixRaw,hEtaARaw,hEtaAMixRaw,hPhiEtaRaw,hPhiEtaMixRaw,MPt,0,0,0,LSign); | |
173 | MakeProjections(TPt1,TPt2,APt1,APt2,Cent,effList,hPhiEff,hPhiMixEff,hEtaNEff,hEtaNMixEff,hEtaAEff,hEtaAMixEff,hPhiEtaEff,hPhiEtaMixEff,MPt2,0,0,0,LSign); | |
174 | MakeProjections(TPt1,TPt2,APt1,APt2,Cent,effList,hPhiMC,hPhiMixMC,hEtaNMC,hEtaNMixMC,hEtaAMC,hEtaAMixMC,hPhiEtaMC,hPhiEtaMixMC,MPt2,0,1,0,LSign); | |
175 | ||
176 | if(EffMethod<4){ | |
177 | EffCorr2(TPt1,TPt2,APt1,APt2,Cent,hPhiEff,hPhiMC,hPhiMixEff,hPhiMixMC,hEtaNEff,hEtaNMC,hEtaNMixEff,hEtaNMixMC,hEtaAEff,hEtaAMC,hEtaAMixEff,hEtaAMixMC,hPhiEtaEff,hPhiEtaMC,hPhiEtaMixEff,hPhiEtaMixMC,EffMethod); | |
178 | } | |
179 | else{ | |
180 | EffFit(APt1,APt2,Cent,effList,hPhiEff,hPhiMixEff,hEtaNEff,hEtaNMixEff,hEtaAEff,hEtaAMixEff,hPhiEtaEff,hPhiEtaMixEff,LSign,VariablePtLimit); | |
181 | } | |
182 | //inFile->Close(); | |
183 | // TFile *inFile2=new TFile(inName); | |
184 | // TList *inList2=inFile2->Get("julery_DiHadron"); | |
185 | Load3Particle(TPt1,TPt2,APt1,APt2,Cent,inList,hPhiPhiRaw,hPhiPhiSSRaw,hPhiPhiMixRaw,hEtaEtaRaw,hEtaEtaSSRaw,hEtaEtaMixRaw,0,LSign); | |
186 | Load3Particle(TPt1,TPt2,APt1,APt2,Cent,effList,hPhiPhiEff,hPhiPhiSSEff,hPhiPhiMixEff,hEtaEtaEff,hEtaEtaSSEff,hEtaEtaMixEff,0,LSign); | |
187 | Load3Particle(TPt1,TPt2,APt1,APt2,Cent,effList,hPhiPhiMC,hPhiPhiSSMC,hPhiPhiMixMC,hEtaEtaMC,hEtaEtaSSMC,hEtaEtaMixMC,1,LSign); | |
188 | ||
189 | EffCorr3Part(TPt1,TPt2,APt1,APt2,Cent,hPhiPhiEff,hPhiPhiMC,hPhiPhiSSEff,hPhiPhiSSMC,hPhiPhiMixEff,hPhiPhiMixMC,hEtaEtaEff,hEtaEtaMC,hEtaEtaSSEff,hEtaEtaSSMC,hEtaEtaMixEff,hEtaEtaMixMC,0); | |
190 | ||
191 | hPhiCorr=(TH1F*)hPhiRaw->Clone(); | |
192 | sprintf(name,"hPhiCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
193 | hPhiCorr->SetName(name); | |
194 | hPhiCorr->Divide(hPhiEff); | |
195 | ||
196 | hPhiMixCorr=(TH1F*)hPhiMixRaw->Clone(); | |
197 | sprintf(name,"hPhiMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
198 | hPhiMixCorr->SetName(name); | |
199 | hPhiMixCorr->Divide(hPhiMixEff); | |
200 | ||
201 | hEtaNCorr=(TH1F*)hEtaNRaw->Clone(); | |
202 | sprintf(name,"hEtaNCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
203 | hEtaNCorr->SetName(name); | |
204 | hEtaNCorr->Divide(hEtaNEff); | |
205 | ||
206 | hEtaNMixCorr=(TH1F*)hEtaNMixRaw->Clone(); | |
207 | sprintf(name,"hEtaNMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
208 | hEtaNMixCorr->SetName(name); | |
209 | hEtaNMixCorr->Divide(hEtaNMixEff); | |
210 | ||
211 | hEtaACorr=(TH1F*)hEtaARaw->Clone(); | |
212 | sprintf(name,"hEtaACorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
213 | hEtaACorr->SetName(name); | |
214 | hEtaACorr->Divide(hEtaAEff); | |
215 | ||
216 | hEtaAMixCorr=(TH1F*)hEtaAMixRaw->Clone(); | |
217 | sprintf(name,"hEtaAMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
218 | hEtaAMixCorr->SetName(name); | |
219 | hEtaAMixCorr->Divide(hEtaAMixEff); | |
220 | ||
221 | hPhiEtaCorr=(TH2F*)hPhiEtaRaw->Clone(); | |
222 | sprintf(name,"hPhiEtaCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
223 | hPhiEtaCorr->SetName(name); | |
224 | hPhiEtaCorr->Divide(hPhiEtaEff); | |
225 | ||
226 | hPhiEtaMixCorr=(TH2F*)hPhiEtaMixRaw->Clone(); | |
227 | sprintf(name,"hPhiMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
228 | hPhiEtaMixCorr->SetName(name); | |
229 | hPhiEtaMixCorr->Divide(hPhiEtaMixEff); | |
230 | ||
231 | hPhiPhiCorr=(TH2F*)hPhiPhiRaw->Clone(); | |
232 | sprintf(name,"hPhiPhiCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
233 | hPhiPhiCorr->SetName(name); | |
234 | hPhiPhiCorr->Divide(hPhiPhiEff); | |
235 | ||
236 | hPhiPhiSSCorr=(TH2F*)hPhiPhiSSRaw->Clone(); | |
237 | sprintf(name,"hPhiPhiSSCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
238 | hPhiPhiSSCorr->SetName(name); | |
239 | hPhiPhiSSCorr->Divide(hPhiPhiSSEff); | |
240 | ||
241 | hPhiPhiMixCorr=(TH2F*)hPhiPhiMixRaw->Clone(); | |
242 | sprintf(name,"hPhiPhiMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
243 | hPhiPhiMixCorr->SetName(name); | |
244 | cout << "hPhiPhiMixCorr: " << hPhiPhiMixCorr->GetBinContent(1,1) << " " << hPhiPhiMixCorr->GetBinError(1,1) << endl; | |
245 | hPhiPhiMixCorr->Divide(hPhiPhiMixEff); | |
246 | hPhiPhiMixCorr->Scale(hPhiPhiSSCorr->GetSum()/hPhiPhiMixCorr->GetSum()); | |
247 | cout << "hPhiPhiMixCorr: " << hPhiPhiMixCorr->GetBinContent(1,1) << " " << hPhiPhiMixCorr->GetBinError(1,1) << endl; | |
248 | cout << "hPhiPhiMixEff: " << hPhiPhiMixEff->GetBinContent(1,1) << " " << hPhiPhiMixEff->GetBinError(1,1) << endl; | |
249 | ||
250 | hEtaEtaCorr=(TH2F*)hEtaEtaRaw->Clone(); | |
251 | sprintf(name,"hEtaEtaCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
252 | hEtaEtaCorr->SetName(name); | |
253 | hEtaEtaCorr->Divide(hEtaEtaEff); | |
254 | ||
255 | hEtaEtaSSCorr=(TH2F*)hEtaEtaSSRaw->Clone(); | |
256 | sprintf(name,"hEtaEtaSSCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
257 | hEtaEtaSSCorr->SetName(name); | |
258 | hEtaEtaSSCorr->Divide(hEtaEtaSSEff); | |
259 | ||
260 | hEtaEtaMixCorr=(TH2F*)hEtaEtaMixRaw->Clone(); | |
261 | sprintf(name,"hEtaEtaMixCorr_%2.2fPT%2.2f_%2.2fpt%2.2f_%d",TPt1,TPt2,APt1,APt2,Cent); | |
262 | hEtaEtaMixCorr->SetName(name); | |
263 | ||
264 | hEtaEtaMixCorr->Divide(hEtaEtaMixEff); | |
265 | hEtaEtaMixCorr->Scale(hEtaEtaSSCorr->GetSum()/hEtaEtaMixCorr->GetSum()); | |
266 | ||
267 | ||
268 | //Deal with efficiencies of 0 | |
269 | for(int x=1;x<=hPhiCorr->GetNbinsX();x++){ | |
270 | if(hPhiEff->GetBinContent(x)<1E-10)hPhiCorr->SetBinContent(x,0); | |
271 | if(hPhiMixEff->GetBinContent(x)<1E-10)hPhiMixCorr->SetBinContent(x,0); | |
272 | } | |
273 | for(int x=1;x<=hEtaNCorr->GetNbinsX();x++){ | |
274 | if(hEtaNEff->GetBinContent(x)<1E-10)hEtaNCorr->SetBinContent(x,0); | |
275 | if(hEtaNMixEff->GetBinContent(x)<1E-10)hEtaNMixCorr->SetBinContent(x,0); | |
276 | if(hEtaAEff->GetBinContent(x)<1E-10)hEtaACorr->SetBinContent(x,0); | |
277 | if(hEtaAMixEff->GetBinContent(x)<1E-10)hEtaAMixCorr->SetBinContent(x,0); | |
278 | } | |
279 | for(int x=1;x<=hPhiEtaCorr->GetNbinsX();x++){ | |
280 | for(int y=1;y<=hPhiCorr->GetNbinsX();y++){ | |
281 | if(hPhiEtaEff->GetBinContent(x,y)<1E-10)hPhiEtaCorr->SetBinContent(x,y,0); | |
282 | if(hPhiEtaMixEff->GetBinContent(x,y)<1E-10)hPhiEtaMixCorr->SetBinContent(x,y,0); | |
283 | } | |
284 | } | |
285 | for(int x=1;x<=hPhiPhiCorr->GetNbinsX();x++){ | |
286 | for(int y=1;y<=hPhiPhiCorr->GetNbinsY();y++){ | |
287 | if(hPhiPhiCorr->GetBinContent(x,y)<1E-10)hPhiPhiCorr->SetBinContent(x,y,0); | |
288 | if(hPhiPhiSSCorr->GetBinContent(x,y)<1E-10)hPhiPhiSSCorr->SetBinContent(x,y,0); | |
289 | if(hPhiPhiMixCorr->GetBinContent(x,y)<1E-10)hPhiPhiMixCorr->SetBinContent(x,y,0); | |
290 | } | |
291 | } | |
292 | for(int x=1;x<=hEtaEtaCorr->GetNbinsX();x++){ | |
293 | for(int y=1;y<=hEtaEtaCorr->GetNbinsY();y++){ | |
294 | if(hEtaEtaCorr->GetBinContent(x,y)<1E-10)hEtaEtaCorr->SetBinContent(x,y,0); | |
295 | if(hEtaEtaSSCorr->GetBinContent(x,y)<1E-10)hEtaEtaSSCorr->SetBinContent(x,y,0); | |
296 | if(hEtaEtaMixCorr->GetBinContent(x,y)<1E-10)hEtaEtaMixCorr->SetBinContent(x,y,0); | |
297 | } | |
298 | } | |
299 | ||
300 | // GeoCorr2(hEtaNCorr,hEtaNMixCorr,hEtaACorr,hEtaAMixCorr,hPhiEtaCorr,hPhiEtaMixCorr); | |
301 | //GeoCorr3Part2(hEtaEtaCorr,hEtaEtaSSCorr,hEtaEtaMixCorr, hEtaEtaHSCorr); | |
302 | MixedCorrect(hPhiCorr,hPhiMixCorr,hEtaNCorr,hEtaNMixCorr,hEtaACorr,hEtaAMixCorr,hPhiEtaCorr,hPhiEtaMixCorr); | |
303 | MixedCorrect3(hPhiPhiCorr,hPhiPhiSSCorr,hPhiPhiMixCorr,hEtaEtaCorr,hEtaEtaSSCorr,hEtaEtaMixCorr); | |
304 | ||
305 | float a[3]; | |
306 | Float_t b=(hPhiPhiCorr->GetSum()/pow(hPhiCorr->GetSum(),2))/(hPhiPhiSSCorr->GetSum()/pow(hPhiMixCorr->GetSum(),2)); | |
307 | // b=1; | |
308 | cout << "b:= " << b << endl; | |
309 | float bEta=(hEtaEtaCorr->GetSum()/pow(hEtaNCorr->GetSum(),2))/(hEtaEtaSSCorr->GetSum()/pow(hEtaNMixCorr->GetSum(),2)); | |
310 | float bEta2=bEta; | |
311 | //bEta=b; | |
312 | cout << "bEta:= " << bEta << endl; | |
313 | if(ZYACent>0){ | |
314 | ZYA1(hPhiCorr,hPhiMixCorr,a,ZYACent,ZYAWidth); | |
315 | cout << "a: " << a[0] << " Error: " << a[1] << " Error Code: " << a[2] << " <pT>: " << MPt[0] << endl; | |
316 | } | |
317 | else if(ZYACent>-2){ | |
318 | ZYAM2D2(hPhiEtaCorr,hPhiEtaMixCorr,a,fabs(ZYACent),ZYAWidth); | |
319 | cout << "a: " << a[0] << " Error: " << a[1] << " Error Code: " << a[2] << " <pT>: " << MPt[0] << endl; | |
320 | } | |
321 | else if(fabs(ZYACent+2)<0.1) ZYAM2D(hPhiEtaCorr,hPhiEtaMixCorr,a,72,10); | |
322 | else if(fabs(ZYACent+3)<0.1) ZYAM3(hPhiCorr, hPhiMixCorr, hPhiPhiCorr,hPhiPhiSSCorr,hPhiPhiMixCorr, a, b,36,50); | |
323 | ||
324 | hPhiMixCorr->Scale(a[0]); | |
325 | hEtaNMixCorr->Scale(a[0]); | |
326 | float scale3=a[0]*a[0]*b; | |
327 | //bEta2=0; | |
328 | float scale3Eta=a[0]*a[0]*bEta; | |
329 | float scale3Eta2=a[0]*a[0]*bEta2; | |
330 | hPhiPhiMixCorr->Scale(scale3); | |
331 | hPhiPhiSSCorr->Scale(scale3); | |
332 | // hEtaEtaSSCorr->Add(hEtaEtaMixCorr,-1); | |
333 | hEtaEtaMixCorr->Scale(scale3Eta2); | |
334 | hEtaEtaSSCorr->Scale(scale3Eta); | |
335 | // hEtaEtaSSCorr->Add(hEtaEtaMixCorr); | |
336 | ||
337 | TH2F *hPhiPhiHSCorr=(TH2F*)hPhiPhiCorr->Clone(); | |
338 | hPhiPhiHSCorr->SetName("hPhiPhiHSCorr"); | |
339 | hPhiPhiHSCorr->SetTitle("Hard-Soft Term"); | |
340 | ||
341 | /* | |
342 | TH2F *hEtaEtaHSCorr=(TH2F*)hEtaEtaMixRaw->Clone(); | |
343 | hEtaEtaHSCorr->SetName("hEtaEtaHSCorr"); | |
344 | hEtaEtaHSCorr->SetTitle("Hard-Soft Term"); | |
345 | */ | |
346 | float binsx=hEtaEtaCorr->GetNbinsX(); | |
347 | float minx=hEtaEtaCorr->GetBinCenter(1)-hEtaEtaCorr->GetBinWidth(1)/2; | |
348 | float maxx=hEtaEtaCorr->GetBinCenter(binsx)+hEtaEtaCorr->GetBinWidth(binsx)/2; | |
349 | TH2F *hEtaEtaHSCorr=new TH2F("hEtaEtaHCCorr","Hard-Soft Term",binsx,minx,maxx,binsx,minx,maxx); | |
350 | hEtaEtaHSCorr->Sumw2(); | |
351 | ||
352 | ||
353 | TH1F *hPhiCorr2=(TH1F*)hPhiCorr->Clone(); | |
354 | hPhiCorr2->SetName("hPhiCorr2"); | |
355 | hPhiCorr2->Add(hPhiMixCorr,-1); | |
356 | ||
357 | TH1F *hEtaNCorr2=(TH1F*)hEtaNCorr->Clone(); | |
358 | hEtaNCorr2->SetName("hEtaNCorr2"); | |
359 | hEtaNCorr2->Add(hEtaNMixCorr,-1); | |
360 | ||
361 | float sigX, sigY, esigX, esigY, sig; | |
362 | float mixX, mixY, emixX, emixY, esig; | |
363 | int binRatio=hPhiCorr->GetNbinsX()/hPhiPhiCorr->GetNbinsX(); | |
364 | float CheckRatio=hPhiCorr->GetNbinsX()/hPhiPhiCorr->GetNbinsX(); | |
365 | if(fabs(binRatio-CheckRatio)>0.01){ | |
366 | cout << "Warning Use Bins for 3-Particle That are Divisors of 2-Particle!!!!!! Phi" << endl; | |
367 | } | |
368 | // cout << "binRatio " << binRatio << endl; | |
369 | for(int x=1;x<=hPhiPhiCorr->GetNbinsX();x++){ | |
370 | sigX=0; esigX=0; mixX=0; emixX=0; | |
371 | for(int j=(binRatio*(x-1)+1);j<=(x*binRatio);j++){ | |
372 | sigX+=hPhiCorr2->GetBinContent(j); | |
373 | esigX+=pow(hPhiCorr2->GetBinError(j),2); | |
374 | mixX+=hPhiMixCorr->GetBinContent(j); | |
375 | emixX+=pow(hPhiMixCorr->GetBinError(j),2); | |
376 | } | |
377 | for(int y=1;y<=hPhiPhiCorr->GetNbinsX();y++){ | |
378 | sigY=0; esigY=0; mixY=0; emixY=0; | |
379 | for(int k=(binRatio*(y-1)+1);k<=(y*binRatio);k++){ | |
380 | sigY+=hPhiCorr2->GetBinContent(k); | |
381 | esigY+=pow(hPhiCorr2->GetBinError(k),2); | |
382 | mixY+=hPhiMixCorr->GetBinContent(k); | |
383 | emixY+=pow(hPhiMixCorr->GetBinError(k),2); | |
384 | } | |
385 | //cout << sigX << " " << sigY << " " << esigX << " " << esigY << " " << mixX << " " << emixX << " " << mixY << " " << emixY << endl; | |
386 | sig=sigX*mixY+sigY*mixX; | |
387 | esig=pow(pow(sigX*mixY,2)*(esigX/sigX/sigX+emixY/mixY/mixY)+pow(sigY*mixX,2)*(esigY/sigY/sigY+emixX/mixX/mixX),0.5); | |
388 | sig=sig/pow(binRatio,2); | |
389 | esig=esig/pow(binRatio,2); | |
390 | hPhiPhiHSCorr->SetBinContent(x,y,sig); | |
391 | hPhiPhiHSCorr->SetBinError(x,y,esig); | |
392 | } | |
393 | } | |
394 | ||
395 | float sigX, sigY, esigX, esigY, sig; | |
396 | float mixX, mixY, emixX, emixY, esig; | |
397 | float centX, centY; | |
398 | int binRatio=hEtaNCorr->GetNbinsX()/hEtaEtaCorr->GetNbinsX(); | |
399 | float CheckRatio=hEtaNCorr->GetNbinsX()/hEtaEtaCorr->GetNbinsX(); | |
400 | float etaCut=hEtaNCorr->GetBinCenter(hEtaNCorr->GetNbinsX())+hEtaNCorr->GetBinWidth(1); | |
401 | if(fabs(binRatio-CheckRatio)>0.01){ | |
402 | cout << "Warning Use Bins for 3-Particle That are Divisors of 2-Particle!!!!!! Eta" << endl; | |
403 | } | |
404 | for(int x=1;x<=hEtaNCorr->GetNbinsX();x++){ | |
405 | sigX=0; esigX=0; mixX=0; emixX=0; | |
406 | centX=hEtaEtaCorr->GetXaxis()->GetBinCenter(x); | |
407 | for(int j=(binRatio*(x-1)+1);j<=(x*binRatio);j++){ | |
408 | sigX+=hEtaNCorr2->GetBinContent(j); | |
409 | esigX+=hEtaNCorr2->GetBinError(j); | |
410 | mixX+=hEtaNMixCorr->GetBinContent(j); | |
411 | emixX+=hEtaNMixCorr->GetBinError(j); | |
412 | } | |
413 | for(int y=1;y<=hEtaNCorr->GetNbinsX();y++){ | |
414 | sigY=0; esigY=0; mixY=0; emixY=0; | |
415 | centY=hEtaEtaCorr->GetXaxis()->GetBinCenter(y); | |
416 | for(int k=(binRatio*(y-1)+1);k<=(y*binRatio);k++){ | |
417 | sigY+=hEtaNCorr2->GetBinContent(k); | |
418 | esigY+=hEtaNCorr2->GetBinError(k); | |
419 | mixY+=hEtaNMixCorr->GetBinContent(k); | |
420 | emixY+=hEtaNMixCorr->GetBinError(k); | |
421 | } | |
422 | sig=sigX*mixY+sigY*mixX; | |
423 | ||
424 | //divide by 0 protection | |
425 | if(sigX==0)sigX=1E-5; | |
426 | if(sigY==0)sigY=1E-5; | |
427 | if(mixX==0)mixX=1E-5; | |
428 | if(mixY==0)mixY=1E-5; | |
429 | esig=pow(pow(sigX*mixY,2)*(pow(esigX/sigX,2)+pow(emixY/mixY,2))+pow(sigY*mixX,2)*(pow(esigY/sigY,2)+pow(emixX/mixX,2)),0.5); | |
430 | //if(fabs(centX-centY)>etaCut){sig=0;esig=0;} | |
431 | if(hEtaEtaMixCorr->GetBinContent(x,y)){ | |
432 | hEtaEtaHSCorr->SetBinContent(x,y,sig/binRatio/binRatio); | |
433 | hEtaEtaHSCorr->SetBinError(x,y,esig/binRatio/binRatio); | |
434 | } | |
435 | //else cout << hEtaEtaSSCorr->GetBinContent(x,y) << " " << hEtaEtaHSCorr->GetBinError(x,y) << endl; | |
436 | } | |
437 | } | |
438 | ||
439 | ||
440 | ||
441 | // hEtaNCorr2=(TH1F*)hEtaNCorr->Clone(); | |
442 | // hEtaNCorr2->SetName("hEtaNCorr2"); | |
443 | // hEtaNCorr2->Add(hEtaNMixCorr,-1); | |
444 | ||
445 | ||
446 | TH2F *hPhiPhiCorr2=(TH2F*)hPhiPhiCorr->Clone(); | |
447 | hPhiPhiCorr2->SetName("hPhiPhiCorr2"); | |
448 | hPhiPhiCorr2->SetTitle("Background Subtracted"); | |
449 | hPhiPhiCorr2->Add(hPhiPhiHSCorr,-1); | |
450 | hPhiPhiCorr2->Add(hPhiPhiSSCorr,-1); | |
451 | ||
452 | TH2F *hEtaEtaCorr2=(TH2F*)hEtaEtaCorr->Clone(); | |
453 | hEtaEtaCorr2->SetName("hEtaEtaCorr2"); | |
454 | hEtaEtaCorr2->SetTitle("Background Subtracted"); | |
455 | hEtaEtaCorr2->Add(hEtaEtaHSCorr,-1); | |
456 | hEtaEtaCorr2->Add(hEtaEtaSSCorr,-1); | |
457 | ||
458 | //here need to sum over the centralities | |
459 | ||
460 | ProjPhiPhi(hPhiPhiCorr2,hPhiPhiNOn,hPhiPhiNOff,hPhiPhiAOn,hPhiPhiAOff,1,0.35);//0.35 | |
461 | ProjEtaEta(hEtaEtaCorr2,hEtaEtaNOn,hEtaEtaNOff,0.35); | |
462 | ||
463 | cPhiAll=new TCanvas("cPhiAll","3-Particle Phi",1500,900); | |
464 | cPhiAll->Divide(4,3); | |
465 | // SetMargins1D(cPhiAll_1); | |
466 | //1-D plots | |
467 | float RM1=0.02; | |
468 | float LM1=0.16; | |
469 | float TM1=0.1; | |
470 | float BM1=0.15; | |
471 | //colz | |
472 | float RM2=0.25; | |
473 | float LM2=0.12; | |
474 | float TM2=0.1; | |
475 | float BM2=0.15; | |
476 | //surf | |
477 | float RM3=0.05; | |
478 | float LM3=0.21; | |
479 | float TM3=0.05; | |
480 | float BM3=0.15; | |
481 | ||
482 | cPhiAll_1->SetRightMargin(RM1); | |
483 | cPhiAll_1->SetLeftMargin(LM1); | |
484 | cPhiAll_1->SetTopMargin(TM1); | |
485 | cPhiAll_1->SetBottomMargin(BM1); | |
486 | ||
487 | cPhiAll_2->SetRightMargin(RM1); | |
488 | cPhiAll_2->SetLeftMargin(LM1); | |
489 | cPhiAll_2->SetTopMargin(TM1); | |
490 | cPhiAll_2->SetBottomMargin(BM1); | |
491 | ||
492 | cPhiAll_3->SetRightMargin(RM3); | |
493 | cPhiAll_3->SetLeftMargin(LM3); | |
494 | cPhiAll_3->SetTopMargin(TM3); | |
495 | cPhiAll_3->SetBottomMargin(BM3); | |
496 | ||
497 | cPhiAll_4->SetRightMargin(RM2); | |
498 | cPhiAll_4->SetLeftMargin(LM2); | |
499 | cPhiAll_4->SetTopMargin(TM2); | |
500 | cPhiAll_4->SetBottomMargin(BM2); | |
501 | ||
502 | cPhiAll_5->SetRightMargin(RM3); | |
503 | cPhiAll_5->SetLeftMargin(LM3); | |
504 | cPhiAll_5->SetTopMargin(TM3); | |
505 | cPhiAll_5->SetBottomMargin(BM3); | |
506 | ||
507 | cPhiAll_6->SetRightMargin(RM2); | |
508 | cPhiAll_6->SetLeftMargin(LM2); | |
509 | cPhiAll_6->SetTopMargin(TM2); | |
510 | cPhiAll_6->SetBottomMargin(BM2); | |
511 | ||
512 | cPhiAll_7->SetRightMargin(RM3); | |
513 | cPhiAll_7->SetLeftMargin(LM3); | |
514 | cPhiAll_7->SetTopMargin(TM3); | |
515 | cPhiAll_7->SetBottomMargin(BM3); | |
516 | ||
517 | cPhiAll_8->SetRightMargin(RM2); | |
518 | cPhiAll_8->SetLeftMargin(LM2); | |
519 | cPhiAll_8->SetTopMargin(TM2); | |
520 | cPhiAll_8->SetBottomMargin(BM2); | |
521 | ||
522 | cPhiAll_9->SetRightMargin(RM3); | |
523 | cPhiAll_9->SetLeftMargin(LM3); | |
524 | cPhiAll_9->SetTopMargin(TM3); | |
525 | cPhiAll_9->SetBottomMargin(BM3); | |
526 | ||
527 | cPhiAll_10->SetRightMargin(RM2); | |
528 | cPhiAll_10->SetLeftMargin(LM2); | |
529 | cPhiAll_10->SetTopMargin(TM2); | |
530 | cPhiAll_10->SetBottomMargin(BM2); | |
531 | ||
532 | cPhiAll_11->SetRightMargin(RM1); | |
533 | cPhiAll_11->SetLeftMargin(LM1); | |
534 | cPhiAll_11->SetTopMargin(TM1); | |
535 | cPhiAll_11->SetBottomMargin(BM1); | |
536 | ||
537 | cPhiAll_12->SetRightMargin(RM1); | |
538 | cPhiAll_12->SetLeftMargin(LM1); | |
539 | cPhiAll_12->SetTopMargin(TM1); | |
540 | cPhiAll_12->SetBottomMargin(BM1); | |
541 | ||
542 | hPhiPhiCorr->SetTitle("Raw Signal"); | |
543 | hPhiPhiSSCorr->SetTitle("Soft-Soft Term"); | |
544 | hPhiPhiNOn->SetTitle("Near"); | |
545 | hPhiPhiNOff->SetTitle("Near"); | |
546 | hPhiPhiAOn->SetTitle("Away"); | |
547 | hPhiPhiAOff->SetTitle("Away"); | |
548 | ||
549 | cPhiAll_1->cd(); | |
550 | SetTitles1D(hPhiCorr); | |
551 | hPhiCorr->Draw(); | |
552 | hPhiMixCorr->Draw("same"); | |
553 | ||
554 | cPhiAll_2->cd(); | |
555 | SetTitles1D(hPhiCorr2); | |
556 | hPhiCorr2->Draw(); | |
557 | ZeroLine->Draw("same"); | |
558 | ||
559 | cPhiAll_3->cd(); | |
560 | SetTitles2D(hPhiPhiCorr); | |
561 | hPhiPhiCorr->Draw("lego2"); | |
562 | ||
563 | cPhiAll_4->cd(); | |
564 | hPhiPhiCorr->Draw("colz"); | |
565 | ||
566 | cPhiAll_5->cd(); | |
567 | SetTitles2D(hPhiPhiHSCorr); | |
568 | hPhiPhiHSCorr->Draw("lego2"); | |
569 | ||
570 | cPhiAll_6->cd(); | |
571 | hPhiPhiHSCorr->Draw("colz"); | |
572 | ||
573 | cPhiAll_7->cd(); | |
574 | SetTitles2D(hPhiPhiMixCorr); | |
575 | hPhiPhiSSCorr->Draw("lego2"); | |
576 | ||
577 | cPhiAll_8->cd(); | |
578 | hPhiPhiSSCorr->Draw("colz"); | |
579 | ||
580 | cPhiAll_9->cd(); | |
581 | SetTitles2D(hPhiPhiCorr2); | |
582 | hPhiPhiCorr2->Draw("lego2"); | |
583 | ||
584 | cPhiAll_10->cd(); | |
585 | hPhiPhiCorr2->Draw("colz"); | |
586 | ||
587 | cPhiAll_11->cd(); | |
588 | hPhiPhiNOff->Draw(); | |
589 | hPhiPhiNOn->Draw("same"); | |
590 | keySymbol(0.2,0.85,"On",4,25,0.05,1.5); | |
591 | keySymbol(0.2,0.8,"Off",2,20,0.05,1.5); | |
592 | ||
593 | cPhiAll_12->cd(); | |
594 | hPhiPhiAOff->Draw(); | |
595 | hPhiPhiAOn->Draw("same"); | |
596 | ||
597 | sprintf(name,"%s/Draw3Particle_PhiAll_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
598 | cPhiAll->SaveAs(name); | |
599 | ||
600 | cEtaAll=new TCanvas("cEtaAll","3-Particle Eta",1500,900); | |
601 | cEtaAll->Divide(4,3); | |
602 | // SetMargins1D(cEtaAll_1); | |
603 | /* | |
604 | //1-D plots | |
605 | float RM1=0.02; | |
606 | float LM1=0.16; | |
607 | float TM1=0.1; | |
608 | float BM1=0.15; | |
609 | //colz | |
610 | float RM2=0.24; | |
611 | float LM2=0.12; | |
612 | float TM2=0.1; | |
613 | float BM2=0.15; | |
614 | //surf | |
615 | float RM3=0.05; | |
616 | float LM3=0.2; | |
617 | float TM3=0.05; | |
618 | float BM3=0.15; | |
619 | */ | |
620 | ||
621 | cEtaAll_1->SetRightMargin(RM1); | |
622 | cEtaAll_1->SetLeftMargin(LM1); | |
623 | cEtaAll_1->SetTopMargin(TM1); | |
624 | cEtaAll_1->SetBottomMargin(BM1); | |
625 | ||
626 | cEtaAll_2->SetRightMargin(RM1); | |
627 | cEtaAll_2->SetLeftMargin(LM1); | |
628 | cEtaAll_2->SetTopMargin(TM1); | |
629 | cEtaAll_2->SetBottomMargin(BM1); | |
630 | ||
631 | cEtaAll_3->SetRightMargin(RM3); | |
632 | cEtaAll_3->SetLeftMargin(LM3); | |
633 | cEtaAll_3->SetTopMargin(TM3); | |
634 | cEtaAll_3->SetBottomMargin(BM3); | |
635 | ||
636 | cEtaAll_4->SetRightMargin(RM2); | |
637 | cEtaAll_4->SetLeftMargin(LM2); | |
638 | cEtaAll_4->SetTopMargin(TM2); | |
639 | cEtaAll_4->SetBottomMargin(BM2); | |
640 | ||
641 | cEtaAll_5->SetRightMargin(RM3); | |
642 | cEtaAll_5->SetLeftMargin(LM3); | |
643 | cEtaAll_5->SetTopMargin(TM3); | |
644 | cEtaAll_5->SetBottomMargin(BM3); | |
645 | ||
646 | cEtaAll_6->SetRightMargin(RM2); | |
647 | cEtaAll_6->SetLeftMargin(LM2); | |
648 | cEtaAll_6->SetTopMargin(TM2); | |
649 | cEtaAll_6->SetBottomMargin(BM2); | |
650 | ||
651 | cEtaAll_7->SetRightMargin(RM3); | |
652 | cEtaAll_7->SetLeftMargin(LM3); | |
653 | cEtaAll_7->SetTopMargin(TM3); | |
654 | cEtaAll_7->SetBottomMargin(BM3); | |
655 | ||
656 | cEtaAll_8->SetRightMargin(RM2); | |
657 | cEtaAll_8->SetLeftMargin(LM2); | |
658 | cEtaAll_8->SetTopMargin(TM2); | |
659 | cEtaAll_8->SetBottomMargin(BM2); | |
660 | ||
661 | cEtaAll_9->SetRightMargin(RM3); | |
662 | cEtaAll_9->SetLeftMargin(LM3); | |
663 | cEtaAll_9->SetTopMargin(TM3); | |
664 | cEtaAll_9->SetBottomMargin(BM3); | |
665 | ||
666 | cEtaAll_10->SetRightMargin(RM2); | |
667 | cEtaAll_10->SetLeftMargin(LM2); | |
668 | cEtaAll_10->SetTopMargin(TM2); | |
669 | cEtaAll_10->SetBottomMargin(BM2); | |
670 | ||
671 | cEtaAll_11->SetRightMargin(RM1); | |
672 | cEtaAll_11->SetLeftMargin(LM1); | |
673 | cEtaAll_11->SetTopMargin(TM1); | |
674 | cEtaAll_11->SetBottomMargin(BM1); | |
675 | ||
676 | cEtaAll_12->SetRightMargin(RM1); | |
677 | cEtaAll_12->SetLeftMargin(LM1); | |
678 | cEtaAll_12->SetTopMargin(TM1); | |
679 | cEtaAll_12->SetBottomMargin(BM1); | |
680 | ||
681 | hEtaEtaCorr->SetTitle("Raw Signal"); | |
682 | hEtaEtaSSCorr->SetTitle("Soft-Soft Term"); | |
683 | hEtaEtaNOn->SetTitle("Projections"); | |
684 | hEtaEtaNOff->SetTitle("Projections"); | |
685 | ||
686 | ||
687 | cEtaAll_1->cd(); | |
688 | SetTitles1D(hEtaNCorr); | |
689 | hEtaNCorr->Draw(); | |
690 | hEtaNMixCorr->Draw("same"); | |
691 | ||
692 | cEtaAll_2->cd(); | |
693 | SetTitles1D(hEtaNCorr2); | |
694 | hEtaNCorr2->Draw(); | |
695 | ZeroLine->Draw("same"); | |
696 | ||
697 | cEtaAll_3->cd(); | |
698 | SetTitles2D(hEtaEtaCorr); | |
699 | hEtaEtaCorr->Draw("lego2"); | |
700 | ||
701 | cEtaAll_4->cd(); | |
702 | hEtaEtaCorr->Draw("colz"); | |
703 | ||
704 | cEtaAll_5->cd(); | |
705 | SetTitles2D(hEtaEtaHSCorr); | |
706 | hEtaEtaHSCorr->Draw("lego2"); | |
707 | ||
708 | cEtaAll_6->cd(); | |
709 | hEtaEtaHSCorr->Draw("colz"); | |
710 | ||
711 | cEtaAll_7->cd(); | |
712 | SetTitles2D(hEtaEtaMixCorr); | |
713 | hEtaEtaSSCorr->Draw("lego2"); | |
714 | ||
715 | cEtaAll_8->cd(); | |
716 | hEtaEtaSSCorr->Draw("colz"); | |
717 | ||
718 | cEtaAll_9->cd(); | |
719 | SetTitles2D(hEtaEtaCorr2); | |
720 | hEtaEtaCorr2->Draw("lego2"); | |
721 | ||
722 | cEtaAll_10->cd(); | |
723 | hEtaEtaCorr2->Draw("colz"); | |
724 | ||
725 | cEtaAll_11->cd(); | |
726 | hEtaEtaNOff->Draw(); | |
727 | hEtaEtaNOn->Draw("same"); | |
728 | keySymbol(0.2,0.85,"On",4,25,0.05,1.5); | |
729 | keySymbol(0.2,0.8,"Off",2,20,0.05,1.5); | |
730 | ||
731 | ||
732 | sprintf(name,"%s/Draw3Particle_EtaAll_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
733 | cEtaAll->SaveAs(name); | |
734 | ||
735 | cPhi1=new TCanvas("cPhi1","2-Particle",400,300); | |
736 | SetMargins1D(cPhi1); | |
737 | hPhiCorr->SetTitle(""); | |
738 | hPhiCorr->Draw(); | |
739 | hPhiMixCorr->Draw("same"); | |
740 | sprintf(name,"%s/Draw3Particle_PhiCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
741 | cPhi1->SaveAs(name); | |
742 | ||
743 | cPhi2=new TCanvas("cPhi2","2-Particle BgSub",400,350); | |
744 | SetMargins1D(cPhi2); | |
745 | hPhiCorr2->SetTitle(""); | |
746 | hPhiCorr2->Draw(); | |
747 | ZeroLine->Draw("same"); | |
748 | sprintf(name,"%s/Draw3Particle_PhiCorr2_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
749 | cPhi2->SaveAs(name); | |
750 | ||
751 | cPhi3=new TCanvas("cPhi3","3-Particle lego",400,300); | |
752 | SetMargins2DSurf(cPhi3); | |
753 | hPhiPhiCorr->SetTitle(""); | |
754 | hPhiPhiCorr->Draw("lego2"); | |
755 | sprintf(name,"%s/Draw3Particle_PhiPhiCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
756 | cPhi3->SaveAs(name); | |
757 | ||
758 | cPhi4=new TCanvas("cPhi4","3-Particle",400,350); | |
759 | SetMargins2D(cPhi4); | |
760 | hPhiPhiCorr->SetTitle(""); | |
761 | hPhiPhiCorr->Draw("colz"); | |
762 | sprintf(name,"%s/Draw3Particle_PhiPhiCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
763 | cPhi4->SaveAs(name); | |
764 | ||
765 | cPhi5=new TCanvas("cPhi5","HS lego",400,300); | |
766 | SetMargins2DSurf(cPhi5); | |
767 | hPhiPhiHSCorr->SetTitle(""); | |
768 | hPhiPhiHSCorr->Draw("lego2"); | |
769 | sprintf(name,"%s/Draw3Particle_PhiPhiHSCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
770 | cPhi5->SaveAs(name); | |
771 | ||
772 | cPhi6=new TCanvas("cPhi6","HS",400,350); | |
773 | SetMargins2D(cPhi6); | |
774 | hPhiPhiHSCorr->SetTitle(""); | |
775 | hPhiPhiHSCorr->Draw("colz"); | |
776 | sprintf(name,"%s/Draw3Particle_PhiPhiHSCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
777 | cPhi6->SaveAs(name); | |
778 | ||
779 | cPhi7=new TCanvas("cPhi3","SS lego",400,300); | |
780 | SetMargins2DSurf(cPhi7); | |
781 | hPhiPhiSSCorr->SetTitle(""); | |
782 | hPhiPhiSSCorr->Draw("lego2"); | |
783 | sprintf(name,"%s/Draw3Particle_PhiPhiSSCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
784 | cPhi7->SaveAs(name); | |
785 | ||
786 | cPhi8=new TCanvas("cPhi8","SS",400,350); | |
787 | SetMargins2D(cPhi8); | |
788 | hPhiPhiSSCorr->SetTitle(""); | |
789 | hPhiPhiSSCorr->Draw("colz"); | |
790 | sprintf(name,"%s/Draw3Particle_PhiPhiSSCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
791 | cPhi8->SaveAs(name); | |
792 | ||
793 | cPhi9=new TCanvas("cPhi9","3-Particle BGSub lego",400,300); | |
794 | SetMargins2DSurf(cPhi9); | |
795 | hPhiPhiCorr2->SetTitle(""); | |
796 | hPhiPhiCorr2->Draw("lego2"); | |
797 | sprintf(name,"%s/Draw3Particle_PhiPhiCorr2Lego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
798 | cPhi9->SaveAs(name); | |
799 | ||
800 | cPhi10=new TCanvas("cPhi10","3-Particle BGSub",400,350); | |
801 | SetMargins2D(cPhi10); | |
802 | hPhiPhiCorr2->SetTitle(""); | |
803 | hPhiPhiCorr2->Draw("colz"); | |
804 | sprintf(name,"%s/Draw3Particle_PhiPhiCorr2_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
805 | cPhi10->SaveAs(name); | |
806 | ||
807 | cPhi11=new TCanvas("cPhi11","Near Projection",400,300); | |
808 | SetMargins1D(cPhi11); | |
809 | hPhiPhiNOff->SetTitle(""); | |
810 | hPhiPhiNOff->Draw(); | |
811 | hPhiPhiNOn->Draw("same"); | |
812 | keySymbol(0.2,0.85,"On",4,25,0.05,1.5); | |
813 | keySymbol(0.2,0.8,"Off",2,20,0.05,1.5); | |
814 | sprintf(name,"%s/Draw3Particle_PhiProjN_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
815 | cPhi11->SaveAs(name); | |
816 | ||
817 | cPhi12=new TCanvas("cPhi12","Away Projection",400,300); | |
818 | SetMargins1D(cPhi12); | |
819 | hPhiPhiAOff->SetTitle(""); | |
820 | hPhiPhiAOff->Draw(); | |
821 | hPhiPhiAOn->Draw("same"); | |
822 | keySymbol(0.2,0.85,"On",4,25,0.05,1.5); | |
823 | keySymbol(0.2,0.8,"Off",2,20,0.05,1.5); | |
824 | sprintf(name,"%s/Draw3Particle_PhiProjA_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
825 | cPhi12->SaveAs(name); | |
826 | ||
827 | cEta1=new TCanvas("cEta1","2-Particle",400,300); | |
828 | SetMargins1D(cEta1); | |
829 | hEtaNCorr->SetTitle(""); | |
830 | hEtaNCorr->Draw(); | |
831 | hEtaNMixCorr->Draw("same"); | |
832 | sprintf(name,"%s/Draw3Particle_EtaNCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
833 | cEta1->SaveAs(name); | |
834 | ||
835 | cEta2=new TCanvas("cEta2","2-Particle BgSub",400,350); | |
836 | SetMargins1D(cEta2); | |
837 | hEtaNCorr2->SetTitle(""); | |
838 | hEtaNCorr2->Draw(); | |
839 | ZeroLine->Draw("same"); | |
840 | sprintf(name,"%s/Draw3Particle_EtaNCorr2_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
841 | cEta2->SaveAs(name); | |
842 | ||
843 | cEta3=new TCanvas("cEta3","3-Particle lego",400,300); | |
844 | SetMargins2DSurf(cEta3); | |
845 | hEtaEtaCorr->SetTitle(""); | |
846 | hEtaEtaCorr->Draw("lego2"); | |
847 | sprintf(name,"%s/Draw3Particle_EtaEtaCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
848 | cEta3->SaveAs(name); | |
849 | ||
850 | cEta4=new TCanvas("cEta4","3-Particle",400,350); | |
851 | SetMargins2D(cEta4); | |
852 | hEtaEtaCorr->SetTitle(""); | |
853 | hEtaEtaCorr->Draw("colz"); | |
854 | sprintf(name,"%s/Draw3Particle_EtaEtaCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
855 | cEta4->SaveAs(name); | |
856 | ||
857 | cEta5=new TCanvas("cEta5","HS lego",400,300); | |
858 | SetMargins2DSurf(cEta5); | |
859 | hEtaEtaHSCorr->SetTitle(""); | |
860 | hEtaEtaHSCorr->Draw("lego2"); | |
861 | sprintf(name,"%s/Draw3Particle_EtaEtaHSCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
862 | cEta5->SaveAs(name); | |
863 | ||
864 | cEta6=new TCanvas("cEta6","HS",400,350); | |
865 | SetMargins2D(cEta6); | |
866 | hEtaEtaHSCorr->SetTitle(""); | |
867 | hEtaEtaHSCorr->Draw("colz"); | |
868 | sprintf(name,"%s/Draw3Particle_EtaEtaHSCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
869 | cEta6->SaveAs(name); | |
870 | ||
871 | cEta7=new TCanvas("cEta3","SS lego",400,300); | |
872 | SetMargins2DSurf(cEta7); | |
873 | hEtaEtaSSCorr->SetTitle(""); | |
874 | hEtaEtaSSCorr->Draw("lego2"); | |
875 | sprintf(name,"%s/Draw3Particle_EtaEtaSSCorrLego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
876 | cEta7->SaveAs(name); | |
877 | ||
878 | cEta8=new TCanvas("cEta8","SS",400,350); | |
879 | SetMargins2D(cEta8); | |
880 | hEtaEtaSSCorr->SetTitle(""); | |
881 | hEtaEtaSSCorr->Draw("colz"); | |
882 | sprintf(name,"%s/Draw3Particle_EtaEtaSSCorr_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
883 | cEta8->SaveAs(name); | |
884 | ||
885 | cEta9=new TCanvas("cEta9","3-Particle BGSub lego",400,300); | |
886 | SetMargins2DSurf(cEta9); | |
887 | hEtaEtaCorr2->SetTitle(""); | |
888 | hEtaEtaCorr2->Draw("lego2"); | |
889 | sprintf(name,"%s/Draw3Particle_EtaEtaCorr2Lego_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
890 | cEta9->SaveAs(name); | |
891 | ||
892 | cEta10=new TCanvas("cEta10","3-Particle BGSub",400,350); | |
893 | SetMargins2D(cEta10); | |
894 | hEtaEtaCorr2->SetTitle(""); | |
895 | hEtaEtaCorr2->Draw("colz"); | |
896 | sprintf(name,"%s/Draw3Particle_EtaEtaCorr2_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
897 | cEta10->SaveAs(name); | |
898 | ||
899 | cEta11=new TCanvas("cEta11","Near Projection",400,300); | |
900 | SetMargins1D(cEta11); | |
901 | hEtaEtaNOff->SetTitle(""); | |
902 | hEtaEtaNOff->Draw(); | |
903 | hEtaEtaNOn->Draw("same"); | |
904 | keySymbol(0.2,0.85,"On",4,25,0.05,1.5); | |
905 | keySymbol(0.2,0.8,"Off",2,20,0.05,1.5); | |
906 | sprintf(name,"%s/Draw3Particle_EtaProjN_%2.1fPt%2.1f_%1.2fpt%1.2f_%dC%d_E%d_Z%1.2f%s",Folder,TPt1,TPt2,APt1,APt2,Cent1,Cent2,EffMethod,ZYACent,fileType); | |
907 | cEta11->SaveAs(name); | |
908 | ||
909 | ||
910 | } | |
911 | } |