12 #include <TEveManager.h>
13 #include <TEveArrow.h>
26 #define _MAP_ZMIN_ (-500.0)
27 #define _MAP_ZDIM_ 501
29 #define _MAP_RMIN_ 0.0
30 #define _MAP_RDIM_ 126
32 #define _COORD_CFF_ 1.0
33 #define _FIELD_CFF_ 1.0
40 #define _KICK_ZMIN_ 160.0
41 #define _KICK_ZDIM_ 100
42 #define _KICK_ZSTEP_ 1.0
46 #define _KICK_TDIM_ 40
47 #define _KICK_TSTEP_ 1.0
58 gStyle->SetOptStat(0);
60 TEveManager::Create();
73 double accu = 0.0, avg = 0.0, avg_sqr = 0.0;
77 int ret = bmf->GetFieldValue(r, z, br, bz); assert(!ret);
78 TVector2
n(1.0, slope), b(bz, br);
79 double norm = (b.Norm(
n)).Mod();
81 double kick = (420.0/
_P0_) * sqrt(1.0+slope*slope)*_KICK_ZSTEP_ * b.Mod()*tan(b.DeltaPhi(
n)) / (1.3*100.0);
90 double dsp = sqrt(avg_sqr - avg*avg);
92 printf(
" %3d -> <kick> %7.2f [mrad] -> sigma %7.2f [mrad]\n", is, avg, dsp);
97 double qstep = 1.0, alen = qstep*0.8;
99 for(
unsigned ir=0;
ir<25;
ir++) {
100 unsigned counter = 0;
101 double rr =
ir*5.0, zz = 0.0;
108 if (!bmf->GetFieldValue(
ir ? rr : 0.0, zz, br, bz))
break;
110 double norm = sqrt(br*br+bz*bz);
112 TEveArrow *ea =
new TEveArrow(0.0, alen*br/norm, alen*bz/norm, 0.0, rr, zz);
114 ea->SetMainColor(color);
115 ea->SetPickable(kFALSE);
119 gEve->AddElement(ea);
121 zz += (bz/norm)*qstep; rr += (br/norm)*qstep;
123 if (zz > 300.0)
break;
124 if (counter++ > 1000)
break;
128 for(
unsigned iq=0; iq<5; iq++) {
129 double th = (iq+1)*5*TMath::Pi()/180.;
131 auto pt =
new TEveLine(2);
132 pt->SetMainColor(kWhite);
133 pt->SetPickable(kFALSE);
134 pt->SetPoint(0, 0., 0., 0.);
135 pt->SetPoint(1, 0., 300.*tan(th), 300.);
136 gEve->AddElement(pt);
140 gEve->FullRedraw3D(kTRUE);
143 TCanvas *
c1 =
new TCanvas(
"c1",
"c1", 0, 0, 800, 500);
153 if (ibin >= 0 && ibin < _KICK_TDIM_)
154 dspH->SetBinContent(is+1, (
_P0_/p0)*kicksigs[ibin]);
157 dspH->SetMinimum( 0.0);
158 dspH->SetMaximum(10.0);
159 dspH->GetXaxis()->SetTitle(
"Scattered hadron polar angle, [degree]");
160 dspH->GetXaxis()->SetTitleFont(52);
161 dspH->GetXaxis()->SetTitleSize(0.05);
162 dspH->GetXaxis()->SetLabelFont(52);
163 dspH->GetXaxis()->SetLabelSize(0.04);
164 dspH->GetXaxis()->SetTitleOffset(0.90);
165 dspH->GetYaxis()->SetTitle(
"Direction variation, [mrad]");
166 dspH->GetYaxis()->SetTitleFont(52);
167 dspH->GetYaxis()->SetTitleSize(0.05);
168 dspH->GetYaxis()->SetLabelFont(52);
169 dspH->GetYaxis()->SetLabelSize(0.04);
170 dspH->GetYaxis()->SetTitleOffset(0.80);
172 dspH->SetLineWidth(2);
173 dspH->SetFillColor(kGreen+1);
176 TLine *line =
new TLine(25., 0., 25., 10.);
177 line->SetLineColor(kRed);
178 line->SetLineWidth(2);
179 line->SetLineStyle(5);