87 Comment(
"the data product of simulated particles to be processed"),
93 Comment(
"minimum length of particle trajectory [cm]"),
99 Comment(
"minimum energy of particle [GeV]"),
105 Comment(
"configuration of TotallyCheatTrackingAlg algorithm"),
153 consumes<std::vector<simb::MCParticle>>(
particleTag);
155 produces<std::vector<lar::example::CheatTrack>>();
156 produces<art::Assns<lar::example::CheatTrack, simb::MCParticle>>();
168 =
event.getValidHandle<std::vector<simb::MCParticle>>(
particleTag);
174 auto tracks = std::make_unique<std::vector<lar::example::CheatTrack>>();
176 std::make_unique<art::Assns<lar::example::CheatTrack, simb::MCParticle>>();
190 for (std::size_t iParticle = 0U; iParticle < particles.size(); ++iParticle) {
206 auto const iTrack = tracks->size() - 1;
209 trackToPart->addSingle(trackPtr, partPtr);
217 <<
"Reconstructed " << tracks->size() <<
" tracks out of " 218 << particleHandle->size() <<
" particles from '" 221 event.put(std::move(tracks));
222 event.put(std::move(trackToPart));
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
Data product for reconstructed trajectory in space.
Reconstructs tracks from simulated particles.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
const simb::MCTrajectory & Trajectory() const
virtual void produce(art::Event &event) override
double minLength
Minimum particle length [cm].
Algorithm to "reconstruct" trajectories from simulated particles.
fhicl::Table< lar::example::TotallyCheatTrackingAlg::Config > algoConfig
double minEnergy
Minimum energy [GeV].
Pseudo-track data product for TotallyCheatTracks example.
#define DEFINE_ART_MODULE(klass)
bool acceptParticle(simb::MCParticle const &particle) const
Returns whether the particle satisfies the selection criteria.
lar::example::CheatTrack makeTrack(simb::MCParticle const &mcParticle) const
Returns a reconstructed track from the specified particle.
void setup()
Set up the algorithm (currently no operation).
fhicl::Atom< double > minLength
lar::example::TotallyCheatTrackingAlg trackMaker
Reconstruction algorithm.
Module: creates tracks from simulated particles.
fhicl::Atom< double > minEnergy
Module configuration data.
LArSoft-specific namespace.
double TotalLength() const
TotallyCheatTracker(Parameters const &config)
Constructor; see the class documentation for the configuration.
fhicl::Atom< art::InputTag > particles
art::InputTag particleTag
Label of the input data product.
Event finding and building.