35 namespace sim {
class DumpSimEnergyDeposits; }
60 Name(
"EnergyDepositTag"),
62 (
"tag of data product containing the `sim::SimEnergyDeposit` to dump"),
68 Comment(
"whether to show where the deposition took place"),
74 Comment(
"whether to show start and end position of the particle step"),
80 Comment(
"whether to show the number of photons and electrons generated"),
86 Comment(
"whether to list fast- and slow-emitted photons separately"),
92 Name(
"OutputCategory"),
93 Comment(
"the messagefacility category used for the output"),
94 "DumpSimEnergyDeposits" 118 template <
typename Stream>
147 auto const& Deps = *(
152 <<
"Event " <<
event.id() <<
" contains " << Deps.size() <<
" '" 157 unsigned int TotalElectrons = 0U, TotalPhotons = 0U,
158 TotalPhotonsFast = 0U, TotalPhotonsSlow = 0U;
164 log <<
"[#" << iDep <<
"] ";
169 TotalLength +=
centimeter{ dep.StepLength() };
170 TotalElectrons += dep.NumElectrons();
171 TotalPhotons += dep.NumPhotons();
172 TotalPhotonsSlow += dep.NumSPhotons();
173 TotalPhotonsFast += dep.NumFPhotons();
178 <<
"Event " <<
event.id() <<
" energy deposits '" 180 << TotalE <<
" worth of energy, " << TotalElectrons
181 <<
" electrons and " << TotalPhotons <<
" photons (" 182 << TotalPhotonsFast <<
" fast and " << TotalPhotonsSlow
183 <<
" slow); tracked particles crossed " << TotalLength <<
" of space." 190 template <
typename Stream>
202 out <<
"TrkID=" << dep.
TrackID()
207 out <<
" (step: " << length <<
")";
211 out <<
"; photons: " << dep.
NumFPhotons() <<
" (fast), " 214 else out <<
"; photons: " << dep.
NumPhotons();
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
ChannelGroupService::Name Name
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)
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.
Code to link reconstructed objects back to the MC truth information.
bool bShowEmission
Print the photons and electrons emitted.
void dumpEnergyDeposit(Stream &out, sim::SimEnergyDeposit const &dep) const
Dimensioned variables representing energy.
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.
Utility functions to print MC truth information.
Definitions of geometry vector data types.
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.