|
using | Parameters = art::EDAnalyzer::Table< Config > |
|
Definition at line 90 of file DumpMCShowers_module.cc.
sim::DumpMCShowers::DumpMCShowers |
( |
Parameters const & |
config | ) |
|
|
explicit |
Configuration-checking constructor.
Definition at line 142 of file DumpMCShowers_module.cc.
art::InputTag fInputShowers
name of MCShower's data product
std::string fOutputCategory
name of the stream for output
unsigned int fDaughtersPerLine
number of daughter IDs printed per line
void sim::DumpMCShowers::analyze |
( |
art::Event const & |
event | ) |
|
|
overridevirtual |
Definition at line 228 of file DumpMCShowers_module.cc.
232 = *(
event.getValidHandle<std::vector<sim::MCShower>>(
fInputShowers));
235 <<
"Event " <<
event.id() <<
": data product '"
237 << Showers.size() <<
" MCShower objects";
239 unsigned int iShower = 0;
244 log <<
"\n[#" << (iShower++) <<
"] ";
art::InputTag fInputShowers
name of MCShower's data product
std::string fOutputCategory
name of the stream for output
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.
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 151 of file DumpMCShowers_module.cc.
155 if (bIndentFirst) out << indent;
157 <<
"from GEANT track ID=" <<
shower.TrackID()
158 <<
" PDG ID=" <<
shower.PdgCode()
159 <<
" from " << OriginDescription(
shower.Origin())
160 <<
" via '" <<
shower.Process() <<
"'";
161 out <<
"\n" << indent
163 ::PrintMCStep(out,
shower.Start());
164 out <<
"\n" << indent
166 ::PrintMCStep(out,
shower.End());
168 TVector3
const& startDir =
shower.StartDir();
169 out <<
"\n" << indent
170 <<
"pointing toward ("
171 << startDir.X() <<
", " << startDir.Y() <<
", " << startDir.Z() <<
") cm";
172 std::vector<double>
const& charges =
shower.Charge();
173 std::vector<double>
const& dQdx =
shower.dQdx();
174 size_t const nQPlanes = dQdx.size(), nChPlanes = charges.size();
175 size_t const nPlanes = std::max(nQPlanes, nChPlanes);
176 out <<
"\n" << indent;
179 <<
"dE/dx=" <<
shower.dEdx() <<
" MeV/cm and dQ/dx (charge) on "
180 << nPlanes <<
" planes:";
181 for (
size_t iPlane = 0; iPlane < nPlanes; ++iPlane) {
182 out <<
" [#" << iPlane <<
"] ";
183 if (iPlane < dQdx.size()) out << dQdx[iPlane];
185 if (iPlane < charges.size()) out <<
" (" << charges[iPlane] <<
")";
189 else out <<
"no energy or charge information available";
191 std::vector<unsigned int>
const& daughters =
shower.DaughterTrackID();
192 out <<
"\n" << indent
193 <<
"combined energy deposition information: ";
194 ::PrintMCStep(out,
shower.DetProfile());
195 out <<
"\n" << indent
196 << daughters.size() <<
" daughters, ID:";
197 for (
size_t i = 0; i < daughters.size(); ++i) {
199 out <<
" " << std::setw(8) << daughters[i];
202 out <<
"\n" << indent
203 <<
"mother ID=" <<
shower.MotherTrackID()
204 <<
" PDG ID=" <<
shower.MotherPdgCode()
205 <<
" via '" <<
shower.MotherProcess() <<
"'";
206 out <<
"\n" << indent
208 ::PrintMCStep(out,
shower.MotherStart());
209 out <<
"\n" << indent
211 ::PrintMCStep(out,
shower.MotherEnd());
213 out <<
"\n" << indent
214 <<
"ancestor ID=" <<
shower.AncestorTrackID()
215 <<
" PDG ID=" <<
shower.AncestorPdgCode()
216 <<
" via '" <<
shower.AncestorProcess() <<
"'";
217 out <<
"\n" << indent
219 ::PrintMCStep(out,
shower.AncestorStart());
220 out <<
"\n" << indent
222 ::PrintMCStep(out,
shower.AncestorEnd());
unsigned int fDaughtersPerLine
number of daughter IDs printed per line
unsigned int sim::DumpMCShowers::fDaughtersPerLine |
|
private |
art::InputTag sim::DumpMCShowers::fInputShowers |
|
private |
std::string sim::DumpMCShowers::fOutputCategory |
|
private |
The documentation for this class was generated from the following file: