12 #include "art_root_io/TFileService.h" 22 class TrackContainmentTagger;
56 p.get<std::vector<bool>>(
"ApplyTags", std::vector<bool>(
fTrackModuleLabels.size(),
true));
59 throw cet::exception(
"TrackContainmentTagger::TrackContainmentTagger")
60 <<
"ApplyTags not same size as TrackModuleLabels. ABORT!!!";
64 produces<std::vector<anab::CosmicTag>>();
65 produces<art::Assns<recob::Track, anab::CosmicTag>>();
71 std::unique_ptr<std::vector<anab::CosmicTag>> cosmicTagTrackVector(
72 new std::vector<anab::CosmicTag>);
73 std::unique_ptr<art::Assns<recob::Track, anab::CosmicTag>> assnOutCosmicTagTrack(
78 std::vector<std::vector<recob::Track>> trackVectors;
79 std::vector<art::Handle<std::vector<recob::Track>>> trackHandles;
83 trackVectors.push_back(*trackHandle);
84 trackHandles.push_back(trackHandle);
92 for (
size_t i_tc = 0; i_tc < cosmicTags.size(); ++i_tc) {
97 *cosmicTagTrackVector,
99 *assnOutCosmicTagTrack);
103 e.
put(std::move(cosmicTagTrackVector));
104 e.
put(std::move(assnOutCosmicTagTrack));
void setMakeCosmicTags(bool flag=true)
void ProcessTracks(std::vector< std::vector< recob::Track >> const &, geo::GeometryCore const &)
std::vector< std::string > fTrackModuleLabels
EDProducer(fhicl::ParameterSet const &pset)
void SetupOutputTree(TTree *)
void produce(art::Event &e) override
std::vector< bool > fApplyTags
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
#define DEFINE_ART_MODULE(klass)
TrackContainmentTagger(fhicl::ParameterSet const &p)
EventNumber_t event() const
void Configure(fhicl::ParameterSet const &)
void SetRunEvent(unsigned int const &, unsigned int const &)
TrackContainmentTagger & operator=(TrackContainmentTagger const &)=delete
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.
trk::TrackContainmentAlg fAlg
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
std::vector< std::vector< anab::CosmicTag > > const & GetTrackCosmicTags()
art framework interface to geometry description
cet::coded_exception< error, detail::translate > exception