GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NucDeExcitationSim.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 
6  Costas Andreopoulos <c.andreopoulos \at cern.ch>
7  University of Liverpool
8 */
9 //____________________________________________________________________________
10 
11 #include <cstdlib>
12 #include <sstream>
13 
14 #include <TFile.h>
15 #include <TH1D.h>
16 #include <TMath.h>
17 #include <TParameter.h>
18 #include <TSystem.h>
19 
21 #include "Framework/Conventions/GBuild.h"
38 
39 using std::ostringstream;
40 
41 using namespace genie;
42 using namespace genie::utils;
43 using namespace genie::constants;
44 using namespace genie::controls;
45 
46 //___________________________________________________________________________
48 EventRecordVisitorI("genie::NucDeExcitationSim")
49 {
50 
51 }
52 //___________________________________________________________________________
54 EventRecordVisitorI("genie::NucDeExcitationSim", config)
55 {
56 
57 }
58 //___________________________________________________________________________
60 {
61 
62 }
63 //___________________________________________________________________________
65 {
66  LOG("NucDeEx", pNOTICE)
67  << "Simulating nuclear de-excitation gamma rays";
68 
69  GHepParticle * nucltgt = evrec->TargetNucleus();
70  if (!nucltgt) {
71  LOG("NucDeEx", pINFO)
72  << "No nuclear target found - Won't simulate nuclear de-excitation";
73  return;
74  }
75 
76  if(nucltgt->Z()==8) this->OxygenTargetSim(evrec);
77 
78  // if oxygen, keep the existing genie behavior
79 
80  // if not oxygen, only simulate these for QE events
81  // double nucleon knockout produces fewer photons.
82  // too much energy and it all leaves as nucleon ejection.
83  // either set them to zero, or set them to 1/10 probability.
84  // proc_info.IsQuasiElastic();
85  // RIK TODO still need to test that this works.
86  // Then move the photon spectrom to p-hole too
87  // Then activate for Argon.
88  // Then make plots of the spectra.
89  // do not do this for coherent ? MEC, RES, DIS only ?
90  // ask if the exotic processes are used and should get it.
91 
93 
94  if(evrec->Summary()->ProcInfo().IsQuasiElastic()){ // || rand < 0.1}
95  //suppress_probability_factor = 1.0;
96  if(nucltgt->Z()==6) this->CarbonTargetSim(evrec);
97  // simulate argon with a dedicated calculation
98  if(nucltgt->Z()==18) this->ArgonTargetSim(evrec);
99  } else if(evrec->Summary()->ProcInfo().IsResonant() ||
100  evrec->Summary()->ProcInfo().IsMEC() ||
101  evrec->Summary()->ProcInfo().IsDeepInelastic()){
102 
103  double suppress_probability_factor = 0.20;
104  // deexcitation is less likely after multiple nucleon knockout
105  // because there is too much energy.
106  // the decay will happen via nucleon or alpha ejection
107  // and the KE will be carried away in that fashion, not gamma.
108  if(rnd->RndDec().Rndm() < suppress_probability_factor){
109  if(nucltgt->Z()==6) this->CarbonTargetSim(evrec);
110  // simulate argon with the same probabilities.
111  // Argoneut using FLUKA says
112  if(nucltgt->Z()==18) this->ArgonTargetSim(evrec);
113  } else {
114  //std::cout << "Rik made none nonQE " << std::endl;
115  }
116 
117  }
118 
119 
120  // else if rand < 0.1
121 
122  LOG("NucDeEx", pINFO)
123  << "Done with this event";
124 }
125 //___________________________________________________________________________
127 {
128  LOG("NucDeEx", pNOTICE)
129  << "Simulating nuclear de-excitation gamma rays for Oxygen target";
130 
131  //LOG("NucDeEx", pNOTICE) << *evrec;
132 
133  GHepParticle * hitnuc = evrec->HitNucleon();
134  if(!hitnuc) return;
135 
136  bool p_hole = (hitnuc->Pdg() == kPdgProton);
137  double dt = -1;
138 
139  RandomGen * rnd = RandomGen::Instance();
140 
141  //
142  // ****** P-Hole
143  //
144  if (p_hole) {
145  //
146  // * Define all the data required for simulating deexcitations of p-hole states
147  //
148 
149  // > probabilities for creating a p-hole in the P1/2, P3/2, S1/2 shells
150  double Pp12 = 0.25; // P1/2
151  double Pp32 = 0.47; // P3/2
152  double Ps12 = 1. - Pp12 - Pp32; // S1/2
153 
154  // > excited state energy levels & probabilities for P3/2-shell p-holes
155  const int np32 = 3;
156  double p32Elv[np32] = { 0.00632, 0.00993, 0.01070 };
157  double p32Plv[np32] = { 0.872, 0.064, 0.064 };
158  // - probabilities for deexcitation modes of P3/2-shell p-hole state '1'
159  double p32Plv1_1gamma = 0.78; // prob to decay via 1 gamma
160  double p32Plv1_cascade = 0.22; // prob to decay via gamma cascade
161 
162  // > excited state energy levels & probabilities for S1/2-shell p-holes
163  const int ns12 = 11;
164  double s12Elv[ns12] = {
165  0.00309, 0.00368, 0.00385, 0.00444, 0.00492,
166  0.00511, 0.00609, 0.00673, 0.00701, 0.00703, 0.00734 };
167  double s12Plv[ns12] = {
168  0.0625, 0.1875, 0.075, 0.1375, 0.1375,
169  0.0125, 0.0125, 0.075, 0.0563, 0.0563, 0.1874 };
170  // - gamma energies and probabilities for S1/2-shell p-hole excited
171  // states '2','7' and '10' with >1 deexcitation modes
172  const int ns12lv2 = 3;
173  double s12Elv2[ns12lv2] = { 0.00309, 0.00369, 0.00385 };
174  double s12Plv2[ns12lv2] = { 0.013, 0.360, 0.625 };
175  const int ns12lv7 = 2;
176  double s12Elv7[ns12lv7] = { 0.00609, 0.00673 };
177  double s12Plv7[ns12lv7] = { 0.04, 0.96 };
178  const int ns12lv10 = 3;
179  double s12Elv10[ns12lv10] = { 0.00609, 0.00673, 0.00734 };
180  double s12Plv10[ns12lv10] = { 0.050, 0.033, 0.017 };
181 
182  // Select one of the P1/2, P3/2 or S1/2
183  double rshell = rnd->RndDec().Rndm();
184  //
185  // >> P1/2 shell
186  //
187  if(rshell < Pp12) {
188  LOG("NucDeEx", pNOTICE)
189  << "Hit nucleon left a P1/2 shell p-hole. Remnant is at g.s.";
190  return;
191  }
192  //
193  // >> P3/2 shell
194  //
195  else
196  if(rshell < Pp12 + Pp32) {
197  LOG("NucDeEx", pNOTICE)
198  << "Hit nucleon left a P3/2 shell p-hole";
199  // Select one of the excited states
200  double rdecmode = rnd->RndDec().Rndm();
201  double prob_sum = 0;
202  int sel_state = -1;
203  for(int istate=0; istate<np32; istate++) {
204  prob_sum += p32Plv[istate];
205  if(rdecmode < prob_sum) {
206  sel_state = istate;
207  break;
208  }
209  }
210  LOG("NucDeEx", pNOTICE)
211  << "Selected P3/2 excited state = " << sel_state;
212 
213  // Decay that excited state
214  // >> 6.32 MeV state
215  if(sel_state==0) {
216  this->AddPhoton(evrec, p32Elv[0], dt);
217  }
218  // >> 9.93 MeV state
219  else
220  if(sel_state==1) {
221  double r = rnd->RndDec().Rndm();
222  // >>> emit a single gamma
223  if(r < p32Plv1_1gamma) {
224  this->AddPhoton(evrec, p32Elv[1], dt);
225  }
226  // >>> emit a cascade of gammas
227  else
228  if(r < p32Plv1_1gamma + p32Plv1_cascade) {
229  this->AddPhoton(evrec, p32Elv[1], dt);
230  this->AddPhoton(evrec, p32Elv[1]-p32Elv[0], dt);
231  }
232  }
233  // >> 10.7 MeV state
234  else
235  if(sel_state==2) {
236  // Above the particle production threshold - need to emit
237  // a 0.5 MeV kinetic energy proton.
238  // Will neglect that given that it is a very low energy
239  // kinetic energy nucleon and the intranuke break-up nucleon
240  // cross sections are already tuned.
241  return;
242  }
243  } //p3/2
244  //
245  // >> S1/2 shell
246  //
247  else if (rshell < Pp12 + Pp32 + Ps12) {
248  LOG("NucDeEx", pNOTICE)
249  << "Hit nucleon left an S1/2 shell p-hole";
250  // Select one of the excited states caused by a S1/2 shell hole
251  double rdecmode = rnd->RndDec().Rndm();
252  double prob_sum = 0;
253  int sel_state = -1;
254  for(int istate=0; istate<ns12; istate++) {
255  prob_sum += s12Plv[istate];
256  if(rdecmode < prob_sum) {
257  sel_state = istate;
258  break;
259  }
260  }
261  LOG("NucDeEx", pNOTICE)
262  << "Selected S1/2 excited state = " << sel_state;
263 
264  // Decay that excited state
265  bool multiple_decay_modes =
266  (sel_state==2 || sel_state==7 || sel_state==10);
267  if(!multiple_decay_modes) {
268  this->AddPhoton(evrec, s12Elv[sel_state], dt);
269  } else {
270  int ndec = -1;
271  double * pdec = 0, * edec = 0;
272  switch(sel_state) {
273  case(2) :
274  ndec = ns12lv2; pdec = s12Plv2; edec = s12Elv2;
275  break;
276  case(7) :
277  ndec = ns12lv7; pdec = s12Plv7; edec = s12Elv7;
278  break;
279  case(10) :
280  ndec = ns12lv10; pdec = s12Plv10; edec = s12Elv10;
281  break;
282  default:
283  return;
284  }
285  double r = rnd->RndDec().Rndm();
286  double decmode_prob_sum = 0;
287  int sel_decmode = -1;
288  for(int idecmode=0; idecmode < ndec; idecmode++) {
289  decmode_prob_sum += pdec[idecmode];
290  if(r < decmode_prob_sum) {
291  sel_decmode = idecmode;
292  break;
293  }
294  }
295  if(sel_decmode == -1) return;
296  this->AddPhoton(evrec, edec[sel_decmode], dt);
297  }//mult.dec.ch
298 
299  } // s1/2
300  else {
301  }
302  } // p-hole
303 
304  //
305  // ****** n-hole
306  //
307  else {
308  //
309  // * Define all the data required for simulating deexcitations of n-hole states
310  //
311 
312  // > probabilities for creating a n-hole in the P1/2, P3/2, S1/2 shells
313  double Pp12 = 0.25; // P1/2
314  double Pp32 = 0.44; // P3/2
315  double Ps12 = 0.09; // S1/2
316  //>
317  double p32Elv = 0.00618;
318  //>
319  double s12Elv = 0.00703;
320  double s12Plv = 0.222;
321 
322  // Select one of the P1/2, P3/2 or S1/2
323  double rshell = rnd->RndDec().Rndm();
324  //
325  // >> P1/2 shell
326  //
327  if(rshell < Pp12) {
328  LOG("NucDeEx", pNOTICE)
329  << "Hit nucleon left a P1/2 shell n-hole. Remnant is at g.s.";
330  return;
331  }
332  //
333  // >> P3/2 shell
334  //
335  else
336  if(rshell < Pp12 + Pp32) {
337  LOG("NucDeEx", pNOTICE)
338  << "Hit nucleon left a P3/2 shell n-hole";
339  this->AddPhoton(evrec, p32Elv, dt);
340  }
341  //
342  // >> S1/2 shell
343  //
344  else
345  if(rshell < Pp12 + Pp32 + Ps12) {
346  LOG("NucDeEx", pNOTICE)
347  << "Hit nucleon left a S1/2 shell n-hole";
348  // only one of the deexcitation modes involve a (7.03 MeV) photon
349  double r = rnd->RndDec().Rndm();
350  if(r < s12Plv) this->AddPhoton(evrec, s12Elv,dt);
351  }
352  else {
353  }
354  } //n-hole
355 }
356 
357 //___________________________________________________________________________
358 // Carbon
359 //
360 // As of October 2022, we are not prepared to turn on new GENIE functionality
361 // that includes full simulation of remnant nucleus deexcitation
362 // such as INCL++ or Marley (or FLUKA).
363 //
364 // Based on some MINERvA effort at Duluth, undergrad Brandon Reed and Rik Gran
365 // We have coded in the neutron hole decay spectrum predicted by
366 // Kamyshkov and Kolbe @article{Kamyshkov:2002wp, arXiv:nucl-th/0206030
367 // doi = "10.1103/PhysRevD.67.076007",
368 //
369 // This paper proposes a decay spectrum using a similar concept to the one
370 // for neutron-hole and proton-hole used for oxygen that is coded above.
371 // They do not present a proton hole calculation.
372 // The P3/2 neutron-hole decay leads only to a 2 MeV photon.
373 // The S1/2 neutron-hole decay leads to a wide range of outcomes
374 // of which this code only gives the photon spectrum, not ejected nucleons.
375 // They also present a discussion of two-neutron hole spectra
376 // which preferentially lead to nucleon ejection and less often a photon
377 //
379 {
380  // If we've disabled carbon de-excitations, then this function is a no-op
381  if ( !fDoCarbon ) return;
382 
383  LOG("NucDeEx", pNOTICE)
384  << "Simulating nuclear de-excitation gamma rays for Carbon target";
385 
386  GHepParticle * hitnuc = evrec->HitNucleon();
387  if(!hitnuc) return;
388 
389  // bool p_hole = (hitnuc->Pdg() == kPdgProton);
390 
391 
392 
393  double dt = -1;
394 
395  RandomGen * rnd = RandomGen::Instance();
396 
397 
398  //
399  // * Define all the data required for simulating deexcitations of n-hole states
400  //
401 
402  //std::cout << "Rik simulating n-hole in carbon " << std::endl;
403 
404  // > probabilities for creating a n-hole in the P1/2, P3/2, S1/2 shells
405  // Kamyshkov gives it a different way than the oxygen folks did.
406  // A probability for the Pstates combined, and branching fractions for S1/2
407  double Pp12 = 0.0; // 0.75/6.0; // 0.25; // P1/2 Rik says set to zero.
408  double Pp32 = 4.0/6.0; // 0.44; // P3/2
409  double Ps12 = 2.00/6.0; //0.09; // S1/2
410  //>
411  double p32Elv = 0.0020;
412  //>
413  const int ns12 = 8;
414  double s12Elv[ns12] = {0.0005, 0.0007, 0.0017, 0.0021, 0.0033, 0.0035, 0.0047, 0.0063};
415  //double s12Plv[ns12] = {0.21, 0.295, 0.14, 0.26, 0.14, 0.2, 0.03, 0.03};
416  // the above multiply by 0.2
417  double s12Plv[ns12] = {0.042, 0.059, 0.028, 0.052, 0.028, 0.04, 0.006, 0.006};
418  // the above multiply by 0.2 and by 2/6.
419  //double s12Plv[ns12] = {0.0140, 0.01967, 0.0933, 0.01733, 0.00933, 0.0133, 0.0020, 0.0020};
420 
421 
422  //double s12Elv = 0.00703;
423  //double s12Plv = 0.222;
424 
425  // Select one of the P1/2, P3/2 or S1/2
426  double rshell = rnd->RndDec().Rndm();
427  //
428  // >> P1/2 shell
429  //
430  if(rshell < Pp12) {
431  // Rik says this probability is already set to zero for Kamyshkov
432  LOG("NucDeEx", pNOTICE)
433  << "Hit nucleon left a P1/2 shell n-hole. Remnant is at g.s.";
434  return;
435  }
436  //
437  // >> P3/2 shell
438  //
439  else
440  if(rshell < Pp12 + Pp32) {
441  LOG("NucDeEx", pNOTICE)
442  << "Hit nucleon left a P3/2 shell n-hole";
443 
444  double myrand = rnd->RndDec().Rndm();
445  if(myrand < 0.2){
446  this->AddPhoton(evrec, p32Elv, dt);
447  //std::cout << "Rik made p32Elv " << p32Elv << std::endl;
448  } else {
449  //std::cout << "Rik made none p32" << std::endl;
450  }
451  }
452  //
453  // >> S1/2 shell
454  //
455  else
456  if(rshell < Pp12 + Pp32 + Ps12) {
457  LOG("NucDeEx", pNOTICE)
458  << "Hit nucleon left an S1/2 shell p-hole";
459  // Select one of the excited states caused by a S1/2 shell hole
460  double rdecmode = rnd->RndDec().Rndm();
461  double prob_sum = 0.;
462  int sel_state = -1;
463  for(int istate=0; istate<ns12; istate++) {
464  prob_sum += s12Plv[istate];
465  if(rdecmode < prob_sum) {
466  sel_state = istate;
467  break;
468  }
469  }
470  LOG("NucDeEx", pNOTICE)
471  << "Selected S1/2 excited state = " << sel_state;
472  if(sel_state >= 0){
473  this->AddPhoton(evrec, s12Elv[sel_state], dt);
474  //std::cout << "Rik made s12Elv " << s12Elv[sel_state] << std::endl;
475  } else {
476  //std::cout << "Rik made none s12" << std::endl;
477  }
478  }
479  else {
480  //std::cout << "Rik made none at all" << std::endl;
481  }
482 
483 
484 }
485 //___________________________________________________________________________
487  GHepRecord * evrec, double E0, double dt) const
488 {
489 // Add a photon at the event record & recoil the remnant nucleus so as to
490 // conserve energy/momenta
491 //
492  double E = (dt>0) ? this->PhotonEnergySmearing(E0, dt) : E0;
493 
494  LOG("NucDeEx", pNOTICE)
495  << "Adding a " << E/units::MeV << " MeV photon from nucl. deexcitation";
496 
497  GHepParticle * target = evrec->Particle(1);
498  GHepParticle * remnant = 0;
499  for(int i = target->FirstDaughter(); i <= target->LastDaughter(); i++) {
500  remnant = evrec->Particle(i);
501  if(pdg::IsIon(remnant->Pdg())) break;
502  }
503 
504  TLorentzVector x4(0,0,0,0);
505  TLorentzVector p4 = this->Photon4P(E);
506  GHepParticle gamma(kPdgGamma, kIStStableFinalState,1,-1,-1,-1, p4, x4); // note that this assigns the parent of the photon as the initial-state nucleon/nucleus. (do we want that??)
507  evrec->AddParticle(gamma);
508 
509 
510  remnant->SetPx ( remnant->Px() - p4.Px() );
511  remnant->SetPy ( remnant->Py() - p4.Py() );
512  remnant->SetPz ( remnant->Pz() - p4.Pz() );
513  remnant->SetEnergy ( remnant->E() - p4.E() );
514 }
515 //___________________________________________________________________________
516 double NucDeExcitationSim::PhotonEnergySmearing(double E0, double dt) const
517 {
518 // Returns the smeared energy of the emitted gamma
519 // E0 : energy of the excited state (GeV)
520 // dt: excited state lifetime (sec)
521 //
522  double dE = kPlankConstant / (dt*units::s);
523 
524  RandomGen * rnd = RandomGen::Instance();
525  double E = rnd->RndDec().Gaus(E0 /*mean*/, dE /*sigma*/);
526 
527  LOG("NucDeEx", pNOTICE)
528  << "<E> = " << E0 << ", dE = " << dE << " -> E = " << E;
529 
530  return E;
531 }
532 //___________________________________________________________________________
533 TLorentzVector NucDeExcitationSim::Photon4P(double E) const
534 {
535 // Generate a photon 4p
536 
537  RandomGen * rnd = RandomGen::Instance();
538 
539  double costheta = -1. + 2. * rnd->RndDec().Rndm();
540  double sintheta = TMath::Sqrt(TMath::Max(0., 1.-TMath::Power(costheta,2)));
541  double phi = 2*kPi * rnd->RndDec().Rndm();
542  double cosphi = TMath::Cos(phi);
543  double sinphi = TMath::Sin(phi);
544 
545  double px = E * sintheta * cosphi;
546  double py = E * sintheta * sinphi;
547  double pz = E * costheta;
548 
549  TLorentzVector p4(px,py,pz,E);
550  return p4;
551 }
552 //___________________________________________________________________________
553 // Added on 27 January 2023 by S. Gardiner based on a preliminary MARLEY
554 // calculation. Only the leading de-excitation photon is generated for now.
556 {
557  // If we've disabled argon de-excitations, then this function is a no-op
558  if ( !fDoArgon ) return;
559 
560  LOG( "NucDeEx", pNOTICE ) << "Simulating nuclear de-excitation gamma-rays"
561  " for an argon target";
562 
563  // Load the leading gamma-ray spectra and emission probabilities from prior
564  // simulation results
565  static bool loaded_hists = false;
566  static TH1D* hist_n = nullptr;
567  static TH1D* hist_p = nullptr;
568  static double prob_gamma_n = 0.;
569  static double prob_gamma_p = 0.;
570 
571  if ( !loaded_hists ) {
572  std::string data_file_name = std::string( gSystem->Getenv("GENIE") )
573  + "/data/evgen/nucl/marley_argon_sf_lead_gamma_hists.root";
574 
575  TFile data_file( data_file_name.c_str(), "read" );
576 
577  TParameter< double >* prob_n = nullptr;
578  TParameter< double >* prob_p = nullptr;
579 
580  data_file.GetObject( "hist_n", hist_n );
581  data_file.GetObject( "hist_p", hist_p );
582 
583  hist_n->SetDirectory( nullptr );
584  hist_p->SetDirectory( nullptr );
585 
586  data_file.GetObject( "prob_gamma_n", prob_n );
587  data_file.GetObject( "prob_gamma_p", prob_p );
588 
589  assert( hist_n && hist_p && prob_n && prob_p );
590 
591  prob_gamma_n = prob_n->GetVal();
592  prob_gamma_p = prob_p->GetVal();
593 
594  loaded_hists = true;
595  }
596 
597  GHepParticle* hitnuc = evrec->HitNucleon();
598  if ( !hitnuc ) return;
599 
600  // Choose the appropriate gamma-ray distribution based on the struck nucleon
601  int hit_nuc_pdg = hitnuc->Pdg();
602  if ( !genie::pdg::IsNucleon(hit_nuc_pdg) ) return;
603 
604  TH1D* lead_gamma_hist = hist_n;
605  double gamma_prob = prob_gamma_n;
606  if ( hit_nuc_pdg == kPdgProton ) {
607  lead_gamma_hist = hist_p;
608  gamma_prob = prob_gamma_p;
609  }
610 
611  // Throw a random number to see if this de-excitation event contains at least
612  // one gamma-ray. If it doesn't, just return without doing anything.
614  double r_gamma = rnd->RndDec().Rndm();
615  if ( r_gamma > gamma_prob ) {
616  LOG( "NucDeEx", pNOTICE ) << "No gamma-ray emitted";
617  return;
618  }
619  // If it does, then sample the leading gamma from the pre-saved distribution
620  // and add it to the event. Note that the MARLEY histogram is in MeV, so we
621  // also convert to GeV here for consistency with GENIE conventions.
622  double E_gamma = lead_gamma_hist->GetRandom() / 1e3;
623  this->AddPhoton( evrec, E_gamma, -1. );
624 
625  LOG( "NucDeEx", pNOTICE ) << "Added gamma with energy " << E_gamma << " GeV";
626 }
627 //_________________________________________________________________________
629 {
630  Algorithm::Configure( config );
631  this->LoadConfig();
632 }
633 //____________________________________________________________________________
634 void NucDeExcitationSim::Configure( std::string config )
635 {
636  Algorithm::Configure( config );
637  this->LoadConfig();
638 }
639 //_________________________________________________________________________
641 {
642  // Boolean flag that enables/disables de-excitation handling for carbon
643  GetParamDef( "DoCarbon", fDoCarbon, false );
644 
645  // Boolean flag that enables/disables de-excitation handling for argon
646  GetParamDef( "DoArgon", fDoArgon, false );
647 }
bool IsResonant(void) const
Definition: ProcessInfo.cxx:99
int Z(void) const
virtual GHepParticle * Particle(int position) const
Definition: GHepRecord.cxx:104
double PhotonEnergySmearing(double E0, double t) const
double E(void) const
Get energy.
Definition: GHepParticle.h:91
virtual Interaction * Summary(void) const
Definition: GHepRecord.cxx:91
void SetPz(double pz)
static RandomGen * Instance()
Access instance.
Definition: RandomGen.cxx:71
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the &#39;Visito...
int FirstDaughter(void) const
Definition: GHepParticle.h:68
bool IsNucleon(int pdgc)
Definition: PDGUtils.cxx:346
bool IsQuasiElastic(void) const
Definition: ProcessInfo.cxx:69
static constexpr double s
Definition: Units.h:95
TLorentzVector Photon4P(double E) const
static constexpr double MeV
Definition: Units.h:129
A singleton holding random number generator classes. All random number generation in GENIE should tak...
Definition: RandomGen.h:29
double Pz(void) const
Get Pz.
Definition: GHepParticle.h:90
void SetPx(double px)
double Px(void) const
Get Px.
Definition: GHepParticle.h:88
int Pdg(void) const
Definition: GHepParticle.h:63
int LastDaughter(void) const
Definition: GHepParticle.h:69
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
const int kPdgGamma
Definition: PDGCodes.h:189
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
virtual GHepParticle * TargetNucleus(void) const
Definition: GHepRecord.cxx:293
#define pINFO
Definition: Messenger.h:62
bool IsMEC(void) const
void AddPhoton(GHepRecord *evrec, double E0, double t) const
void ArgonTargetSim(GHepRecord *evrec) const
bool IsDeepInelastic(void) const
Definition: ProcessInfo.cxx:89
bool IsIon(int pdgc)
Definition: PDGUtils.cxx:42
void OxygenTargetSim(GHepRecord *evrec) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
virtual GHepParticle * HitNucleon(void) const
Definition: GHepRecord.cxx:313
void CarbonTargetSim(GHepRecord *evrec) const
virtual void AddParticle(const GHepParticle &p)
Definition: GHepRecord.cxx:499
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
const int kPdgProton
Definition: PDGCodes.h:81
#define pNOTICE
Definition: Messenger.h:61
bool GetParamDef(const RgKey &name, T &p, const T &def) const
void SetEnergy(double E)
static const double kPlankConstant
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
TRandom3 & RndDec(void) const
rnd number generator used by decay models
Definition: RandomGen.h:56
STDHEP-like event record entry that can fit a particle or a nucleus.
Definition: GHepParticle.h:39
void SetPy(double py)
void ProcessEventRecord(GHepRecord *evrec) const override
void Configure(const Registry &config) override
double Py(void) const
Get Py.
Definition: GHepParticle.h:89