85 Comment(
"the data product of simulated particles to be processed"),
91 Comment(
"minimum length of particle trajectory [cm]"),
97 Comment(
"minimum energy of particle [GeV]"),
103 Comment(
"configuration of TotallyCheatTrackingAlg algorithm"),
152 consumes<std::vector<simb::MCParticle>>(
particleTag);
154 produces<std::vector<lar::example::CheatTrack>>();
155 produces<art::Assns<lar::example::CheatTrack, simb::MCParticle>>();
167 =
event.getValidHandle<std::vector<simb::MCParticle>>(
particleTag);
173 auto tracks = std::make_unique<std::vector<lar::example::CheatTrack>>();
175 std::make_unique<art::Assns<lar::example::CheatTrack, simb::MCParticle>>();
189 for (std::size_t iParticle = 0U; iParticle < particles.size(); ++iParticle) {
205 auto const iTrack =
tracks->size() - 1;
208 trackToPart->addSingle(trackPtr, partPtr);
216 <<
"Reconstructed " <<
tracks->size() <<
" tracks out of " 217 << particleHandle->size() <<
" particles from '"
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
Reconstructs tracks from simulated particles.
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
const simb::MCTrajectory & Trajectory() const
EDProducer(fhicl::ParameterSet const &pset)
virtual void produce(art::Event &event) override
double minLength
Minimum particle length [cm].
ChannelGroupService::Name Name
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.