LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
module to produce single or multiple specified particles in the detector More...
Public Types | |
using | ModuleType = EDProducer |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
GaisserParam (fhicl::ParameterSet const &pset) | |
void | doBeginJob (SharedResources const &resources) |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
void | fillProductDescriptions () |
void | registerProducts (ProductDescriptions &productsToRegister) |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
std::unique_ptr< Worker > | makeWorker (WorkerParams const &wp) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
Protected Member Functions | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
Private Types | |
typedef std::map< double, TH1 * > | dhist_Map |
typedef std::map< double, TH1 * >::iterator | dhist_Map_it |
Private Member Functions | |
void | produce (art::Event &evt) override |
void | beginJob () override |
void | beginRun (art::Run &run) override |
void | SampleOne (unsigned int i, simb::MCTruth &mct, CLHEP::HepRandomEngine &engine) |
void | Sample (simb::MCTruth &mct, CLHEP::HepRandomEngine &engine) |
std::pair< double, double > | GetThetaAndEnergy (double rand1, double rand2) |
void | MakePDF () |
void | ResetMap () |
double | GaisserMuonFlux_Integrand (Double_t *x, Double_t *par) |
double | GaisserFlux (double e, double theta) |
std::vector< double > | GetBinning (const TAxis *axis, bool finalEdge=true) |
Private Attributes | |
TFile * | m_File |
dhist_Map * | m_PDFmap |
TH1 * | m_thetaHist |
CLHEP::HepRandomEngine & | fEngine |
art-managed random-number engine More... | |
int | fMode |
bool | fPadOutVectors |
std::vector< int > | fPDG |
PDG code of particles to generate. More... | |
int | fCharge |
Charge. More... | |
std::string | fInputDir |
Input Directory. More... | |
double | fEmin |
Minimum Kinetic Energy (GeV) More... | |
double | fEmax |
Maximum Kinetic Energy (GeV) More... | |
double | fEmid |
Energy to go from low to high (GeV) More... | |
int | fEBinsLow |
Number of low energy Bins. More... | |
int | fEBinsHigh |
Number of high energy Bins. More... | |
double | fThetamin |
Minimum theta. More... | |
double | fThetamax |
Maximum theta. More... | |
int | fThetaBins |
Number of theta Bins. More... | |
double | fXHalfRange |
Max X position. More... | |
double | fYInput |
Max Y position. More... | |
double | fZHalfRange |
Max Z position. More... | |
double | fT0 |
Central t position (ns) in world coordinates. More... | |
double | fSigmaT |
Variation in t position (ns) More... | |
int | fTDist |
How to distribute t (gaus, or uniform) More... | |
bool | fSetParam |
Which version of Gaissers Param. More... | |
bool | fSetRead |
Whether to Read. More... | |
bool | fSetWrite |
Whether to Write. More... | |
bool | fSetReWrite |
Whether to ReWrite pdfs. More... | |
double | fEpsilon |
Minimum integration sum.... More... | |
double | fCryoBoundaries [6] |
double | xNeg = 0 |
double | xPos = 0 |
double | zNeg = 0 |
double | zPos = 0 |
double | fCenterX = 0 |
double | fCenterZ = 0 |
TTree * | fTree |
double | Time |
double | Momentum |
double | KinEnergy |
double | Gamma |
double | Energy |
double | Theta |
double | Phi |
double | pnorm |
double | XPosition |
double | YPosition |
double | ZPosition |
double | DirCosineX |
double | DirCosineY |
double | DirCosineZ |
Static Private Attributes | |
static constexpr int | kGAUS = 1 |
module to produce single or multiple specified particles in the detector
Definition at line 61 of file GaisserParam_module.cc.
|
private |
Definition at line 73 of file GaisserParam_module.cc.
|
private |
Definition at line 74 of file GaisserParam_module.cc.
|
inherited |
Definition at line 17 of file EDProducer.h.
|
inherited |
Definition at line 26 of file Producer.h.
|
explicit |
Definition at line 147 of file GaisserParam_module.cc.
References art::detail::EngineCreator::createEngine(), fCharge, fEBinsHigh, fEBinsLow, fEmax, fEmid, fEmin, fEngine, fEpsilon, fInputDir, fMode, fPadOutVectors, fPDG, fSetParam, fSetRead, fSetReWrite, fSetWrite, fSigmaT, fT0, fTDist, fThetaBins, fThetamax, fThetamin, fXHalfRange, fYInput, and fZHalfRange.
|
overrideprivatevirtual |
Reimplemented from art::EDProducer.
Definition at line 184 of file GaisserParam_module.cc.
References DirCosineX, DirCosineY, DirCosineZ, Energy, fCenterX, fCenterZ, fCryoBoundaries, fTree, geo::GeometryCore::Iterate(), KinEnergy, Momentum, Phi, Theta, Time, xNeg, xPos, XPosition, YPosition, zNeg, zPos, and ZPosition.
|
overrideprivatevirtual |
Reimplemented from art::EDProducer.
Definition at line 216 of file GaisserParam_module.cc.
References geo::GeometryCore::DetectorName(), fThetamax, fThetamin, art::fullRun(), MakePDF(), and art::Run::put().
|
protectedinherited |
Definition at line 61 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().
|
protectedinherited |
|
protectedinherited |
Definition at line 75 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().
|
protectedinherited |
|
inherited |
Definition at line 68 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().
|
inherited |
Definition at line 22 of file Producer.cc.
References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().
|
inherited |
Definition at line 65 of file Producer.cc.
References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 85 of file Producer.cc.
References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().
|
inherited |
Definition at line 30 of file Producer.cc.
References art::detail::Producer::endJobWithFrame().
|
inherited |
Definition at line 75 of file Producer.cc.
References art::detail::Producer::endRunWithFrame(), art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 95 of file Producer.cc.
References art::detail::Producer::endSubRunWithFrame(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().
|
inherited |
Definition at line 105 of file Producer.cc.
References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().
|
inherited |
Definition at line 44 of file Producer.cc.
References art::detail::Producer::respondToCloseInputFileWithFrame().
|
inherited |
Definition at line 58 of file Producer.cc.
References art::detail::Producer::respondToCloseOutputFilesWithFrame().
|
inherited |
Definition at line 37 of file Producer.cc.
References art::detail::Producer::respondToOpenInputFileWithFrame().
|
inherited |
Definition at line 51 of file Producer.cc.
References art::detail::Producer::respondToOpenOutputFilesWithFrame().
|
inherited |
Definition at line 10 of file Modifier.cc.
References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().
|
private |
Definition at line 652 of file GaisserParam_module.cc.
Referenced by GaisserMuonFlux_Integrand().
|
private |
Definition at line 686 of file GaisserParam_module.cc.
References GaisserFlux().
Referenced by MakePDF().
|
private |
|
inherited |
Definition at line 43 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().
|
private |
Definition at line 384 of file GaisserParam_module.cc.
References energy, m_PDFmap, and m_thetaHist.
Referenced by SampleOne().
|
private |
Definition at line 428 of file GaisserParam_module.cc.
References fEBinsHigh, fEBinsLow, fEmax, fEmid, fEmin, fEpsilon, fInputDir, fSetRead, fSetReWrite, fSetWrite, fThetaBins, fThetamax, fThetamin, GaisserMuonFlux_Integrand(), GetBinning(), m_File, m_PDFmap, m_thetaHist, and ResetMap().
Referenced by beginRun().
|
inherited |
Definition at line 37 of file ModuleBase.cc.
References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.
|
protectedinherited |
Definition at line 82 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().
|
protectedinherited |
Definition at line 96 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().
|
protectedinherited |
|
inherited |
Definition at line 89 of file ModuleBase.h.
References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().
|
inherited |
Definition at line 13 of file ModuleBase.cc.
References art::errors::LogicError.
Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().
|
overrideprivatevirtual |
unique_ptr allows ownership to be transferred to the art::Event after the put statement
Implements art::EDProducer.
Definition at line 241 of file GaisserParam_module.cc.
References fEngine, simb::kSingleParticle, MF_LOG_DEBUG, art::Event::put(), Sample(), and simb::MCTruth::SetOrigin().
|
inherited |
Definition at line 16 of file Modifier.cc.
References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().
|
private |
Definition at line 709 of file GaisserParam_module.cc.
References DEFINE_ART_MODULE, m_PDFmap, and m_thetaHist.
Referenced by MakePDF().
|
private |
Definition at line 357 of file GaisserParam_module.cc.
References fMode, fPDG, and SampleOne().
Referenced by produce().
|
private |
Definition at line 261 of file GaisserParam_module.cc.
References simb::MCTruth::Add(), simb::MCParticle::AddTrajectoryPoint(), DirCosineX, DirCosineY, DirCosineZ, Energy, fCenterX, fCenterZ, fCharge, fPDG, fSigmaT, fT0, fTDist, fTree, fXHalfRange, fYInput, fZHalfRange, Gamma, GetThetaAndEnergy(), kGAUS, KinEnergy, m_PDFmap, Momentum, part, Phi, pnorm, Theta, Time, x, XPosition, YPosition, and ZPosition.
Referenced by Sample().
|
inherited |
|
inherited |
Definition at line 49 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 134 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 135 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Charge.
Definition at line 101 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Definition at line 129 of file GaisserParam_module.cc.
Referenced by beginJob().
|
private |
Number of high energy Bins.
Definition at line 108 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Number of low energy Bins.
Definition at line 107 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Maximum Kinetic Energy (GeV)
Definition at line 105 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Energy to go from low to high (GeV)
Definition at line 106 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Minimum Kinetic Energy (GeV)
Definition at line 104 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
art-managed random-number engine
Definition at line 89 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and produce().
|
private |
Minimum integration sum....
Definition at line 126 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Input Directory.
Definition at line 102 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Particle Selection Mode 0–generate a list of all particles, 1–generate a single particle selected randomly from the list
Definition at line 93 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and Sample().
|
private |
Select to pad out configuration vectors if they are not of of the same length as PDG false: don't pad out - all values need to specified true: pad out - default values assumed and printed out
Definition at line 96 of file GaisserParam_module.cc.
Referenced by GaisserParam().
|
private |
PDG code of particles to generate.
Definition at line 100 of file GaisserParam_module.cc.
Referenced by GaisserParam(), Sample(), and SampleOne().
|
private |
Which version of Gaissers Param.
Definition at line 122 of file GaisserParam_module.cc.
Referenced by GaisserFlux(), and GaisserParam().
|
private |
Whether to Read.
Definition at line 123 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Whether to ReWrite pdfs.
Definition at line 125 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Whether to Write.
Definition at line 124 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Variation in t position (ns)
Definition at line 119 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Central t position (ns) in world coordinates.
Definition at line 118 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
How to distribute t (gaus, or uniform)
Definition at line 120 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Number of theta Bins.
Definition at line 112 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and MakePDF().
|
private |
Maximum theta.
Definition at line 111 of file GaisserParam_module.cc.
Referenced by beginRun(), GaisserParam(), and MakePDF().
|
private |
Minimum theta.
Definition at line 110 of file GaisserParam_module.cc.
Referenced by beginRun(), GaisserParam(), and MakePDF().
|
private |
Definition at line 138 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Max X position.
Definition at line 114 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Max Y position.
Definition at line 115 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Max Z position.
Definition at line 116 of file GaisserParam_module.cc.
Referenced by GaisserParam(), and SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by SampleOne().
|
staticprivate |
Definition at line 91 of file GaisserParam_module.cc.
Referenced by SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 75 of file GaisserParam_module.cc.
Referenced by MakePDF().
|
private |
Definition at line 76 of file GaisserParam_module.cc.
Referenced by GetThetaAndEnergy(), MakePDF(), ResetMap(), and SampleOne().
|
private |
Definition at line 77 of file GaisserParam_module.cc.
Referenced by GetThetaAndEnergy(), MakePDF(), and ResetMap().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 139 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 130 of file GaisserParam_module.cc.
Referenced by beginJob().
|
private |
Definition at line 131 of file GaisserParam_module.cc.
Referenced by beginJob().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().
|
private |
Definition at line 132 of file GaisserParam_module.cc.
Referenced by beginJob().
|
private |
Definition at line 133 of file GaisserParam_module.cc.
Referenced by beginJob().
|
private |
Definition at line 140 of file GaisserParam_module.cc.
Referenced by beginJob(), and SampleOne().