Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
sim Namespace Reference

Code to link reconstructed objects back to the MC truth information. More...

Namespaces

 details
 
 dump
 Functions to dump Monte Carlo object information into a stream.
 

Classes

class  AuxDetHit
 
class  AuxDetIDE
 MC truth information to make RawDigits and do back tracking. More...
 
class  AuxDetSimChannel
 Collection of particles crossing one auxiliary detector cell. More...
 
class  BeamGateInfo
 
struct  Chan_Phot
 
class  DumpGTruth
 
class  DumpMCParticles
 
class  DumpMCShowers
 
class  DumpMCTracks
 
class  DumpMCTruth
 
class  DumpOpDetBacktrackerRecords
 
class  DumpOpDetDivRecs
 
class  DumpSimChannels
 
class  DumpSimEnergyDeposits
 Prints the content of all the deposited energies on screen. More...
 
class  DumpSimPhotons
 
class  DumpSimPhotonsLite
 
class  GeneratedParticleInfo
 Contains information about a generated particle. More...
 
class  GenericCRT
 
class  GenericCRTUtility
 
struct  IDE
 Ionization at a point of the TPC sensitive volume. More...
 
class  LArG4Parameters
 
class  LArVoxelCalculator
 
class  LArVoxelData
 
class  LArVoxelID
 
class  LArVoxelList
 
class  MCBaseException
 
struct  MCEdep
 
class  MCEdepHit
 
class  MCEnDep
 
class  MCHit
 
class  MCHitCollection
 
class  MCMiniPart
 
class  MCRecoEdep
 
class  MCRecoPart
 
class  MCShower
 
class  MCShowerRecoAlg
 
class  MCShowerRecoPart
 
class  MCStep
 
class  MCTrack
 
class  MCTrackCollectionAnaAlg
 
class  MCTrackRecoAlg
 
class  MCWire
 
class  MCWireCollection
 
class  MergeSimSources
 
class  MergeSimSourcesUtility
 
struct  OnePhoton
 All information of a photon entering the sensitive optical detector volume. More...
 
struct  OpDet_Time_Chans
 
class  OpDetBacktrackerRecord
 Energy deposited on a readout Optical Detector by simulated tracks. More...
 
class  OpDetDivRec
 
class  PhotonVoxel
 Representation of a single small volume (voxel). More...
 
class  PhotonVoxelDef
 Representation of a region of space diced into voxels. More...
 
class  POTaccumulator
 Prints on console the total Protons On Target from the input subruns. More...
 
class  ProtoDUNEBeamInstrument
 
class  ProtoDUNEbeamsim
 
class  ProtoDUNEBeamTPCMatching
 
struct  SDP
 
class  SimChannel
 Energy deposited on a readout channel by simulated tracks. More...
 
class  SimDriftedElectronCluster
 
class  SimEnergyDeposit
 Energy deposition in the active material. More...
 
class  SimListUtils
 
class  SimPhotons
 Collection of photons which recorded on one channel. More...
 
class  SimPhotonsCollection
 Collection of sim::SimPhotons, indexed by channel number. More...
 
class  SimPhotonsLite
 Compact representation of photons on a channel. More...
 
class  SupernovaTruth
 
struct  TrackIDE
 Ionization energy from a Geant4 track. More...
 
struct  TrackSDP
 Ionization photons from a Geant4 track. More...
 
class  UniquePosition
 

Typedefs

typedef std::vector< AuxDetHitAuxDetHitCollection
 
typedef std::vector< AuxDetSimChannelAuxDetSimChannelCollection
 
typedef std::pair< double, std::vector< sim::SDP > > timePDclockSDP_t
 List of energy deposits at the same time (on this Optical Detector) More...
 
typedef std::pair< unsigned short, std::vector< sim::IDE > > TDCIDE
 List of energy deposits at the same time (on this channel) More...
 
typedef std::vector< SimEnergyDepositSimEnergyDepositCollection
 

Enumerations

enum  BeamType_t { kUnknown =0, kBNB, kNuMI, kBeamTypeMax }
 Defines category of beams to be stored in sim::BeamGateInfo. More...
 
enum  SupernovaSamplingMode_t {
  kUnknownSupernovaSamplingMode = 0, kUnbiased, kUniformTime, kUniformEnergy,
  kSupernovaSamplingModeMax
}
 

Functions

bool operator< (const BeamGateInfo &lhs, const BeamGateInfo &rhs)
 
unsigned int GetRandomNumberSeed ()
 
bool operator< (OnePhoton const &, OnePhoton const &)
 a is smaller than b if has earlier Time, or lower MotherTrackID. More...
 
const LArVoxelData operator* (const double &value, const LArVoxelData &data)
 
std::ostream & operator<< (std::ostream &output, const LArVoxelData &data)
 
std::ostream & operator<< (std::ostream &output, const LArVoxelID &id)
 
const LArVoxelList operator* (const double &value, const LArVoxelList &list)
 
std::ostream & operator<< (std::ostream &output, const LArVoxelList &list)
 
std::ostream & operator<< (std::ostream &out, sim::PhotonVoxelDef const &voxelDef)
 Prints the content of the specified voxel definition into a stream. More...
 
Function to name `simb::MCParticle` enumerators and codes.
std::string ParticleName (int pigid)
 Returns a string with the name of particle the specified with PDG ID. More...
 
std::string ParticleStatusName (int code)
 Describes the status of a particle (simb::MCParticle::StatusCode()). More...
 

Variables

const double kINVALID_DOUBLE = std::numeric_limits <double>::max()
 
const float kINVALID_FLOAT = std::numeric_limits <float>::max()
 
const unsigned int kINVALID_UINT = std::numeric_limits <unsigned int>::max()
 
const int kINVALID_INT = std::numeric_limits <int>::max()
 
static const int NoParticleId = std::numeric_limits<int>::min()
 

Functions to name `simb::MCTruth` enumerators and codes.

enum  RescatterCategory { RescatterCategory::GENIE_INukeFateHA, RescatterCategory::LArSoftDefault = GENIE_INukeFateHA }
 Possible sources of rescattering code (which is generator-dependent). More...
 
std::string TruthOriginName (simb::Origin_t origin)
 Returns a string representing the specified process origin. More...
 
std::string TruthCCNCname (int ccnc)
 
std::string TruthReactionMode (int mode)
 Returns the "mode" of the reaction (a lesser version of interaction type). More...
 
std::string TruthInteractionTypeName (int type)
 
std::string RescatteringName (int code, RescatterCategory cat=RescatterCategory::LArSoftDefault)
 The name of the specified rescattering code. More...
 
std::string GENIE_INukeFateHA_RescatteringName (int code)
 Description of a rescattering code from GENIE INukeFateHA_t. More...
 

Detailed Description

Code to link reconstructed objects back to the MC truth information.

Monte Carlo Simulation.

Title: GenericCRT Utility Class Author: Andrzej Szelc (andrz.nosp@m.ejs@.nosp@m.fnal..nosp@m.gov)

Description: Class with Algorithms to convert sim::AuxDetHits to sim::AuxDetSimChannels

Title: MergeSimSources Utility Class Author: Wes Ketchum (wketc.nosp@m.hum@.nosp@m.lanl..nosp@m.gov)

Description: Class that merges different simulation sources together to created a combined sim list. Typically just merges vectors/maps/etc together. But, if anything as a G4 trackID, applies a user-defined offset to those IDs.

This class encapsulates the calculations associated with computing the LArVoxelID, and provides access to the any LArVoxel parameters from the input file(s). It is to be called using art::ServiceHandle<sim::LArVoxelCalculator const> lvx; The service makes it act like a singleton, but it knows about the Parameters defined in the input file. Definition: "Voxels" are three-dimensional "pixels"; basically they divide the energy deposition in the LAr into (x,y,z) cubes. Well, hyper-cubes actually, since we have to potentially include divisions in time as well.

This service encapsulates the calculations associated with computing the LArVoxelID, and provides access to the any LArVoxel parameters from the input file(s). Definition: "Voxels" are three-dimensional "pixels"; basically they divide the energy deposition in the LAr into (x,y,z) cubes. Well, hyper-cubes actually, since we have to potentially include divisions in time as well.

LArVoxelList associates a voxel ID with voxel data. LArVoxelID describes the ID (position); this class describes the data.

In particular, this class stores the association between particle tracks and the energy deposited within a voxel.

The key item of information stored for a voxel is the energy. Another, less important item is the association of a particular particle track to an amount of energy stored in the voxel. If all you want is the energy in a voxel, use LArVoxelData::Energy() and ignore the rest of this discussion. If you want to understand the source of that energy, you have to dig deeper:

LArVoxelData::Energy[trackID] returns the amount of energy deposited by the particle with the given track ID (note the use of square brackets).

LArVoxelData::NumberParticles() returns the number of individual particles whose energy deposits are recorded for this voxel.

LArVoxelData::Energy(i) returns the amount of energy deposited by the "i-th" particle (note the use of parenthesis).

LArVoxelData::TrackID(i) returns the track ID of the "i-th" particle.

LArVoxelData::UnassignedEnergy() returns the amount of energy in the voxel that's not assigned to any particle. There might be "unassigned" energy for one of two reasons:

1) In the Monte Carlo, particles can be cut from the ParticleList because they fall below the energy cut. If that happens, the particle is also removed from the LArVoxelData lists, and its energy placed in "unassigned" energy.

For example, a voxel might contain the sum of many low-energy electrons. It may be that none of the individual electron tracks would be written to the output, but their sum might be enough for the voxel to be written to the output file.

2) If any form of "voxel arithmetic" is performed (e.g,. adding two LArVoxelLists together), it becomes too difficult to maintain the particle<->energy relationship because the track IDs change. In that case, all the voxel energies are moved to "unassigned" energy.

LArVoxelData::AssignedEnergy() returns, in effect, Energy() - UnassignedEnergy()

This class defines a unique identifier for a given volume element ("voxel") in the LAr volume. It is sortable, can be tested for equality, and is persistent under ROOT I/O. (Actually, the term "voxel" is a mis-nomer, since we're also keeping track of the time slice. What's a four-dimensional volume element? A "tesseract element or "tessel"?)

A container for LAr voxel information. Although there's nothing in the class below that assumes units, the standard for LArSoft is that distances are in cm, and energy is in GeV.

It acts like a map<LArVoxelID,LArVoxelData>, but with additional features:

Author
brebe.nosp@m.l@fn.nosp@m.al.go.nosp@m.v

this class is designed to hold methods that access the event handle to make the various simulation lists, ie ParticleList, LArVoxelList, etc

Typedef Documentation

Definition at line 183 of file AuxDetHit.h.

Definition at line 104 of file AuxDetSimChannel.h.

Definition at line 230 of file SimEnergyDeposit.h.

typedef std::pair<unsigned short, std::vector<sim::IDE> > sim::TDCIDE

List of energy deposits at the same time (on this channel)

Definition at line 122 of file SimChannel.h.

typedef std::pair< double, std::vector<sim::SDP> > sim::timePDclockSDP_t

List of energy deposits at the same time (on this Optical Detector)

Definition at line 104 of file OpDetBacktrackerRecord.h.

Enumeration Type Documentation

Defines category of beams to be stored in sim::BeamGateInfo.

Enumerator
kUnknown 

Unknown beam type.

kBNB 

BNB.

kNuMI 

NuMI.

kBeamTypeMax 

Max value of enum for iteration.

Definition at line 9 of file BeamTypes.h.

9  {
10  kUnknown=0, ///< Unknown beam type
11  kBNB, ///< BNB
12  kNuMI, ///< NuMI
13  kBeamTypeMax ///< Max value of enum for iteration
14  };
Max value of enum for iteration.
Definition: BeamTypes.h:13
Unknown beam type.
Definition: BeamTypes.h:10
NuMI.
Definition: BeamTypes.h:12
BNB.
Definition: BeamTypes.h:11

Possible sources of rescattering code (which is generator-dependent).

Enumerator
GENIE_INukeFateHA 

GENIE genie::EINukeFateHA_t

LArSoftDefault 

Definition at line 39 of file MCDumperUtils.h.

39  {
40  GENIE_INukeFateHA, ///< GENIE `genie::EINukeFateHA_t`
42  };
GENIE genie::EINukeFateHA_t
Enumerator
kUnknownSupernovaSamplingMode 

Unknown sampling mode.

kUnbiased 

Sample directly from cross-section weighted spectrum.

kUniformTime 

Arrival times were sampled uniformly.

kUniformEnergy 

Neutrino energies were sampled uniformly.

kSupernovaSamplingModeMax 

Max value of enum for iteration.

Definition at line 14 of file SupernovaTruth.h.

14  {
15  kUnknownSupernovaSamplingMode = 0, ///< Unknown sampling mode
16  kUnbiased, ///< Sample directly from cross-section weighted spectrum
17  kUniformTime, ///< Arrival times were sampled uniformly
18  kUniformEnergy, ///< Neutrino energies were sampled uniformly
19  kSupernovaSamplingModeMax ///< Max value of enum for iteration
20  };
Max value of enum for iteration.
Arrival times were sampled uniformly.
Sample directly from cross-section weighted spectrum.
Neutrino energies were sampled uniformly.

Function Documentation

std::string sim::GENIE_INukeFateHA_RescatteringName ( int  code)

Description of a rescattering code from GENIE INukeFateHA_t.

Definition at line 181 of file MCDumperUtils.cxx.

181  {
182 
183 #ifdef _INTRANUKE_FATES_H_ // from GENIE
184 
185  return
186  genie::INukeHadroFates::AsString(static_cast<genie::INukeFateHA_t>(code));
187 
188 #else // !_INTRANUKE_FATES_H_:
189 
190  using namespace std::string_literals;
191 
192  /*
193  * Here we do an horrible thing, that is to copy GENIE code into LArSoft.
194  * By defining `HAS_GENIE`, the proper code branch would be taken instead,
195  * which directly refers to GENIE.
196  * But LArSoft does not do that, because we don't want to be forced to have
197  * GENIE around all the time we use `simb::MCParticle`.
198  *
199  */
200  switch (code) {
201  // from Fermilab UPS GENIE v3_0_0_b4a, `Physics/HadronTransport/INukeHadroFates.h`:
202  case 0 /* kIHAFtUndefined */ : return "** Undefined HA-mode fate **"s; break;
203  case 1 /* kIHAFtNoInteraction */ : return "HA-mode / no interaction"s; break;
204  case 2 /* kIHAFtCEx */ : return "HA-mode / cex"s; break;
205  case 3 /* kIHAFtElas */ : return "HA-mode / elas"s; break;
206  case 4 /* kIHAFtInelas */ : return "HA-mode / inelas"s; break;
207  case 5 /* kIHAFtAbs */ : return "HA-mode / abs"s; break;
208  case 6 /* kIHAFtKo */ : return "HA-mode / knock-out"s; break;
209  case 7 /* kIHAFtCmp */ : return "HA-mode / compound"s; break;
210  case 8 /* kIHAFtPiProd */ : return "HA-mode / pi-production"s ; break;
211  case 9 /* kIHAFtInclPip */ : return "HA-mode / pi-prod incl pi+"s; break;
212  case 10 /* kIHAFtInclPim */ : return "HA-mode / pi-prod incl pi-"s; break;
213  case 11 /* kIHAFtInclPi0 */ : return "HA-mode / pi-prod incl pi0"s; break;
214  case 12 /* kIHAFtDCEx */ : return "HA-mode / dcex"s; break;
215  default:
216  return "unknown ("s + std::to_string(code) + ")"s;
217  } // switch(code)
218 
219 #endif // ?_INTRANUKE_FATES_H_
220 
221 } // sim::GENIE_INukeFateHA_RescatteringName()
CodeOutputInterface * code
static string AsString(INukeFateHN_t fate)
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
static QCString * s
Definition: config.cpp:1042
unsigned int sim::GetRandomNumberSeed ( )
inline

Definition at line 32 of file sim.h.

32  {
33 
34  // the maximum allowed seed for the art::RandomNumberGenerator
35  // is 900000000. Use TRandom3 to get the seed value in that range.
36  // Instantiating TRandom3 with a 0 means that its seed is set based
37  // on the TUUID and should always be random, even for jobs running on the
38  // same machine
39  TRandom3 rand(0);
40  return rand.Integer(900000000);
41 }
const LArVoxelList sim::operator* ( const double &  value,
const LArVoxelList list 
)

Just in case: define the result of "scalar * LArVoxelList" to be the same as "LArVoxelList * scalar".

Definition at line 45 of file LArVoxelList.cxx.

46  {
47  return LArVoxelList(list) *= value;
48  }
const LArVoxelData sim::operator* ( const double &  value,
const LArVoxelData data 
)

Just in case: define the result of "scalar * LArVoxelData" to be the same as "LArVoxelData * scalar".

Definition at line 71 of file LArVoxelData.cxx.

72  {
73  return LArVoxelData(data) *= value;
74  }
bool sim::operator< ( const BeamGateInfo lhs,
const BeamGateInfo rhs 
)

Definition at line 45 of file BeamGateInfo.h.

46  {
47  // Sort by start; in the enormously-unlikely case that two beam
48  // gates (BNB and NuMI?) start at the same time, sort by width.
49  if ( lhs.Start() < rhs.Start() )
50  return true;
51  if ( lhs.Start() == rhs.Start() )
52  return ( lhs.Width() < lhs.Width() );
53  return false;
54  }
bool sim::operator< ( OnePhoton const &  a,
OnePhoton const &  b 
)
inline

a is smaller than b if has earlier Time, or lower MotherTrackID.

Definition at line 235 of file SimPhotons.h.

235  {
236  if (a.Time < b.Time) return true;
237  if (a.Time > b.Time) return false;
238 
239  return (a.MotherTrackID < b.MotherTrackID);
240 } // sim::operator< (OnePhoton const&, OnePhoton const&)
const double a
static bool * b
Definition: config.cpp:1043
std::ostream& sim::operator<< ( std::ostream &  output,
const LArVoxelData data 
)

Definition at line 77 of file LArVoxelData.cxx.

78  {
79  output << "Voxel: " << data.VoxelID() << std::endl;
80 
81  double unassigned = data.UnassignedEnergy();
82  // Display the total energy then the breakdown of
83  // the sum.
84  output << data.Energy() << " = <ID,E>=";
85  for ( LArVoxelData::const_iterator i = data.begin(); i != data.end(); ++i){
86  if ( i != data.begin() )
87  output << ",";
88 
89  output << "<" << (*i).first << "," << (*i).second << ">";
90  }
91  if( unassigned > 0 )
92  output << ",<*," << unassigned << ">";
93 
94  return output;
95  }
intermediate_table::const_iterator const_iterator
QTextStream & endl(QTextStream &s)
std::ostream& sim::operator<< ( std::ostream &  output,
const LArVoxelList list 
)

Definition at line 91 of file LArVoxelList.cxx.

92  {
93  // Determine a field width for the voxel number.
94  LArVoxelList::size_type numberOfVoxels = list.size();
95  int numberOfDigits = (int) std::log10( (double) numberOfVoxels ) + 1;
96 
97  // A simple header.
98  output.width( numberOfDigits );
99  output << "#" << ": < ID, energy >" << std::endl;
100 
101  // Write each voxel on a separate line.
102  LArVoxelList::size_type nVoxel = 0;
103  for ( LArVoxelList::const_iterator voxel = list.begin(); voxel != list.end(); ++voxel, ++nVoxel ){
104  output.width( numberOfDigits );
105  output << nVoxel << ": "
106  << "< " << (*voxel).first
107  << ", " << (*voxel).second
108  << " >\n";
109  }
110 
111  return output;
112  }
intermediate_table::const_iterator const_iterator
QTextStream & endl(QTextStream &s)
std::ostream& sim::operator<< ( std::ostream &  output,
const LArVoxelID id 
)

Put the contents on the output stream. We have a choice: write the bin number, or write the position represented by the bins. For now, let's pick writing the positions.

Definition at line 121 of file LArVoxelID.cxx.

122  {
123  output << "(" << id.X()
124  << "," << id.Y()
125  << "," << id.Z()
126  << "," << id.T()
127  << ")";
128 
129  return output;
130  }
std::ostream & sim::operator<< ( std::ostream &  out,
sim::PhotonVoxelDef const &  voxelDef 
)

Prints the content of the specified voxel definition into a stream.

Definition at line 233 of file PhotonVoxels.cxx.

234  {
235 
236  auto const& lower = voxelDef.GetRegionLowerCorner();
237  auto const& upper = voxelDef.GetRegionUpperCorner();
238  auto const& steps = voxelDef.GetSteps();
239  auto const& stepSize = voxelDef.GetVoxelSize();
240 
241  out << "Volume " << voxelDef.GetVolumeSize() << " cm^3 split in " << voxelDef.GetNVoxels()
242  << " voxels:"
243  << "\n - x axis: [ " << lower.X() << " ; " << upper.X() << " ] split in " << steps[0]
244  << "x " << stepSize.X() << " cm steps"
245  << "\n - y axis: [ " << lower.Y() << " ; " << upper.Y() << " ] split in " << steps[1]
246  << "x " << stepSize.Y() << " cm steps"
247  << "\n - z axis: [ " << lower.Z() << " ; " << upper.Z() << " ] split in " << steps[2]
248  << "x " << stepSize.Z() << " cm steps"
249  << "\n";
250 
251  return out;
252  } // operator<< (sim::PhotonVoxelDef)
std::string sim::ParticleName ( int  pigid)

Returns a string with the name of particle the specified with PDG ID.

Definition at line 147 of file MCDumperUtils.cxx.

147  {
148  TParticlePDG const* PDGinfo = TDatabasePDG::Instance()->GetParticle(pigid);
149  return PDGinfo? PDGinfo->GetTitle(): ("PDG ID " + std::to_string(pigid));
150 } // sim::ParticleName()
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
std::string sim::ParticleStatusName ( int  code)

Describes the status of a particle (simb::MCParticle::StatusCode()).

Definition at line 126 of file MCDumperUtils.cxx.

126  {
127 
128  switch(code) {
129  case -1: return "undefined";
130  case 0: return "initial state";
131  case 1: return "stable final state";
132  case 2: return "intermediate";
133  case 3: return "decayed";
134  case 11: return "nucleon target";
135  case 12: return "pre-fragmentation hadronic state";
136  case 13: return "pre-decay resonant state";
137  case 14: return "hadron in nucleus";
138  case 15: return "final state nuclear remnant";
139  case 16: return "nucleon cluster target";
140  default: return "unknown";
141  } // switch
142 
143 } // sim::ParticleStatusName
CodeOutputInterface * code
std::string sim::RescatteringName ( int  code,
RescatterCategory  cat = RescatterCategory::LArSoftDefault 
)

The name of the specified rescattering code.

Parameters
codethe rescattering code
typethe category of rescattering code belongs to
Returns
a string describing the rescattering code

The meaning of the rescattering code is generator-dependent, and also within a generator it may be algorithm-dependent. The category pins down which set of possible meaning the code belongs to. In LArSoft, if the code is unassigned by the generator, it will default to simb::MCParticle::s_uninitialized.

Definition at line 163 of file MCDumperUtils.cxx.

164 {
165  using namespace std::string_literals;
166 
167  if (code == simb::MCParticle::s_uninitialized) return "(unset)"s;
168 
169  switch (cat) {
170  case RescatterCategory::GENIE_INukeFateHA:
172  default:
173  return "unknown category "s + std::to_string(static_cast<int>(cat))
174  + " (code: "s + std::to_string(code) + ")"s;
175  } // switch(code)
176 
177 } // sim::RescatteringName()
static const int s_uninitialized
Definition: MCParticle.h:28
CodeOutputInterface * code
std::string GENIE_INukeFateHA_RescatteringName(int code)
Description of a rescattering code from GENIE INukeFateHA_t.
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
static QCString * s
Definition: config.cpp:1042
std::string sim::TruthCCNCname ( int  ccnc)

Returns a string representing the specified process from simb::MCTruth (CC or NC, nothing fancy).

Definition at line 32 of file MCDumperUtils.cxx.

32  {
33  switch (ccnc) {
34  case simb::kCC: return "charged weak current";
35  case simb::kNC: return "neutral weak current";
36  default: return "unsupported (" + std::to_string(ccnc) + ")";
37  } // switch
38 } // sim::TruthCCNCname()
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
std::string sim::TruthInteractionTypeName ( int  type)

Returns a string representing the specified interaction type as in simb::MCTruth convention.

Definition at line 56 of file MCDumperUtils.cxx.

56  {
57  switch (type) {
58  case simb::kUnknownInteraction : return "unknown interaction";
59  case simb::kQE : return "quasi-elastic scattering";
60  case simb::kRes : return "resonant scattering";
61  case simb::kDIS : return "deep inelastic scattering";
62  case simb::kCoh : return "coherent scattering";
63  case simb::kCohElastic : return "coherent elastic scattering";
64  case simb::kElectronScattering : return "electron scattering";
65  case simb::kIMDAnnihilation : return "inverse muon decay annihilation";
66  case simb::kInverseBetaDecay : return "inverse beta decay";
67  case simb::kGlashowResonance : return "Glashow resonance";
68  case simb::kAMNuGamma : return "anomalous neutrino-photon interaction";
69  case simb::kMEC : return "meson exchange current";
70  case simb::kDiffractive : return "diffractive";
71  case simb::kEM : return "electromagnetic";
72  case simb::kWeakMix : return "weak mixing";
73  case simb::kNuanceOffset : return "<nuance offset>";
74  case simb::kCCQE : return "charged current quasi-elastic scattering";
75  case simb::kNCQE : return "neutral current quasi-elastic scattering";
76  case simb::kResCCNuProtonPiPlus : return "resonant charged current neutrino proton pi+";
77  case simb::kResCCNuNeutronPi0 : return "resonant charged current neutrino neutron pi0";
78  case simb::kResCCNuNeutronPiPlus : return "resonant charged current neutrino neutron pi+";
79  case simb::kResNCNuProtonPi0 : return "resonant neutral current neutrino proton pi0";
80  case simb::kResNCNuProtonPiPlus : return "resonant neutral current neutrino proton pi+";
81  case simb::kResNCNuNeutronPi0 : return "resonant neutral current neutrino neutron pi0";
82  case simb::kResNCNuNeutronPiMinus : return "resonant neutral current neutrino neutron pi-";
83  case simb::kResCCNuBarNeutronPiMinus : return "resonant charged current antineutrino neutron pi-";
84  case simb::kResCCNuBarProtonPi0 : return "resonant charged current antineutrino proton pi0";
85  case simb::kResCCNuBarProtonPiMinus : return "resonant charged current antineutrino proton pi-";
86  case simb::kResNCNuBarProtonPi0 : return "resonant neutral current antineutrino proton pi0";
87  case simb::kResNCNuBarProtonPiPlus : return "resonant neutral current antineutrino proton pi+";
88  case simb::kResNCNuBarNeutronPi0 : return "resonant neutral current antineutrino neutron pi0";
89  case simb::kResNCNuBarNeutronPiMinus : return "resonant neutral current antineutrino neutron pi-";
90  case simb::kResCCNuDeltaPlusPiPlus : return "resonant charged current neutrino Delta+ pi+";
91  case simb::kResCCNuDelta2PlusPiMinus : return "resonant charged current neutrino Delta++ pi-";
92  case simb::kResCCNuBarDelta0PiMinus : return "resonant charged current antineutrino Delta0 pi-";
93  case simb::kResCCNuBarDeltaMinusPiPlus : return "resonant charged current antineutrino Delta- pi+";
94  case simb::kResCCNuProtonRhoPlus : return "resonant charged current neutrino proton rho+";
95  case simb::kResCCNuNeutronRhoPlus : return "resonant charged current neutrino neutron rho+";
96  case simb::kResCCNuBarNeutronRhoMinus : return "resonant charged current antineutrino neutron rho-";
97  case simb::kResCCNuBarNeutronRho0 : return "resonant charged current antineutrino neutron rho0";
98  case simb::kResCCNuSigmaPlusKaonPlus : return "resonant charged current neutrino Sigma+ kaon+";
99  case simb::kResCCNuSigmaPlusKaon0 : return "resonant charged current neutrino Sigma+ kaon0";
100  case simb::kResCCNuBarSigmaMinusKaon0 : return "resonant charged current antineutrino Sigma- kaon0";
101  case simb::kResCCNuBarSigma0Kaon0 : return "resonant charged current antineutrino Sigma0 kaon0";
102  case simb::kResCCNuProtonEta : return "resonant charged current neutrino proton eta";
103  case simb::kResCCNuBarNeutronEta : return "resonant charged current antineutrino neutron eta";
104  case simb::kResCCNuKaonPlusLambda0 : return "resonant charged current neutrino Kaon+ Lambda0";
105  case simb::kResCCNuBarKaon0Lambda0 : return "resonant charged current antineutrino kaon0 Lambda0";
106  case simb::kResCCNuProtonPiPlusPiMinus : return "resonant charged current neutrino proton pi+ pi-";
107  case simb::kResCCNuProtonPi0Pi0 : return "resonant charged current neutrino proton pi0 pi0";
108  case simb::kResCCNuBarNeutronPiPlusPiMinus: return "resonant charged current antineutrino neutron pi+ pi-";
109  case simb::kResCCNuBarNeutronPi0Pi0 : return "resonant charged current antineutrino neutron pi0 pi0";
110  case simb::kResCCNuBarProtonPi0Pi0 : return "resonant charged current antineutrino proton pi0 pi0";
111  case simb::kCCDIS : return "charged current deep inelastic scattering";
112  case simb::kNCDIS : return "neutral current deep inelastic scattering";
113  case simb::kUnUsed1 : return "unused (1)";
114  case simb::kUnUsed2 : return "unused (2)";
115  case simb::kCCQEHyperon : return "charged current quasi-elastic scattering with hyperon";
116  case simb::kNCCOH : return "neutral current coherent scattering";
117  case simb::kCCCOH : return "charged current coherent scattering";
118  case simb::kNuElectronElastic : return "electron neutrino elastic";
119  case simb::kInverseMuDecay : return "inverse muon decay";
120  default : return "unsupported (" + std::to_string(type) + ")";
121  } // switch
122 } // sim::TruthInteractionTypeName()
neutral current quasi-elastic
Definition: MCNeutrino.h:97
resonant charged current, nubar p -> nubar n pi+
Definition: MCNeutrino.h:109
resonant neutral current, nu p -> nu p pi0
Definition: MCNeutrino.h:101
charged current deep inelastic scatter
Definition: MCNeutrino.h:134
resonant charged current, nubar p -> l+ p pi-
Definition: MCNeutrino.h:107
neutrino electron elastic scatter
Definition: MCNeutrino.h:140
resonant charged current, nubar p -> l+ n pi0
Definition: MCNeutrino.h:106
offset to account for adding in Nuance codes to this enum
Definition: MCNeutrino.h:95
charged current quasi-elastic
Definition: MCNeutrino.h:96
resonant charged current, nubar p -> nubar p pi0
Definition: MCNeutrino.h:108
resonant charged current, nu n -> l- p pi0
Definition: MCNeutrino.h:99
resonant neutral current, nu n -> nu n pi0
Definition: MCNeutrino.h:103
resonant charged current, nu n -> l- n pi+
Definition: MCNeutrino.h:100
resonant charged current, nubar n -> nubar p pi-
Definition: MCNeutrino.h:111
charged current deep inelastic scatter
Definition: MCNeutrino.h:133
resonant charged current, nu p -> l- p pi+
Definition: MCNeutrino.h:98
n.b.: this group is similar but not quite, entirely unlike GENIE ScatteringType convention ...
Definition: MCNeutrino.h:80
charged current coherent pion
Definition: MCNeutrino.h:139
resonant neutral current, nu n -> nu p pi-
Definition: MCNeutrino.h:104
inverse muon decay
Definition: MCNeutrino.h:141
resonant charged current, nubar n -> l+ n pi-
Definition: MCNeutrino.h:105
resonant charged current, nubar n -> nubar n pi0
Definition: MCNeutrino.h:110
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
resonant neutral current, nu p -> nu p pi+
Definition: MCNeutrino.h:102
std::string sim::TruthOriginName ( simb::Origin_t  origin)

Returns a string representing the specified process origin.

Definition at line 19 of file MCDumperUtils.cxx.

19  {
20  switch (origin) {
21  case simb::kUnknown : return "unknown origin";
22  case simb::kBeamNeutrino : return "neutrinos from beam";
23  case simb::kCosmicRay : return "cosmic rays";
24  case simb::kSuperNovaNeutrino: return "supernova neutrinos";
25  case simb::kSingleParticle : return "single particle";
26  default: return "unsupported (" + std::to_string((int)origin) + ")";
27  } // switch
28 } // sim::TruthOriginName()
single particles thrown at the detector
Definition: MCTruth.h:26
Supernova neutrinos.
Definition: MCTruth.h:25
std::string to_string(ModuleType const mt)
Definition: ModuleType.h:34
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:227
Cosmic rays.
Definition: MCTruth.h:24
Beam neutrinos.
Definition: MCTruth.h:23
std::string sim::TruthReactionMode ( int  mode)

Returns the "mode" of the reaction (a lesser version of interaction type).

Definition at line 42 of file MCDumperUtils.cxx.

42  {
43 
44  switch (mode) {
45  case 0: return "quasi-elastic";
46  case 1: return "resonant";
47  case 2: return "deep inelastic";
48  case 3: return "coherent";
49  default: return "unknown mode";
50  } // switch
51 
52 } // sim::TruthReactionMode()

Variable Documentation

const double sim::kINVALID_DOUBLE = std::numeric_limits <double>::max()

Definition at line 10 of file MCLimits.h.

const float sim::kINVALID_FLOAT = std::numeric_limits <float>::max()

Definition at line 12 of file MCLimits.h.

const int sim::kINVALID_INT = std::numeric_limits <int>::max()

Definition at line 16 of file MCLimits.h.

const unsigned int sim::kINVALID_UINT = std::numeric_limits <unsigned int>::max()

Definition at line 14 of file MCLimits.h.

const int sim::NoParticleId = std::numeric_limits<int>::min()
static

Definition at line 28 of file sim.h.