All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
sim Namespace Reference

Monte Carlo Simulation. More...

Namespaces

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

Classes

class  DumpSimEnergyDeposits
 Prints the content of all the deposited energies on screen. More...
 
class  DumpSimPhotonsLite
 
class  MCBaseException
 
class  MCEnDep
 
class  MCHit
 
class  MCHitCollection
 
class  MCParticleLite
 
class  MCShower
 
class  MCStep
 
class  MCTrack
 
class  MCWire
 
class  MCWireCollection
 
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
 
class  GeneratedParticleInfo
 Contains information about a generated particle. More...
 
struct  TrackSDP
 Ionization photons from a Geant4 track. More...
 
struct  SDP
 
class  OpDetBacktrackerRecord
 Energy deposited on a readout Optical Detector by simulated tracks. More...
 
struct  TrackIDE
 Ionization energy from a Geant4 track. More...
 
struct  IDE
 Ionization at a point of the TPC sensitive volume. More...
 
class  SimChannel
 Energy deposited on a readout channel by simulated tracks. More...
 
class  SimDriftedElectronCluster
 
class  SimEnergyDeposit
 Energy deposition in the active material. More...
 
class  SimEnergyDepositLite
 Energy deposition in the active material (lite version). More...
 
struct  OnePhoton
 All information of a photon entering the sensitive optical detector volume. More...
 
class  SimPhotonsLite
 Compact representation of photons on a channel. More...
 
class  SimPhotons
 Collection of photons which recorded on one channel. More...
 
class  SimPhotonsCollection
 Collection of sim::SimPhotons, indexed by channel number. More...
 
class  SupernovaTruth
 
class  POTaccumulator
 Prints on console the total Protons On Target from the input subruns. More...
 
class  GenericCRTUtility
 
class  GenericCRT
 
class  DumpGTruth
 
class  DumpMCParticles
 
class  DumpMCShowers
 
class  DumpMCTracks
 
class  DumpMCTruth
 
class  DumpOpDetBacktrackerRecords
 
class  DumpSimChannels
 
class  DumpSimPhotons
 
class  MCEdepHit
 
class  UniquePosition
 
struct  MCEdep
 
class  MCRecoEdep
 
class  MCMiniPart
 
class  MCRecoPart
 
class  MCShowerRecoAlg
 
class  MCShowerRecoPart
 
class  MCTrackCollectionAnaAlg
 
class  MCTrackRecoAlg
 
class  MergeSimSourcesUtility
 
class  MergeSimSources
 
class  LArG4Parameters
 
class  LArVoxelCalculator
 
class  LArVoxelData
 
class  LArVoxelID
 
class  LArVoxelList
 
class  PhotonVoxel
 Representation of a single small volume (voxel). More...
 
class  PhotonVoxelDef
 Representation of a region of space diced into voxels. More...
 
class  SimListUtils
 

Typedefs

typedef std::vector< AuxDetHitAuxDetHitCollection
 
typedef std::vector
< AuxDetSimChannel
AuxDetSimChannelCollection
 
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
< SimEnergyDeposit
SimEnergyDepositCollection
 
typedef std::vector
< SimEnergyDepositLite
SimEnergyDepositLiteCollection
 

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

Monte Carlo Simulation.

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

Description: Class that counts up sim photons, leading towards comparisons with flashes and flash hypotheses.

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 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

typedef std::vector<AuxDetHit> sim::AuxDetHitCollection

Definition at line 183 of file AuxDetHit.h.

Definition at line 104 of file AuxDetSimChannel.h.

Definition at line 235 of file SimEnergyDeposit.h.

Definition at line 93 of file SimEnergyDepositLite.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 127 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  };
Unknown view.
Definition: geo_types.h:136
Max value of enum for iteration.
Definition: BeamTypes.h:13
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()
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
unsigned int sim::GetRandomNumberSeed ( )
inline

Definition at line 25 of file sim.h.

25  {
26 
27  // the maximum allowed seed for the art::RandomNumberGenerator
28  // is 900000000. Use TRandom3 to get the seed value in that range.
29  // Instantiating TRandom3 with a 0 means that its seed is set based
30  // on the TUUID and should always be random, even for jobs running on the
31  // same machine
32  TRandom3 rand(0);
33  return rand.Integer(900000000);
34 }
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  }
temporary value
list
Definition: file_to_url.sh:28
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  }
temporary value
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&)
process_name gaushit a
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  }
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
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  }
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
list
Definition: file_to_url.sh:28
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  }
BEGIN_PROLOG sequence::SlidingWindowTriggerPatternsOppositeWindows END_PROLOG simSlidingORM6O6 effSlidingORW output
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 larsim/larsim/Simulation/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 155 of file MCDumperUtils.cxx.

155  {
156  TParticlePDG const* PDGinfo = TDatabasePDG::Instance()->GetParticle(pigid);
157  return PDGinfo? PDGinfo->GetTitle(): ("PDG ID " + std::to_string(pigid));
158 } // sim::ParticleName()
std::string to_string(WindowPattern const &pattern)
std::string sim::ParticleStatusName ( int  code)

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

Definition at line 134 of file MCDumperUtils.cxx.

134  {
135 
136  switch(code) {
137  case -1: return "undefined";
138  case 0: return "initial state";
139  case 1: return "stable final state";
140  case 2: return "intermediate";
141  case 3: return "decayed";
142  case 11: return "nucleon target";
143  case 12: return "pre-fragmentation hadronic state";
144  case 13: return "pre-decay resonant state";
145  case 14: return "hadron in nucleus";
146  case 15: return "final state nuclear remnant";
147  case 16: return "nucleon cluster target";
148  default: return "unknown";
149  } // switch
150 
151 } // sim::ParticleStatusName
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()
std::string GENIE_INukeFateHA_RescatteringName(int code)
Description of a rescattering code from GENIE INukeFateHA_t.
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
Definition: file_to_url.sh:60
std::string sim::TruthCCNCname ( int  ccnc)

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

Definition at line 40 of file MCDumperUtils.cxx.

40  {
41  switch (ccnc) {
42  case simb::kCC: return "charged weak current";
43  case simb::kNC: return "neutral weak current";
44  default: return "unsupported (" + std::to_string(ccnc) + ")";
45  } // switch
46 } // sim::TruthCCNCname()
Charged-current interactions.
Definition: IPrediction.h:38
std::string to_string(WindowPattern const &pattern)
Neutral-current interactions.
Definition: IPrediction.h:39
std::string sim::TruthInteractionTypeName ( int  type)

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

Definition at line 64 of file MCDumperUtils.cxx.

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

Returns a string representing the specified process origin.

Definition at line 27 of file MCDumperUtils.cxx.

27  {
28  switch (origin) {
29  case simb::kUnknown : return "unknown origin";
30  case simb::kBeamNeutrino : return "neutrinos from beam";
31  case simb::kCosmicRay : return "cosmic rays";
32  case simb::kSuperNovaNeutrino: return "supernova neutrinos";
33  case simb::kSingleParticle : return "single particle";
34  default: return "unsupported (" + std::to_string((int)origin) + ")";
35  } // switch
36 } // sim::TruthOriginName()
const Cut kCosmicRay
std::string to_string(WindowPattern const &pattern)
constexpr Point origin()
Returns a origin position with a point of the specified type.
Definition: geo_vectors.h:227
std::string sim::TruthReactionMode ( int  mode)

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

Definition at line 50 of file MCDumperUtils.cxx.

50  {
51 
52  switch (mode) {
53  case 0: return "quasi-elastic";
54  case 1: return "resonant";
55  case 2: return "deep inelastic";
56  case 3: return "coherent";
57  default: return "unknown mode";
58  } // switch
59 
60 } // sim::TruthReactionMode()
const char mode
Definition: noise_ana.cxx:20

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 21 of file sim.h.