|
using | Parameters = art::EDAnalyzer::Table< Config > |
|
Definition at line 83 of file DumpMCTracks_module.cc.
sim::DumpMCTracks::DumpMCTracks |
( |
Parameters const & |
config | ) |
|
|
explicit |
Configuration-checking constructor.
Definition at line 134 of file DumpMCTracks_module.cc.
art::InputTag fInputTracks
name of MCTrack's data product
std::string fOutputCategory
name of the stream for output
void sim::DumpMCTracks::analyze |
( |
art::Event const & |
event | ) |
|
|
overridevirtual |
Definition at line 211 of file DumpMCTracks_module.cc.
215 = *(
event.getValidHandle<std::vector<sim::MCTrack>>(
fInputTracks));
218 <<
"Event " <<
event.id() <<
": data product '"
220 <<
Tracks.size() <<
" MCTrack objects";
222 unsigned int iTrack = 0;
227 log <<
"\n[#" << (iTrack++) <<
"] ";
art::InputTag fInputTracks
name of MCTrack's data product
process_name use argoneut_mc_hitfinder track
void DumpMCTrack(Stream &&out, sim::MCTrack const &track, std::string indent="", bool bIndentFirst=true) const
Dumps the content of the specified particle in the output stream.
std::string fOutputCategory
name of the stream for output
template<typename Stream >
void sim::DumpMCTracks::DumpMCTrack |
( |
Stream && |
out, |
|
|
sim::MCTrack const & |
track, |
|
|
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 142 of file DumpMCTracks_module.cc.
146 if (bIndentFirst) out << indent;
148 <<
"from GEANT track ID=" <<
track.TrackID()
149 <<
" PDG ID=" <<
track.PdgCode()
150 <<
" from " << OriginDescription(
track.Origin())
151 <<
" via '" <<
track.Process() <<
"'";
152 out <<
"\n" << indent
154 ::PrintMCStep(out,
track.Start());
155 out <<
"\n" << indent
157 ::PrintMCStep(out,
track.End());
159 std::vector<std::vector<double>>
const& dQdx =
track.dQdx();
160 std::vector<double>
const&
dEdx =
track.dEdx();
161 size_t const nQSteps = dQdx.size(), nESteps = dEdx.size();
162 size_t const nSteps = std::max(nQSteps, nESteps);
163 out <<
"\n" << indent;
166 <<
"energy information for " << nSteps
167 <<
" steps (dE/dX in MeV/cm, then dQ/dx per plane):";
168 for (
size_t iStep = 0; iStep < nSteps; ++iStep) {
169 out <<
"\n" << indent
170 <<
" [#" << iStep <<
"] dE/dx=";
171 if (iStep < nESteps) out << dEdx[iStep];
174 if (iStep < nQSteps) {
175 std::vector<double>
const& step_dQdx = dQdx[iStep];
176 for (
size_t iPlane = 0; iPlane < step_dQdx.size(); ++iPlane) {
177 out <<
" [#" << iPlane <<
"] " << step_dQdx[iPlane];
183 else out <<
"no energy or charge information available";
185 out <<
"\n" << indent
186 <<
"mother ID=" <<
track.MotherTrackID()
187 <<
" PDG ID=" <<
track.MotherPdgCode()
188 <<
" via '" <<
track.MotherProcess() <<
"'";
189 out <<
"\n" << indent
191 ::PrintMCStep(out,
track.MotherStart());
192 out <<
"\n" << indent
194 ::PrintMCStep(out,
track.MotherEnd());
196 out <<
"\n" << indent
197 <<
"ancestor ID=" <<
track.AncestorTrackID()
198 <<
" PDG ID=" <<
track.AncestorPdgCode()
199 <<
" via '" <<
track.AncestorProcess() <<
"'";
200 out <<
"\n" << indent
202 ::PrintMCStep(out,
track.AncestorStart());
203 out <<
"\n" << indent
205 ::PrintMCStep(out,
track.AncestorEnd());
process_name use argoneut_mc_hitfinder track
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
art::InputTag sim::DumpMCTracks::fInputTracks |
|
private |
std::string sim::DumpMCTracks::fOutputCategory |
|
private |
The documentation for this class was generated from the following file: