LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
A module for optical MC testing and library building. More...
Public Types | |
using | ModuleType = EDProducer |
using | WorkerType = WorkerT< EDProducer > |
template<typename UserConfig , typename KeysToIgnore = void> | |
using | Table = ProducerBase::Table< UserConfig, KeysToIgnore > |
Public Member Functions | |
LightSource (fhicl::ParameterSet const &pset) | |
void | produce (art::Event &evt) |
void | beginRun (art::Run &run) |
template<typename PROD , BranchType B = InEvent> | |
ProductID | getProductID (std::string const &instanceName={}) const |
template<typename PROD , BranchType B> | |
ProductID | getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const |
bool | modifiesEvent () const |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ProductToken< T > | consumes (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ViewToken< T > | consumesView (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ProductToken< T > | mayConsume (InputTag const &it) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , art::BranchType BT> | |
art::ViewToken< T > | mayConsumeView (InputTag const &it) |
base_engine_t & | createEngine (seed_t seed) |
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
Static Public Member Functions | |
static cet::exempt_ptr< Consumer > | non_module_context () |
Protected Member Functions | |
CurrentProcessingContext const * | currentContext () const |
void | validateConsumedProduct (BranchType const bt, ProductInfo const &pi) |
void | prepareForJob (fhicl::ParameterSet const &pset) |
void | showMissingConsumes () const |
Private Member Functions | |
void | Sample (simb::MCTruth &truth) |
Private Attributes | |
std::string | fVersion |
std::ifstream | fInputFile |
std::string | fFileName |
char | fDummyString [256] |
TTree * | fPhotonsGenerated |
TLorentzVector | fShotPos |
TLorentzVector | fShotMom |
Int_t | fEvID |
int | fSourceMode |
bool | fFillTree |
int | fPosDist |
int | fTDist |
int | fPDist |
int | fXSteps |
int | fYSteps |
int | fZSteps |
sim::PhotonVoxelDef | fThePhotonVoxelDef |
int | fVoxelCount |
int | fCurrentVoxel |
TVector3 | fTPCCenter |
TVector3 | fTPCDimensions |
std::vector< double > | fRegionMin |
std::vector< double > | fRegionMax |
bool | fUseCustomRegion |
double | fX |
double | fY |
double | fZ |
double | fT |
double | fSigmaX |
double | fSigmaY |
double | fSigmaZ |
double | fSigmaT |
double | fP |
double | fSigmaP |
int | fN |
int | fFirstVoxel |
int | fLastVoxel |
Static Private Attributes | |
static const int | kUNIF = 0 |
static const int | kGAUS = 1 |
static const int | kFILE = 0 |
static const int | kSCAN = 1 |
A module for optical MC testing and library building.
Light source event generator which simulate an extended isotropic photon source.
The light source can be run in two modes, file mode or scan mode. Each requires the specification of a different set of parameters.
Light source position, intensity and shape are supplied on an event by event basis in a text file. See the example provided for the format. Pararmeters required:
int32 SourceMode = 0 - sets light source to file mode string FileName - file of per event light source specifications int32 PosDist - how to distribute production points sampled in momentum, position int32 PDist and time ranges specified. For all of these : int32 TDist 0 = uniform and 1 = gauss bool FillTree - whether to write a tree of photon production points to fileservice
Upon reaching the end of the file, the light source will loop back to the first point. hence a one line text file will give a constant light source size, position and intensity.
Divide volume into cuboidal regions and produce an isotropic light source in each, using one region per event. User can specify either to use the full detector volume or some custom specified volume.
This mode is used when building a fast photon sim library, and performing volume scan sensitivity studies.
int32 SourceMode = 1 - sets light source to scan mode int32 N - number of photons to shoot from each point double P - peak photon momentum (or energy) in eV double SigmaP - momentum distribution width double XSteps - Number of regions to divide volume into in each direction double YSteps double ZSteps double T0 - Peak time of photon production double SigmaT - time distribution width int32 PosDist - how to distribute production points sampled in momentum, position int32 PDist and time ranges specified. For all of these : int32 TDist 0 = uniform and 1 = gaussian bool FillTree - whether to write a tree of photon production points to fileservice bool UseCustomRegion - supply our own volme specification or use the full detector volume? vdouble[3] RegionMin - bounding corners of the custom volume specification vdouble[3] RegionMax (only used if UseCustomRegion=true)
Definition at line 106 of file LightSource_module.cc.
|
inherited |
Definition at line 34 of file EDProducer.h.
|
inherited |
Definition at line 43 of file EDProducer.h.
|
inherited |
Definition at line 35 of file EDProducer.h.
|
explicit |
Definition at line 187 of file LightSource_module.cc.
References art::EngineCreator::createEngine(), fCurrentVoxel, fDummyString, fEvID, fFileName, fFillTree, fFirstVoxel, fInputFile, fLastVoxel, fN, fP, fPDist, fPhotonsGenerated, fPosDist, fRegionMax, fRegionMin, fShotMom, fShotPos, fSigmaP, fSigmaT, fSigmaX, fSigmaY, fSigmaZ, fSourceMode, fT, fTDist, fThePhotonVoxelDef, fUseCustomRegion, fVoxelCount, fXSteps, fYSteps, fZSteps, fhicl::ParameterSet::get(), sim::PhotonVoxelDef::GetNVoxels(), phot::PhotonVisibilityService::GetVoxelDef(), sim::PhotonVoxelDef::GetVoxelSize(), kFILE, kSCAN, and art::TFileDirectory::make().
|
virtual |
Reimplemented from art::EDProducer.
Definition at line 310 of file LightSource_module.cc.
References geo::GeometryCore::DetectorName(), fCurrentVoxel, fFirstVoxel, and art::Run::put().
|
inherited |
|
inherited |
Definition at line 147 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inherited |
Definition at line 162 of file Consumer.h.
|
inherited |
|
inherited |
Definition at line 172 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inherited |
Definition at line 26 of file EngineCreator.cc.
References art::EngineCreator::rng().
Referenced by evgen::CosmicsGen::CosmicsGen(), rndm::NuRandomService::createEngine(), cluster::fuzzyCluster::fuzzyCluster(), cluster::HoughLineFinder::HoughLineFinder(), art::MixFilter< T >::initEngine_(), larg4::LArG4::LArG4(), LightSource(), evgen::NeutronOsc::NeutronOsc(), evgen::NucleonDecay::NucleonDecay(), opdet::OpMCDigi::OpMCDigi(), opdet::OptDetDigitizer::OptDetDigitizer(), phot::PhotonLibraryPropagation::PhotonLibraryPropagation(), detsim::SimDriftElectrons::SimDriftElectrons(), evgen::SingleGen::SingleGen(), evgen::SNNueAr40CCGen::SNNueAr40CCGen(), ToyOneShowerGen::ToyOneShowerGen(), and trkf::Track3DKalman::Track3DKalman().
|
inherited |
Definition at line 32 of file EngineCreator.cc.
References art::EngineCreator::rng().
|
inherited |
Definition at line 40 of file EngineCreator.cc.
References art::EngineCreator::rng().
|
protectedinherited |
|
inherited |
Definition at line 49 of file EngineCreator.cc.
References fhicl::ParameterSet::get().
Referenced by art::MixFilter< T >::initEngine_().
|
inlineinherited |
|
inherited |
Definition at line 56 of file ProducerBase.h.
References B, and art::ModuleDescription::moduleLabel().
Referenced by art::ProducerBase::modifiesEvent().
|
inherited |
|
inherited |
Definition at line 190 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inherited |
Definition at line 205 of file Consumer.h.
|
inherited |
|
inherited |
Definition at line 215 of file Consumer.h.
References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().
|
inlineinherited |
Definition at line 40 of file ProducerBase.h.
References art::ProducerBase::getProductID().
|
staticinherited |
Definition at line 76 of file Consumer.cc.
Referenced by art::RootOutput::beginSubRun(), art::OutputModule::doBeginRun(), art::OutputModule::doBeginSubRun(), art::OutputModule::doEndRun(), art::OutputModule::doEndSubRun(), art::ProducingService::doPostReadEvent(), art::ProducingService::doPostReadRun(), art::ProducingService::doPostReadSubRun(), art::OutputModule::doWriteEvent(), art::ProcessPackage< L >::postScheduleSignal(), art::BeginEndPackage< Level::Run >::Begin::postScheduleSignal(), art::BeginEndPackage< Level::Run >::End::postScheduleSignal(), art::BeginEndPackage< Level::SubRun >::Begin::postScheduleSignal(), art::BeginEndPackage< Level::SubRun >::End::postScheduleSignal(), art::ProcessPackage< L >::preScheduleSignal(), art::BeginEndPackage< Level::Run >::Begin::preScheduleSignal(), art::BeginEndPackage< Level::SubRun >::Begin::preScheduleSignal(), art::EventProcessor::readEvent(), art::EventProcessor::readRun(), art::EmptyEvent::readRun_(), art::EventProcessor::readSubRun(), and art::EmptyEvent::readSubRun_().
|
protectedinherited |
Definition at line 89 of file Consumer.cc.
References fhicl::ParameterSet::get_if_present().
Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().
|
virtual |
Implements art::EDProducer.
Definition at line 325 of file LightSource_module.cc.
References e, fCurrentVoxel, fDummyString, fFileName, fFirstVoxel, fInputFile, fLastVoxel, fN, fP, fSigmaP, fSigmaT, fSigmaX, fSigmaY, fSigmaZ, fSourceMode, fT, fThePhotonVoxelDef, fX, fY, fZ, sim::PhotonVoxel::GetCenter(), sim::PhotonVoxelDef::GetPhotonVoxel(), phot::PhotonVisibilityService::IsBuildJob(), kFILE, kSCAN, simb::kSingleParticle, art::Event::put(), Sample(), art::errors::ServiceNotFound, simb::MCTruth::SetOrigin(), and phot::PhotonVisibilityService::StoreLightProd().
|
private |
Definition at line 441 of file LightSource_module.cc.
References simb::MCTruth::Add(), simb::MCParticle::AddTrajectoryPoint(), DEFINE_ART_MODULE, fFillTree, fN, fP, fPDist, fPhotonsGenerated, fPosDist, fShotMom, fShotPos, fSigmaP, fSigmaT, fSigmaX, fSigmaY, fSigmaZ, fT, fTDist, fX, fY, fZ, art::RandomNumberGenerator::getEngine(), kGAUS, part, art::EngineCreator::rng(), and x.
Referenced by produce().
|
protectedinherited |
Definition at line 125 of file Consumer.cc.
Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().
|
protectedinherited |
Definition at line 101 of file Consumer.cc.
References art::errors::ProductRegistrationFailure.
|
private |
Definition at line 153 of file LightSource_module.cc.
Referenced by beginRun(), LightSource(), and produce().
|
private |
Definition at line 130 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 136 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 129 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 140 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 179 of file LightSource_module.cc.
Referenced by beginRun(), LightSource(), and produce().
|
private |
Definition at line 128 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 180 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 177 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 173 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 143 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 133 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 141 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 160 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 159 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 135 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 134 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 174 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 172 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 169 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 170 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 171 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 139 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 168 of file LightSource_module.cc.
Referenced by LightSource(), produce(), and Sample().
|
private |
Definition at line 142 of file LightSource_module.cc.
Referenced by LightSource(), and Sample().
|
private |
Definition at line 150 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
private |
Definition at line 157 of file LightSource_module.cc.
|
private |
Definition at line 158 of file LightSource_module.cc.
|
private |
Definition at line 161 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 119 of file LightSource_module.cc.
|
private |
Definition at line 152 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 165 of file LightSource_module.cc.
|
private |
Definition at line 146 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 166 of file LightSource_module.cc.
|
private |
Definition at line 147 of file LightSource_module.cc.
Referenced by LightSource().
|
private |
Definition at line 167 of file LightSource_module.cc.
|
private |
Definition at line 148 of file LightSource_module.cc.
Referenced by LightSource().
|
staticprivate |
Definition at line 124 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
staticprivate |
Definition at line 123 of file LightSource_module.cc.
Referenced by Sample().
|
staticprivate |
Definition at line 125 of file LightSource_module.cc.
Referenced by LightSource(), and produce().
|
staticprivate |
Definition at line 122 of file LightSource_module.cc.