14 |
|
#include <TPad.h> |
15 |
|
#include <TColor.h> |
16 |
|
#include <TStyle.h> |
17 |
+ |
#include <TLatex.h> |
18 |
|
|
19 |
|
|
20 |
|
#include "scan.h" |
24 |
|
|
25 |
|
using namespace std; |
26 |
|
|
27 |
+ |
|
28 |
+ |
double total_xsec(const SUSY_XSECS point) |
29 |
+ |
{ return point.total(); } |
30 |
+ |
|
31 |
+ |
|
32 |
|
bool charged_LSP(const SUSY_POINT point) |
33 |
|
{ return ( (fabs(point.MZ1) - point.MTAU1)>0.0 ); } |
34 |
|
|
35 |
|
bool gluino(const SUSY_POINT point, const double mass) |
36 |
< |
{ return ( fabs(point.MGL - mass)<1.0 ); } |
36 |
> |
{ return ( fabs(point.MGL - mass)<5.0 ); } |
37 |
|
|
38 |
|
bool ul(const SUSY_POINT point, const double mass) |
39 |
|
{ return ( fabs(point.MUL - mass)<5.0 ); } |
41 |
|
bool neutralino_1(const SUSY_POINT point, const double mass) |
42 |
|
{ return ( fabs(fabs(point.MZ1) - mass)<1.0 ); } |
43 |
|
|
44 |
+ |
bool sq_equal_gluino(const SUSY_POINT point, const double treshold) |
45 |
+ |
{ return ( fabs(point.MUL - point.MGL)<treshold ); } |
46 |
|
|
47 |
|
TScan::TScan() |
48 |
|
{ |
71 |
|
return result; |
72 |
|
} |
73 |
|
|
74 |
< |
TH2F * TScan::Area(bool(*func)(SUSY_POINT)) |
74 |
> |
template <class T> TH2F * TScan::Area(std::vector<T> pnts, double(*func)(T)) |
75 |
|
{ |
76 |
|
char * name = new char[255]; |
77 |
|
sprintf(name,"Area_plot%d",++plot_id); |
78 |
|
TH2F * result = new TH2F(name,"",bins_x,min_x,max_x,bins_y,min_x,max_y); |
79 |
< |
for (std::vector<SUSY_POINT>::const_iterator it=points.begin(); |
80 |
< |
it!=points.end(); ++it) { |
79 |
> |
for (typename std::vector<T>::const_iterator it=pnts.begin(); |
80 |
> |
it!=pnts.end(); ++it) { |
81 |
> |
result->Fill(it->MZERO, it->MHALF, func(*it) ); |
82 |
> |
} |
83 |
> |
delete name; |
84 |
> |
return result; |
85 |
> |
} |
86 |
> |
|
87 |
> |
template <class T> TH2F * TScan::Area(std::vector<T> pnts, bool(*func)(T)) |
88 |
> |
{ |
89 |
> |
char * name = new char[255]; |
90 |
> |
sprintf(name,"Area_plot%d",++plot_id); |
91 |
> |
TH2F * result = new TH2F(name,"",bins_x,min_x,max_x,bins_y,min_x,max_y); |
92 |
> |
for (typename std::vector<T>::const_iterator it=pnts.begin(); |
93 |
> |
it!=pnts.end(); ++it) { |
94 |
|
if ( func( *it ) ) |
95 |
|
result->Fill(it->MZERO, it->MHALF, 1.); |
75 |
– |
//if (it->MZERO==100. && it->MHALF==200.) |
76 |
– |
//cout << it->MZERO <<", "<<it->MHALF |
77 |
– |
// << ", m(Z1)="<<it->MZ1<<", m(stau)="<<it->MTAU1<<endl; |
96 |
|
} |
97 |
|
delete name; |
98 |
|
return result; |
194 |
|
} |
195 |
|
} |
196 |
|
|
197 |
+ |
void TScan::ReadGeneratedXsects(std::string file) |
198 |
+ |
{ |
199 |
+ |
ifstream xsects_file; |
200 |
+ |
xsects_file.open(file.c_str()); |
201 |
+ |
SUSY_XSECS x; |
202 |
+ |
while (1) { |
203 |
+ |
xsects_file >> x.MZERO |
204 |
+ |
>> x.MHALF |
205 |
+ |
>> x.TANB |
206 |
+ |
>> x.SGNMU |
207 |
+ |
>> x.AZERO |
208 |
+ |
>> x.MTOP |
209 |
+ |
>> x.XS0 |
210 |
+ |
>> x.XS201 |
211 |
+ |
>> x.XS202 |
212 |
+ |
>> x.XS204 |
213 |
+ |
>> x.XS205 |
214 |
+ |
>> x.XS207 |
215 |
+ |
>> x.XS208 |
216 |
+ |
>> x.XS209 |
217 |
+ |
>> x.XS210 |
218 |
+ |
>> x.XS211 |
219 |
+ |
>> x.XS212 |
220 |
+ |
>> x.XS213 |
221 |
+ |
>> x.XS214 |
222 |
+ |
>> x.XS216 |
223 |
+ |
>> x.XS217 |
224 |
+ |
>> x.XS218 |
225 |
+ |
>> x.XS219 |
226 |
+ |
>> x.XS220 |
227 |
+ |
>> x.XS221 |
228 |
+ |
>> x.XS222 |
229 |
+ |
>> x.XS223 |
230 |
+ |
>> x.XS224 |
231 |
+ |
>> x.XS225 |
232 |
+ |
>> x.XS226 |
233 |
+ |
>> x.XS227 |
234 |
+ |
>> x.XS228 |
235 |
+ |
>> x.XS229 |
236 |
+ |
>> x.XS230 |
237 |
+ |
>> x.XS231 |
238 |
+ |
>> x.XS232 |
239 |
+ |
>> x.XS233 |
240 |
+ |
>> x.XS234 |
241 |
+ |
>> x.XS235 |
242 |
+ |
>> x.XS236 |
243 |
+ |
>> x.XS237 |
244 |
+ |
>> x.XS238 |
245 |
+ |
>> x.XS239 |
246 |
+ |
>> x.XS240 |
247 |
+ |
>> x.XS241 |
248 |
+ |
>> x.XS242 |
249 |
+ |
>> x.XS243 |
250 |
+ |
>> x.XS244 |
251 |
+ |
>> x.XS246 |
252 |
+ |
>> x.XS247 |
253 |
+ |
>> x.XS248 |
254 |
+ |
>> x.XS249 |
255 |
+ |
>> x.XS250 |
256 |
+ |
>> x.XS251 |
257 |
+ |
>> x.XS252 |
258 |
+ |
>> x.XS253 |
259 |
+ |
>> x.XS254 |
260 |
+ |
>> x.XS256 |
261 |
+ |
>> x.XS258 |
262 |
+ |
>> x.XS259 |
263 |
+ |
>> x.XS261 |
264 |
+ |
>> x.XS262 |
265 |
+ |
>> x.XS263 |
266 |
+ |
>> x.XS264 |
267 |
+ |
>> x.XS265 |
268 |
+ |
>> x.XS271 |
269 |
+ |
>> x.XS272 |
270 |
+ |
>> x.XS273 |
271 |
+ |
>> x.XS274 |
272 |
+ |
>> x.XS275 |
273 |
+ |
>> x.XS276 |
274 |
+ |
>> x.XS277 |
275 |
+ |
>> x.XS278 |
276 |
+ |
>> x.XS279 |
277 |
+ |
>> x.XS280 |
278 |
+ |
>> x.XS281 |
279 |
+ |
>> x.XS282 |
280 |
+ |
>> x.XS283 |
281 |
+ |
>> x.XS284 |
282 |
+ |
>> x.XS285 |
283 |
+ |
>> x.XS286 |
284 |
+ |
>> x.XS287 |
285 |
+ |
>> x.XS288 |
286 |
+ |
>> x.XS289 |
287 |
+ |
>> x.XS290 |
288 |
+ |
>> x.XS291 |
289 |
+ |
>> x.XS292 |
290 |
+ |
>> x.XS293 |
291 |
+ |
>> x.XS294 |
292 |
+ |
>> x.XS295 |
293 |
+ |
>> x.XS296 |
294 |
+ |
>> x.XS297 |
295 |
+ |
>> x.XS298 |
296 |
+ |
>> x.XS299 |
297 |
+ |
>> x.XS300 |
298 |
+ |
>> x.XS301; |
299 |
+ |
if (!xsects_file.good()) break; |
300 |
+ |
if (fabs(x.SGNMU)!=1.) { |
301 |
+ |
cerr << "check lines near m0=" << x.MZERO << ", m1/2=" << x.MHALF << endl; |
302 |
+ |
break; |
303 |
+ |
} |
304 |
+ |
xsects.push_back(x); |
305 |
+ |
} |
306 |
+ |
} |
307 |
|
|
308 |
|
int TScan::DoStuff() |
309 |
|
{ |
311 |
|
ReadGeneratedMasses( "mass_scan.dat" ); |
312 |
|
cout << "Read in " << points.size() << " mass points." <<endl; |
313 |
|
|
314 |
+ |
///Read in the generated x-sections |
315 |
+ |
ReadGeneratedXsects( "xsec_scan.dat" ); |
316 |
+ |
cout << "Read in " << xsects.size() << " x-section points." <<endl; |
317 |
+ |
|
318 |
|
///Where are no mass-points generated? |
319 |
|
TH2F * no_solution = Area51( ); |
320 |
|
MyTGraph * contour_no_solution = GetContour( no_solution ); |
322 |
|
contour_no_solution->SetLineWidth(4); |
323 |
|
|
324 |
|
///Where is the LSP charged? |
325 |
< |
TH2F * ch_LSP = Area( charged_LSP ); |
325 |
> |
TH2F * ch_LSP = Area<SUSY_POINT>( points, charged_LSP ); |
326 |
|
MyTGraph * contour_charged_LSP = GetContour( ch_LSP ); |
327 |
|
contour_charged_LSP->SetLineColor(6); |
328 |
|
contour_charged_LSP->SetLineWidth(4); |
331 |
|
TCanvas * c1 = new TCanvas("c1","c1",600,600); |
332 |
|
c1->SetFillStyle ( 4000 ); |
333 |
|
c1->SetLeftMargin ( 0.15 ); |
334 |
< |
c1->SetRightMargin ( 0.05 ); |
334 |
> |
c1->SetRightMargin ( 0.15 ); |
335 |
|
c1->SetBottomMargin( 0.10 ); |
336 |
|
c1->cd(); |
337 |
|
//c1->SetTopMargin ( 0.05 ); |
338 |
|
//TPostScript ps("plots.ps",-112); |
339 |
|
|
340 |
|
///The base hist of the mSUGRA-plane with axis labels |
341 |
< |
TH2F * plane = new TH2F("plane","The mSUGRA parameter space;m_{0} [GeV];m_{1/2} [GeV]", bins_x,min_x,max_x,bins_y,min_x,max_y); |
341 |
> |
//TH2F * plane = new TH2F("plane","The mSUGRA parameter space;m_{0} [GeV];m_{1/2} [GeV]", bins_x,min_x,max_x,bins_y,min_x,max_y); |
342 |
> |
SetBins(80,80);//xsec-binning is 25 GeV |
343 |
> |
TH2F * plane = Area<SUSY_XSECS>( xsects, total_xsec ); |
344 |
> |
SetBins(400,400);//mass-binning is 5 GeV |
345 |
> |
plane->SetTitle("The mSUGRA parameter space;m_{0} [GeV];m_{1/2} [GeV];#sigma_{SUSY incl.} [pb]"); |
346 |
|
plane->GetYaxis()->SetTitleOffset( 1.8 ); |
347 |
< |
plane->Draw(); |
347 |
> |
plane->GetZaxis()->SetTitleOffset( 1.1 ); |
348 |
> |
plane->GetZaxis()->SetRangeUser(0.00001, 1000.); |
349 |
> |
gPad->SetLogz(1); |
350 |
> |
plane->Draw("COLZ"); |
351 |
|
|
352 |
|
///Now, add what ever should be displayed else |
353 |
|
//---------------------------------------------------------------------------// |
354 |
+ |
TLatex t; |
355 |
+ |
t.SetTextColor(14); |
356 |
+ |
t.SetTextAlign(12); |
357 |
+ |
t.SetTextSize(0.02); |
358 |
|
|
359 |
|
///gluino |
360 |
< |
//MyTGraph * m_gluino = IsoMassLine( gluino, 1000. ); m_gluino->Draw(); |
360 |
> |
gStyle->SetLineColor(15);//gray |
361 |
> |
MyTGraph * m_gluino5 = IsoMassLine( gluino, 500. ); m_gluino5->Draw(); |
362 |
> |
MyTGraph * m_gluino10 = IsoMassLine( gluino, 1000. ); m_gluino10->Draw(); |
363 |
> |
MyTGraph * m_gluino20 = IsoMassLine( gluino, 2000. ); m_gluino20->Draw(); |
364 |
> |
MyTGraph * m_gluino30 = IsoMassLine( gluino, 3000. ); m_gluino30->Draw(); |
365 |
> |
MyTGraph * m_gluino40 = IsoMassLine( gluino, 4000. ); m_gluino40->Draw(); |
366 |
> |
t.DrawLatex(360.,450.,"#tilde{g}=1000 GeV"); |
367 |
> |
t.DrawLatex(600.,930.,"#tilde{g}=2000 GeV"); |
368 |
> |
t.DrawLatex(870.,1420.,"#tilde{g}=3000 GeV"); |
369 |
> |
t.DrawLatex(1150.,1930.,"#tilde{g}=4000 GeV"); |
370 |
|
|
371 |
|
///neutralino |
372 |
|
//MyTGraph * m_neutralino1 = IsoMassLine( neutralino_1, 500. ); m_neutralino1->Draw(); |
380 |
|
MyTGraph * m_ul30 = IsoMassLine( ul, 3000. ); m_ul30->Draw(); |
381 |
|
MyTGraph * m_ul35 = IsoMassLine( ul, 3500. ); m_ul35->Draw(); |
382 |
|
MyTGraph * m_ul40 = IsoMassLine( ul, 4000. ); m_ul40->Draw(); |
383 |
+ |
t.DrawLatex(800.,250.,"#tilde{u}_{L}=1000 GeV"); |
384 |
+ |
t.DrawLatex(1670.,470.,"#tilde{u}_{L}=2000 GeV"); |
385 |
+ |
t.DrawLatex(1670.,1250.,"#tilde{u}_{L}=3000 GeV"); |
386 |
+ |
t.DrawLatex(1670.,1930.,"#tilde{u}_{L}=4000 GeV"); |
387 |
|
|
388 |
|
///Contours |
389 |
|
contour_no_solution->Add(max_x+5,430); |
402 |
|
contour_charged_LSP->SetLineWidth( 4 ); |
403 |
|
contour_charged_LSP->Draw("lf"); |
404 |
|
contour_charged_LSP->Draw(); |
405 |
+ |
t.SetTextSize(0.03);t.SetTextColor( 6 ); |
406 |
+ |
t.DrawLatex(200.,1800.,"charged LSP (#tilde{#tau})"); |
407 |
|
|
408 |
+ |
// m(gluino)==m(squark) |
409 |
+ |
gStyle->SetLineColor(1);//black |
410 |
+ |
MyTGraph * m_ulgl = IsoMassLine( sq_equal_gluino, 0.2 ); |
411 |
+ |
m_ulgl->SetLineWidth(3); m_ulgl->Draw(); |
412 |
+ |
t.SetTextSize(0.03);t.SetTextColor( 1 ); |
413 |
+ |
t.DrawLatex( 750.,1200.,"m(#tilde{u}_{L}) < m(#tilde{g})"); |
414 |
+ |
t.DrawLatex(1400.,1150.,"m(#tilde{u}_{L}) > m(#tilde{g})"); |
415 |
|
|
416 |
|
|
417 |
< |
//c2->Draw(); //interactive |
253 |
< |
//gApplication->Run(); //interactive |
254 |
< |
|
417 |
> |
//DONE |
418 |
|
c1->SaveAs("dirt.eps"); |
419 |
+ |
gApplication->Run(); //interactive |
420 |
+ |
|
421 |
|
//ps.NewPage(); |
422 |
|
|
423 |
|
} |
448 |
|
gStyle->SetStatY(0); |
449 |
|
gStyle->SetStatW(0); |
450 |
|
gStyle->SetStatH(0); |
451 |
+ |
|
452 |
+ |
gStyle->SetTitleFont(22); |
453 |
+ |
gStyle->SetLabelFont(22,"X"); |
454 |
+ |
gStyle->SetLabelFont(22,"Y"); |
455 |
+ |
gStyle->SetLabelFont(22,"Z"); |
456 |
+ |
gStyle->SetLabelSize(0.03,"X"); |
457 |
+ |
gStyle->SetLabelSize(0.03,"Y"); |
458 |
+ |
gStyle->SetLabelSize(0.03,"Z"); |
459 |
+ |
|
460 |
+ |
//gROOT->SetStyle("MyStyle"); |
461 |
+ |
|
462 |
|
|
463 |
|
TScan * scan = new TScan(); |
464 |
|
scan->DoStuff(); |