File indexing completed on 2025-01-18 10:18:19
0001
0002
0003 void cerenkov( void )
0004 {
0005 gROOT->Reset();
0006
0007 gStyle->SetTextSize(0.02);
0008 gStyle->SetLabelSize(0.04,"xy");
0009 gStyle->SetFrameFillColor(0);
0010 gStyle->SetOptStat(0);
0011 gStyle->SetOptFit(0);
0012 gStyle->SetPadBottomMargin(0.13);
0013 gStyle->SetPadTopMargin(0.02);
0014 gStyle->SetPadRightMargin(0.05);
0015 gStyle->SetPadLeftMargin(0.10);
0016
0017
0018
0019
0020
0021
0022
0023
0024 TCanvas *c1 = new TCanvas("c1", "c1", 0, 0, 800, 500);
0025 c1->UseCurrentStyle();
0026 c1->SetBorderMode(0);
0027 c1->SetFrameBorderMode(0);
0028 c1->SetFrameLineColor(kWhite);
0029 c1->SetFillColor(kWhite);
0030
0031 #define _TSIZE_ 0.05
0032 #define _LSIZE_ 0.04
0033
0034 #define _PMAX_ (15.0)
0035
0036 TH1D *hdum = new TH1D("hdum", "", 50, 0.0, _PMAX_);
0037
0038 hdum->GetXaxis()->SetLabelFont(52);
0039 hdum->GetYaxis()->SetLabelFont(52);
0040 hdum->GetXaxis()->SetTitleFont(52);
0041 hdum->GetYaxis()->SetTitleFont(52);
0042
0043 hdum->GetXaxis()->SetTitle("Momentum, [GeV/c]");
0044 hdum->GetXaxis()->SetTitleSize(_TSIZE_);
0045 hdum->GetXaxis()->SetLabelSize(_LSIZE_);
0046 hdum->GetYaxis()->SetTitle("Cerenkov angle, [mrad]");
0047 hdum->GetYaxis()->SetTitleSize(_TSIZE_);
0048 hdum->GetYaxis()->SetLabelSize(_LSIZE_);
0049 hdum->GetXaxis()->SetTitleOffset(0.90);
0050 hdum->GetYaxis()->SetTitleOffset(0.80);
0051 hdum->SetMinimum( 0.0);
0052 hdum->SetMaximum( 400.0);
0053
0054
0055
0056
0057 gPad->SetGrid();
0058 gPad->SetBorderMode(0);
0059 gPad->SetBorderSize(0);
0060 gPad->SetFrameBorderMode(0);
0061 gPad->SetFrameLineColor(kWhite);
0062
0063 hdum->Draw();
0064
0065 #define _GNUM_ 1
0066 #define _CF4_ (1.00055)
0067 #define _C2F6_ (1.00083)
0068 #define _C4F10_ (1.00150)
0069 #define _AG_1_02_ (1.02000)
0070 #define _AG_1_05_ (1.04550)
0071 #define _C6F14_ (1.275)
0072 #define _QQ_ (1.01000)
0073
0074 #define _PNUM_ 2
0075 #define _MPI_ (0.140)
0076 #define _MK_ (0.494)
0077 #define _MP_ (0.938)
0078 #define _ME_ (0.0005)
0079
0080
0081 double masses[_PNUM_] = {_MPI_, _MK_}, gases[_GNUM_] = {_AG_1_05_};
0082 unsigned colors[_PNUM_] = {kRed};
0083
0084 for(unsigned ig=0; ig<_GNUM_; ig++) {
0085 double gas = gases[ig];
0086
0087 for(unsigned ip=0; ip<_PNUM_; ip++) {
0088 double mass = masses[ip];
0089
0090 double pmin = mass/sqrt(gas*gas-1.0);
0091 printf("%f\n", pmin);
0092 char name[128], buffer[512];
0093 sprintf(name, "g%dp%d", ig, ip);
0094 sprintf(buffer, "1000.*acos(sqrt(x*x+%7.3f*%7.3f)/(%7.5f*x))", mass, mass, gas);
0095 {
0096 double p = 7.0;
0097 printf("-> %f\n", 1000.*acos(sqrt(p*p+mass*mass)/(gas*p)));
0098 }
0099 TF1 *hfun = new TF1(name, buffer, pmin, _PMAX_);
0100 hfun->SetNpx(100000);
0101 hfun->SetLineWidth(2);
0102 hfun->SetLineColor(colors[ip]);
0103 if (ig) hfun->SetLineStyle(7);
0104 hfun->Draw("SAME");
0105 }
0106 }
0107 }