LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "BaseRadioGen.h"
Public Types | |
using | ModuleType = EDProducer |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = Modifier::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
BaseRadioGen (fhicl::ParameterSet const &pset) | |
void | produce (art::Event &evt) |
void | beginRun (art::Run &run) |
void | beginJob () |
void | endJob () |
virtual void | produce_radio (art::Event &evt)=0 |
virtual void | beginRun_radio (art::Run &) |
virtual void | beginJob_radio () |
virtual void | endJob_radio () |
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 | |
int | GetNDecays () |
bool | GetGoodPositionTime (TLorentzVector &position) |
TLorentzVector | dirCalc (double p, double m) |
void | FillHistos (simb::MCParticle &part) |
CLHEP::HepRandomEngine & | GetRandomEngine () |
int | GetNEvents () |
void | GetTs (double &T0, double &T1) |
void | GetXs (double &X0, double &X1) |
void | GetYs (double &Y0, double &Y1) |
void | GetZs (double &Z0, double &Z1) |
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 () |
Protected Attributes | |
std::vector< std::string > | m_isotope |
isotope to simulate. Example: "Ar39" More... | |
Private Member Functions | |
void | CalculateActiveVolumeFromAllNodes () |
void | CalculateActiveVolumeFromXYZ () |
void | SimplePDG (int pdg, int &simple, std::string &name) |
void | DeclareOutputHistos () |
void | FillAllNodes (const TGeoNode *curnode) |
void | GetNodeXYZMinMax (const TGeoNode *from, const TGeoNode *to, double &x_min, double &x_max, double &y_min, double &y_max, double &z_min, double &z_max) |
bool | IsDaughterNode (const TGeoNode *daughter_node, const TGeoNode *mother_node) |
bool | findNode (const TGeoNode *curnode, std::string &tgtnname, const TGeoNode *&targetnode) |
Shamelessly stolen from here: https://cdcvs.fnal.gov/redmine/attachments/6719/calc_bbox.C. More... | |
bool | findMotherNode (const TGeoNode *cur_node, std::string &daughter_name, const TGeoNode *&mother_node) |
Adapted from above. More... | |
bool | NodeSupported (TGeoNode const *node) const |
Private Attributes | |
std::set< const TGeoNode * > | m_all_nodes |
std::string | m_material |
regex of materials in which to generate the decays. Example: "LAr" More... | |
std::string | m_volume_rand |
The volume in which to generate the decays. More... | |
std::string | m_volume_gen |
The volume in which to generate the decays. More... | |
std::regex | m_regex_material |
std::regex | m_regex_volume |
double | m_Bq {signaling_NaN} |
Radioactivity in Becquerels (decay per sec) per cubic cm. More... | |
double | m_rate |
Radioactivity in Becquerels (decay per sec) use either of this of Bq. More... | |
double | m_T0 {signaling_NaN} |
Beginning of time window to simulate in ns. More... | |
double | m_T1 {signaling_NaN} |
End of time window to simulate in ns. More... | |
double | m_X0 {signaling_NaN} |
Bottom corner x position (cm) in world coordinates. More... | |
double | m_Y0 {signaling_NaN} |
Bottom corner y position (cm) in world coordinates. More... | |
double | m_Z0 {signaling_NaN} |
Bottom corner z position (cm) in world coordinates. More... | |
double | m_X1 {signaling_NaN} |
Top corner x position (cm) in world coordinates. More... | |
double | m_Y1 {signaling_NaN} |
Top corner y position (cm) in world coordinates. More... | |
double | m_Z1 {signaling_NaN} |
Top corner z position (cm) in world coordinates. More... | |
double | m_volume_cc {signaling_NaN} |
art::ServiceHandle< geo::Geometry const > | m_geo_service |
TGeoManager * | m_geo_manager |
CLHEP::HepRandomEngine & | m_engine |
CLHEP::RandFlat | m_random_flat |
CLHEP::RandPoisson | m_random_poisson |
bool | m_geo_volume_mode {false} |
bool | m_rate_mode |
bool | m_volume_rand_present |
size_t | m_max_tries_event |
size_t | m_max_tries_rate_calculation |
size_t | m_target_n_point_rate_calculation |
std::map< const TGeoNode *, double > | m_good_nodes {} |
std::vector< const TGeoVolume * > | m_good_volumes {} |
std::vector< const TGeoMaterial * > | m_good_materials {} |
TF1 * | m_distrib_xpos {nullptr} |
TF1 * | m_distrib_ypos {nullptr} |
TF1 * | m_distrib_zpos {nullptr} |
int | m_nevent {0} |
std::map< int, TH2D * > | m_pos_xy_TH2D {} |
std::map< int, TH2D * > | m_pos_xz_TH2D {} |
std::map< int, TH1D * > | m_dir_x_TH1D {} |
std::map< int, TH1D * > | m_dir_y_TH1D {} |
std::map< int, TH1D * > | m_dir_z_TH1D {} |
std::map< int, TH1D * > | m_mom_TH1D {} |
std::map< int, TH1D * > | m_ke_TH1D {} |
std::map< int, TH1D * > | m_time_TH1D {} |
TH1D * | m_pdg_TH1D {nullptr} |
Static Private Attributes | |
static constexpr double | signaling_NaN = std::numeric_limits<double>::signaling_NaN() |
Definition at line 71 of file BaseRadioGen.h.
|
inherited |
Definition at line 17 of file EDProducer.h.
|
inherited |
Definition at line 26 of file Producer.h.
|
inlineexplicit |
If we specified X, Y, Z we will throw with what the user provided This will throw an error if somebody specifies only one X0.
If we specified volume_rand we will throw with what the coordinates of the volume
Else we throw in the whole geometry but only in the nodes who have the specified volume/material
Definition at line 269 of file BaseRadioGen.h.
References art::detail::EngineCreator::createEngine(), m_engine, m_geo_manager, m_geo_service, m_material, m_max_tries_event, m_max_tries_rate_calculation, m_random_flat, m_random_poisson, m_rate_mode, m_regex_material, m_regex_volume, m_target_n_point_rate_calculation, m_volume_gen, m_volume_rand, m_volume_rand_present, and geo::GeometryCore::ROOTGeoManager().
|
inlinevirtual |
Reimplemented from art::EDProducer.
Definition at line 490 of file BaseRadioGen.h.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from art::EDProducer.
Definition at line 483 of file BaseRadioGen.h.
|
inlinevirtual |
Definition at line 80 of file BaseRadioGen.h.
|
inlineprivate |
Definition at line 402 of file BaseRadioGen.h.
Referenced by GetZs().
|
inlineprivate |
Definition at line 424 of file BaseRadioGen.h.
Referenced by GetZs().
|
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().
|
inlineprivate |
Definition at line 724 of file BaseRadioGen.h.
Referenced by GetZs().
|
inlineprotected |
Definition at line 810 of file BaseRadioGen.h.
Referenced by endJob_radio(), and evgen::SpectrumVolumeGen::produce_radio().
|
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().
|
inlinevirtual |
Reimplemented from art::EDProducer.
Definition at line 502 of file BaseRadioGen.h.
|
inlinevirtual |
Reimplemented in evgen::Decay0Gen.
Definition at line 82 of file BaseRadioGen.h.
References dirCalc(), FillHistos(), GetGoodPositionTime(), GetNDecays(), and part.
|
inlineprivate |
Definition at line 658 of file BaseRadioGen.h.
|
inlineprotected |
Definition at line 788 of file BaseRadioGen.h.
Referenced by endJob_radio(), evgen::SpectrumVolumeGen::produce_radio(), and evgen::Decay0Gen::produce_radio().
|
inherited |
Definition at line 10 of file Modifier.cc.
References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().
|
inlineprivate |
Adapted from above.
Definition at line 697 of file BaseRadioGen.h.
Referenced by GetNodeXYZMinMax().
|
inlineprivate |
Shamelessly stolen from here: https://cdcvs.fnal.gov/redmine/attachments/6719/calc_bbox.C.
Definition at line 673 of file BaseRadioGen.h.
|
inherited |
Definition at line 43 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().
|
inlineprotected |
Deal with the time first
We use all the XYZ that have been set earlier, until we find the correct volume and material
We use the list of nodes
Definition at line 521 of file BaseRadioGen.h.
Referenced by endJob_radio(), evgen::SpectrumVolumeGen::produce_radio(), and evgen::Decay0Gen::produce_radio().
|
inlineprotected |
Definition at line 629 of file BaseRadioGen.h.
Referenced by endJob_radio(), evgen::SpectrumVolumeGen::produce_radio(), and evgen::Decay0Gen::produce_radio().
|
inlineprotected |
Definition at line 93 of file BaseRadioGen.h.
References m_nevent.
Referenced by evgen::Decay0Gen::endJob_radio().
|
inlineprivate |
Definition at line 199 of file BaseRadioGen.h.
References findMotherNode(), and geo::origin().
|
inlineprotected |
Definition at line 92 of file BaseRadioGen.h.
References m_engine.
Referenced by evgen::Decay0Gen::Decay0Gen().
|
inlineprotected |
Definition at line 94 of file BaseRadioGen.h.
Referenced by evgen::Decay0Gen::beginJob_radio().
|
inlineprotected |
Definition at line 99 of file BaseRadioGen.h.
|
inlineprotected |
Definition at line 104 of file BaseRadioGen.h.
|
inlineprotected |
Definition at line 109 of file BaseRadioGen.h.
References CalculateActiveVolumeFromAllNodes(), CalculateActiveVolumeFromXYZ(), DeclareOutputHistos(), m_Z0, m_Z1, and SimplePDG().
|
inlineprivate |
Definition at line 639 of file BaseRadioGen.h.
|
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().
|
inlineprivate |
Definition at line 192 of file BaseRadioGen.h.
References m_good_materials, and m_good_volumes.
|
inlinevirtual |
Implements art::EDProducer.
Definition at line 477 of file BaseRadioGen.h.
|
pure virtual |
Implemented in evgen::Decay0Gen, and evgen::SpectrumVolumeGen.
|
inherited |
Definition at line 16 of file Modifier.cc.
References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().
|
inherited |
|
inlineprivate |
|
inherited |
Definition at line 49 of file ModuleBase.cc.
References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().
|
private |
Definition at line 120 of file BaseRadioGen.h.
|
private |
Radioactivity in Becquerels (decay per sec) per cubic cm.
Definition at line 144 of file BaseRadioGen.h.
|
private |
Definition at line 183 of file BaseRadioGen.h.
|
private |
Definition at line 184 of file BaseRadioGen.h.
|
private |
Definition at line 185 of file BaseRadioGen.h.
|
private |
Definition at line 176 of file BaseRadioGen.h.
|
private |
Definition at line 177 of file BaseRadioGen.h.
|
private |
Definition at line 178 of file BaseRadioGen.h.
|
private |
Definition at line 160 of file BaseRadioGen.h.
Referenced by BaseRadioGen(), and GetRandomEngine().
|
private |
Definition at line 158 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 157 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 164 of file BaseRadioGen.h.
|
private |
Definition at line 174 of file BaseRadioGen.h.
Referenced by NodeSupported().
|
private |
Definition at line 172 of file BaseRadioGen.h.
|
private |
Definition at line 173 of file BaseRadioGen.h.
Referenced by NodeSupported().
|
protected |
isotope to simulate. Example: "Ar39"
Definition at line 90 of file BaseRadioGen.h.
Referenced by evgen::Decay0Gen::Decay0Gen(), and evgen::SpectrumVolumeGen::SpectrumVolumeGen().
|
private |
Definition at line 187 of file BaseRadioGen.h.
|
private |
regex of materials in which to generate the decays. Example: "LAr"
Definition at line 137 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 168 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 169 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 186 of file BaseRadioGen.h.
|
private |
Definition at line 180 of file BaseRadioGen.h.
Referenced by GetNEvents().
|
private |
Definition at line 189 of file BaseRadioGen.h.
|
private |
Definition at line 181 of file BaseRadioGen.h.
|
private |
Definition at line 182 of file BaseRadioGen.h.
|
private |
Definition at line 161 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 162 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Radioactivity in Becquerels (decay per sec) use either of this of Bq.
Definition at line 145 of file BaseRadioGen.h.
|
private |
Definition at line 165 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 140 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 141 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Beginning of time window to simulate in ns.
Definition at line 147 of file BaseRadioGen.h.
Referenced by GetTs().
|
private |
End of time window to simulate in ns.
Definition at line 148 of file BaseRadioGen.h.
Referenced by GetTs().
|
private |
Definition at line 170 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 188 of file BaseRadioGen.h.
|
private |
Definition at line 155 of file BaseRadioGen.h.
|
private |
The volume in which to generate the decays.
Definition at line 139 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
The volume in which to generate the decays.
Definition at line 138 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Definition at line 166 of file BaseRadioGen.h.
Referenced by BaseRadioGen().
|
private |
Bottom corner x position (cm) in world coordinates.
Definition at line 149 of file BaseRadioGen.h.
Referenced by GetXs().
|
private |
Top corner x position (cm) in world coordinates.
Definition at line 152 of file BaseRadioGen.h.
Referenced by GetXs().
|
private |
Bottom corner y position (cm) in world coordinates.
Definition at line 150 of file BaseRadioGen.h.
Referenced by GetYs().
|
private |
Top corner y position (cm) in world coordinates.
Definition at line 153 of file BaseRadioGen.h.
Referenced by GetYs().
|
private |
Bottom corner z position (cm) in world coordinates.
Definition at line 151 of file BaseRadioGen.h.
Referenced by GetZs().
|
private |
Top corner z position (cm) in world coordinates.
Definition at line 154 of file BaseRadioGen.h.
Referenced by GetZs().
|
staticprivate |
Definition at line 143 of file BaseRadioGen.h.