286 fEvtuser.AddNamedSlot(
"TargetTheta");
389 name=gSystem->ExpandPathName(name.Data());
426 if (mode==2) fname+=
".root";
429 fMktree->SetOutputFile(fname,
"NcCollider event/track data in plain ROOT tree format");
431 fJob=
new NcJob(
"NcJob",
"NcCollider job (task) environment");
434 printf(
" *%-s::SetOutputFile* Plain ROOT tree event/track data will be written to output file: %-s \n",ClassName(),fname.Data());
438 if (mode==0 || mode==2)
442 if (mode==2) fname+=
".ncfspack";
452 fEvent->SetName(GetName());
453 fEvent->SetTitle(GetTitle());
456 fOutFile=
new TFile(fname,
"RECREATE",
"NcCollider NcEvent data");
459 fOutTree=
new TTree(
"T",
"NcCollider NcEvent data");
464 printf(
" *%-s::SetOutputFile* NcEvent data structures will be written to output file: %-s \n",ClassName(),fname.Data());
525 if (mode<0 || mode >3)
527 cout <<
" *NcCollider::SetVertexMode* Invalid argument mode : " << mode << endl;
748 if (iseed>900000000)
return;
755 iseed=10000*sec+(mjd%10000);
769 Int_t iseed=GetMRPY(1);
904 if (frame!=
"cms" && frame!=
"fixt" && frame!=
"free") ier=1;
905 if (frame!=
"free" && win<=0) ier=1;
906 if (frame==
"free" && (!pbeam || !ptarget)) ier=1;
907 if (frame==
"free" && (beam.Contains(
"gamma/") || target.Contains(
"gamma/"))) ier=1;
910 cout <<
" *NcCollider::Init* Standard Pythia initialisation ==> Inconsistent input." << endl;
916 if (beam==
"gamma" || target==
"gamma")
922 SetPMAS(25,1,125.09);
960 fBeam.SetNameTitle(beam.Data(),
"Beam");
961 fTarget.SetNameTitle(target.Data(),
"Target");
969 if (beam==
"e-" || beam==
"e+") bmass=0.510998928e-3;
970 if (beam==
"mu-" || beam==
"mu+") bmass=105.6583715e-3;
971 if (beam==
"tau-" || beam==
"tau+") bmass=1.77686;
972 if (beam==
"pi+" || beam==
"pi-") bmass=139.57018e-3;
973 if (beam==
"pi0") bmass=134.9766e-3;
974 if (beam==
"K+" || beam==
"K-") bmass=493.677e-3;
975 if (beam==
"KS0" || beam==
"KL0") bmass=497.611e-3;
976 if (beam==
"p") bmass=938.272046e-3;
977 if (beam==
"n") bmass=939.565379e-3;
978 if (beam==
"Lambda0") bmass=1.115683;
979 if (beam==
"Sigma+") bmass=1.18937;
980 if (beam==
"Sigma0") bmass=1.192642;
981 if (beam==
"Sigma-") bmass=1.197449;
982 if (beam==
"Xi-") bmass=1.32171;
983 if (beam==
"Xi0") bmass=1.31486;
984 if (beam==
"Omega-") bmass=1.67245;
986 if (target==
"e-" || target==
"e+") tmass=0.510998928e-3;
987 if (target==
"mu-" || target==
"mu+") tmass=105.6583715e-3;
988 if (target==
"tau-" || target==
"tau+") tmass=1.77686;
989 if (target==
"pi+" || target==
"pi-") tmass=139.57018e-3;
990 if (target==
"pi0") tmass=134.9766e-3;
991 if (target==
"K+" || target==
"K-") tmass=493.677e-3;
992 if (target==
"KS0" || target==
"KL0") tmass=497.611e-3;
993 if (target==
"p") tmass=938.272046e-3;
994 if (target==
"n") tmass=939.565379e-3;
995 if (target==
"Lambda0") tmass=1.115683;
996 if (target==
"Sigma+") tmass=1.18937;
997 if (target==
"Sigma0") tmass=1.192642;
998 if (target==
"Sigma-") tmass=1.197449;
999 if (target==
"Xi-") tmass=1.32171;
1000 if (target==
"Xi0") tmass=1.31486;
1001 if (target==
"Omega-") tmass=1.67245;
1003 fBeam.SetMass(bmass);
1007 if (fact>0 &&
fWin<0)
1014 cout <<
" ************************************* NcCollider::Init ************************************" << endl;
1015 cout <<
" *** Beam momentum artificially increased for intialisation only. Increase factor : " << fact << endl;
1016 cout <<
" *******************************************************************************************" << endl;
1019 else if (fact<0 &&
fWin<0)
1021 vinit.
Load(*ptarget);
1026 cout <<
" ************************************** NcCollider::Init *************************************" << endl;
1027 cout <<
" *** Target momentum artificially increased for intialisation only. Increase factor : " << fabs(fact) << endl;
1028 cout <<
" *********************************************************************************************" << endl;
1050 TString title=GetTitle();
1052 Initialize(frame.Data(),beam.Data(),target.Data(),
fWin);
1054 SetTitle(title.Data());
1057 fBeam.SetMass(GetP(1,5));
1062 fBeam.Set3Vector(GetP(1,1),GetP(1,2),GetP(1,3),
"car");
1063 fTarget.Set3Vector(GetP(2,1),GetP(2,2),GetP(2,3),
"car");
1067 fBeam.Set3Vector(0,0,win,
"car");
1068 fTarget.Set3Vector(0,0,0,
"car");
1076 TString sweight=
"Yes";
1077 if (!wxsec) sweight=
"No";
1084 cout <<
" ********************************************************" << endl;
1085 cout <<
" *** NcCollider::Init Standard Pythia initialisation ***" << endl;
1086 cout <<
" ********************************************************" << endl;
1087 cout <<
" *** Beam particle: " << beam.Data() <<
" Target particle: " << target.Data() <<
" Frame: " <<
fFrame.Data() << endl;
1088 if (
fFrame==
"cms") cout <<
" *** Total CMS energy: " << win <<
" GeV" << endl;
1089 if (
fFrame==
"fixt") cout <<
" *** Beam particle momentum: " << win <<
" GeV/c" << endl;
1090 if (
fFrame==
"free") cout <<
" *** Event weighting by cross section: " << sweight.Data() << endl;
1091 cout <<
" *** Beam particle 3-momentum (GeV/c): px=" <<
fBeam.GetX(1,
"car") <<
" py=" <<
fBeam.GetX(2,
"car") <<
" pz=" <<
fBeam.GetX(3,
"car") << endl;
1092 cout <<
" *** Target particle 3-momentum (GeV/c): px=" <<
fTarget.GetX(1,
"car") <<
" py=" <<
fTarget.GetX(2,
"car") <<
" pz=" <<
fTarget.GetX(3,
"car") << endl;
1093 if (
fFrame!=
"cms") cout <<
" *** Total CMS energy: " << ecms <<
" GeV" << endl;
1094 if (
fFrame==
"free" &&
fWin>0) cout <<
" *** Forced CMS processing. Cross sections initialised for a CMS energy of " <<
fWin <<
" GeV" << endl;
1095 if (
fOutFile) cout <<
" *** NcEvent data structures will be written to output file: " <<
fOutFile->GetName() << endl;
1178 if (frame!=
"cms" && frame!=
"fixt" && frame!=
"free") ier=1;
1179 if (frame!=
"free" && win<=0) ier=1;
1180 if (frame==
"free" && (!pbeam || !ptarget)) ier=1;
1183 cout <<
" *NcCollider::Init* Nucleus-Nucleus generator initialisation ==> Inconsistent input." << endl;
1191 SetPMAS(25,1,125.09);
1226 if (win>0)
fWin=win;
1236 if (ap<1 || at<1 || zp>ap || zt>at)
1239 cout <<
" *NcCollider::Init* Invalid input value(s). Zproj = " << zp
1240 <<
" Aproj = " << ap <<
" Ztarg = " << zt <<
" Atarg = " << at << endl;
1254 fBeam.SetNameTitle(beam.Data(),
"Beam");
1256 TString target=
"(Z=";
1261 fTarget.SetNameTitle(target.Data(),
"Target");
1263 Float_t mnuc=(0.9382720+0.9395654)/2.;
1264 fBeam.SetMass(mnuc);
1269 Float_t pcms=sqrt((win*win/4.)-mnuc*mnuc);
1270 fBeam.Set3Vector(0,0,pcms,
"car");
1271 fTarget.Set3Vector(0,0,-pcms,
"car");
1275 fBeam.Set3Vector(0,0,win,
"car");
1276 fTarget.Set3Vector(0,0,0,
"car");
1284 TString sweight=
"Yes";
1285 if (!wxsec) sweight=
"No";
1288 Double_t ecms=sqrt(s);
1295 cout <<
" ******************************************************************" << endl;
1296 cout <<
" *** NcCollider::Init Nucleus-Nucleus generator initialisation ***" << endl;
1297 cout <<
" ******************************************************************" << endl;
1298 cout <<
" *** Beam nucleus: " <<
fBeam.GetName() <<
" Target nucleus: " <<
fTarget.GetName() <<
" Frame: " <<
fFrame.Data() << endl;
1299 if (
fFrame==
"cms") cout <<
" *** Total CMS energy per nucleon-nucleon collision: " << win <<
" GeV" << endl;
1300 if (
fFrame==
"fixt") cout <<
" *** Beam momentum: " << win <<
" GeV/c per nucleon" << endl;
1301 if (
fFrame==
"free") cout <<
" *** Event weighting by cross section: " << sweight.Data() << endl;
1302 cout <<
" *** Beam 3-momentum in GeV/c per nucleon: px=" <<
fBeam.GetX(1,
"car") <<
" py=" <<
fBeam.GetX(2,
"car") <<
" pz=" <<
fBeam.GetX(3,
"car") << endl;
1303 cout <<
" *** Target 3-momentum in GeV/c per nucleon: px=" <<
fTarget.GetX(1,
"car") <<
" py=" <<
fTarget.GetX(2,
"car") <<
" pz=" <<
fTarget.GetX(3,
"car") << endl;
1304 if (
fFrame!=
"cms") cout <<
" *** Total CMS energy per nucleon-nucleon collision: " << ecms <<
" GeV" << endl;
1305 if (
fFrame==
"free" &&
fWin>0) cout <<
" *** Forced CMS processing. Cross sections initialised for a nucleon-nucleon CMS energy of " <<
fWin <<
" GeV" << endl;
1306 if (
fOutFile) cout <<
" *** Event data will be written to output file: " <<
fOutFile->GetName() << endl;
1335 fFracnn=(1.-zp/ap)*(1.-zt/at);
1354 if (mode!=1 && mode!=2)
1356 cout <<
" *NcCollider::SetMomentum* Invalid input value. mode = " << mode << endl;
1362 cout <<
" *NcCollider::SetMomentum* Not valid for frame = " <<
fFrame.Data() << endl;
1366 if (mode==1)
fBeam.Set3Momentum(p);
1367 if (mode==2)
fTarget.Set3Momentum(p);
1372 SetP(mode,1,p.
GetX(1,
"car"));
1373 SetP(mode,2,p.
GetX(2,
"car"));
1374 SetP(mode,3,p.
GetX(3,
"car"));
1379 Double_t ecms=sqrt(s);
1380 SetPARP(171,ecms/
fWin);
1436 Int_t ncols[4]={0,0,0,0};
1449 cout <<
" *NcCollider::MakeEvent* Invalid input value. npt = " << npt
1450 <<
" Aproj = " <<
fAproj <<
" Atarg = " <<
fAtarg << endl;
1456 if (npt%2 &&
fRan.Uniform()>0.5) ncol+=1;
1465 Float_t* rans=
new Float_t[ncol];
1466 fRan.Uniform(rans,ncol);
1468 for (Int_t i=0; i<ncol; i++)
1528 TString sweight=
"Yes";
1529 if (!
fWxsec) sweight=
"No";
1532 Double_t ecms=sqrt(s);
1538 cout <<
" *NcCollider::MakeEvent* Run : " <<
fRunnum <<
" Event : " <<
fEventnum << endl;
1539 if (
fFrame==
"free") cout <<
" Event weighting by cross section: " << sweight.Data() << endl;
1543 cout <<
" Beam nucleus: " <<
fBeam.GetName() <<
" Target nucleus: " <<
fTarget.GetName() <<
" Frame: " <<
fFrame.Data() << endl;
1544 cout <<
" Beam 3-momentum in GeV/c per nucleon: px=" <<
fBeam.GetX(1,
"car") <<
" py=" <<
fBeam.GetX(2,
"car") <<
" pz=" <<
fBeam.GetX(3,
"car") << endl;
1545 cout <<
" Target 3-momentum in GeV/c per nucleon: px=" <<
fTarget.GetX(1,
"car") <<
" py=" <<
fTarget.GetX(2,
"car") <<
" pz=" <<
fTarget.GetX(3,
"car") << endl;
1546 cout <<
" Total CMS energy per nucleon-nucleon collision: " << ecms <<
" GeV" << endl;
1547 cout <<
" # participants and collisions: npart=" << npt <<
" ncol=" << ncol
1548 <<
" ncolpp=" << ncols[0] <<
" ncolnp=" << ncols[1] <<
" ncolpn=" << ncols[2] <<
" ncolnn=" << ncols[3] << endl;
1552 cout <<
" Beam particle: " <<
fBeam.GetName() <<
" Target particle: " <<
fTarget.GetName() <<
" Frame: " <<
fFrame.Data() << endl;
1553 cout <<
" Beam particle 3-momentum (GeV/c): px=" <<
fBeam.GetX(1,
"car") <<
" py=" <<
fBeam.GetX(2,
"car") <<
" pz=" <<
fBeam.GetX(3,
"car") << endl;
1554 cout <<
" Target particle 3-momentum (GeV/c): px=" <<
fTarget.GetX(1,
"car") <<
" py=" <<
fTarget.GetX(2,
"car") <<
" pz=" <<
fTarget.GetX(3,
"car") << endl;
1555 cout <<
" Total CMS energy: " << ecms <<
" GeV" << endl;
1558 if (ecms<
fEcmsmin) printf(
" *** No event generated. Ecms is below the minimal requirement of : %-g GeV. \n \n",
fEcmsmin);
1568 fEvent->SetName(GetName());
1569 fEvent->SetTitle(GetTitle());
1579 TString title=GetTitle();
1582 title=
fBeam.GetName();
1585 title+=
" collision";
1586 fEvent->SetTitle(title.Data());
1602 p=
fBeam.Get3Momentum();
1606 fLorbo.Set4Momentum(ptot);
1624 fEvent->AddVertex(vert,0);
1628 Float_t charge=0,mass=0;
1648 if (
fWin>0) frame=
"cms";
1650 pproj=
fBeam.Get3Momentum();
1652 Int_t npart=0,ntk=0;
1654 for (Int_t itype=0; itype<ntypes; itype++)
1664 if (itype==0 && ncols[itype]) Initialize(frame.Data(),
"p",
"p",
fWin);
1665 if (itype==1 && ncols[itype]) Initialize(frame.Data(),
"n",
"p",
fWin);
1666 if (itype==2 && ncols[itype]) Initialize(frame.Data(),
"p",
"n",
fWin);
1667 if (itype==3 && ncols[itype]) Initialize(frame.Data(),
"n",
"n",
fWin);
1676 for (Int_t jcol=0; jcol<ncols[itype]; jcol++)
1689 params.SetNameTitle(
"NcCollider",
"NcCollider generator parameters");
1733 fEvent->SetProjectile(0,0,pproj,kf);
1735 fEvent->SetTarget(0,0,ptarg,kf);
1738 fEvent->AddDevice(params);
1743 if (medit >= 0) Pyedit(medit);
1745 if (mlist>=0 && select)
1752 for (Int_t jpart=1; jpart<=npart; jpart++)
1755 charge=Pychge(kf)/3.;
1766 v[0]=GetV(jpart,1)/1000.;
1767 v[1]=GetV(jpart,2)/1000.;
1768 v[2]=GetV(jpart,3)/1000.;
1771 ct=GetV(jpart,4)/1000.;
1795 t.SetName(name.Data());
1808 for (Int_t jv=1; jv<=
fEvent->GetNvertices(); jv++)
1845 fEvent->AddVertex(vert,0);
1860 for (Int_t i=2; i<=
fEvent->GetNvertices(); i++)
1872 if (
fNucl && specmode)
1879 zp=
fZproj-(ncols[0]+ncols[2]);
1881 ap=
fAproj-(ncols[0]+ncols[1]+ncols[2]+ncols[3]);
1883 zt=
fZtarg-(ncols[0]+ncols[1]);
1885 at=
fAtarg-(ncols[0]+ncols[1]+ncols[2]+ncols[3]);
1893 charge=Pychge(kf)/3.;
1894 mass=GetPMAS(Pycomp(kf),1);
1896 for (Int_t iprojp=1; iprojp<=zp; iprojp++)
1902 t.SetName(name.Data());
1903 t.SetTitle(
"Projectile spectator proton");
1913 charge=Pychge(kf)/3.;
1914 mass=GetPMAS(Pycomp(kf),1);
1916 for (Int_t iprojn=1; iprojn<=(ap-zp); iprojn++)
1922 t.SetName(name.Data());
1923 t.SetTitle(
"Projectile spectator neutron");
1936 charge=Pychge(kf)/3.;
1937 mass=GetPMAS(Pycomp(kf),1);
1939 for (Int_t itargp=1; itargp<=zt; itargp++)
1945 t.SetName(name.Data());
1946 t.SetTitle(
"Target spectator proton");
1956 charge=Pychge(kf)/3.;
1957 mass=GetPMAS(Pycomp(kf),1);
1959 for (Int_t itargn=1; itargn<=(at-zt); itargn++)
1965 t.SetName(name.Data());
1966 t.SetTitle(
"Target spectator neutron");
1982 for (Int_t ispec=1; ispec<=nspec; ispec++)
1995 if (
fEvent) printf(
" Number of tracks in the event structure : %-i \n",
fEvent->GetNtracks());
2074 printf(
" *%-s::EndRun* Output file(s) correctly written and closed. \n",ClassName());
2114 if (mode==0 || mode==1)
2124 Double_t ctau=2.6391e14;
2132 SetKFDP(idc,1,2212);
2140 for (Int_t i=1; i<1000; i++)
2145 if (cls==1 && i<10) SetMDCY(kc,1,decay);
2146 if (cls==2 && i>10 && i<20) SetMDCY(kc,1,decay);
2147 if (cls==3 && i>20 && i<26) SetMDCY(kc,1,decay);
2148 if (cls==4 && i>100 && i<1000) SetMDCY(kc,1,decay);
2149 if (cls==5 && i>1000) SetMDCY(kc,1,decay);
2156 if (kc>0) SetMDCY(kc,1,decay);
2158 if (kc>0) SetMDCY(kc,1,decay);
2163 cout <<
" *NcCollider::SetStable* Invalid parameter. cls = " << cls << endl;
2171 SetMDCY(kc,1,decay);
2175 cout <<
" *NcCollider::SetStable* Unknown particle code. id = " <<
id << endl;
2181 cout <<
" *NcCollider::SetStable* Invalid parameter. mode = " << mode << endl;
2220 Int_t kc=Pycomp(
id);
2230 for (Int_t i=0; i<size; i++)
2276 if (GetMSTI(61))
return 0;
2285 for (Int_t jpart=1; jpart<=npart; jpart++)
2289 for (Int_t i=0; i<nsel; i++)
2349 for (Int_t i=1; i<16; i++)
2351 if (name[i]==
' ')
break;
2352 sname=sname+name[i];
2404 if (pmax<=pmin && pmin<=0)
2406 printf(
" *%-s::SetJetProtonSpectrum* Inconsistent input pmin=%-g pmax=%-g \n",ClassName(),pmin,pmax);
2410 if (pmax>pmin && !fspec && !hspec)
2412 printf(
" *%-s::SetJetProtonSpectrum* Inconsistent input pmin=%-g pmax=%-g fspec=0 hspec=0 \n",ClassName(),pmin,pmax);
2442 TH1F hpbeam=
fLab.GetCountsHistogram(*hspec,mode,
"",fspec);
2451 for (Int_t i=1; i<=nbins; i++)
2453 if (i<ibinlow || i>ibinup)
fJetPspectrum->SetBinContent(i,0);
2458 if (fspec && !hspec && pmax>pmin)
2461 TString title=
"Jet proton (beam) dN/dp=";
2462 title+=fspec->GetExpFormula(
"p");
2463 title.ReplaceAll(
"x",
"p");
2465 if (mode==0) title+=
";Momentum [GeV/c];Counts";
2468 title+=
";^{10}Log(Momentum) [GeV/c];Counts";
2474 title+=
";Ln(Momentum) [GeV/c];Counts";
2478 TH1F hpbeam=
fLab.GetCountsHistogram(*fspec,1000,pmin,pmax,mode);
2532 if (pmax<=pmin && pmin<=0)
2534 printf(
" *%-s::SetJetGammaSpectrum* Inconsistent input pmin=%-g pmax=%-g \n",ClassName(),pmin,pmax);
2538 if (pmax>pmin && !fspec && !hspec)
2540 printf(
" *%-s::SetJetGammaSpectrum* Inconsistent input pmin=%-g pmax=%-g fspec=0 hspec=0 \n",ClassName(),pmin,pmax);
2570 TH1F hptarget=
fLab.GetCountsHistogram(*hspec,mode,
"",fspec);
2579 for (Int_t i=1; i<=nbins; i++)
2581 if (i<ibinlow || i>ibinup)
fJetGspectrum->SetBinContent(i,0);
2586 if (fspec && !hspec && pmax>pmin)
2589 TString title=
"Jet gamma (target) dN/dp=";
2590 title+=fspec->GetExpFormula(
"p");
2591 title.ReplaceAll(
"x",
"p");
2593 if (mode==0) title+=
";Momentum [GeV/c];Counts";
2596 title+=
";^{10}Log(Momentum) [GeV/c];Counts";
2602 title+=
";Ln(Momentum) [GeV/c];Counts";
2606 TH1F hptarget=
fLab.GetCountsHistogram(*fspec,1000,pmin,pmax,0);
2653void NcCollider::ProcessJet(Double_t np,Double_t gfrac,TString flux,Double_t dthmax,Int_t nlist,Int_t ntrymax,Int_t wxsec,Double_t finit,Int_t full)
2727 printf(
" *%-s::ProcessJet* Inconsistent intialisation. \n",ClassName());
2728 printf(
" Momentum range for (beam) protons : [%-g,%-g] GeV/c \n",
fJetPpmin,
fJetPpmax);
2729 printf(
" Momentum range for (target) gammas : [%-g,%-g] GeV/c \n",
fJetGpmin,
fJetGpmax);
2730 printf(
" Number of simulated (beam) protons : %-g \n",np);
2731 printf(
" Fraction of (beam) protons used for p+gamma interactions : %-g \n",gfrac);
2732 printf(
" Maximum number of phase-space trials per event : %-i \n",ntrymax);
2736 printf(
" *%-s::ProcessJet* Parameter settings for astrophysical Jet simulation \n",ClassName());
2737 printf(
" Multiple partonic interactions flag : %-i \n",
GetMultiple());
2738 printf(
" Low-Pt, Elastic and Diffractive scattering flag : %-i \n",
GetElastic());
2739 printf(
" Minimal CMS energy for event generation : %-g GeV \n",
GetEcmsMin());
2740 printf(
" Number of simulated (beam) protons : %-g \n",np);
2741 printf(
" Fraction of (beam) protons used for p+gamma interactions : %-g \n",gfrac);
2742 printf(
" Maximum number of phase-space trials per event : %-i \n",ntrymax);
2743 printf(
" Final particle species that are recorded : %-s \n",flux.Data());
2746 printf(
" Proton (beam) momenta will be mono-energetic at %-g GeV/c \n",
fJetPpmax);
2750 printf(
" Momentum range for (beam) protons : [%-g,%-g] GeV/c \n",
fJetPpmin,
fJetPpmax);
2754 printf(
" Gamma (target) momenta will be mono-energetic at %-g GeV/c \n",
fJetGpmax);
2758 printf(
" Momentum range for (target) gammas : [%-g,%-g] GeV/c \n",
fJetGpmin,
fJetGpmax);
2763 fMktree->Select(
"event",
"jrun");
2764 fMktree->Select(
"event",
"jevt");
2765 fMktree->Select(
"event",
"user",
"BeamP");
2766 fMktree->Select(
"event",
"user",
"BeamTheta");
2767 fMktree->Select(
"event",
"user",
"BeamPhi");
2768 fMktree->Select(
"event",
"user",
"TargetP");
2769 fMktree->Select(
"event",
"user",
"TargetTheta");
2770 fMktree->Select(
"event",
"user",
"TargetPhi");
2774 if (flux.Contains(
"nu"))
2777 fMktree->UseTracks(
"nu_mubar");
2779 fMktree->UseTracks(
"nu_ebar");
2781 fMktree->UseTracks(
"nu_taubar");
2782 fMktree->UseTracks(
"nu",-1,1);
2784 if (flux.Contains(
"gamma"))
fMktree->UseTracks(
"gamma");
2785 if (flux.Contains(
"neutron"))
2814 for (Int_t k=0; k<2; k++)
2821 nevents=(1.-gfrac)*np;
2823 ier=
Init(
"free",
"p",
"p",0,&pbeam,&pfixed,wxsec,finit);
2829 ier=
Init(
"free",
"p",
"gamma",0,&pbeam,&ptarget,wxsec,finit);
2838 if (flux.Contains(
"nu") || flux.Contains(
"gamma"))
SetStable(0,0,4);
2839 if (!(flux.Contains(
"gamma")))
SetStable(111,1);
2840 if (!(flux.Contains(
"nu")))
SetStable(211,1);
2841 if (flux.Contains(
"nu"))
SetStable(13,0);
2842 if (flux.Contains(
"nu") && !(flux.Contains(
"neutron")))
SetStable(2112,0);
2847 while (ievt<nevents && ntry<ntrymax)
2868 fLab.RandomPosition(pbeam,0,dthmax,0,360);
2873 fLab.RandomPosition(ptarget,180+dthmax,180,0,360);
2880 if (nlist && ievt<nlist)
Handling of 3-vectors in various reference frames.
Double_t GetX(Int_t i, TString f, TString u="rad")
void SetVector(Double_t *v, TString f, TString u="rad")
virtual void Load(Nc3Vector &q)
Double_t Dot(Nc3Vector &q)
Handling of Lorentz 4-vectors in various reference frames.
void SetInvariant(Double_t v2, Double_t dv2=0)
void Set3Vector(Nc3Vector &v)
Nc3Vector Get3Vector() const
void AddNamedSlot(TString s)
void SetSlotName(TString s, Int_t j=1)
Pythia based universal (astro)physics event generator.
void SetRunNumber(Int_t run)
Int_t Init(TString frame, TString beam, TString target, Float_t win, Nc3Vector *pbeam=0, Nc3Vector *ptarget=0, Int_t wxsec=1, Double_t fact=0)
void SetElastic(Int_t flag)
void SetUserControl(Int_t flag)
void SetEcmsMin(Double_t ecms)
Int_t GetVertexMode() const
void SetSpectatorPmin(Float_t pmin)
Double_t GetEcmsMin() const
NcEvent * GetEvent(Int_t select=0) const
Int_t GetSelectionFlag() const
void SetVertexMode(Int_t mode)
void SetMomentum(Nc3Vector &p, Int_t mode)
void SetJetGammaSpectrum(Double_t pmin, Double_t pmax=-1, TF1 *fspec=0, TH1 *hspec=0, Int_t mode=0)
void SetStable(Int_t id, Int_t mode=1, Int_t cls=0)
TH1 * GetJetGammaSpectrum(Double_t *pmin=0, Double_t *pmax=0)
Double_t GetResolution() const
void SetMultiple(Int_t flag)
Int_t GetMultiple() const
TH1 * GetJetProtonSpectrum(Double_t *pmin=0, Double_t *pmax=0)
void SetJetProtonSpectrum(Double_t pmin, Double_t pmax=-1, TF1 *fspec=0, TH1 *hspec=0, Int_t mode=0)
Int_t GetUserControl() const
Float_t GetSpectatorPmin() const
void GetFractions(Float_t zp, Float_t ap, Float_t zt, Float_t at)
NcTreeMaker * SetOutputFile(TString fname, Int_t mode=0)
void SetRandomSeed(Int_t iseed)
void SetResolution(Double_t res)
void SelectEvent(Int_t id)
Int_t GetRunNumber() const
void SetPrintFreq(Int_t n)
void ProcessJet(Double_t np, Double_t gfrac, TString flux, Double_t dthmax=0, Int_t nlist=1, Int_t ntrymax=1000, Int_t wxsec=0, Double_t finit=0, Int_t full=0)
TString GetPyname(Int_t kf)
Int_t GetPrintFreq() const
Int_t MakeEvent(Int_t npt=0, Int_t mlist=-1, Int_t medit=1)
Signal (Hit) handling of a generic device.
Creation and investigation of an NCFS generic event structure.
void SetTrackCopy(Int_t j)
void AddTrack(NcTrack &t)
Base class for top level job in a task based procedure.
Handling of positions (with timestamps) in various reference frames.
void GetPosition(Double_t *r, TString f, TString u="rad", Float_t s=-1) const
Double_t GetDistance(NcPosition &p, Float_t scale=-1)
void SetPositionErrors(Double_t *e, TString f, TString u="rad")
void SetPosition(Double_t *r, TString f, TString u="rad")
virtual void SetSignal(Double_t sig, Int_t j=1)
Handling of timestamps for (astro)particle physics research.
Double_t GetMJD(Int_t y, Int_t m, Int_t d, Int_t hh, Int_t mm, Int_t ss, Int_t ns) const
Handling of the attributes of a reconstructed particle track.
void SetCharge(Float_t q)
void SetBeginPoint(NcPosition &p)
void SetMass(Double_t m, Double_t dm=0)
void SetParticleCode(Int_t code)
void Set3Momentum(Nc3Vector &p)
TTask derived class to generate a plain ROOT tree from NCFS generic event structures.
Creation and investigation of an NcVertex.
void SetVertexCopy(Int_t j)
void AddVertex(NcVertex &v, Int_t connect=1)