35 class DumpSimEnergyDeposits;
60 Name(
"EnergyDepositTag"),
61 Comment(
"tag of data product containing the `sim::SimEnergyDeposit` to dump"),
65 Comment(
"whether to show where the deposition took place"),
70 Comment(
"whether to show start and end position of the particle step"),
75 Comment(
"whether to show the number of photons and electrons generated"),
80 Comment(
"whether to list fast- and slow-emitted photons separately"),
85 Name(
"OutputCategory"),
86 Comment(
"the messagefacility category used for the output"),
87 "DumpSimEnergyDeposits"};
108 template <
typename Stream>
136 auto const& Deps = *(
event.getValidHandle<std::vector<sim::SimEnergyDeposit>>(
fEnergyDepositTag));
143 unsigned int TotalElectrons = 0U, TotalPhotons = 0U, TotalPhotonsFast = 0U, TotalPhotonsSlow = 0U;
149 log <<
"[#" << iDep <<
"] ";
155 TotalElectrons += dep.NumElectrons();
156 TotalPhotons += dep.NumPhotons();
157 TotalPhotonsSlow += dep.NumSPhotons();
158 TotalPhotonsFast += dep.NumFPhotons();
164 << TotalE <<
" worth of energy, " << TotalElectrons <<
" electrons and " << TotalPhotons
165 <<
" photons (" << TotalPhotonsFast <<
" fast and " << TotalPhotonsSlow
166 <<
" slow); tracked particles crossed " << TotalLength <<
" of space.";
171 template <
typename Stream>
187 out <<
" (step: " << length <<
")";
DumpSimEnergyDeposits(Parameters const &config)
Constructor: reads the configuration.
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
fhicl::Atom< std::string > OutputCategory
geo::Length_t StepLength() const
Definition of util::enumerate().
Literal constants for energy quantities.
fhicl::Atom< bool > ShowEmission
fhicl::Atom< art::InputTag > EnergyDepositTag
bool bSplitPhotons
Print photons by emission speed.
EDAnalyzer(fhicl::ParameterSet const &pset)
Prints the content of all the deposited energies on screen.
auto enumerate(Iterables &&...iterables)
Range-for loop helper tracking the number of iteration.
art::InputTag fEnergyDepositTag
Tag for input data product.
geo::Point_t Start() const
#define DEFINE_ART_MODULE(klass)
Definitions of geometry vector data types.
megaelectronvolt_as<> megaelectronvolt
Type of energy stored in megaelectronvolt, in double precision.
void analyze(art::Event const &evt)
Does the printing.
std::string ParticleName(int pigid)
Returns a string with the name of particle the specified with PDG ID.
geo::Point_t MidPoint() const
bool bShowStep
Print the step ends.
gigaelectronvolt_as<> gigaelectronvolt
Type of energy stored in gigaelectronvolt, in double precision.
bool bShowEmission
Print the photons and electrons emitted.
void dumpEnergyDeposit(Stream &out, sim::SimEnergyDeposit const &dep) const
Dimensioned variables representing energy.
Utility functions to print MC truth information.
Dimensioned variables representing space or time quantities.
contains information for a single step in the detector simulation
Energy deposition in the active material.
nanosecond_as<> nanosecond
Type of time stored in nanoseconds, in double precision.
fhicl::Atom< bool > ShowLocation
centimeter_as<> centimeter
Type of space stored in centimeters, in double precision.
fhicl::Atom< bool > SplitPhotons
bool bShowLocation
Print the center of the deposition.
fhicl::Atom< bool > ShowStep
Literal constants for space quantities.
std::string fOutputCategory
Category for LogInfo output.
Event finding and building.