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

Event Generation using GENIE, cosmics or single particles. More...

Namespaces

 ldm
 

Classes

class  HepMCFileGen
 
class  larg4SingleGen
 module to produce single or multiple specified particles in the detector More...
 
class  CORSIKAGen
 LArSoft interface to CORSIKA event generator. More...
 
class  CosmicsGen
 A module to check the results from the Monte Carlo generator. More...
 
class  FileMuons
 module to produce single or multiple specified particles in the detector More...
 
class  GENIEGen
 A module to check the results from the Monte Carlo generator. More...
 
class  NeutronOsc
 
class  NucleonDecay
 
class  LightSource
 A module for optical MC testing and library building. More...
 
class  ActiveVolumeVertexSampler
 
class  MarleyGen
 
class  MARLEYHelper
 
class  MarleyParameterSetWalker
 
class  MarleyTimeGen
 
class  GaisserParam
 module to produce single or multiple specified particles in the detector More...
 
class  MUSUN
 module to produce single or multiple specified particles in the detector More...
 
class  NDKGen
 A module to check the results from the Monte Carlo generator. More...
 
class  NueAr40CCGenerator
 
class  NuWroGen
 A module to check the results from the Monte Carlo generator. More...
 
class  RadioGen
 Module to generate particles created by radiological decay, patterned off of SingleGen. More...
 
class  SingleGen
 module to produce single or multiple specified particles in the detector More...
 
class  SNNueAr40CCGen
 
class  TextFileGen
 

Functions

 fShowerAreaExtension (p.get< double >("ShowerAreaExtension", 0.))
 
 fRandomXZShift (p.get< double >("RandomXZShift", 0.))
 
 fGenEngine (art::ServiceHandle< rndm::NuRandomService >{}->createEngine(*this,"HepJamesRandom","gen", p,{"Seed","SeedGenerator"}))
 
if(fSampleTime==0.) throw cet
if(fProjectToHeight==0.) mf
this 
openDBs (p.get< std::string >("module_label"))
 
this populateNShowers ()
 
this populateTOffset ()
 
 produces< std::vector< simb::MCTruth > > ()
 
 produces< sumdata::RunData, art::InRun > ()
 
 fEngine (art::ServiceHandle< rndm::NuRandomService >() ->createEngine(*this, pset,"Seed"))
 
 fEngine (art::ServiceHandle< rndm::NuRandomService >{}->createEngine(*this, pset,"Seed"))
 
 if (!fEventFile.good())
 

Variables

 fShowerInputs =fShowerInputFiles.size()
 
 fNMaxF {pset.get<double>("NMaxFactor", 100.0)}
 
createEngine this
 
createEngine fMode {pset.get< int >("ParticleSelectionMode")}
 
createEngine fPadOutVectors {pset.get< bool >("PadOutVectors")}
 
createEngine fPDG {pset.get< std::vector<int> >("PDG")}
 
createEngine fCharge {pset.get< int >("Charge")}
 
createEngine fInputDir {pset.get< std::string >("InputDir")}
 
createEngine fEmin {pset.get< double >("Emin")}
 
createEngine fEmax {pset.get< double >("Emax")}
 
createEngine fEmid {pset.get< double >("Emid")}
 
createEngine fEBinsLow {pset.get< int >("EBinsLow")}
 
createEngine fEBinsHigh {pset.get< int >("EBinsHigh")}
 
createEngine fThetamin {pset.get< double >("Thetamin")}
 
createEngine fThetamax {pset.get< double >("Thetamax")}
 
createEngine fThetaBins {pset.get< int >("ThetaBins")}
 
createEngine fXHalfRange {pset.get< double >("XHalfRange")}
 
createEngine fYInput {pset.get< double >("YInput")}
 
createEngine fZHalfRange {pset.get< double >("ZHalfRange")}
 
createEngine fT0 {pset.get< double >("T0")}
 
createEngine fSigmaT {pset.get< double >("SigmaT")}
 
createEngine fTDist {pset.get< int >("TDist")}
 
createEngine fSetParam {pset.get< bool >("SetParam")}
 
createEngine fSetRead {pset.get< bool >("SetRead")}
 
createEngine fSetWrite {pset.get< bool >("SetWrite")}
 
createEngine fSetReWrite {pset.get< bool >("SetReWrite")}
 
createEngine fChargeRatio {pset.get<double>("ChargeRatio")}
 
createEngine fInputFile1 {pset.get<std::string>("InputFile1")}
 
createEngine fInputFile2 {pset.get<std::string>("InputFile2")}
 
createEngine fInputFile3 {pset.get<std::string>("InputFile3")}
 
createEngine fCavernAngle {pset.get<double>("CavernAngle")}
 
createEngine fRockDensity {pset.get<double>("RockDensity")}
 
createEngine fPhimin {pset.get<double>("Phimin")}
 
createEngine fPhimax {pset.get<double>("Phimax")}
 
createEngine figflag {pset.get<int>("igflag")}
 
createEngine fXmin {pset.get<double>("Xmin")}
 
createEngine fYmin {pset.get<double>("Ymin")}
 
createEngine fZmin {pset.get<double>("Zmin")}
 
createEngine fXmax {pset.get<double>("Xmax")}
 
createEngine fYmax {pset.get<double>("Ymax")}
 
createEngine fZmax {pset.get<double>("Zmax")}
 
 fY0 {pset.get< std::vector<double> >("Y0", {})}
 
 fZ0 {pset.get< std::vector<double> >("Z0", {})}
 
 fX1 {pset.get< std::vector<double> >("X1", {})}
 
 fY1 {pset.get< std::vector<double> >("Y1", {})}
 
 fZ1 {pset.get< std::vector<double> >("Z1", {})}
 
 fIsFirstSignalSpecial {pset.get< bool >("IsFirstSignalSpecial", false)}
 

Detailed Description

Event Generation using GENIE, cosmics or single particles.

Function Documentation

evgen::fEngine ( art::ServiceHandle< rndm::NuRandomService >() ->createEngine *,,""  Seed)
evgen::fEngine ( art::ServiceHandle< rndm::NuRandomService >{}->createEngine *,,""  Seed)

Definition at line 294 of file RadioGen_module.cc.

294  {}->createEngine(*this, pset, "Seed"))
295  {
296  produces< std::vector<simb::MCTruth> >();
298 
299 
300  auto const nuclide = pset.get< std::vector<std::string>>("Nuclide");
301  auto const material = pset.get< std::vector<std::string>>("Material");
302  auto const Bq = pset.get< std::vector<double> >("BqPercc");
303  auto t0 = pset.get< std::vector<double> >("T0", {});
304  auto t1 = pset.get< std::vector<double> >("T1", {});
305 
306  if (fT0.empty() || fT1.empty()) { // better be both empty...
307  if (!fT0.empty() || !fT1.empty()) {
308  throw art::Exception(art::errors::Configuration)
309  << "RadioGen T0 and T1 need to be both non-empty, or both empty"
310  " (now T0 has " << fT0.size() << " entries and T1 has " << fT0.size()
311  << ")\n";
312  }
313  auto const [ defaultT0, defaultT1 ] = defaulttimewindow();
314  t0.push_back(defaultT0);
315  t1.push_back(defaultT1);
316  }
317 
318  //
319  // First, the materials are assigned to the coordinates explicitly
320  // configured; then, each of the remaining materials is assigned to one
321  // of the named volumes.
322  // TODO: reaction to mismatches is "not so great".
323  //
324  mf::LogInfo("RadioGen") << "Configuring activity:";
325  for (std::size_t iCoord: util::counter(fX0.size())) {
326 
327  fNuclide.push_back(nuclide.at(iCoord));
328  fMaterial.push_back(material.at(iCoord));
329  fBq.push_back(Bq.at(iCoord));
330  // replicate the last timing if none is specified
331  fT0.push_back(t0[std::min(iCoord, t0.size() - 1U)]);
332  fT1.push_back(t1[std::min(iCoord, t1.size() - 1U)]);
333 
334  dumpNuclideSettings(mf::LogVerbatim("RadioGen"), iCoord);
335 
336  } // for
337 
338  std::size_t iNext = fX0.size();
339  auto const volumes = pset.get<std::vector<std::string>>("Volumes", {});
340  for (auto&& [ iVolume, volName ]: util::enumerate(volumes)) {
341  // this expands the coordinate vectors
342  auto const nVolumes = addvolume(volName);
343  if (nVolumes == 0) {
344  throw art::Exception(art::errors::Configuration)
345  << "No volume named '" << volName << "' was found!\n";
346  }
347 
348  std::size_t const iVolFirst = fNuclide.size();
349  for (auto iVolInstance: util::counter(nVolumes)) {
350  fNuclide.push_back(nuclide.at(iNext));
351  fMaterial.push_back(material.at(iNext));
352  fBq.push_back(Bq.at(iNext));
353  // replicate the last timing if none is specified
354  fT0.push_back(t0[std::min(iNext, t0.size() - 1U)]);
355  fT1.push_back(t1[std::min(iNext, t1.size() - 1U)]);
356 
357  dumpNuclideSettings
358  (mf::LogVerbatim("RadioGen"), iVolFirst + iVolInstance, volName);
359 
360  }
361  ++iNext;
362  } // for
363 
364  // check for consistency of vector sizes
365  unsigned int nsize = fNuclide.size();
366  if (nsize == 0) {
367  throw art::Exception(art::errors::Configuration)
368  << "No nuclide configured!\n";
369  }
370 
371  if ( fMaterial.size() != nsize ) throw cet::exception("RadioGen") << "Different size Material vector and Nuclide vector\n";
372  if ( fBq.size() != nsize ) throw cet::exception("RadioGen") << "Different size Bq vector and Nuclide vector\n";
373  if ( fT0.size() != nsize ) throw cet::exception("RadioGen") << "Different size T0 vector and Nuclide vector\n";
374  if ( fT1.size() != nsize ) throw cet::exception("RadioGen") << "Different size T1 vector and Nuclide vector\n";
375  if ( fX0.size() != nsize ) throw cet::exception("RadioGen") << "Different size X0 vector and Nuclide vector\n";
376  if ( fY0.size() != nsize ) throw cet::exception("RadioGen") << "Different size Y0 vector and Nuclide vector\n";
377  if ( fZ0.size() != nsize ) throw cet::exception("RadioGen") << "Different size Z0 vector and Nuclide vector\n";
378  if ( fX1.size() != nsize ) throw cet::exception("RadioGen") << "Different size X1 vector and Nuclide vector\n";
379  if ( fY1.size() != nsize ) throw cet::exception("RadioGen") << "Different size Y1 vector and Nuclide vector\n";
380  if ( fZ1.size() != nsize ) throw cet::exception("RadioGen") << "Different size Z1 vector and Nuclide vector\n";
381 
382  for(std::string & nuclideName : fNuclide){
383  if(nuclideName=="39Ar" ){readfile("39Ar","Argon_39.root") ;}
384  else if(nuclideName=="60Co" ){readfile("60Co","Cobalt_60.root") ;}
385  else if(nuclideName=="85Kr" ){readfile("85Kr","Krypton_85.root") ;}
386  else if(nuclideName=="40K" ){readfile("40K","Potassium_40.root") ;}
387  else if(nuclideName=="232Th"){readfile("232Th","Thorium_232.root");}
388  else if(nuclideName=="238U" ){readfile("238U","Uranium_238.root") ;}
389  else if(nuclideName=="222Rn"){continue;} //Rn222 is handled separately later
390  else if(nuclideName=="59Ni"){continue;} //Rn222 is handled separately later
391  else if(nuclideName=="42Ar" ){
392  readfile("42Ar_1", "Argon_42_1.root"); //Each possible beta decay mode of Ar42 is given it's own .root file for now.
393  readfile("42Ar_2", "Argon_42_2.root"); //This allows us to know which decay chain to follow for the dexcitation gammas.
394  readfile("42Ar_3", "Argon_42_3.root"); //The dexcitation gammas are not included in the root files as we want to
395  readfile("42Ar_4", "Argon_42_4.root"); //probabilistically simulate the correct coincident gammas, which we cannot guarantee
396  readfile("42Ar_5", "Argon_42_5.root"); //by sampling a histogram.
397  continue;
398  } //Ar42 is handeled separately later
399  else{
400  std::string searchName = nuclideName;
401  searchName+=".root";
402  readfile(nuclideName,searchName);
403  }
404  }
405  }
createEngine fT0
produces< sumdata::RunData, art::InRun >()
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
Definition: enumerate.h:69
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285
evgen::fGenEngine ( art::ServiceHandle< rndm::NuRandomService >{}->createEngine *,"","",,{"",""}  SeedGenerator)
evgen::fRandomXZShift ( p.get< double >  "RandomXZShift", 0.)
evgen::fShowerAreaExtension ( p.get< double >  "ShowerAreaExtension", 0.)
evgen::if ( !fEventFile.  good())

Definition at line 121 of file NDKGen_module.cc.

121  {
122  throw cet::exception("NDKGen")
123  << "Could not open file: " << fNdkFile << '\n';
124  }
if (fSampleTime==0.) throw cet if (fProjectToHeight==0.) mf this evgen::openDBs ( p.get< std::string >  "module_label")
this evgen::populateNShowers ( )
this evgen::populateTOffset ( )
evgen::produces< std::vector< simb::MCTruth > > ( )
evgen::produces< sumdata::RunData, art::InRun > ( )

Variable Documentation

createEngine evgen::fCavernAngle {pset.get<double>("CavernAngle")}

Definition at line 334 of file MUSUN_module.cc.

createEngine evgen::fCharge {pset.get< int >("Charge")}

Definition at line 171 of file GaisserParam_module.cc.

createEngine evgen::fChargeRatio {pset.get<double>("ChargeRatio")}

Definition at line 329 of file MUSUN_module.cc.

createEngine evgen::fEBinsHigh {pset.get< int >("EBinsHigh")}

Definition at line 177 of file GaisserParam_module.cc.

createEngine evgen::fEBinsLow {pset.get< int >("EBinsLow")}

Definition at line 176 of file GaisserParam_module.cc.

createEngine evgen::fEmax {pset.get< double >("Emax")}

Definition at line 174 of file GaisserParam_module.cc.

createEngine evgen::fEmid {pset.get< double >("Emid")}

Definition at line 175 of file GaisserParam_module.cc.

createEngine evgen::fEmin {pset.get< double >("Emin")}

Definition at line 173 of file GaisserParam_module.cc.

createEngine evgen::figflag {pset.get<int>("igflag")}

Definition at line 342 of file MUSUN_module.cc.

createEngine evgen::fInputDir {pset.get< std::string >("InputDir")}

Definition at line 172 of file GaisserParam_module.cc.

createEngine evgen::fInputFile1 {pset.get<std::string>("InputFile1")}

Definition at line 331 of file MUSUN_module.cc.

createEngine evgen::fInputFile2 {pset.get<std::string>("InputFile2")}

Definition at line 332 of file MUSUN_module.cc.

createEngine evgen::fInputFile3 {pset.get<std::string>("InputFile3")}

Definition at line 333 of file MUSUN_module.cc.

evgen::fIsFirstSignalSpecial {pset.get< bool >("IsFirstSignalSpecial", false)}

Definition at line 291 of file RadioGen_module.cc.

createEngine evgen::fMode {pset.get< int >("ParticleSelectionMode")}

Definition at line 168 of file GaisserParam_module.cc.

evgen::fNMaxF {pset.get<double>("NMaxFactor", 100.0)}

Definition at line 278 of file LightSource_module.cc.

createEngine evgen::fPadOutVectors {pset.get< bool >("PadOutVectors")}

Definition at line 169 of file GaisserParam_module.cc.

createEngine evgen::fPDG {pset.get< std::vector<int> >("PDG")}

Definition at line 170 of file GaisserParam_module.cc.

createEngine evgen::fPhimax {pset.get<double>("Phimax")}

Definition at line 341 of file MUSUN_module.cc.

createEngine evgen::fPhimin {pset.get<double>("Phimin")}

Definition at line 340 of file MUSUN_module.cc.

createEngine evgen::fRockDensity {pset.get<double>("RockDensity")}

Definition at line 335 of file MUSUN_module.cc.

createEngine evgen::fSetParam {pset.get< bool >("SetParam")}

Definition at line 187 of file GaisserParam_module.cc.

createEngine evgen::fSetRead {pset.get< bool >("SetRead")}

Definition at line 188 of file GaisserParam_module.cc.

createEngine evgen::fSetReWrite {pset.get< bool >("SetReWrite")}

Definition at line 190 of file GaisserParam_module.cc.

createEngine evgen::fSetWrite {pset.get< bool >("SetWrite")}

Definition at line 189 of file GaisserParam_module.cc.

evgen::fShowerInputs =fShowerInputFiles.size()

Definition at line 307 of file CORSIKAGen_module.cc.

createEngine evgen::fSigmaT {pset.get< double >("SigmaT")}

Definition at line 185 of file GaisserParam_module.cc.

createEngine evgen::fT0 {pset.get< double >("T0")}

Definition at line 184 of file GaisserParam_module.cc.

createEngine evgen::fTDist {pset.get< int >("TDist")}

Definition at line 186 of file GaisserParam_module.cc.

createEngine evgen::fThetaBins {pset.get< int >("ThetaBins")}

Definition at line 180 of file GaisserParam_module.cc.

createEngine evgen::fThetamax {pset.get< double >("Thetamax")}

Definition at line 179 of file GaisserParam_module.cc.

createEngine evgen::fThetamin {pset.get< double >("Thetamin")}

Definition at line 178 of file GaisserParam_module.cc.

evgen::fX1 {pset.get< std::vector<double> >("X1", {})}

Definition at line 288 of file RadioGen_module.cc.

createEngine evgen::fXHalfRange {pset.get< double >("XHalfRange")}

Definition at line 181 of file GaisserParam_module.cc.

createEngine evgen::fXmax {pset.get<double>("Xmax")}

Definition at line 346 of file MUSUN_module.cc.

createEngine evgen::fXmin {pset.get<double>("Xmin")}

Definition at line 343 of file MUSUN_module.cc.

evgen::fY0 {pset.get< std::vector<double> >("Y0", {})}

Definition at line 286 of file RadioGen_module.cc.

evgen::fY1 {pset.get< std::vector<double> >("Y1", {})}

Definition at line 289 of file RadioGen_module.cc.

createEngine evgen::fYInput {pset.get< double >("YInput")}

Definition at line 182 of file GaisserParam_module.cc.

createEngine evgen::fYmax {pset.get<double>("Ymax")}

Definition at line 347 of file MUSUN_module.cc.

createEngine evgen::fYmin {pset.get<double>("Ymin")}

Definition at line 344 of file MUSUN_module.cc.

evgen::fZ0 {pset.get< std::vector<double> >("Z0", {})}

Definition at line 287 of file RadioGen_module.cc.

evgen::fZ1 {pset.get< std::vector<double> >("Z1", {})}

Definition at line 290 of file RadioGen_module.cc.

createEngine evgen::fZHalfRange {pset.get< double >("ZHalfRange")}

Definition at line 183 of file GaisserParam_module.cc.

createEngine evgen::fZmax {pset.get<double>("Zmax")}

Definition at line 348 of file MUSUN_module.cc.

createEngine evgen::fZmin {pset.get<double>("Zmin")}

Definition at line 345 of file MUSUN_module.cc.

createEngine evgen::this
Initial value:
{
fStopwatch.Start()

Definition at line 167 of file GaisserParam_module.cc.