32 gROOT->SetStyle(
"Plain");
36 const Int_t NRGBs = 5;
37 const Int_t NCont = 255;
38 Double_t stops[NRGBs] = { 0.00, 0.25, 0.50, 0.75, 1.00 };
39 Double_t
red[NRGBs] = { 0.00, 0.00, 0.40, 1.00, 1.00 };
40 Double_t
green[NRGBs] = { 0.00, 0.40, 0.70, 0.60, 1.00 };
41 Double_t blue[NRGBs] = { 0.30, 0.60, 0.00, 0.00, 0.20 };
42 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
43 gStyle->SetNumberContours(NCont);
47 const Int_t NRGBs = 3;
48 const Int_t NCont = 255;
49 Double_t stops[NRGBs] = { 0.00, 0.50, 1.00 };
50 Double_t red[NRGBs] = { 0.90, 0.50, 0.00};
51 Double_t green[NRGBs] = { 0.90, 0.50, 0.00};
52 Double_t blue[NRGBs] = { 0.90, 0.50, 0.00};
53 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
54 gStyle->SetNumberContours(NCont);
58 const Int_t NRGBs = 7;
59 const Int_t NCont = 255;
60 Double_t stops[NRGBs] = { 0.00, 0.15, 0.30, 0.45, 0.65, 0.85, 1.00 };
61 Double_t red[NRGBs] = { 0.60, 0.30, 0.00, 0.00, 0.60, 0.40, 0.00 };
62 Double_t green[NRGBs] = { 1.00, 0.90, 0.80, 0.75, 0.20, 0.00, 0.00 };
63 Double_t blue[NRGBs] = { 1.00, 1.00, 1.00, 0.30, 0.00, 0.00, 0.00 };
64 TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
65 gStyle->SetNumberContours(NCont);
68 int ncol = gStyle->GetNumberOfColors();
69 std::cout <<
"Number of colors " << ncol << std::endl;
73 TProfile* aveoccu= (TProfile*)gDirectory->Get(
"aveoccu");
74 TProfile* avemult= (TProfile*)gDirectory->Get(
"avemult");
75 TH1F* nchannels = (TH1F*)gDirectory->Get(
"nchannels_real");
77 TProfile* averadius = (TProfile*)gDirectory->Get(
"averadius");
78 TProfile* avez = (TProfile*)gDirectory->Get(
"avez");
80 std::cout <<
"pointers " << aveoccu <<
" " << avemult <<
" " << nchannels <<
" " << averadius <<
" " << avez << std::endl;
82 if(aveoccu && avemult && nchannels && averadius && avez) {
85 for(
int i=1;
i<nchannels->GetNbinsX()+1;++
i) {
86 nchannels->SetBinError(
i,0.);
89 TH1D* haveoccu = aveoccu->ProjectionX(
"haveoccu");
90 haveoccu->SetDirectory(0);
91 haveoccu->Divide(nchannels);
92 TH1D* havemult = avemult->ProjectionX(
"havemult");
93 havemult->SetDirectory(0);
94 havemult->Divide(nchannels);
96 TH1D* havewidth = (TH1D*)haveoccu->Clone(
"havewidth");
97 havewidth->SetDirectory(0);
98 havewidth->SetTitle(
"Average Cluster Size");
99 havewidth->Divide(havemult);
102 new TCanvas(
"occupancy",
"occupancy",1200,500);
104 haveoccu->SetStats(0);
105 haveoccu->DrawCopy();
106 TLine* l1 =
new TLine(1000,0,1000,haveoccu->GetMaximum()); l1->DrawClone();
107 TLine* l2 =
new TLine(2000,0,2000,haveoccu->GetMaximum()); l2->DrawClone();
108 TLine* l3 =
new TLine(3000,0,3000,haveoccu->GetMaximum()); l3->DrawClone();
109 TLine* l4 =
new TLine(4000,0,4000,haveoccu->GetMaximum()); l4->DrawClone();
110 TLine* l5 =
new TLine(5000,0,5000,haveoccu->GetMaximum()); l5->DrawClone();
111 TText* tpix =
new TText(500,haveoccu->GetMaximum(),
"BPIX+FPIX"); tpix->SetTextAlign(22); tpix->DrawClone();
112 TText* ttib =
new TText(1500,haveoccu->GetMaximum(),
"TIB"); ttib->SetTextAlign(22); ttib->DrawClone();
113 TText* ttid =
new TText(2500,haveoccu->GetMaximum(),
"TID"); ttid->SetTextAlign(22); ttid->DrawClone();
114 TText* ttob =
new TText(3500,haveoccu->GetMaximum(),
"TOB"); ttob->SetTextAlign(22); ttob->DrawClone();
115 TText* ttecm =
new TText(4500,haveoccu->GetMaximum(),
"TEC-"); ttecm->SetTextAlign(22); ttecm->DrawClone();
116 TText* ttecp =
new TText(5500,haveoccu->GetMaximum(),
"TEC+"); ttecp->SetTextAlign(22); ttecp->DrawClone();
118 new TCanvas(
"multiplicity",
"multiplicity",1200,500);
120 havemult->SetStats(0);
121 havemult->DrawCopy();
122 tpix->SetY(havemult->GetMaximum()); tpix->DrawClone();
123 ttib->SetY(havemult->GetMaximum()); ttib->DrawClone();
124 ttid->SetY(havemult->GetMaximum()); ttid->DrawClone();
125 ttob->SetY(havemult->GetMaximum()); ttob->DrawClone();
126 ttecm->SetY(havemult->GetMaximum()); ttecm->DrawClone();
127 ttecp->SetY(havemult->GetMaximum()); ttecp->DrawClone();
128 l1->SetY2(havemult->GetMaximum()); l1->DrawClone();
129 l2->SetY2(havemult->GetMaximum()); l2->DrawClone();
130 l3->SetY2(havemult->GetMaximum()); l3->DrawClone();
131 l4->SetY2(havemult->GetMaximum()); l4->DrawClone();
132 l5->SetY2(havemult->GetMaximum()); l5->DrawClone();
134 new TCanvas(
"width",
"width",1200,500);
135 havewidth->SetStats(0);
136 havewidth->DrawCopy();
137 tpix->SetY(havewidth->GetMaximum()); tpix->DrawClone();
138 ttib->SetY(havewidth->GetMaximum()); ttib->DrawClone();
139 ttid->SetY(havewidth->GetMaximum()); ttid->DrawClone();
140 ttob->SetY(havewidth->GetMaximum()); ttob->DrawClone();
141 ttecm->SetY(havewidth->GetMaximum()); ttecm->DrawClone();
142 ttecp->SetY(havewidth->GetMaximum()); ttecp->DrawClone();
143 l1->SetY2(havewidth->GetMaximum()); l1->DrawClone();
144 l2->SetY2(havewidth->GetMaximum()); l2->DrawClone();
145 l3->SetY2(havewidth->GetMaximum()); l3->DrawClone();
146 l4->SetY2(havewidth->GetMaximum()); l4->DrawClone();
147 l5->SetY2(havewidth->GetMaximum()); l5->DrawClone();
149 TCanvas * o2 =
new TCanvas(
"occupancy2",
"occupancy2",1200,800);
152 haveoccu->SetAxisRange(100,270);
153 haveoccu->DrawCopy();
154 tpix->SetY(haveoccu->GetMaximum()); tpix->SetX(185); tpix->DrawClone();
156 haveoccu->SetAxisRange(1050,1450);
157 haveoccu->DrawCopy();
158 ttib->SetY(haveoccu->GetMaximum()); ttib->SetX(1250); ttib->DrawClone();
160 haveoccu->SetAxisRange(2070,2400);
161 haveoccu->DrawCopy();
162 ttid->SetY(haveoccu->GetMaximum()); ttid->SetX(2235); ttid->DrawClone();
164 haveoccu->SetAxisRange(3000,3700);
165 haveoccu->DrawCopy();
166 ttob->SetY(haveoccu->GetMaximum()); ttob->SetX(3350); ttob->DrawClone();
168 haveoccu->SetAxisRange(4000,4850);
169 haveoccu->DrawCopy();
170 ttecm->SetY(haveoccu->GetMaximum()); ttecm->SetX(4425); ttecm->DrawClone();
172 haveoccu->SetAxisRange(5000,5850);
173 haveoccu->DrawCopy();
174 ttecp->SetY(haveoccu->GetMaximum()); ttecp->SetX(5425); ttecp->DrawClone();
176 TCanvas * m2 =
new TCanvas(
"multiplicity2",
"multiplicity2",1200,800);
179 havemult->SetAxisRange(100,270);
180 havemult->DrawCopy();
181 tpix->SetY(havemult->GetMaximum()); tpix->SetX(185); tpix->DrawClone();
183 havemult->SetAxisRange(1050,1450);
184 havemult->DrawCopy();
185 ttib->SetY(havemult->GetMaximum()); ttib->SetX(1250); ttib->DrawClone();
187 havemult->SetAxisRange(2070,2400);
188 havemult->DrawCopy();
189 ttid->SetY(havemult->GetMaximum()); ttid->SetX(2235); ttid->DrawClone();
191 havemult->SetAxisRange(3000,3700);
192 havemult->DrawCopy();
193 ttob->SetY(havemult->GetMaximum()); ttob->SetX(3350); ttob->DrawClone();
195 havemult->SetAxisRange(4000,4850);
196 havemult->DrawCopy();
197 ttecm->SetY(havemult->GetMaximum()); ttecm->SetX(4425); ttecm->DrawClone();
199 havemult->SetAxisRange(5000,5850);
200 havemult->DrawCopy();
201 ttecp->SetY(havemult->GetMaximum()); ttecp->SetX(5425); ttecp->DrawClone();
203 TCanvas *
w2 =
new TCanvas(
"width2",
"width2",1200,800);
206 havewidth->SetAxisRange(100,270);
207 havewidth->DrawCopy();
208 tpix->SetY(havewidth->GetMaximum()); tpix->SetX(185); tpix->DrawClone();
210 havewidth->SetAxisRange(1050,1450);
211 havewidth->DrawCopy();
212 ttib->SetY(havewidth->GetMaximum()); ttib->SetX(1250); ttib->DrawClone();
214 havewidth->SetAxisRange(2070,2400);
215 havewidth->DrawCopy();
216 ttid->SetY(havewidth->GetMaximum()); ttid->SetX(2235); ttid->DrawClone();
218 havewidth->SetAxisRange(3000,3700);
219 havewidth->DrawCopy();
220 ttob->SetY(havewidth->GetMaximum()); ttob->SetX(3350); ttob->DrawClone();
222 havewidth->SetAxisRange(4000,4850);
223 havewidth->DrawCopy();
224 ttecm->SetY(havewidth->GetMaximum()); ttecm->SetX(4425); ttecm->DrawClone();
226 havewidth->SetAxisRange(5000,5850);
227 havewidth->DrawCopy();
228 ttecp->SetY(havewidth->GetMaximum()); ttecp->SetX(5425); ttecp->DrawClone();
235 for(
int i=1;
i<haveoccu->GetNbinsX();++
i) {
237 if(averadius->GetBinEntries(
i)*avez->GetBinEntries(
i)) {
243 if(
i > 100 &&
i < 200) { dz=3.33;dr=0.4;}
245 if(
i > 200 &&
i < 1000 && (
i%10 == 1 ||
i%10 == 7)) { dz=0.8;dr=0.4;}
246 if(
i > 200 &&
i < 1000 && !(
i%10 == 1 ||
i%10 == 7)) { dz=0.8;dr=0.8;}
248 if(
i > 1000 &&
i < 2000) { dz=5.948;dr=0.4;}
250 if(
i > 3000 &&
i < 4000) { dz=9.440;dr=0.4;}
252 if(
i > 2000 &&
i < 3000 && (
i%1000)/100 == 1) { dz=0.8;dr=5.647;}
253 if(
i > 2000 &&
i < 3000 && (
i%1000)/100 == 2) { dz=0.8;dr=4.512;}
254 if(
i > 2000 &&
i < 3000 && (
i%1000)/100 == 3) { dz=0.8;dr=5.637;}
256 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 1) { dz=0.8;dr=4.362;}
257 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 2) { dz=0.8;dr=4.512;}
258 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 3) { dz=0.8;dr=5.637;}
259 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 4) { dz=0.8;dr=5.862;}
260 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 5) { dz=0.8;dr=7.501;}
261 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 6) { dz=0.8;dr=9.336;}
262 if(
i > 4000 &&
i < 6000 && (
i%1000)/100 == 7) { dz=0.8;dr=10.373;}
265 TBox* modoccu =
new TBox(avez->GetBinContent(
i)-dz,averadius->GetBinContent(
i)-dr,avez->GetBinContent(
i)+dz,averadius->GetBinContent(
i)+dr);
266 modoccu->SetFillStyle(1001);
269 if(icol > (ncol-1)) icol=(ncol-1);
270 std::cout <<
i <<
" " << icol <<
" " << haveoccu->GetBinContent(
i) << std::endl;
271 modoccu->SetFillColor(gStyle->GetColorPalette(icol));
272 modulesoccu.Add(modoccu);
275 TBox* modmult =
new TBox(avez->GetBinContent(
i)-dz,averadius->GetBinContent(
i)-dr,avez->GetBinContent(
i)+dz,averadius->GetBinContent(
i)+dr);
276 modmult->SetFillStyle(1001);
277 int icol=int(ncol*(
log(havemult->GetBinContent(
i))-
log(mmin))/(
log(mmax)-
log(mmin)));
279 if(icol > (ncol-1)) icol=(ncol-1);
280 std::cout <<
i <<
" " << icol <<
" " << havemult->GetBinContent(
i) << std::endl;
281 modmult->SetFillColor(gStyle->GetColorPalette(icol));
282 modulesmult.Add(modmult);
289 double etavalext[] = {3.,2.8,2.6,2.4,2.2,2.0,1.8,1.6};
290 double etavalint[] = {-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.,0.2,0.4,0.6,0.8,1.0,1.2,1.4};
294 for(
int i=0;
i<8;++
i) {
296 double eta = etavalext[
i];
297 TLine* lin =
new TLine(295,2*295/(
exp(eta)-
exp(-eta)),305,2*305/(
exp(eta)-
exp(-eta)));
300 sprintf(lab,
"%3.1f",eta);
301 TText*
label =
new TText(285,2*285/(
exp(eta)-
exp(-eta)),lab);
302 label->SetTextSize(.03);
303 label->SetTextAlign(22);
304 etalabels.Add(label);
306 for(
int i=0;
i<8;++
i) {
308 double eta = -1*etavalext[
i];
309 TLine* lin =
new TLine(-295,-2*295/(
exp(eta)-
exp(-eta)),-305,-2*305/(
exp(eta)-
exp(-eta)));
312 sprintf(lab,
"%3.1f",eta);
313 TText* label =
new TText(-285,-2*285/(
exp(eta)-
exp(-eta)),lab);
314 label->SetTextSize(.03);
315 label->SetTextAlign(22);
316 etalabels.Add(label);
318 for(
int i=0;
i<15;++
i) {
320 double eta = etavalint[
i];
321 TLine* lin =
new TLine(130.*(
exp(eta)-
exp(-eta))/2.,130,138.*(
exp(eta)-
exp(-eta))/2.,138);
324 sprintf(lab,
"%3.1f",eta);
325 TText* label =
new TText(125.*(
exp(eta)-
exp(-eta))/2.,125,lab);
326 label->SetTextSize(.03);
327 label->SetTextAlign(22);
328 etalabels.Add(label);
330 TLatex* etalab =
new TLatex(0,115,
"#eta");
331 etalab->SetTextSize(.03);
332 etalab->SetTextAlign(22);
333 etalabels.Add(etalab);
336 TLatex *cmslab =
new TLatex(0.15,0.965,
"CMS");
338 cmslab->SetTextSize(0.04);
339 cmslab->SetTextAlign(31);
340 paperlabels.Add(cmslab);
341 TLatex *enelab =
new TLatex(0.92,0.965,
"#sqrt{s} = 7 TeV");
343 enelab->SetTextSize(0.04);
344 enelab->SetTextAlign(31);
345 paperlabels.Add(enelab);
354 TGaxis *raxis =
new TGaxis(-310,0,-310,140,0,140,10,
"S");
355 TGaxis *zaxis =
new TGaxis(-310,0,310,0,-310,310,10,
"S");
356 raxis->SetTickSize(.01); zaxis->SetTickSize(.01);
357 raxis->SetTitle(
"r (cm)"); zaxis->SetTitle(
"z (cm)");
362 for(
int i = 0;
i< ncol ; ++
i) {
363 TBox* box=
new TBox(315,0+140./ncol*
i,330,0+140./ncol*(i+1));
364 box->SetFillStyle(1001);
365 box->SetFillColor(gStyle->GetColorPalette(i));
371 TGaxis *paxis =
new TGaxis(330,0,330,140,
min,
max,510,
"SLG+");
372 paxis->SetTickSize(.02);
373 paxis->SetLabelOffset(paxis->GetLabelOffset()*0.5);
374 paxis->SetTitle(
"channel occupancy");
377 TGaxis *mpaxis =
new TGaxis(330,0,330,140,mmin,mmax,510,
"SLG+");
378 mpaxis->SetTickSize(.02);
379 mpaxis->SetLabelOffset(paxis->GetLabelOffset()*0.5);
380 mpalette.Add(mpaxis);
382 TCanvas* cc1 =
new TCanvas(
"occumap",
"occumap",1000,500);
383 cc1->Range(-370.,-20.,390.,150.);
384 TFrame* fr1 =
new TFrame(-310,0,310,140);
385 fr1->UseCurrentStyle();
387 raxis->Draw(); zaxis->Draw();
388 std::cout << modulesoccu.GetSize() << std::endl;
395 TCanvas* cc2 =
new TCanvas(
"multmap",
"multmap",1000,500);
396 cc2->Range(-370.,-20.,390.,150.);
397 TFrame* fr2 =
new TFrame(-310,0,310,140);
398 fr2->UseCurrentStyle();
400 raxis->Draw(); zaxis->Draw();
401 std::cout << modulesmult.GetSize() << std::endl;
static std::vector< std::string > checklist log
common ppss p3p6s2 common epss epspn46 common const1 w2