4 #include "StSpinPool/StMCAsymMaker/StMCAsymMaker.h"
6 #include "StMcEventMaker/StMcEventMaker.h"
7 #include "StMcEventTypes.hh"
8 #include "StMcEvent.hh"
9 #include "St_DataSet.h"
10 #include "St_DataSetIter.h"
11 #include "tables/St_g2t_event_Table.h"
12 #include "tables/St_particle_Table.h"
13 #include "tables/St_g2t_pythia_Table.h"
14 #include "StMuDSTMaker/COMMON/StMuEvent.h"
15 #include "StMuDSTMaker/COMMON/StMuDst.h"
16 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
19 #include "StPythiaEvent.h"
21 #include "tables/St_particle_Table.h"
29 StMCAsymMaker::~StMCAsymMaker() {
33 Int_t StMCAsymMaker::Init() {
36 return StMaker::Init();
39 void StMCAsymMaker::Zero() {
139 weight_NLO_DSSV2009a=0;
153 df1_NLO_LSS2010_delGpos = 0;
154 df2_NLO_LSS2010_delGpos = 0;
155 weight_NLO_LSS2010_delGpos = 0;
157 df1_NLO_LSS2010_chsign_delG = 0;
158 df2_NLO_LSS2010_chsign_delG = 0;
159 weight_NLO_LSS2010_chsign_delG = 0;
183 weight_NLO_BB2010 = 0;
195 void StMCAsymMaker::Clear(
const Option_t* c) {
204 mcEvent = (
StMcEvent*)GetDataSet(
"StMcEvent");
206 LOG_WARN <<
"No StMcEvent" << endm;
211 muDstMaker = (
StMuDstMaker*)GetMaker(
"MuDst"); assert(muDstMaker);
213 muEvent = dst->
event(); assert(muEvent);
222 particleTabPtr = (St_particle *) geantDstI(
"particle");
225 if (particleTabPtr!=0){
227 particle_st* particleTable = particleTabPtr->GetTable();
230 Pg2t_event=(St_g2t_event *) geantDstI(
"g2t_event");
231 g2t_event_st *g2t_event1=Pg2t_event->GetTable();
232 geantID= g2t_event1->n_event;
233 geantPID= g2t_event1->subprocess_id;
236 assert(evtid==geantID);
239 Pg2t_pythia=(St_g2t_pythia *) geantDstI(
"g2t_pythia");
240 g2t_pythia_st *g2t_pythia1=Pg2t_pythia->GetTable();
241 s= g2t_pythia1-> mand_s;
242 t= g2t_pythia1-> mand_t;
243 u= g2t_pythia1-> mand_u;
244 hard_p= g2t_pythia1->hard_p;
245 cos_th= g2t_pythia1->cos_th;
246 x1= g2t_pythia1->bjor_1;
247 x2= g2t_pythia1->bjor_2;
250 flavor1=particleTable[4].idhep;
251 flavor2=particleTable[5].idhep;
252 flavor3=particleTable[6].idhep;
253 flavor4=particleTable[7].idhep;
256 parton1[0]=particleTable[6].idhep;
257 parton1[1]=particleTable[6].phep[0];
258 parton1[2]=particleTable[6].phep[1];
259 parton1[3]=particleTable[6].phep[2];
260 parton1[4]=particleTable[6].phep[3];
261 parton1[5]=particleTable[6].phep[4];
262 parton1[6]=particleTable[6].isthep;
263 parton1[7]=particleTable[6].jmohep[0];
264 parton1[8]=particleTable[6].jmohep[1];
265 parton1[9]=particleTable[6].jdahep[0];
266 parton1[10]=particleTable[6].jdahep[1];
267 parton2[0]=particleTable[7].idhep;
268 parton2[1]=particleTable[7].phep[0];
269 parton2[2]=particleTable[7].phep[1];
270 parton2[3]=particleTable[7].phep[2];
271 parton2[4]=particleTable[7].phep[3];
272 parton2[5]=particleTable[7].phep[4];
273 parton2[6]=particleTable[7].isthep;
274 parton2[7]=particleTable[7].jmohep[0];
275 parton2[8]=particleTable[7].jmohep[1];
276 parton2[9]=particleTable[7].jdahep[0];
277 parton2[10]=particleTable[7].jdahep[1];
280 printf(
"PID/evtid from McEvent = %d,%d; PID/evtid from Table = %d,%d:\n",pid,evtid,geantPID,geantID);
281 printf(
"row | id | px | py | pz | E | m | status | moth1 | moth2 | daught1 | daught2 |\n");
282 for (
int i=0; i<particleTabPtr->GetNRows();++i) {
283 printf(
" %d, %d, %f, %f, %f, %f, %f, %d, %d, %d, %d, %d\n",i,particleTable[i].idhep, particleTable[i].phep[0],
284 particleTable[i].phep[1], particleTable[i].phep[2] , particleTable[i].phep[3], particleTable[i].phep[4], particleTable[i].isthep,
285 particleTable[i].jmohep[0], particleTable[i].jmohep[1], particleTable[i].jdahep[0], particleTable[i].jdahep[1]);}
287 cout <<
"flavor1: " << flavor1 <<
" flavor2: " << flavor2 <<
" flavor3: " << flavor3 <<
" flavor4: " << flavor4 << endl << endl;
291 partonic_all=getPartonicALL(s,t,u,pid,flavor1,flavor2,flavor3,flavor4);
295 df1_NLO_GSA=get_polPDF_NLO_GSA(flavor1,x1,Q2);
296 df2_NLO_GSA=get_polPDF_NLO_GSA(flavor2,x2,Q2);
297 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
298 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
299 weight_NLO_GSA=(df1_NLO_GSA*df2_NLO_GSA*partonic_all)/(f1_NLO*f2_NLO);
302 df1_NLO_GSB=get_polPDF_NLO_GSB(flavor1,x1,Q2);
303 df2_NLO_GSB=get_polPDF_NLO_GSB(flavor2,x2,Q2);
304 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
305 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
306 weight_NLO_GSB=(df1_NLO_GSB*df2_NLO_GSB*partonic_all)/(f1_NLO*f2_NLO);
309 df1_NLO_GSC=get_polPDF_NLO_GSC(flavor1,x1,Q2);
310 df2_NLO_GSC=get_polPDF_NLO_GSC(flavor2,x2,Q2);
311 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
312 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
313 weight_NLO_GSC=(df1_NLO_GSC*df2_NLO_GSC*partonic_all)/(f1_NLO*f2_NLO);
316 df1_LO=get_polPDF_LO(flavor1,x1,Q2);
317 df2_LO=get_polPDF_LO(flavor2,x2,Q2);
318 f1_LO=get_unpolPDF_LO(flavor1,x1,Q2);
319 f2_LO=get_unpolPDF_LO(flavor2,x2,Q2);
320 weight_LO=(df1_LO*df2_LO*partonic_all)/(f1_LO*f2_LO);
323 df1_NLO=get_polPDF_NLO(flavor1,x1,Q2);
324 df2_NLO=get_polPDF_NLO(flavor2,x2,Q2);
325 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
326 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
327 weight_NLO=(df1_NLO*df2_NLO*partonic_all)/(f1_NLO*f2_NLO);
330 df1_NLO_g0=get_polPDF_NLO_g0(flavor1,x1,Q2);
331 df2_NLO_g0=get_polPDF_NLO_g0(flavor2,x2,Q2);
332 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
333 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
334 weight_NLO_g0=(df1_NLO_g0*df2_NLO_g0*partonic_all)/(f1_NLO*f2_NLO);
337 df1_NLO_gmax=get_polPDF_NLO_gmax(flavor1,x1,Q2);
338 df2_NLO_gmax=get_polPDF_NLO_gmax(flavor2,x2,Q2);
339 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
340 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
341 weight_NLO_gmax=(df1_NLO_gmax*df2_NLO_gmax*partonic_all)/(f1_NLO*f2_NLO);
344 df1_NLO_gmin=get_polPDF_NLO_gmin(flavor1,x1,Q2);
345 df2_NLO_gmin=get_polPDF_NLO_gmin(flavor2,x2,Q2);
346 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
347 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
348 weight_NLO_gmin=(df1_NLO_gmin*df2_NLO_gmin*partonic_all)/(f1_NLO*f2_NLO);
351 df1_NLO_m015=get_polPDF_NLO_m015(flavor1,x1,Q2);
352 df2_NLO_m015=get_polPDF_NLO_m015(flavor2,x2,Q2);
353 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
354 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
355 weight_NLO_m015=(df1_NLO_m015*df2_NLO_m015*partonic_all)/(f1_NLO*f2_NLO);
358 df1_NLO_m030=get_polPDF_NLO_m030(flavor1,x1,Q2);
359 df2_NLO_m030=get_polPDF_NLO_m030(flavor2,x2,Q2);
360 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
361 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
362 weight_NLO_m030=(df1_NLO_m030*df2_NLO_m030*partonic_all)/(f1_NLO*f2_NLO);
365 df1_NLO_m045=get_polPDF_NLO_m045(flavor1,x1,Q2);
366 df2_NLO_m045=get_polPDF_NLO_m045(flavor2,x2,Q2);
367 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
368 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
369 weight_NLO_m045=(df1_NLO_m045*df2_NLO_m045*partonic_all)/(f1_NLO*f2_NLO);
372 df1_NLO_m060=get_polPDF_NLO_m060(flavor1,x1,Q2);
373 df2_NLO_m060=get_polPDF_NLO_m060(flavor2,x2,Q2);
374 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
375 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
376 weight_NLO_m060=(df1_NLO_m060*df2_NLO_m060*partonic_all)/(f1_NLO*f2_NLO);
379 df1_NLO_m075=get_polPDF_NLO_m075(flavor1,x1,Q2);
380 df2_NLO_m075=get_polPDF_NLO_m075(flavor2,x2,Q2);
381 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
382 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
383 weight_NLO_m075=(df1_NLO_m075*df2_NLO_m075*partonic_all)/(f1_NLO*f2_NLO);
386 df1_NLO_m090=get_polPDF_NLO_m090(flavor1,x1,Q2);
387 df2_NLO_m090=get_polPDF_NLO_m090(flavor2,x2,Q2);
388 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
389 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
390 weight_NLO_m090=(df1_NLO_m090*df2_NLO_m090*partonic_all)/(f1_NLO*f2_NLO);
393 df1_NLO_m105=get_polPDF_NLO_m105(flavor1,x1,Q2);
394 df2_NLO_m105=get_polPDF_NLO_m105(flavor2,x2,Q2);
395 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
396 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
397 weight_NLO_m105=(df1_NLO_m105*df2_NLO_m105*partonic_all)/(f1_NLO*f2_NLO);
400 df1_NLO_p030=get_polPDF_NLO_p030(flavor1,x1,Q2);
401 df2_NLO_p030=get_polPDF_NLO_p030(flavor2,x2,Q2);
402 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
403 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
404 weight_NLO_p030=(df1_NLO_p030*df2_NLO_p030*partonic_all)/(f1_NLO*f2_NLO);
407 df1_NLO_p045=get_polPDF_NLO_p045(flavor1,x1,Q2);
408 df2_NLO_p045=get_polPDF_NLO_p045(flavor2,x2,Q2);
409 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
410 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
411 weight_NLO_p045=(df1_NLO_p045*df2_NLO_p045*partonic_all)/(f1_NLO*f2_NLO);
414 df1_NLO_p060=get_polPDF_NLO_p060(flavor1,x1,Q2);
415 df2_NLO_p060=get_polPDF_NLO_p060(flavor2,x2,Q2);
416 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
417 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
418 weight_NLO_p060=(df1_NLO_p060*df2_NLO_p060*partonic_all)/(f1_NLO*f2_NLO);
421 df1_NLO_p070=get_polPDF_NLO_p070(flavor1,x1,Q2);
422 df2_NLO_p070=get_polPDF_NLO_p070(flavor2,x2,Q2);
423 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
424 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
425 weight_NLO_p070=(df1_NLO_p070*df2_NLO_p070*partonic_all)/(f1_NLO*f2_NLO);
428 df1_NLO_DSSV=get_polPDF_NLO_DSSV(flavor1,x1,Q2);
429 df2_NLO_DSSV=get_polPDF_NLO_DSSV(flavor2,x2,Q2);
430 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
431 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
432 weight_NLO_DSSV=(df1_NLO_DSSV*df2_NLO_DSSV*partonic_all)/(f1_NLO*f2_NLO);
435 df1_NLO_DSSV2009a=get_polPDF_NLO_DSSV2009a(flavor1,x1,Q2);
436 df2_NLO_DSSV2009a=get_polPDF_NLO_DSSV2009a(flavor2,x2,Q2);
437 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
438 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
439 weight_NLO_DSSV2009a=(df1_NLO_DSSV2009a/f1_NLO)*(df2_NLO_DSSV2009a/f2_NLO)*partonic_all;
442 df1_NLO_LSS1=get_polPDF_NLO_LSS1(flavor1,x1,Q2);
443 df2_NLO_LSS1=get_polPDF_NLO_LSS1(flavor2,x2,Q2);
444 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
445 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
446 weight_NLO_LSS1=(df1_NLO_LSS1*df2_NLO_LSS1*partonic_all)/(f1_NLO*f2_NLO);
449 df1_NLO_LSS2=get_polPDF_NLO_LSS2(flavor1,x1,Q2);
450 df2_NLO_LSS2=get_polPDF_NLO_LSS2(flavor2,x2,Q2);
451 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
452 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
453 weight_NLO_LSS2=(df1_NLO_LSS2*df2_NLO_LSS2*partonic_all)/(f1_NLO*f2_NLO);
456 df1_NLO_LSS3=get_polPDF_NLO_LSS3(flavor1,x1,Q2);
457 df2_NLO_LSS3=get_polPDF_NLO_LSS3(flavor2,x2,Q2);
458 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
459 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
460 weight_NLO_LSS3=(df1_NLO_LSS3*df2_NLO_LSS3*partonic_all)/(f1_NLO*f2_NLO);
463 df1_NLO_LSS2010_delGpos = get_polPDF_NLO_LSS2010_delGpos(flavor1,x1,Q2);
464 df2_NLO_LSS2010_delGpos = get_polPDF_NLO_LSS2010_delGpos(flavor2,x2,Q2);
465 f1_NLO = get_unpolPDF_NLO(flavor1,x1,Q2);
466 f2_NLO = get_unpolPDF_NLO(flavor2,x2,Q2);
467 weight_NLO_LSS2010_delGpos = (df1_NLO_LSS2010_delGpos*df2_NLO_LSS2010_delGpos*partonic_all)/(f1_NLO*f2_NLO);
470 df1_NLO_LSS2010_chsign_delG = get_polPDF_NLO_LSS2010_chsign_delG(flavor1,x1,Q2);
471 df2_NLO_LSS2010_chsign_delG = get_polPDF_NLO_LSS2010_chsign_delG(flavor2,x2,Q2);
472 f1_NLO = get_unpolPDF_NLO(flavor1,x1,Q2);
473 f2_NLO = get_unpolPDF_NLO(flavor2,x2,Q2);
474 weight_NLO_LSS2010_chsign_delG = (df1_NLO_LSS2010_chsign_delG*df2_NLO_LSS2010_chsign_delG*partonic_all)/(f1_NLO*f2_NLO);
477 df1_NLO_AAC1=get_polPDF_NLO_AAC1(flavor1,x1,Q2);
478 df2_NLO_AAC1=get_polPDF_NLO_AAC1(flavor2,x2,Q2);
479 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
480 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
481 weight_NLO_AAC1=(df1_NLO_AAC1*df2_NLO_AAC1*partonic_all)/(f1_NLO*f2_NLO);
484 df1_NLO_AAC2=get_polPDF_NLO_AAC2(flavor1,x1,Q2);
485 df2_NLO_AAC2=get_polPDF_NLO_AAC2(flavor2,x2,Q2);
486 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
487 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
488 weight_NLO_AAC2=(df1_NLO_AAC2*df2_NLO_AAC2*partonic_all)/(f1_NLO*f2_NLO);
491 df1_NLO_AAC3=get_polPDF_NLO_AAC3(flavor1,x1,Q2);
492 df2_NLO_AAC3=get_polPDF_NLO_AAC3(flavor2,x2,Q2);
493 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
494 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
495 weight_NLO_AAC3=(df1_NLO_AAC3*df2_NLO_AAC3*partonic_all)/(f1_NLO*f2_NLO);
498 df1_NLO_BB1=get_polPDF_NLO_BB1(flavor1,x1,Q2);
499 df2_NLO_BB1=get_polPDF_NLO_BB1(flavor2,x2,Q2);
500 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
501 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
502 weight_NLO_BB1=(df1_NLO_BB1*df2_NLO_BB1*partonic_all)/(f1_NLO*f2_NLO);
505 df1_NLO_BB2=get_polPDF_NLO_BB2(flavor1,x1,Q2);
506 df2_NLO_BB2=get_polPDF_NLO_BB2(flavor2,x2,Q2);
507 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
508 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
509 weight_NLO_BB2=(df1_NLO_BB2*df2_NLO_BB2*partonic_all)/(f1_NLO*f2_NLO);
512 df1_NLO_BB2010 = get_polPDF_NLO_BB2010(flavor1,x1,Q2);
513 df2_NLO_BB2010 = get_polPDF_NLO_BB2010(flavor2,x2,Q2);
514 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
515 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
516 weight_NLO_BB2010 = (df1_NLO_BB2010*df2_NLO_BB2010*partonic_all)/(f1_NLO*f2_NLO);
519 df1_NLO_DNS1=get_polPDF_NLO_DNS1(flavor1,x1,Q2);
520 df2_NLO_DNS1=get_polPDF_NLO_DNS1(flavor2,x2,Q2);
521 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
522 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
523 weight_NLO_DNS1=(df1_NLO_DNS1*df2_NLO_DNS1*partonic_all)/(f1_NLO*f2_NLO);
526 df1_NLO_DNS2=get_polPDF_NLO_DNS2(flavor1,x1,Q2);
527 df2_NLO_DNS2=get_polPDF_NLO_DNS2(flavor2,x2,Q2);
528 f1_NLO=get_unpolPDF_NLO(flavor1,x1,Q2);
529 f2_NLO=get_unpolPDF_NLO(flavor2,x2,Q2);
530 weight_NLO_DNS2=(df1_NLO_DNS2*df2_NLO_DNS2*partonic_all)/(f1_NLO*f2_NLO);
533 printf(
"LO: df1_LO=%f, df2_LO=%f, f1_LO=%f, f2_LO=%f, weight_LO=%f\n",df1_LO,df2_LO,f1_LO,f2_LO,weight_LO);
534 printf(
"NLO: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO,df2_NLO,f1_NLO,f2_NLO,weight_NLO);
535 printf(
"NLO_gmin: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_gmin,df2_NLO_gmin,f1_NLO,f2_NLO,weight_NLO_gmin);
536 printf(
"NLO_g0: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_g0,df2_NLO_g0,f1_NLO,f2_NLO,weight_NLO_g0);
537 printf(
"NLO_gmax: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_gmax,df2_NLO_gmax,f1_NLO,f2_NLO,weight_NLO_gmax);
539 printf(
"NLO_m015: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m015,df2_NLO_m015,f1_NLO,f2_NLO,weight_NLO_m015);
540 printf(
"NLO_m030: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m030,df2_NLO_m030,f1_NLO,f2_NLO,weight_NLO_m030);
541 printf(
"NLO_m045: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m045,df2_NLO_m045,f1_NLO,f2_NLO,weight_NLO_m045);
542 printf(
"NLO_m060: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m060,df2_NLO_m060,f1_NLO,f2_NLO,weight_NLO_m060);
543 printf(
"NLO_m075: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m075,df2_NLO_m075,f1_NLO,f2_NLO,weight_NLO_m075);
544 printf(
"NLO_m090: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m090,df2_NLO_m090,f1_NLO,f2_NLO,weight_NLO_m090);
545 printf(
"NLO_m105: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_m105,df2_NLO_m105,f1_NLO,f2_NLO,weight_NLO_m105);
547 printf(
"NLO_p030: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_p030,df2_NLO_p030,f1_NLO,f2_NLO,weight_NLO_p030);
548 printf(
"NLO_p045: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_p045,df2_NLO_p045,f1_NLO,f2_NLO,weight_NLO_p045);
549 printf(
"NLO_p060: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_p060,df2_NLO_p060,f1_NLO,f2_NLO,weight_NLO_p060);
550 printf(
"NLO_p070: df1_NLO=%f, df2_NLO=%f, f1_NLO=%f, f2_NLO=%f, weight_NLO=%f\n",df1_NLO_p070,df2_NLO_p070,f1_NLO,f2_NLO,weight_NLO_p070);
553 printf(
"DSSV: df1_DSSV=%f, df2_DSSV=%f, f1_DSSV=%f, f2_DSSV=%f, weight_DSSV=%f\n",df1_NLO_DSSV,df2_NLO_DSSV,f1_NLO,f2_NLO,weight_NLO_DSSV);
554 printf(
"LSS1: df1_LSS1=%f, df2_LSS1=%f, f1_LSS1=%f, f2_LSS1=%f, weight_LSS1=%f\n",df1_NLO_LSS1,df2_NLO_LSS1,f1_NLO,f2_NLO,weight_NLO_LSS1);
555 printf(
"LSS2: df1_LSS2=%f, df2_LSS2=%f, f1_LSS2=%f, f2_LSS2=%f, weight_LSS2=%f\n",df1_NLO_LSS2,df2_NLO_LSS2,f1_NLO,f2_NLO,weight_NLO_LSS2);
556 printf(
"LSS3: df1_LSS3=%f, df2_LSS3=%f, f1_LSS3=%f, f2_LSS3=%f, weight_LSS3=%f\n",df1_NLO_LSS3,df2_NLO_LSS3,f1_NLO,f2_NLO,weight_NLO_LSS3);
557 printf(
"AAC1: df1_AAC1=%f, df2_AAC1=%f, f1_AAC1=%f, f2_AAC1=%f, weight_AAC1=%f\n",df1_NLO_AAC1,df2_NLO_AAC1,f1_NLO,f2_NLO,weight_NLO_AAC1);
558 printf(
"AAC2: df1_AAC2=%f, df2_AAC2=%f, f1_AAC2=%f, f2_AAC2=%f, weight_AAC2=%f\n",df1_NLO_AAC2,df2_NLO_AAC2,f1_NLO,f2_NLO,weight_NLO_AAC2);
559 printf(
"AAC3: df1_AAC3=%f, df2_AAC3=%f, f1_AAC3=%f, f2_AAC3=%f, weight_AAC3=%f\n",df1_NLO_AAC3,df2_NLO_AAC3,f1_NLO,f2_NLO,weight_NLO_AAC3);
561 printf(
"BB1: df1_BB1=%f, df2_BB1=%f, f1_BB1=%f, f2_BB1=%f, weight_BB1=%f\n",df1_NLO_BB1,df2_NLO_BB1,f1_NLO,f2_NLO,weight_NLO_BB1);
562 printf(
"BB2: df1_BB2=%f, df2_BB2=%f, f1_BB2=%f, f2_BB2=%f, weight_BB2=%f\n",df1_NLO_BB2,df2_NLO_BB2,f1_NLO,f2_NLO,weight_NLO_BB2);
563 printf(
"DNS1: df1_DNS1=%f, df2_DNS1=%f, f1_DNS1=%f, f2_DNS1=%f, weight_DNS1=%f\n",df1_NLO_DNS1,df2_NLO_DNS1,f1_NLO,f2_NLO,weight_NLO_DNS1);
564 printf(
"DNS2: df1_DNS2=%f, df2_DNS2=%f, f1_DNS2=%f, f2_DNS2=%f, weight_DNS2=%f\n",df1_NLO_DNS2,df2_NLO_DNS2,f1_NLO,f2_NLO,weight_NLO_DNS2);
568 fillPythiaEvent(mEvent);
577 g2t_event_st* eventTable = Pg2t_event->GetTable();
579 pythia->setRunId(eventTable->n_run);
580 pythia->setEventId(eventTable->n_event);
582 if (mcEvent && mcEvent->primaryVertex())
583 pythia->setVertex(mcEvent->primaryVertex()->position().xyz());
585 g2t_pythia_st* pythiaTable = Pg2t_pythia->GetTable();
587 pythia->setProcessId(pythiaTable->subprocess_id);
588 pythia->setS(pythiaTable->mand_s);
589 pythia->setT(pythiaTable->mand_t);
590 pythia->setU(pythiaTable->mand_u);
591 pythia->setPt(pythiaTable->hard_p);
592 pythia->setCosTheta(pythiaTable->cos_th);
593 pythia->setX1(pythiaTable->bjor_1);
594 pythia->setX2(pythiaTable->bjor_2);
595 pythia->setMstu72(pythiaTable->mstu72);
596 pythia->setMstu73(pythiaTable->mstu73);
597 pythia->setMstp111(pythiaTable->mstp111);
598 pythia->setPartonALL(partonic_all);
600 pythia->setDF1(StPythiaEvent::LO, df1_LO);
601 pythia->setDF1(StPythiaEvent::NLO, df1_NLO);
602 pythia->setDF1(StPythiaEvent::ZERO, df1_NLO_g0);
603 pythia->setDF1(StPythiaEvent::MAX, df1_NLO_gmax);
604 pythia->setDF1(StPythiaEvent::MIN, df1_NLO_gmin);
605 pythia->setDF1(StPythiaEvent::M015, df1_NLO_m015);
606 pythia->setDF1(StPythiaEvent::M030, df1_NLO_m030);
607 pythia->setDF1(StPythiaEvent::M045, df1_NLO_m045);
608 pythia->setDF1(StPythiaEvent::M060, df1_NLO_m060);
609 pythia->setDF1(StPythiaEvent::M075, df1_NLO_m075);
610 pythia->setDF1(StPythiaEvent::M090, df1_NLO_m090);
611 pythia->setDF1(StPythiaEvent::M105, df1_NLO_m105);
612 pythia->setDF1(StPythiaEvent::P030, df1_NLO_p030);
613 pythia->setDF1(StPythiaEvent::P045, df1_NLO_p045);
614 pythia->setDF1(StPythiaEvent::P060, df1_NLO_p060);
615 pythia->setDF1(StPythiaEvent::P070, df1_NLO_p070);
616 pythia->setDF1(StPythiaEvent::GS_NLOA, df1_NLO_GSA);
617 pythia->setDF1(StPythiaEvent::GS_NLOB, df1_NLO_GSB);
618 pythia->setDF1(StPythiaEvent::GS_NLOC, df1_NLO_GSC);
619 pythia->setDF1(StPythiaEvent::DSSV, df1_NLO_DSSV);
620 pythia->setDF1(StPythiaEvent::DSSV2009a, df1_NLO_DSSV2009a);
621 pythia->setDF1(StPythiaEvent::LSS1, df1_NLO_LSS1);
622 pythia->setDF1(StPythiaEvent::LSS2, df1_NLO_LSS2);
623 pythia->setDF1(StPythiaEvent::LSS3, df1_NLO_LSS3);
624 pythia->setDF1(StPythiaEvent::LSS2010_delGpos, df1_NLO_LSS2010_delGpos);
625 pythia->setDF1(StPythiaEvent::LSS2010_chsign_delG, df1_NLO_LSS2010_chsign_delG);
626 pythia->setDF1(StPythiaEvent::AAC1, df1_NLO_AAC1);
627 pythia->setDF1(StPythiaEvent::AAC2, df1_NLO_AAC2);
628 pythia->setDF1(StPythiaEvent::AAC3, df1_NLO_AAC3);
629 pythia->setDF1(StPythiaEvent::BB1, df1_NLO_BB1);
630 pythia->setDF1(StPythiaEvent::BB2, df1_NLO_BB2);
631 pythia->setDF1(StPythiaEvent::BB2010, df1_NLO_BB2010);
632 pythia->setDF1(StPythiaEvent::DNS1, df1_NLO_DNS1);
633 pythia->setDF1(StPythiaEvent::DNS2, df1_NLO_DNS2);
635 pythia->setDF2(StPythiaEvent::LO, df2_LO);
636 pythia->setDF2(StPythiaEvent::NLO, df2_NLO);
637 pythia->setDF2(StPythiaEvent::ZERO, df2_NLO_g0);
638 pythia->setDF2(StPythiaEvent::MAX, df2_NLO_gmax);
639 pythia->setDF2(StPythiaEvent::MIN, df2_NLO_gmin);
640 pythia->setDF2(StPythiaEvent::M015, df2_NLO_m015);
641 pythia->setDF2(StPythiaEvent::M030, df2_NLO_m030);
642 pythia->setDF2(StPythiaEvent::M045, df2_NLO_m045);
643 pythia->setDF2(StPythiaEvent::M060, df2_NLO_m060);
644 pythia->setDF2(StPythiaEvent::M075, df2_NLO_m075);
645 pythia->setDF2(StPythiaEvent::M090, df2_NLO_m090);
646 pythia->setDF2(StPythiaEvent::M105, df2_NLO_m105);
647 pythia->setDF2(StPythiaEvent::P030, df2_NLO_p030);
648 pythia->setDF2(StPythiaEvent::P045, df2_NLO_p045);
649 pythia->setDF2(StPythiaEvent::P060, df2_NLO_p060);
650 pythia->setDF2(StPythiaEvent::P070, df2_NLO_p070);
651 pythia->setDF2(StPythiaEvent::GS_NLOA, df2_NLO_GSA);
652 pythia->setDF2(StPythiaEvent::GS_NLOB, df2_NLO_GSB);
653 pythia->setDF2(StPythiaEvent::GS_NLOC, df2_NLO_GSC);
654 pythia->setDF2(StPythiaEvent::DSSV, df2_NLO_DSSV);
655 pythia->setDF2(StPythiaEvent::DSSV2009a, df2_NLO_DSSV2009a);
656 pythia->setDF2(StPythiaEvent::LSS1, df2_NLO_LSS1);
657 pythia->setDF2(StPythiaEvent::LSS2, df2_NLO_LSS2);
658 pythia->setDF2(StPythiaEvent::LSS3, df2_NLO_LSS3);
659 pythia->setDF2(StPythiaEvent::LSS2010_delGpos, df2_NLO_LSS2010_delGpos);
660 pythia->setDF2(StPythiaEvent::LSS2010_chsign_delG, df2_NLO_LSS2010_chsign_delG);
661 pythia->setDF2(StPythiaEvent::AAC1, df2_NLO_AAC1);
662 pythia->setDF2(StPythiaEvent::AAC2, df2_NLO_AAC2);
663 pythia->setDF2(StPythiaEvent::AAC3, df2_NLO_AAC3);
664 pythia->setDF2(StPythiaEvent::BB1, df2_NLO_BB1);
665 pythia->setDF2(StPythiaEvent::BB2, df2_NLO_BB2);
666 pythia->setDF2(StPythiaEvent::BB2010, df2_NLO_BB2010);
667 pythia->setDF2(StPythiaEvent::DNS1, df2_NLO_DNS1);
668 pythia->setDF2(StPythiaEvent::DNS2, df2_NLO_DNS2);
670 pythia->setF1(StPythiaEvent::LO, f1_LO);
671 pythia->setF1(StPythiaEvent::NLO, f1_NLO);
673 pythia->setF2(StPythiaEvent::LO, f2_LO);
674 pythia->setF2(StPythiaEvent::NLO, f2_NLO);
676 particle_st* particleTable = particleTabPtr->GetTable();
678 for (
int i = 0; i < particleTabPtr->GetNRows(); ++i)
679 pythia->addParticle(TParticle(particleTable[i].idhep,
680 particleTable[i].isthep,
681 particleTable[i].jmohep[0],
682 particleTable[i].jmohep[1],
683 particleTable[i].jdahep[0],
684 particleTable[i].jdahep[1],
685 TLorentzVector(particleTable[i].phep),
686 TLorentzVector(particleTable[i].vhep)));
691 Double_t StMCAsymMaker::get_polPDF_NLO_GSA(
int flavor,
double x,
double Q2){
693 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
695 int polset_NLO_GSA=201;
699 if ((Q2>=1.0)&&(Q2<=1E+06)) polar_(&polset_NLO_GSA, &x, &Q2, parpol, &polid);
704 if (flavor==2) pdf=parpol[0]+parpol[2];
706 if (flavor==1) pdf=parpol[1]+parpol[3];
708 if (flavor==-2) pdf=parpol[2];
710 if (flavor==-1) pdf=parpol[3];
712 if (abs(flavor)==3) pdf=parpol[4];
713 if (flavor==21) pdf=parpol[5];
714 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
720 Double_t StMCAsymMaker::get_polPDF_NLO_GSB(
int flavor,
double x,
double Q2){
722 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
724 int polset_NLO_GSB=202;
728 if ((Q2>=1.0)&&(Q2<=1E+06)) polar_(&polset_NLO_GSB, &x, &Q2, parpol, &polid);
733 if (flavor==2) pdf=parpol[0]+parpol[2];
735 if (flavor==1) pdf=parpol[1]+parpol[3];
737 if (flavor==-2) pdf=parpol[2];
739 if (flavor==-1) pdf=parpol[3];
741 if (abs(flavor)==3) pdf=parpol[4];
742 if (flavor==21) pdf=parpol[5];
743 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
749 Double_t StMCAsymMaker::get_polPDF_NLO_GSC(
int flavor,
double x,
double Q2){
751 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
753 int polset_NLO_GSC=203;
757 if ((Q2>=1.0)&&(Q2<=1E+06)) polar_(&polset_NLO_GSC, &x, &Q2, parpol, &polid);
761 if (flavor==2) pdf=parpol[0]+parpol[2];
763 if (flavor==1) pdf=parpol[1]+parpol[3];
765 if (flavor==-2) pdf=parpol[2];
767 if (flavor==-1) pdf=parpol[3];
769 if (abs(flavor)==3) pdf=parpol[4];
770 if (flavor==21) pdf=parpol[5];
771 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
782 Double_t StMCAsymMaker::get_polPDF_LO(
int flavor,
double x,
double Q2){
784 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
790 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_LO, &x, &Q2, parpol, &polid);
793 if (flavor==1) pdf=parpol[1];
794 if (flavor==2) pdf=parpol[0];
795 if (flavor==-1) pdf=parpol[3];
796 if (flavor==-2) pdf=parpol[2];
797 if (abs(flavor)==3) pdf=parpol[4];
798 if (flavor==21) pdf=parpol[5];
799 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
806 Double_t StMCAsymMaker::get_polPDF_NLO(
int flavor,
double x,
double Q2){
808 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
814 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO, &x, &Q2, parpol, &polid);
817 if (flavor==1) pdf=parpol[1];
818 if (flavor==2) pdf=parpol[0];
819 if (flavor==-1) pdf=parpol[3];
820 if (flavor==-2) pdf=parpol[2];
821 if (abs(flavor)==3) pdf=parpol[4];
822 if (flavor==21) pdf=parpol[5];
823 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
829 Double_t StMCAsymMaker::get_polPDF_NLO_g0(
int flavor,
double x,
double Q2){
831 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
833 int polset_NLO_g0=103;
837 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_g0, &x, &Q2, parpol, &polid);
840 if (flavor==1) pdf=parpol[1];
841 if (flavor==2) pdf=parpol[0];
842 if (flavor==-1) pdf=parpol[3];
843 if (flavor==-2) pdf=parpol[2];
844 if (abs(flavor)==3) pdf=parpol[4];
845 if (flavor==21) pdf=parpol[5];
846 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
853 Double_t StMCAsymMaker::get_polPDF_NLO_gmax(
int flavor,
double x,
double Q2){
855 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
857 int polset_NLO_gmax=104;
861 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_gmax, &x, &Q2, parpol, &polid);
864 if (flavor==1) pdf=parpol[1];
865 if (flavor==2) pdf=parpol[0];
866 if (flavor==-1) pdf=parpol[3];
867 if (flavor==-2) pdf=parpol[2];
868 if (abs(flavor)==3) pdf=parpol[4];
869 if (flavor==21) pdf=parpol[5];
870 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
877 Double_t StMCAsymMaker::get_polPDF_NLO_gmin(
int flavor,
double x,
double Q2){
879 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
881 int polset_NLO_gmin=105;
885 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_gmin, &x, &Q2, parpol, &polid);
888 if (flavor==1) pdf=parpol[1];
889 if (flavor==2) pdf=parpol[0];
890 if (flavor==-1) pdf=parpol[3];
891 if (flavor==-2) pdf=parpol[2];
892 if (abs(flavor)==3) pdf=parpol[4];
893 if (flavor==21) pdf=parpol[5];
894 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
900 Double_t StMCAsymMaker::get_polPDF_NLO_m015(
int flavor,
double x,
double Q2){
902 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
904 int polset_NLO_m015=106;
908 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m015, &x, &Q2, parpol, &polid);
911 if (flavor==1) pdf=parpol[1];
912 if (flavor==2) pdf=parpol[0];
913 if (flavor==-1) pdf=parpol[3];
914 if (flavor==-2) pdf=parpol[2];
915 if (abs(flavor)==3) pdf=parpol[4];
916 if (flavor==21) pdf=parpol[5];
917 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
923 Double_t StMCAsymMaker::get_polPDF_NLO_m030(
int flavor,
double x,
double Q2){
925 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
927 int polset_NLO_m030=107;
931 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m030, &x, &Q2, parpol, &polid);
934 if (flavor==1) pdf=parpol[1];
935 if (flavor==2) pdf=parpol[0];
936 if (flavor==-1) pdf=parpol[3];
937 if (flavor==-2) pdf=parpol[2];
938 if (abs(flavor)==3) pdf=parpol[4];
939 if (flavor==21) pdf=parpol[5];
940 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
946 Double_t StMCAsymMaker::get_polPDF_NLO_m045(
int flavor,
double x,
double Q2){
948 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
950 int polset_NLO_m045=108;
954 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m045, &x, &Q2, parpol, &polid);
957 if (flavor==1) pdf=parpol[1];
958 if (flavor==2) pdf=parpol[0];
959 if (flavor==-1) pdf=parpol[3];
960 if (flavor==-2) pdf=parpol[2];
961 if (abs(flavor)==3) pdf=parpol[4];
962 if (flavor==21) pdf=parpol[5];
963 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
969 Double_t StMCAsymMaker::get_polPDF_NLO_m060(
int flavor,
double x,
double Q2){
971 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
973 int polset_NLO_m060=109;
977 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m060, &x, &Q2, parpol, &polid);
980 if (flavor==1) pdf=parpol[1];
981 if (flavor==2) pdf=parpol[0];
982 if (flavor==-1) pdf=parpol[3];
983 if (flavor==-2) pdf=parpol[2];
984 if (abs(flavor)==3) pdf=parpol[4];
985 if (flavor==21) pdf=parpol[5];
986 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
992 Double_t StMCAsymMaker::get_polPDF_NLO_m075(
int flavor,
double x,
double Q2){
994 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
996 int polset_NLO_m075=110;
1000 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m075, &x, &Q2, parpol, &polid);
1003 if (flavor==1) pdf=parpol[1];
1004 if (flavor==2) pdf=parpol[0];
1005 if (flavor==-1) pdf=parpol[3];
1006 if (flavor==-2) pdf=parpol[2];
1007 if (abs(flavor)==3) pdf=parpol[4];
1008 if (flavor==21) pdf=parpol[5];
1009 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1015 Double_t StMCAsymMaker::get_polPDF_NLO_m090(
int flavor,
double x,
double Q2){
1017 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1019 int polset_NLO_m090=111;
1023 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m090, &x, &Q2, parpol, &polid);
1026 if (flavor==1) pdf=parpol[1];
1027 if (flavor==2) pdf=parpol[0];
1028 if (flavor==-1) pdf=parpol[3];
1029 if (flavor==-2) pdf=parpol[2];
1030 if (abs(flavor)==3) pdf=parpol[4];
1031 if (flavor==21) pdf=parpol[5];
1032 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1038 Double_t StMCAsymMaker::get_polPDF_NLO_m105(
int flavor,
double x,
double Q2){
1040 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1042 int polset_NLO_m105=112;
1046 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_m105, &x, &Q2, parpol, &polid);
1049 if (flavor==1) pdf=parpol[1];
1050 if (flavor==2) pdf=parpol[0];
1051 if (flavor==-1) pdf=parpol[3];
1052 if (flavor==-2) pdf=parpol[2];
1053 if (abs(flavor)==3) pdf=parpol[4];
1054 if (flavor==21) pdf=parpol[5];
1055 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1061 Double_t StMCAsymMaker::get_polPDF_NLO_p030(
int flavor,
double x,
double Q2){
1063 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1065 int polset_NLO_p030=113;
1069 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_p030, &x, &Q2, parpol, &polid);
1072 if (flavor==1) pdf=parpol[1];
1073 if (flavor==2) pdf=parpol[0];
1074 if (flavor==-1) pdf=parpol[3];
1075 if (flavor==-2) pdf=parpol[2];
1076 if (abs(flavor)==3) pdf=parpol[4];
1077 if (flavor==21) pdf=parpol[5];
1078 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1084 Double_t StMCAsymMaker::get_polPDF_NLO_p045(
int flavor,
double x,
double Q2){
1086 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1088 int polset_NLO_p045=114;
1092 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_p045, &x, &Q2, parpol, &polid);
1095 if (flavor==1) pdf=parpol[1];
1096 if (flavor==2) pdf=parpol[0];
1097 if (flavor==-1) pdf=parpol[3];
1098 if (flavor==-2) pdf=parpol[2];
1099 if (abs(flavor)==3) pdf=parpol[4];
1100 if (flavor==21) pdf=parpol[5];
1101 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1107 Double_t StMCAsymMaker::get_polPDF_NLO_p060(
int flavor,
double x,
double Q2){
1109 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1111 int polset_NLO_p060=115;
1115 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_p060, &x, &Q2, parpol, &polid);
1118 if (flavor==1) pdf=parpol[1];
1119 if (flavor==2) pdf=parpol[0];
1120 if (flavor==-1) pdf=parpol[3];
1121 if (flavor==-2) pdf=parpol[2];
1122 if (abs(flavor)==3) pdf=parpol[4];
1123 if (flavor==21) pdf=parpol[5];
1124 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1130 Double_t StMCAsymMaker::get_polPDF_NLO_p070(
int flavor,
double x,
double Q2){
1132 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1134 int polset_NLO_p070=116;
1138 if (Q2>=0.8&&Q2<=1.0e6) polar_(&polset_NLO_p070, &x, &Q2, parpol, &polid);
1141 if (flavor==1) pdf=parpol[1];
1142 if (flavor==2) pdf=parpol[0];
1143 if (flavor==-1) pdf=parpol[3];
1144 if (flavor==-2) pdf=parpol[2];
1145 if (abs(flavor)==3) pdf=parpol[4];
1146 if (flavor==21) pdf=parpol[5];
1147 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1153 Double_t StMCAsymMaker::get_polPDF_NLO_DSSV(
int flavor,
double x,
double Q2){
1155 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1157 int polset_NLO_DSSV=301;
1161 if (Q2>=1.0&&Q2<=1.0e5) polar_(&polset_NLO_DSSV, &x, &Q2, parpol, &polid);
1164 if (flavor==1) pdf=parpol[1]+parpol[2];
1165 if (flavor==2) pdf=parpol[0]+parpol[3];
1166 if (flavor==-1) pdf=parpol[3];
1167 if (flavor==-2) pdf=parpol[2];
1168 if (abs(flavor)==3) pdf=parpol[4];
1169 if (flavor==21) pdf=parpol[5];
1170 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1176 Double_t StMCAsymMaker::get_polPDF_NLO_DSSV2009a(
int flavor,
double x,
double Q2){
1178 double duv=0,ddv=0,dubar=0,ddbar=0,dstr=0,dglu=0;
1180 if (x>=1.0e-5&&x<=1.0&&Q2>=1.0&&Q2<=1.0e5) {
1181 dssvfit2009a_(&x,&Q2,&duv,&ddv,&dubar,&ddbar,&dstr,&dglu);
1183 case 1:
return (ddv+ddbar)/x;
1184 case 2:
return (duv+dubar)/x;
1185 case -1:
return ddbar/x;
1186 case -2:
return dubar/x;
1188 case -3:
return dstr/x;
1189 case 21:
return dglu/x;
1195 case -6:
return dstr/x;
1202 Double_t StMCAsymMaker::get_polPDF_NLO_LSS1(
int flavor,
double x,
double Q2){
1204 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1206 int polset_NLO_LSS1=401;
1210 if (Q2>=1.0&&Q2<=5.8e5) polar_(&polset_NLO_LSS1, &x, &Q2, parpol, &polid);
1213 if (flavor==1) pdf=parpol[1];
1214 if (flavor==2) pdf=parpol[0];
1215 if (flavor==-1) pdf=parpol[3];
1216 if (flavor==-2) pdf=parpol[2];
1217 if (abs(flavor)==3) pdf=parpol[4];
1218 if (flavor==21) pdf=parpol[5];
1219 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1225 Double_t StMCAsymMaker::get_polPDF_NLO_LSS2(
int flavor,
double x,
double Q2){
1227 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1229 int polset_NLO_LSS2=402;
1233 if (Q2>=1.0&&Q2<=5.8e5) polar_(&polset_NLO_LSS2, &x, &Q2, parpol, &polid);
1236 if (flavor==1) pdf=parpol[1];
1237 if (flavor==2) pdf=parpol[0];
1238 if (flavor==-1) pdf=parpol[3];
1239 if (flavor==-2) pdf=parpol[2];
1240 if (abs(flavor)==3) pdf=parpol[4];
1241 if (flavor==21) pdf=parpol[5];
1242 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1248 Double_t StMCAsymMaker::get_polPDF_NLO_LSS3(
int flavor,
double x,
double Q2){
1250 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1252 int polset_NLO_LSS3=403;
1256 if (Q2>=1.0&&Q2<=5.8e5) polar_(&polset_NLO_LSS3, &x, &Q2, parpol, &polid);
1259 if (flavor==1) pdf=parpol[1];
1260 if (flavor==2) pdf=parpol[0];
1261 if (flavor==-1) pdf=parpol[3];
1262 if (flavor==-2) pdf=parpol[2];
1263 if (abs(flavor)==3) pdf=parpol[4];
1264 if (flavor==21) pdf=parpol[5];
1265 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1271 Double_t StMCAsymMaker::get_polPDF_NLO_LSS2010_delGpos(
int flavor,
double x,
double Q2)
1273 static int iini = 0;
1275 double uub, ddb, u, d, ub, db, st, gl;
1277 if (iini == 0) intini_.iini = 0;
1279 lss2010_(&iset,&x,&Q2,&uub,&ddb,&u,&d,&ub,&db,&st,&gl);
1281 if (iini == 0) iini = 1;
1284 case 1:
return ddb/x;
1285 case 2:
return uub/x;
1286 case -1:
return db/x;
1287 case -2:
return ub/x;
1295 case -6:
return st/x;
1296 case 21:
return gl/x;
1303 Double_t StMCAsymMaker::get_polPDF_NLO_LSS2010_chsign_delG(
int flavor,
double x,
double Q2)
1305 static int iini = 0;
1307 double uub, ddb, u, d, ub, db, st, gl;
1309 if (iini == 0) intini_.iini = 0;
1311 lss2010_(&iset,&x,&Q2,&uub,&ddb,&u,&d,&ub,&db,&st,&gl);
1313 if (iini == 0) iini = 1;
1316 case 1:
return ddb/x;
1317 case 2:
return uub/x;
1318 case -1:
return db/x;
1319 case -2:
return ub/x;
1327 case -6:
return st/x;
1328 case 21:
return gl/x;
1335 Double_t StMCAsymMaker::get_polPDF_NLO_AAC1(
int flavor,
double x,
double Q2){
1337 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1339 int polset_NLO_AAC1=501;
1343 if (Q2>=1.0&&Q2<=1.0e8) polar_(&polset_NLO_AAC1, &x, &Q2, parpol, &polid);
1346 if (flavor==1) pdf=parpol[1];
1347 if (flavor==2) pdf=parpol[0];
1348 if (flavor==-1) pdf=parpol[3];
1349 if (flavor==-2) pdf=parpol[2];
1350 if (abs(flavor)==3) pdf=parpol[4];
1351 if (flavor==21) pdf=parpol[5];
1352 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1358 Double_t StMCAsymMaker::get_polPDF_NLO_AAC2(
int flavor,
double x,
double Q2){
1360 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1362 int polset_NLO_AAC2=502;
1366 if (Q2>=1.0&&Q2<=1.0e8) polar_(&polset_NLO_AAC2, &x, &Q2, parpol, &polid);
1369 if (flavor==1) pdf=parpol[1];
1370 if (flavor==2) pdf=parpol[0];
1371 if (flavor==-1) pdf=parpol[3];
1372 if (flavor==-2) pdf=parpol[2];
1373 if (abs(flavor)==3) pdf=parpol[4];
1374 if (flavor==21) pdf=parpol[5];
1375 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1381 Double_t StMCAsymMaker::get_polPDF_NLO_AAC3(
int flavor,
double x,
double Q2){
1383 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1385 int polset_NLO_AAC3=503;
1389 if (Q2>=1.0&&Q2<=1.0e8) polar_(&polset_NLO_AAC3, &x, &Q2, parpol, &polid);
1392 if (flavor==1) pdf=parpol[1];
1393 if (flavor==2) pdf=parpol[0];
1394 if (flavor==-1) pdf=parpol[3];
1395 if (flavor==-2) pdf=parpol[2];
1396 if (abs(flavor)==3) pdf=parpol[4];
1397 if (flavor==21) pdf=parpol[5];
1398 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1404 Double_t StMCAsymMaker::get_polPDF_NLO_BB1(
int flavor,
double x,
double Q2){
1406 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1408 int polset_NLO_BB1=601;
1412 if (Q2>=1.0&&Q2<=1.0e6) polar_(&polset_NLO_BB1, &x, &Q2, parpol, &polid);
1415 if (flavor==1) pdf=parpol[1];
1416 if (flavor==2) pdf=parpol[0];
1417 if (flavor==-1) pdf=parpol[3];
1418 if (flavor==-2) pdf=parpol[2];
1419 if (abs(flavor)==3) pdf=parpol[4];
1420 if (flavor==21) pdf=parpol[5];
1421 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1427 Double_t StMCAsymMaker::get_polPDF_NLO_BB2(
int flavor,
double x,
double Q2){
1429 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1431 int polset_NLO_BB2=602;
1435 if (Q2>=1.0&&Q2<=1.0e6) polar_(&polset_NLO_BB2, &x, &Q2, parpol, &polid);
1438 if (flavor==1) pdf=parpol[1];
1439 if (flavor==2) pdf=parpol[0];
1440 if (flavor==-1) pdf=parpol[3];
1441 if (flavor==-2) pdf=parpol[2];
1442 if (abs(flavor)==3) pdf=parpol[4];
1443 if (flavor==21) pdf=parpol[5];
1444 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1450 Double_t StMCAsymMaker::get_polPDF_NLO_BB2010(
int flavor,
double x,
double Q2)
1452 static int iini = 0;
1454 double uv, duv, dv, ddv, gl, dgl, qb, dqb, g1p, dg1p, g1n, dg1n;
1456 if (iini == 0) intini_.iini = 0;
1458 polpdf_(&iset,&x,&Q2,&uv,&duv,&dv,&ddv,&gl,&dgl,&qb,&dqb,&g1p,&dg1p,&g1n,&dg1n);
1460 if (iini == 0) iini = 1;
1463 case 1:
return (dv+qb)/x;
1464 case 2:
return (uv+qb)/x;
1474 case -6:
return qb/x;
1475 case 21:
return gl/x;
1482 Double_t StMCAsymMaker::get_polPDF_NLO_DNS1(
int flavor,
double x,
double Q2){
1484 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1486 int polset_NLO_DNS1=701;
1490 if (Q2>=1.0&&Q2<=5.0e4) polar_(&polset_NLO_DNS1, &x, &Q2, parpol, &polid);
1493 if (flavor==1) pdf=parpol[1];
1494 if (flavor==2) pdf=parpol[0];
1495 if (flavor==-1) pdf=parpol[3];
1496 if (flavor==-2) pdf=parpol[2];
1497 if (abs(flavor)==3) pdf=parpol[4];
1498 if (flavor==21) pdf=parpol[5];
1499 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1505 Double_t StMCAsymMaker::get_polPDF_NLO_DNS2(
int flavor,
double x,
double Q2){
1507 double parpol[6]={0.0,0.0,0.0,0.0,0.0,0.0};
1509 int polset_NLO_DNS2=702;
1513 if (Q2>=1.0&&Q2<=5.0e4) polar_(&polset_NLO_DNS2, &x, &Q2, parpol, &polid);
1516 if (flavor==1) pdf=parpol[1];
1517 if (flavor==2) pdf=parpol[0];
1518 if (flavor==-1) pdf=parpol[3];
1519 if (flavor==-2) pdf=parpol[2];
1520 if (abs(flavor)==3) pdf=parpol[4];
1521 if (flavor==21) pdf=parpol[5];
1522 if ((abs(flavor)>=4)&&(abs(flavor)<=6)) pdf=parpol[4];
1528 Double_t StMCAsymMaker::get_unpolPDF_LO(
int flavor,
double x,
double Q2){
1535 if (flavor==1) fl=2;
1536 if (flavor==2) fl=1;
1537 if (flavor==-1) fl=-2;
1538 if (flavor==-2) fl=-1;
1539 if (flavor==21) fl=0;
1540 if (flavor==3) fl=3;
1541 if (flavor==-3) fl=-3;
1542 if (flavor==4) fl=4;
1543 if (flavor==-4) fl=-4;
1544 if (flavor==5) fl=5;
1545 if (flavor==-5) fl=-5;
1547 double Q=pow(Q2,0.5);
1548 pdf=ctq5pd_(&iset,&fl,&x,&Q,&er);
1554 Double_t StMCAsymMaker::get_unpolPDF_NLO(
int flavor,
double x,
double Q2){
1561 if (flavor==1) fl=2;
1562 if (flavor==2) fl=1;
1563 if (flavor==-1) fl=-2;
1564 if (flavor==-2) fl=-1;
1565 if (flavor==21) fl=0;
1566 if (flavor==3) fl=3;
1567 if (flavor==-3) fl=-3;
1568 if (flavor==4) fl=4;
1569 if (flavor==-4) fl=-4;
1570 if (flavor==5) fl=5;
1571 if (flavor==-5) fl=-5;
1573 double Q=pow(Q2,0.5);
1574 pdf=ctq5pd_(&iset,&fl,&x,&Q,&er);
1581 Double_t StMCAsymMaker::getPartonicALL(
double s,
double t,
double u,
int sub,
int inA,
int inB,
int outA,
int outB){
1590 double N1,N2,N3,N4,N5,N6,N7,N8;
1591 double D1,D2,D3,D4,D5,D6,D7,D8;
1594 num_(&s,&t,&u,&N1,&N2,&N3,&N4,&N5,&N6,&N7,&N8);
1595 denom_(&s,&t,&u,&D1,&D2,&D3,&D4,&D5,&D6,&D7,&D8);
1597 cout<<
"s="<<s<<
" t="<<t<<
" u="<<u<<
" sub="<<sub<<
" inA="<<inA<<
" inB="<<inB<<
" outA="<<outA<<
" outB="<<outB<<endl;
1598 cout<<
" 1="<<N1<<
" "<<D1<<endl;
1599 cout<<
" 2="<<N2<<
" "<<D2<<endl;
1600 cout<<
" 3="<<N3<<
" "<<D3<<endl;
1601 cout<<
" 4="<<N4<<
" "<<D4<<endl;
1602 cout<<
" 5="<<N5<<
" "<<D5<<endl;
1603 cout<<
" 6="<<N6<<
" "<<D6<<endl;
1604 cout<<
" 7="<<N7<<
" "<<D7<<endl;
1605 cout<<
" 8="<<N8<<
" "<<D8<<endl;
1609 if ((sub==11)&&(abs(inA)!=abs(inB))) all=N1/D1;
1610 if ((sub==11)&&(inA==inB)&&(outA==outB)) all=N2/D2;
1613 if ((sub==11)&&(inA==(-1*inB))&&(outA==(-1*outB))&&(inA==outA)&&(inB==outB)) all=N4/D4;
1614 if ((sub==12)&&(abs(inA)!=abs(outA))) all=N3/D3;
1615 if ((sub==12)&&(abs(inA)==abs(outA))) all=N4/D4;
1616 if (sub==13) all=N5/D5;
1617 if (sub==53) all=N6/D6;
1618 if (sub==28) all=N7/D7;
1619 if (sub==68) all=N8/D8;
1622 if (sub==29) all=N7/D7;
1623 if (sub==14) all=N6/D6;
1624 if (sub==18) all=N6/D6;
1629 Double_t StMCAsymMaker::getProtonA1(Double_t x,Double_t Q2){
1647 const Double_t weights[] = { -1, 1, 4, 1, 4, 1, 4 };
1648 Double_t polSum = 0;
1649 Double_t unpolSum = 0;
1651 for (
int flavor = 1; flavor <= 6; ++flavor)
1653 Double_t polPdf = get_polPDF_NLO(flavor, x, Q2);
1654 polPdf += get_polPDF_NLO(-flavor, x, Q2);
1655 polPdf *= weights[flavor];
1657 Double_t unpolPdf = get_unpolPDF_NLO(flavor, x, Q2);
1658 unpolPdf += get_unpolPDF_NLO(-flavor, x, Q2);
1659 unpolPdf *= weights[flavor];
1660 unpolSum += unpolPdf;
1663 Double_t A1 = polSum / unpolSum;
1670 typedef double (*PDF)(int,double,double);
1672 static const PDF pdfs[StPythiaEvent::NPDF];
1677 static void setPdfFlavorQ2(
int pdf,
int flavor,
double Q2)
1679 PDFWrapper::pdf = pdfs[pdf];
1680 PDFWrapper::flavor = flavor;
1681 PDFWrapper::Q2 = Q2;
1684 static double eval(
double& x) {
return pdf(flavor,x,Q2); }
1687 const PDFWrapper::PDF PDFWrapper::pdfs[StPythiaEvent::NPDF] = {
1688 StMCAsymMaker::get_polPDF_LO,
1689 StMCAsymMaker::get_polPDF_NLO,
1690 StMCAsymMaker::get_polPDF_NLO_g0,
1691 StMCAsymMaker::get_polPDF_NLO_gmax,
1692 StMCAsymMaker::get_polPDF_NLO_gmin,
1693 StMCAsymMaker::get_polPDF_NLO_m015,
1694 StMCAsymMaker::get_polPDF_NLO_m030,
1695 StMCAsymMaker::get_polPDF_NLO_m045,
1696 StMCAsymMaker::get_polPDF_NLO_m060,
1697 StMCAsymMaker::get_polPDF_NLO_m075,
1698 StMCAsymMaker::get_polPDF_NLO_m090,
1699 StMCAsymMaker::get_polPDF_NLO_m105,
1700 StMCAsymMaker::get_polPDF_NLO_p030,
1701 StMCAsymMaker::get_polPDF_NLO_p045,
1702 StMCAsymMaker::get_polPDF_NLO_p060,
1703 StMCAsymMaker::get_polPDF_NLO_p070,
1704 StMCAsymMaker::get_polPDF_NLO_GSA,
1705 StMCAsymMaker::get_polPDF_NLO_GSB,
1706 StMCAsymMaker::get_polPDF_NLO_GSC,
1707 StMCAsymMaker::get_polPDF_NLO_DSSV,
1708 StMCAsymMaker::get_polPDF_NLO_LSS1,
1709 StMCAsymMaker::get_polPDF_NLO_LSS2,
1710 StMCAsymMaker::get_polPDF_NLO_LSS3,
1711 StMCAsymMaker::get_polPDF_NLO_AAC1,
1712 StMCAsymMaker::get_polPDF_NLO_AAC2,
1713 StMCAsymMaker::get_polPDF_NLO_AAC3,
1714 StMCAsymMaker::get_polPDF_NLO_BB1,
1715 StMCAsymMaker::get_polPDF_NLO_BB2,
1716 StMCAsymMaker::get_polPDF_NLO_DNS1,
1717 StMCAsymMaker::get_polPDF_NLO_DNS2,
1718 StMCAsymMaker::get_polPDF_NLO_DSSV2009a,
1719 StMCAsymMaker::get_polPDF_NLO_LSS2010_delGpos,
1720 StMCAsymMaker::get_polPDF_NLO_LSS2010_chsign_delG,
1721 StMCAsymMaker::get_polPDF_NLO_BB2010
1724 PDFWrapper::PDF PDFWrapper::pdf = 0;
1725 int PDFWrapper::flavor = 0;
1726 double PDFWrapper::Q2 = 0;
1728 double StMCAsymMaker::get_polPDF_firstMoment(
int pdf,
int flavor,
double Q2,
double xmin,
double xmax,
double epsilon)
1730 PDFWrapper::setPdfFlavorQ2(pdf,flavor,Q2);
1731 return dinteg_(PDFWrapper::eval,xmin,xmax,epsilon);
virtual void Clear(Option_t *option="")
User defined functions.
virtual Int_t Make()
Make - this method is called in loop for each event.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...