GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SPPEventGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Authors: Igor Kakorin <kakorin@jinr.ru>, Joint Institute for Nuclear Research
8  Vadim Naumov <vnaumov@theor.jinr.ru >, Joint Institute for Nuclear Research \n
9 
10 
11  For the class documentation see the corresponding header file.
12 */
13 //____________________________________________________________________________
14 
15 #include <TMath.h>
16 #include <Math/Factory.h>
17 #include <Math/Minimizer.h>
18 
19 #include <vector>
20 
23 #include "Framework/Conventions/GBuild.h"
40 
41 using namespace genie;
42 using namespace genie::controls;
43 using namespace genie::utils;
44 using namespace genie::constants;
45 
46 //___________________________________________________________________________
48 KineGeneratorWithCache("genie::SPPEventGenerator")
49 {
50 
51 }
52 //___________________________________________________________________________
54 KineGeneratorWithCache("genie::SPPEventGenerator", config)
55 {
56 
57 }
58 //___________________________________________________________________________
60 {
61 
62 }
63 //___________________________________________________________________________
65 {
66 
67 
68  LOG("SPPEventGen", pINFO) << "Generating resonance single pion production event kinematics...";
69 
70  if(fGenerateUniformly) {
71  LOG("SPPEventGen", pNOTICE)
72  << "Generating kinematics uniformly over the allowed phase space";
73  }
74 
75  //-- Get the interaction from the GHEP record
76  Interaction * interaction = evrec->Summary();
77  const InitialState & init_state = interaction -> InitState();
78  const KPhaseSpace& kps = interaction->PhaseSpace();
79 
80  // Access the target from the interaction summary
81  //const Target & tgt = init_state.Tgt();
82  Target * tgt = interaction -> InitStatePtr()->TgtPtr();
83 
84  // get masses of nucleon and pion
85  PDGLibrary * pdglib = PDGLibrary::Instance();
86  // imply isospin symmetry
87  double mpi = (pdglib->Find(kPdgPiP)->Mass() + pdglib->Find(kPdgPi0)->Mass() + pdglib->Find(kPdgPiM)->Mass())/3;
88  double mpi2 = mpi*mpi;
89  double M = (pdglib->Find(kPdgProton)->Mass() + pdglib->Find(kPdgNeutron)->Mass())/2;
90  double M2 = M*M;
91  // mass of final lepton
92  double ml = interaction->FSPrimLepton()->Mass();
93  double ml2 = ml*ml;
94 
95  // 4-momentum of neutrino in lab frame
96  TLorentzVector k1(*(init_state.GetProbeP4(kRfLab)));
97  // 4-momentum of hit nucleon in lab frame
98  TLorentzVector p1(*(evrec->HitNucleon())->P4());
99  TLorentzVector p1_copy(p1);
100  // set temporarily initial nucleon on shell
101  p1.SetE(TMath::Sqrt(p1.P()*p1.P() + M*M));
102  tgt->SetHitNucP4(p1);
103 
104  // neutrino 4-momentun in nucleon rest frame
105  TLorentzVector k1_HNRF = k1;
106  k1_HNRF.Boost(-p1.BoostVector());
107  // neutrino energy in nucleon rest frame
108  double Ev = k1_HNRF.E();
109  // initial nucleon 4-momentun in nucleon rest frame
110  TLorentzVector p1_HNRF(0,0,0,M);
111 
112  //-- Access cross section algorithm for running thread
114  const EventGeneratorI * evg = rtinfo->RunningThread();
115  fXSecModel = evg->CrossSectionAlg();
116 
117  // function gives differential cross section and depends on reduced variables W,Q2,cos(theta) and phi -> 1
119 
120  //-- Get the random number generators
121  RandomGen * rnd = RandomGen::Instance();
122 
123  double xsec = -1;
124  double xin[4];
125 
126  //-- For the subsequent kinematic selection with the rejection method:
127  // Calculate the max differential cross section or retrieve it from the
128  // cache. Throw an exception and quit the evg thread if a non-positive
129  // value is found.
130  // If the kinematics are generated uniformly over the allowed phase
131  // space the max xsec is irrelevant
132  double xsec_max = (fGenerateUniformly) ? -1 : this->MaxXSec(evrec);
133  // generate W, Q2, cos(theta) and phi by accept-reject method
134  unsigned int iter = 0;
135  bool accept = false;
136  while(1)
137  {
138  iter++;
139  if(iter > 100*kRjMaxIterations) {
140  LOG("SPPEventGen", pWARN)
141  << "*** Could not select a valid kinematics variable after "
142  << iter << " iterations";
143  evrec->EventFlags()->SetBitNumber(kKineGenErr, true);
145  exception.SetReason("Couldn't select kinematics");
146  exception.SwitchOnFastForward();
147  throw exception;
148  }
149 
150  xin[0] = rnd->RndKine().Rndm();
151  xin[1] = rnd->RndKine().Rndm();
152  xin[2] = rnd->RndKine().Rndm();
153  xin[3] = rnd->RndKine().Rndm();
154 
155 
156  //-- Computing cross section for the current kinematics
157  xsec = -(*f)(xin);
158 
159  //-- Decide whether to accept the current kinematics
160  if(!fGenerateUniformly)
161  {
162  this->AssertXSecLimits(interaction, xsec, xsec_max);
163  double t = xsec_max * rnd->RndKine().Rndm();
164  accept = (t < xsec);
165  }
166  else
167  {
168  accept = (xsec>0);
169  }
170 
171  // If the generated kinematics are accepted, finish-up module's job
172  if(accept)
173  {
174  // reset 'trust' bits
175  interaction->ResetBit(kISkipProcessChk);
176  interaction->ResetBit(kISkipKinematicChk);
177  break;
178  }
179  iter++;
180  }
181 
182  // W,Q2,cos(theta) and phi from reduced variables
183  Range1D_t Wl = kps.WLim_SPP_iso();
184  if (fWcut >= Wl.min)
185  Wl.max = TMath::Min(fWcut,Wl.max);
186  Range1D_t Q2l = kps.Q2Lim_W_SPP_iso();
187  double W = Wl.min + (Wl.max - Wl.min)*xin[0];
188  interaction->KinePtr()->SetW(W);
189  double Q2 = Q2l.min + (Q2l.max - Q2l.min)*xin[1];
190  double CosTheta_isb = -1. + 2.*xin[2];
191  double SinTheta_isb = (1 - CosTheta_isb*CosTheta_isb)<0?0:TMath::Sqrt(1 - CosTheta_isb*CosTheta_isb);
192  double Phi_isb = 2*kPi*xin[3];
193 
194 
195  // compute x,y for selected W,Q2
196  double x=-1, y=-1;
197  kinematics::WQ2toXY(Ev,M,W,Q2,x,y);
198 
200  {
201  double vol = (Wl.max-Wl.min)*(Q2l.max-Q2l.min)*4*kPi;
202  double totxsec = evrec->XSec();
203  double wght = (vol/totxsec)*xsec;
204  wght *= evrec->Weight();
205  evrec->SetWeight(wght);
206  }
207 
208 
209  // set the cross section for the selected kinematics
210  evrec->SetDiffXSec(xsec,kPSWQ2ctpphipfE);
211 
212  // lock selected kinematics & clear running values
213  interaction->KinePtr()->SetQ2(Q2, true);
214  interaction->KinePtr()->SetW (W, true);
215  interaction->KinePtr()->Setx (x, true);
216  interaction->KinePtr()->Sety (y, true);
217  interaction->KinePtr()->ClearRunningValues();
218 
219 
220  double W2 = W*W;
221  // Kinematical values of all participating particles in the isobaric frame
222  double Enu_isb = (Ev*M - (ml2 + Q2)/2)/W;
223  double El_isb = (Ev*M - (ml2 + W2 - M2)/2)/W;
224  double v_isb = (W2 - M2 - Q2)/2/W;
225  double q_isb = TMath::Sqrt(v_isb*v_isb + Q2);
226  double kz1_isb = 0.5*(q_isb+(Enu_isb*Enu_isb - El_isb*El_isb + ml2)/q_isb);
227  double kz2_isb = kz1_isb - q_isb;
228  double kx1_isb = (Enu_isb*Enu_isb - kz1_isb*kz1_isb)<0?0:TMath::Sqrt(Enu_isb*Enu_isb - kz1_isb*kz1_isb);
229  double Epi_isb = (W2 + mpi2 - M2)/W/2;
230  double ppi_isb = (Epi_isb - mpi)<0?0:TMath::Sqrt(Epi_isb*Epi_isb - mpi2);
231  double E1_isb = (W2 + Q2 + M2)/2/W;
232  double E2_isb = W - Epi_isb;
233 
234  // 4-momentum of all particles in the isobaric frame
235  TLorentzVector k1_isb(kx1_isb, 0, kz1_isb, Enu_isb);
236  TLorentzVector k2_isb(kx1_isb, 0, kz2_isb, El_isb);
237  TLorentzVector p1_isb(0, 0, -q_isb, E1_isb);
238  TLorentzVector p2_isb(-ppi_isb*SinTheta_isb*TMath::Cos(Phi_isb), -ppi_isb*SinTheta_isb*TMath::Sin(Phi_isb), -ppi_isb*CosTheta_isb, E2_isb);
239  TLorentzVector pi_isb( ppi_isb*SinTheta_isb*TMath::Cos(Phi_isb), ppi_isb*SinTheta_isb*TMath::Sin(Phi_isb), ppi_isb*CosTheta_isb, Epi_isb);
240 
241 
242  // boost from isobaric frame to hit nucleon rest frame
243  TVector3 boost = -p1_isb.BoostVector();
244  k1_isb.Boost(boost);
245  k2_isb.Boost(boost);
246  p2_isb.Boost(boost);
247  pi_isb.Boost(boost);
248 
249 
250  // rotation to align 3-momentum of all particles
251  TVector3 rot_vect = k1_isb.Vect().Cross(k1_HNRF.Vect());
252  double rot_angle = k1_isb.Vect().Angle(k1_HNRF.Vect());
253  k2_isb.Rotate(rot_angle, rot_vect);
254  p2_isb.Rotate(rot_angle, rot_vect);
255  pi_isb.Rotate(rot_angle, rot_vect);
256 
257  // boost to laboratory frame
258  boost = p1.BoostVector();
259  k2_isb.Boost(boost);
260  p2_isb.Boost(boost);
261  pi_isb.Boost(boost);
262 
263 
264  tgt->SetHitNucP4(p1_copy);
265 
266  TLorentzVector x4l(*(evrec->Probe())->X4());
267  // add final lepton
268  evrec->AddParticle(interaction->FSPrimLeptonPdg(), kIStStableFinalState, evrec->ProbePosition(), -1, -1, -1, k2_isb, x4l);
269 
271  // add final nucleon
272  evrec->AddParticle(this->GetRecoilNucleonPdgCode(interaction), ist, evrec->HitNucleonPosition(), -1, -1, -1, p2_isb, x4l);
273  // add final pion
274  evrec->AddParticle(this->GetFinalPionPdgCode(interaction), ist, evrec->HitNucleonPosition(), -1, -1, -1, pi_isb, x4l);
275 
276  delete f;
277 
278 
279  return;
280 
281 }
282 //___________________________________________________________________________
284 {
285  const XclsTag & xcls = interaction->ExclTag();
286  if (xcls.NProtons() == 1)
287  return kPdgProton;
288  else
289  return kPdgNeutron;
290 
291 }
292 //___________________________________________________________________________
294 {
295  const XclsTag & xcls = interaction->ExclTag();
296  if (xcls.NPiPlus() == 1)
297  return kPdgPiP;
298  else if (xcls.NPiMinus() == 1)
299  return kPdgPiM;
300  return kPdgPi0;
301 
302 }
303 //___________________________________________________________________________
305 {
306  Algorithm::Configure(config);
307  this->LoadConfig();
308 }
309 //____________________________________________________________________________
310 void SPPEventGenerator::Configure(string config)
311 {
312  Algorithm::Configure(config);
313  this->LoadConfig();
314 }
315 //____________________________________________________________________________
317 {
318 
319  // Safety factor for the maximum differential cross section
320  this->GetParamDef("MaxXSec-SafetyFactor", fSafetyFactor, 1.03);
321  this->GetParamDef("Maximum-Depth", fMaxDepth, 3);
322 
323  // Minimum energy for which max xsec would be cached, forcing explicit
324  // calculation for lower eneries
325  this->GetParamDef("Cache-MinEnergy", fEMin, 0.5);
326 
327 
328  // Maximum allowed fractional cross section deviation from maxim cross
329  // section used in rejection method
330  this->GetParamDef("MaxXSec-DiffTolerance", fMaxXSecDiffTolerance, 999999.);
331  assert(fMaxXSecDiffTolerance>=0);
332 
333  // Generate kinematics uniformly over allowed phase space and compute
334  // an event weight?
335  this->GetParamDef("UniformOverPhaseSpace", fGenerateUniformly, false);
336 
337  this->GetParamDef("Wcut", fWcut, -1.);
338 
339 
340 }
341 //____________________________________________________________________________
342 double SPPEventGenerator::ComputeMaxXSec(const Interaction * interaction) const
343 {
344  KPhaseSpace * kps = interaction->PhaseSpacePtr();
345  Range1D_t Wl = kps->WLim_SPP_iso();
346  ROOT::Math::Minimizer * min = ROOT::Math::Factory::CreateMinimizer("Minuit", "Minimize");
347  ROOT::Math::IBaseFunctionMultiDim * f = new genie::utils::gsl::d4XSecMK_dWQ2CosThetaPhi_E(fXSecModel, interaction, fWcut);
348  min->SetFunction( *f );
349  min->SetMaxFunctionCalls(10000); // for Minuit/Minuit2
350  min->SetMaxIterations(10000); // for GSL
351  min->SetTolerance(1e-3);
352  min->SetPrintLevel(0);
353  double min_xsec = 0.;
354  double xsec;
355  double step = 1e-7;
356  // a heuristic algorithm for maximum search
357  int total_cells = (TMath::Power(16, fMaxDepth) - 1)/15;
358  vector<Cell> cells(total_cells);
359 
360  for (int dep = 0; dep < fMaxDepth; dep++)
361  {
362  int aux = TMath::Power(16, dep) - 1;
363  for (int cell = aux/15; cell <= 16*aux/15 ; cell++)
364  {
365  if (cell == 0)
366  {
367  cells[cell].Vertex1 = Vertex(0., 0., 0., 0.);
368  cells[cell].Vertex2 = Vertex(1., 1., 1., 1.);
369  }
370  double x1m = (cells[cell].Vertex1.x1 + cells[cell].Vertex2.x1)/2;
371  double x2m = (cells[cell].Vertex1.x2 + cells[cell].Vertex2.x2)/2;
372  double x3m = (cells[cell].Vertex1.x3 + cells[cell].Vertex2.x3)/2;
373  double x4m = (cells[cell].Vertex1.x4 + cells[cell].Vertex2.x4)/2;
374  min->SetVariable(0, "x1", x1m, step);
375  min->SetVariable(1, "x2", x2m, step);
376  min->SetVariable(2, "x3", x3m, step);
377  min->SetVariable(3, "x4", x4m, step);
378  min->SetVariableLimits(0, cells[cell].Vertex1.x1, cells[cell].Vertex2.x1);
379  min->SetVariableLimits(1, cells[cell].Vertex1.x2, cells[cell].Vertex2.x2);
380  min->SetVariableLimits(2, cells[cell].Vertex1.x3, cells[cell].Vertex2.x3);
381  min->SetVariableLimits(3, cells[cell].Vertex1.x4, cells[cell].Vertex2.x4);
382  min->Minimize();
383  xsec = min->MinValue();
384  if (xsec < min_xsec)
385  min_xsec = xsec;
386  const double *xs = min->X();
387  Vertex minv(xs[0], xs[1], xs[2], xs[3]);
388  if (minv == cells[cell].Vertex1 || minv == cells[cell].Vertex2)
389  minv = Vertex (x1m, x2m, x3m, x4m);
390  if (dep < fMaxDepth - 1)
391  for (int i = 0; i < 16; i++)
392  {
393  int child = 16*cell + i + 1;
394  cells[child].Vertex1 = minv;
395  cells[child].Vertex2 = Vertex ((i>>0)%2?cells[cell].Vertex1.x1:cells[cell].Vertex2.x1,
396  (i>>1)%2?cells[cell].Vertex1.x2:cells[cell].Vertex2.x2,
397  (i>>2)%2?cells[cell].Vertex1.x3:cells[cell].Vertex2.x3,
398  (i>>3)%2?cells[cell].Vertex1.x4:cells[cell].Vertex2.x4);
399  }
400  }
401  }
402  Resonance_t res = genie::utils::res::FromString("P33(1232)");
403  const InitialState & init_state = interaction -> InitState();
404  double Enu = init_state.ProbeE(kRfHitNucRest);
405  // other heuristic algorithm for maximum search to fix flaws of the first
406  int N3 = 2;
407  int N4 = 4;
408  double x2max;
409  if (Enu < 1.)
410  x2max = 1.;
411  else
412  x2max = 1./3;
413  double dW = Wl.max - Wl.min;
414  double MR = utils::res::Mass(res);
415  double WR = utils::res::Width(res);
416  double x1 = (MR - Wl.min)/dW;
417  double x1min = (MR - WR - Wl.min)/dW;
418  if (x1min > 1)
419  {
420  delete f;
421  return -min_xsec;
422  }
423  x1min = x1min<0?0:x1min;
424  double x1max = (MR + WR - Wl.min)/dW;
425  if (x1max < 0)
426  {
427  delete f;
428  return -min_xsec;
429  }
430  x1max = x1max>1?1:x1max;
431  if (x1 < x1min || x1 > x1max) x1=0.5*(x1min + x1max);
432  for (int i3 = 0; i3 < N3; i3++)
433  {
434  double x3 = 1.*i3;
435  double x3min = .5*i3;
436  double x3max = .5*(i3 + 1);
437  for (int i4 = 0; i4 <= N4; i4++)
438  {
439  double x4 = 1.*i4/N4;
440  double x4min = 1.*i4/N4;
441  double x4max = 1.*(i4 + 1)/N4;
442  if (i4 == N4)
443  {
444  x4min = 3./N4;
445  x4max = 1;
446  }
447  min->SetVariable(0, "x1", x1, step);
448  min->SetVariable(1, "x2", 1./6, step);
449  min->SetVariable(2, "x3", x3, step);
450  min->SetVariable(3, "x4", x4, step);
451  min->SetVariableLimits(0, x1min, x1max);
452  min->SetVariableLimits(1, 0, x2max);
453  min->SetVariableLimits(2, x3min, x3max);
454  min->SetVariableLimits(3, x4min, x4max);
455  min->Minimize();
456  xsec = min->MinValue();
457  if (xsec < min_xsec)
458  min_xsec = xsec;
459  }
460  }
461 
462  delete f;
463 
464  return -fSafetyFactor*min_xsec;
465 }
466 //____________________________________________________________________________
467 // GSL wrappers
468 //____________________________________________________________________________
470  const XSecAlgorithmI * m, const Interaction * interaction, double wcut) :
471 ROOT::Math::IBaseFunctionMultiDim(), fModel(m), fWcut(wcut)
472 {
473 
474  isZero = false;
475  fInteraction = const_cast<Interaction*>(interaction);
476  // skip process and kinematic checks
479 
481 
482  // Get kinematical parameters
483  const InitialState & init_state = interaction -> InitState();
484  double Enu = init_state.ProbeE(kRfHitNucRest);
485 
486 
487  if (Enu < kps->Threshold_SPP_iso())
488  {
489  isZero = true;
490  return;
491  }
492 
493  Wl = kps->WLim_SPP_iso();
494  if (fWcut >= Wl.min)
495  Wl.max = TMath::Min(fWcut,Wl.max);
496 
497 }
499 {
500 
501 }
503 {
504  return 4;
505 }
507 {
508 
509 // outputs:
510 // differential cross section [10^-38 cm^2/GeV^3] for resonance single pion production production
511 //
512  if (isZero) return 0.;
513 
514  double W = Wl.min + (Wl.max - Wl.min)*xin[0];
515  fInteraction->KinePtr()->SetW(W);
516 
517  Range1D_t Q2l = kps->Q2Lim_W_SPP_iso();
518  double Q2 = Q2l.min + (Q2l.max - Q2l.min)*xin[1];
519  fInteraction->KinePtr()->SetQ2(Q2);
520 
521  fInteraction->KinePtr()->SetKV(kKVctp, -1. + 2.*xin[2]); // cosine of pion theta in resonance rest frame
522 
523  fInteraction->KinePtr()->SetKV(kKVphip , 2.*kPi*xin[3]); // pion phi in resonance rest frame
524 
525  double xsec = fModel->XSec(fInteraction, kPSWQ2ctpphipfE);
526  xsec *= 4*kPi*(Wl.max - Wl.min)*(Q2l.max - Q2l.min);
527  return -xsec/(1E-38 * units::cm2);
528 }
529 ROOT::Math::IBaseFunctionMultiDim *
531 {
532  return
533  new genie::utils::gsl::d4XSecMK_dWQ2CosThetaPhi_E(fModel,fInteraction, fWcut);
534 }
Cross Section Calculation Interface.
Resonance_t FromString(const char *res)
string -&gt; resonance id
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
virtual void SetWeight(double wght)
Definition: GHepRecord.h:130
bool fGenerateUniformly
uniform over allowed phase space + event weight?
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
virtual Interaction * Summary(void) const
Definition: GHepRecord.cxx:91
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:71
void SetQ2(double Q2, bool selected=false)
Definition: Kinematics.cxx:255
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
int GetRecoilNucleonPdgCode(Interaction *interaction) const
double fSafetyFactor
ComputeMaxXSec -&gt; ComputeMaxXSec * fSafetyFactor.
A simple [min,max] interval for doubles.
Definition: Range1.h:42
virtual void AssertXSecLimits(const Interaction *in, double xsec, double xsec_max) const
bool IsNucleus(void) const
Definition: Target.cxx:272
double fMaxXSecDiffTolerance
max{100*(xsec-maxxsec)/.5*(xsec+maxxsec)} if xsec&gt;maxxsec
Defines the EventGeneratorI interface.
virtual double MaxXSec(GHepRecord *evrec, const int nkey=0) const
void SetHitNucP4(const TLorentzVector &p4)
Definition: Target.cxx:189
int NPiMinus(void) const
Definition: XclsTag.h:60
virtual int HitNucleonPosition(void) const
Definition: GHepRecord.cxx:418
virtual double Weight(void) const
Definition: GHepRecord.h:124
double Mass(Resonance_t res)
resonance mass (GeV)
double Width(Resonance_t res)
resonance width (GeV)
Abstract class. Provides a data caching mechanism for for concrete implementations of the EventRecord...
enum genie::EResonance Resonance_t
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:29
void ProcessEventRecord(GHepRecord *event_rec) const
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
KPhaseSpace * PhaseSpacePtr(void) const
Definition: Interaction.h:78
virtual GHepParticle * Probe(void) const
Definition: GHepRecord.cxx:284
double W(const Interaction *const i)
Definition: KineUtils.cxx:1101
ROOT::Math::IBaseFunctionMultiDim * Clone(void) const
Summary information for an interaction.
Definition: Interaction.h:56
Range1D_t Q2Lim_W_SPP_iso(void) const
Q2 limits @ fixed W for resonance single pion production on isoscalar nucleon.
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
const double e
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
static constexpr double cm2
Definition: Units.h:69
void WQ2toXY(double Ev, double M, double W, double Q2, double &x, double &y)
Definition: KineUtils.cxx:1132
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
Kinematical phase space.
Definition: KPhaseSpace.h:33
int NPiPlus(void) const
Definition: XclsTag.h:59
const int kPdgPiP
Definition: PDGCodes.h:158
const int kPdgPi0
Definition: PDGCodes.h:160
#define pINFO
Definition: Messenger.h:62
TRandom3 & RndKine(void) const
rnd number generator used by kinematics generators
Definition: RandomGen.h:50
#define pWARN
Definition: Messenger.h:60
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
void Setx(double x, bool selected=false)
Definition: Kinematics.cxx:231
static RunningThreadInfo * Instance(void)
double max
Definition: Range1.h:53
void SetW(double W, bool selected=false)
Definition: Kinematics.cxx:279
static PDGLibrary * Instance(void)
Definition: PDGLibrary.cxx:68
virtual TBits * EventFlags(void) const
Definition: GHepRecord.h:117
Singleton class to load &amp; serve a TDatabasePDG.
Definition: PDGLibrary.h:35
void Configure(const Registry &config)
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void Sety(double y, bool selected=false)
Definition: Kinematics.cxx:243
const XclsTag & ExclTag(void) const
Definition: Interaction.h:72
virtual GHepParticle * HitNucleon(void) const
Definition: GHepRecord.cxx:313
double fEMin
min E for which maxxsec is cached - forcing explicit calc.
virtual const XSecAlgorithmI * CrossSectionAlg(void) const =0
Range1D_t WLim_SPP_iso(void) const
W limits for resonance single pion production on isoscalar nucleon.
virtual double XSec(void) const
Definition: GHepRecord.h:126
const int kPdgPiM
Definition: PDGCodes.h:159
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:499
double min
Definition: Range1.h:52
const int kPdgProton
Definition: PDGCodes.h:81
TParticlePDG * Find(int pdgc, bool must_exist=true)
Definition: PDGLibrary.cxx:86
#define pNOTICE
Definition: Messenger.h:61
void ClearRunningValues(void)
Definition: Kinematics.cxx:347
bool GetParamDef(const RgKey &name, T &p, const T &def) const
virtual int ProbePosition(void) const
Definition: GHepRecord.cxx:352
d4XSecMK_dWQ2CosThetaPhi_E(const XSecAlgorithmI *m, const Interaction *i, double wcut)
static const unsigned int kRjMaxIterations
Definition: Controls.h:26
int fMaxDepth
Maximum depth of dividing parent cell.
const EventGeneratorI * RunningThread(void)
int GetFinalPionPdgCode(Interaction *interaction) const
double ProbeE(RefFrame_t rf) const
const int kPdgNeutron
Definition: PDGCodes.h:83
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
static constexpr double m
Definition: Units.h:71
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Keep info on the event generation thread currently on charge. This is used so that event generation m...
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
double ComputeMaxXSec(const Interaction *interaction) const
virtual void SetDiffXSec(double xsec, KinePhaseSpace_t ps)
Definition: GHepRecord.h:133
enum genie::EGHepStatus GHepStatus_t
Initial State information.
Definition: InitialState.h:48
int NProtons(void) const
Definition: XclsTag.h:56