10 #define _EY_ ( 3.3E-6)
17 #define _X0_ ( 207.24)
21 #define _SIGMA_CUT_ (10.0)
27 #define _BETA_X_ (87E3)
28 #define _BETA_Y_ (56E3)
38 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
40 gStyle->SetOptStat(0);
41 gStyle->SetPadBottomMargin(0.13);
44 TFile *
ff =
new TFile(
"simulation.root");
46 cbmsim->AddFriend(
"cbmsim",
"digitization.root");
48 TClonesArray *
lqstHitArray =
new TClonesArray(
"EicTrackingDigiHitOrth2D");
49 cbmsim->SetBranchAddress(
"LqstTrackingDigiHit", &lqstHitArray);
51 cbmsim->SetBranchAddress(
"MCTrack", &mcTrackArray);
53 TCanvas *
c1 =
new TCanvas(
"c1",
"c1", 0, 0, 800, 500);
55 TH1D *
th0 =
new TH1D(
"th0",
"", 250, 0., 25.);
56 th0->SetMinimum(0); th0->SetLineWidth(2); th0->SetLineColor(kBlack);
57 TH1D *
th1 =
new TH1D(
"th1",
"", 250, 0., 25.); th1->SetLineWidth(2); th1->SetLineColor(kGreen);
58 TH1D *
th2 =
new TH1D(
"th2",
"", 250, 0., 25.); th2->SetLineWidth(2); th2->SetLineColor(kRed);
59 TH1D *
th3 =
new TH1D(
"th3",
"", 250, 0., 25.); th3->SetLineWidth(2); th3->SetLineColor(kBlue);
63 TH1D *thq3 =
new TH1D(
"thq3",
"", 40, 0., 4.);
64 thq3->SetMinimum(0); thq3->SetLineWidth(2); thq3->SetLineColor(kBlue);
65 TH1D *pq3 =
new TH1D(
"pq3",
"" , 80, 60., 140.0);
66 pq3->SetLineColor(kBlue); pq3->SetMinimum(0); pq3->SetLineWidth(2);
67 TH2D *pthq3 =
new TH2D(
"pthq3",
"" , 80, 60., 140.0, 40, 0., 4.);
72 TH1D *pres =
new TH1D(
"pres",
"", 100, -10., 10.);
73 TH1D *dpt =
new TH1D(
"dpt",
"dpt", 100, -300., 300.);
76 TH1D *
hxl =
new TH1D(
"hxl",
"" , 200, -1.0, 1.0);
79 TH1D *
q2h0 =
new TH1D(
"q2h0",
"" , 100, -20.0, 5.0);
80 q2h0->SetMinimum(0); q2h0->SetLineWidth(3); q2h0->SetLineColor(kBlack);
81 TH1D *
q2h1 =
new TH1D(
"q2h1",
"" , 100, -20.0, 5.0);
82 q2h1->SetLineWidth(2); q2h1->SetLineColor(kGreen);
83 TH1D *
q2h3 =
new TH1D(
"q2h3",
"" , 100, -20.0, 5.0);
84 q2h3->SetLineWidth(1); q2h3->SetLineColor(kBlue);
86 TH1D *
pt0 =
new TH1D(
"pt0",
"" ,150, 0., 1.5);
87 pt0->SetLineColor(kBlack); pt0->SetMinimum(0); pt0->SetLineWidth(1);
88 TH1D *
pt1 =
new TH1D(
"pt1",
"", 150, 0., 1.5); pt1->SetLineWidth(3); pt1->SetLineColor(kGreen);
89 TH1D *
pt2 =
new TH1D(
"pt2",
"", 150, 0., 1.5); pt2->SetLineWidth(3); pt2->SetLineColor(kRed);
90 TH1D *
pt3 =
new TH1D(
"pt3",
"", 150, 0., 1.5); pt3->SetLineWidth(3); pt3->SetLineColor(kBlue);
92 TH1D *hq2d =
new TH1D(
"hq2d",
"hq2d", 100, 0., 100.);
93 TH1D *
phi=
new TH1D(
"phi",
"phi",100, -3.14159, 3.14159);
94 TH2D *acc=
new TH2D(
"acc",
"acc",100, -10., 10., 100, -10., 10.);
96 TH1D *x1 =
new TH1D(
"x1",
"x1", 3000, -30., 30.);
97 TH1D *sx =
new TH1D(
"sx",
"sx", 1000, -10., 10.);
99 TH1D *y1 =
new TH1D(
"y1",
"y1", 2000, -20., 20.);
100 TH1D *sy =
new TH1D(
"sy",
"sy", 1000, -10., 10.);
101 TH2D *xy =
new TH2D(
"xy",
"xy", 50, -120., 120., 50, -120., 120.);
109 double aX[2][2] = {{-1.810, 24.070}, {-0.165, 0.240}}, aXinv[2][2], aYinv = 1/7.725;
110 double det = aX[0][0]*aX[1][1] - aX[0][1]*aX[1][0]; assert(det);
111 aXinv[0][0] = aX[1][1]/det;
112 aXinv[0][1] = -aX[0][1]/det;
113 aXinv[1][0] = -aX[1][0]/det;
114 aXinv[1][1] = aX[0][0]/det;
120 sigx = sqrt(sigx*sigx + sigp*sigp);
129 cbmsim->GetEntry(ev);
131 assert(mcTrackArray->GetEntriesFast() == 1);
134 if (mctrack->GetPdgCode() == 11 && mctrack->GetMotherID() == -1) {
137 double out[3]; out[0] = pin.x(); out[1] = pin.y(); out[2] = pin.z();
142 double p40[4], p41[4], dp4[4];
144 p41[0] = sqrt(
_ME_*
_ME_ + pin.Mag2()); p41[1] = pin.x(); p41[2] = pin.y(); p41[3] = pin.z();
146 for(
unsigned iq=0; iq<4; iq++)
147 dp4[iq] = p41[iq] - p40[iq];
148 double q2 = dp4[0]*dp4[0];
149 for(
unsigned iq=1; iq<4; iq++)
150 q2 -= dp4[iq]*dp4[iq];
151 double theta = 1000*(180.0 - psim.Theta() * TMath::RadToDeg())*TMath::DegToRad();
152 printf(
"%d -> %7.2f %7.2f %f\n", lqstHitArray->GetEntriesFast(),
theta, psim.Mag(), q2);
157 q2h0->Fill(log(-q2));
159 if (lqstHitArray->GetEntriesFast() == 2) {
162 q2h1->Fill(log(-q2));
173 double xl = 10*lqsthit->GetCoord(0) -
_X0_, yl = 10*lqsthit->GetCoord(1) -
_Y0_;
177 double qx = xl/
sigx, qy = yl/
sigy, q2d = sqrt(qx*qx+qy*qy);
183 q2h3->Fill(log(-q2));
189 pq3->Fill(psim.Mag());
191 pthq3->Fill(psim.Mag(),
theta);
203 double Xlqst[2], Xip[2]; Xlqst[0] = XL[1]; Xlqst[1] = 1000*(XL[1] - XL[0])/base -
_SX0_;
204 double Ylqst = YL[1], Yip = aYinv * Ylqst;
205 Xip[0] = Xip[1] = 0.0;
206 for(
unsigned i0=0; i0<2; i0++)
207 for(
unsigned i1=0; i1<2; i1++)
208 Xip[i0] += aXinv[i0][i1]*Xlqst[i1];
211 double perc = 100*(psim.Mag()-275.)/275.;
214 double rsx = Xip[1]/1000., rsy = Yip/1000.,
p = 275.*(1 + 0.01*Xip[0]);
215 double norm = sqrt(1.0 + rsx*rsx + rsy*rsy);
216 double arr[3], out[3]; arr[0] =
p*rsx/norm; arr[1] =
p*rsy/norm; arr[2] =
p/norm;
219 prec = TVector3(arr);
226 pres->Fill(100.*(prec.Mag() - psim.Mag())/psim.Mag());
228 dpt->Fill(1000*(prec.Pt() - psim.Pt()));
231 sx->Fill(1000*(XL[1] - XL[0])/base -
_SX0_);
232 sy->Fill(1000*(YL[1] - YL[0])/base -
_SY0_);
238 q2h0->GetXaxis()->SetTitle(
"log(Q^{2})");
239 q2h0->GetXaxis()->SetTitleOffset(0.9);
240 q2h0->GetXaxis()->SetLabelFont(52);
241 q2h0->GetXaxis()->SetLabelSize(0.050);
242 q2h0->GetXaxis()->SetTitleFont(52);
243 q2h0->GetXaxis()->SetTitleSize(0.060);
245 q2h0->GetYaxis()->SetTitle(
"Events");
246 q2h0->GetYaxis()->SetTitleOffset(0.8);
247 q2h0->GetYaxis()->SetLabelFont(52);
248 q2h0->GetYaxis()->SetLabelSize(0.050);
249 q2h0->GetYaxis()->SetTitleFont(52);
250 q2h0->GetYaxis()->SetTitleSize(0.060);
261 pq3->GetXaxis()->SetTitle(
"Leading proton momentum [GeV/c]");
262 pq3->GetXaxis()->SetTitleOffset(0.9);
263 pq3->GetXaxis()->SetLabelFont(52);
264 pq3->GetXaxis()->SetLabelSize(0.050);
265 pq3->GetXaxis()->SetTitleFont(52);
266 pq3->GetXaxis()->SetTitleSize(0.060);
268 pq3->GetYaxis()->SetTitle(
"Events");
269 pq3->GetYaxis()->SetTitleOffset(0.8);
270 pq3->GetYaxis()->SetLabelFont(52);
271 pq3->GetYaxis()->SetLabelSize(0.050);
272 pq3->GetYaxis()->SetTitleFont(52);
273 pq3->GetYaxis()->SetTitleSize(0.060);
275 thq3->GetXaxis()->SetTitle(
"Spectator proton theta [mrad]");
276 thq3->GetXaxis()->SetTitleOffset(0.9);
277 thq3->GetXaxis()->SetLabelFont(52);
278 thq3->GetXaxis()->SetLabelSize(0.050);
279 thq3->GetXaxis()->SetTitleFont(52);
280 thq3->GetXaxis()->SetTitleSize(0.060);
282 thq3->GetYaxis()->SetTitle(
"Events");
283 thq3->GetYaxis()->SetTitleOffset(0.8);
284 thq3->GetYaxis()->SetLabelFont(52);
285 thq3->GetYaxis()->SetLabelSize(0.050);
286 thq3->GetYaxis()->SetTitleFont(52);
287 thq3->GetYaxis()->SetTitleSize(0.060);
289 pthq3->GetXaxis()->SetTitle(
"Spectator proton momentum [GeV/c]");
290 pthq3->GetXaxis()->SetTitleOffset(0.9);
291 pthq3->GetXaxis()->SetLabelFont(52);
292 pthq3->GetXaxis()->SetLabelSize(0.050);
293 pthq3->GetXaxis()->SetTitleFont(52);
294 pthq3->GetXaxis()->SetTitleSize(0.060);
297 pthq3->GetYaxis()->SetTitle(
"Spectator proton theta [mrad]");
298 pthq3->GetYaxis()->SetTitleOffset(0.8);
299 pthq3->GetYaxis()->SetLabelFont(52);
300 pthq3->GetYaxis()->SetLabelSize(0.050);
301 pthq3->GetYaxis()->SetTitleFont(52);
302 pthq3->GetYaxis()->SetTitleSize(0.060);
306 th0->GetXaxis()->SetTitle(
"Leading proton theta [mrad]");
307 th0->GetXaxis()->SetTitleOffset(0.9);
308 th0->GetXaxis()->SetLabelFont(52);
309 th0->GetXaxis()->SetLabelSize(0.050);
310 th0->GetXaxis()->SetTitleFont(52);
311 th0->GetXaxis()->SetTitleSize(0.060);
313 th0->GetYaxis()->SetTitle(
"Events");
314 th0->GetYaxis()->SetTitleOffset(0.8);
315 th0->GetYaxis()->SetLabelFont(52);
316 th0->GetYaxis()->SetLabelSize(0.050);
317 th0->GetYaxis()->SetTitleFont(52);
318 th0->GetYaxis()->SetTitleSize(0.060);
323 pt0->GetXaxis()->SetTitle(
"DVCS proton P_{t} [GeV/c]");
324 pt0->GetXaxis()->SetTitleOffset(0.9);
325 pt0->GetXaxis()->SetLabelFont(52);
326 pt0->GetXaxis()->SetLabelSize(0.050);
327 pt0->GetXaxis()->SetTitleFont(52);
328 pt0->GetXaxis()->SetTitleSize(0.060);
330 pt0->GetYaxis()->SetTitle(
"Events");
331 pt0->GetYaxis()->SetTitleOffset(0.8);
332 pt0->GetYaxis()->SetLabelFont(52);
333 pt0->GetYaxis()->SetLabelSize(0.050);
334 pt0->GetYaxis()->SetTitleFont(52);
335 pt0->GetYaxis()->SetTitleSize(0.060);