|
| DumpMCShowers (Parameters const &config) |
| Configuration-checking constructor. More...
|
|
| DumpMCShowers (DumpMCShowers const &)=delete |
|
| DumpMCShowers (DumpMCShowers &&)=delete |
|
DumpMCShowers & | operator= (DumpMCShowers const &)=delete |
|
DumpMCShowers & | operator= (DumpMCShowers &&)=delete |
|
virtual void | analyze (art::Event const &event) override |
|
template<typename Stream > |
void | DumpMCShower (Stream &&out, sim::MCShower const &shower, std::string indent="", bool bIndentFirst=true) const |
| Dumps the content of the specified particle in the output stream. More...
|
|
std::string | workerType () const |
|
bool | modifiesEvent () const |
|
void | registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &) |
|
std::string const & | processName () const |
|
bool | wantAllEvents () const |
|
bool | wantEvent (Event const &e) |
|
fhicl::ParameterSetID | selectorConfig () const |
|
art::Handle< art::TriggerResults > | getTriggerResults (Event const &e) 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) |
|
Definition at line 92 of file DumpMCShowers_module.cc.
template<typename Stream >
void sim::DumpMCShowers::DumpMCShower |
( |
Stream && |
out, |
|
|
sim::MCShower const & |
shower, |
|
|
std::string |
indent = "" , |
|
|
bool |
bIndentFirst = true |
|
) |
| const |
Dumps the content of the specified particle in the output stream.
- Template Parameters
-
Stream | the type of output stream |
- Parameters
-
out | the output stream |
particle | the particle to be dumped |
indent | base indentation string (default: none) |
bIndentFirst | if first output line should be indented (default: yes) |
The indent string is prepended to every line of output, with the possible exception of the first one, in case bIndentFirst is true.
The output starts on the current line, and the last line is NOT broken.
Definition at line 153 of file DumpMCShowers_module.cc.
References sim::MCShower::AncestorEnd(), sim::MCShower::AncestorPdgCode(), sim::MCShower::AncestorProcess(), sim::MCShower::AncestorStart(), sim::MCShower::AncestorTrackID(), sim::MCShower::Charge(), sim::MCShower::DaughterTrackID(), sim::MCShower::dEdx(), sim::MCShower::DetProfile(), sim::MCShower::dQdx(), sim::MCShower::End(), fDaughtersPerLine, art::detail::indent(), max, sim::MCShower::MotherEnd(), sim::MCShower::MotherPdgCode(), sim::MCShower::MotherProcess(), sim::MCShower::MotherStart(), sim::MCShower::MotherTrackID(), sim::MCShower::Origin(), sim::MCShower::PdgCode(), sim::MCShower::Process(), sim::MCShower::Start(), sim::MCShower::StartDir(), and sim::MCShower::TrackID().
Referenced by analyze().
157 if (bIndentFirst) out <<
indent;
159 <<
"from GEANT track ID=" <<
shower.TrackID()
160 <<
" PDG ID=" <<
shower.PdgCode()
161 <<
" from " << OriginDescription(
shower.Origin())
162 <<
" via '" <<
shower.Process() <<
"'";
163 out <<
"\n" << indent
165 ::PrintMCStep(out,
shower.Start());
166 out <<
"\n" << indent
168 ::PrintMCStep(out,
shower.End());
170 TVector3
const& startDir =
shower.StartDir();
171 out <<
"\n" << indent
172 <<
"pointing toward (" 173 << startDir.X() <<
", " << startDir.Y() <<
", " << startDir.Z() <<
") cm";
174 std::vector<double>
const& charges =
shower.Charge();
175 std::vector<double>
const& dQdx =
shower.dQdx();
176 size_t const nQPlanes = dQdx.size(), nChPlanes = charges.size();
177 size_t const nPlanes =
std::max(nQPlanes, nChPlanes);
181 <<
"dE/dx=" <<
shower.dEdx() <<
" MeV/cm and dQ/dx (charge) on " 182 << nPlanes <<
" planes:";
183 for (
size_t iPlane = 0; iPlane < nPlanes; ++iPlane) {
184 out <<
" [#" << iPlane <<
"] ";
185 if (iPlane < dQdx.size()) out << dQdx[iPlane];
187 if (iPlane < charges.size()) out <<
" (" << charges[iPlane] <<
")";
191 else out <<
"no energy or charge information available";
193 std::vector<unsigned int>
const& daughters =
shower.DaughterTrackID();
194 out <<
"\n" << indent
195 <<
"combined energy deposition information: ";
196 ::PrintMCStep(out,
shower.DetProfile());
197 out <<
"\n" << indent
198 << daughters.size() <<
" daughters, ID:";
199 for (
size_t i = 0; i < daughters.size(); ++i) {
201 out <<
" " << std::setw(8) << daughters[i];
204 out <<
"\n" << indent
205 <<
"mother ID=" <<
shower.MotherTrackID()
206 <<
" PDG ID=" <<
shower.MotherPdgCode()
207 <<
" via '" <<
shower.MotherProcess() <<
"'";
208 out <<
"\n" << indent
210 ::PrintMCStep(out,
shower.MotherStart());
211 out <<
"\n" << indent
213 ::PrintMCStep(out,
shower.MotherEnd());
215 out <<
"\n" << indent
216 <<
"ancestor ID=" <<
shower.AncestorTrackID()
217 <<
" PDG ID=" <<
shower.AncestorPdgCode()
218 <<
" via '" <<
shower.AncestorProcess() <<
"'";
219 out <<
"\n" << indent
221 ::PrintMCStep(out,
shower.AncestorStart());
222 out <<
"\n" << indent
224 ::PrintMCStep(out,
shower.AncestorEnd());
std::string indent(std::size_t const i)
unsigned int fDaughtersPerLine
number of daughter IDs printed per line