37 class TrackCalorimetry;
71 produces<std::vector<anab::Calorimetry>>();
72 produces<art::Assns<recob::Track, anab::Calorimetry>>();
80 std::vector<recob::Track>
const& trackVector(*trackHandle);
85 std::vector<recob::Hit>
const& hitVector(*hitHandle);
90 std::vector<std::vector<size_t>> hit_indices_per_track =
94 std::unique_ptr<std::vector<anab::Calorimetry>> caloPtr(
new std::vector<anab::Calorimetry>);
95 std::vector<anab::Calorimetry>& caloVector(*caloPtr);
100 std::vector<size_t> assnTrackCaloVector;
101 std::unique_ptr<art::Assns<recob::Track, anab::Calorimetry>> assnTrackCaloPtr(
105 auto const det_prop =
112 hit_indices_per_track,
115 lar::extractProviders<geo::Geometry, detinfo::LArPropertiesService>());
118 for (
size_t calo_iter = 0; calo_iter < assnTrackCaloVector.size(); calo_iter++) {
119 if (assnTrackCaloVector[calo_iter] == std::numeric_limits<size_t>::max())
continue;
124 e.
put(std::move(caloPtr));
125 e.
put(std::move(assnTrackCaloPtr));
Utilities to manage ProviderPack objects with art.
std::string fHitModuleLabel
void produce(art::Event &e) override
TrackCalorimetry(fhicl::ParameterSet const &p)
EDProducer(fhicl::ParameterSet const &pset)
void ExtractCalorimetry(detinfo::DetectorClocksData const &clock_data, detinfo::DetectorPropertiesData const &det_prop, std::vector< recob::Track > const &, std::vector< recob::Hit > const &, std::vector< std::vector< size_t >> const &, std::vector< anab::Calorimetry > &, std::vector< size_t > &, Providers_t providers)
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
Provides recob::Track data product.
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
TrackCalorimetryAlg fTrackCaloAlg
std::vector< std::vector< size_t > > GetAssociatedVectorManyI(art::Handle< art::Assns< T, U >> h, art::Handle< std::vector< T >> index_p)
std::string fTrackModuleLabel
art framework interface to geometry description
TrackCalorimetry & operator=(TrackCalorimetry const &)=delete