89 art::ServiceHandle<phot::PhotonVisibilityService const> pvsHandle;
91 art::ServiceHandle<opdet::OpDigiProperties const> opdigipHandle;
95 art::Handle< std::vector<recob::OpFlash> > flashHandle;
97 std::vector<recob::OpFlash>
const& flashVector(*flashHandle);
100 art::Handle< std::vector<recob::Track> > trackHandle;
102 std::vector<recob::Track>
const& trackVector(*trackHandle);
105 std::unique_ptr< std::vector<anab::CosmicTag> > cosmicTagPtr (
new std::vector<anab::CosmicTag>);
106 std::vector<anab::CosmicTag> & cosmicTagVector(*cosmicTagPtr);
110 std::vector<size_t> assnTrackTagVector;
111 std::unique_ptr< art::Assns<recob::Track,anab::CosmicTag> > assnTrackTag(
new art::Assns<recob::Track,anab::CosmicTag>);
115 cosmicTagVector, assnTrackTagVector,
116 providers, pvs, opdigip);
120 for(
size_t track_iter=0; track_iter<assnTrackTagVector.size(); track_iter++){
121 if(assnTrackTagVector[track_iter]==std::numeric_limits<size_t>::max())
continue;
122 art::Ptr<recob::Track> trk_ptr(trackHandle,track_iter);
123 util::CreateAssn(*
this,
evt, cosmicTagVector, trk_ptr, *assnTrackTag, assnTrackTagVector[track_iter]);
130 art::Handle< std::vector<recob::Hit> > hitHandle;
134 art::Handle< art::Assns<recob::Hit,recob::Track> > assnHitTrackHandle;
136 std::vector< std::vector<size_t> >
140 std::vector< std::vector<size_t> > assnHitTagVector;
141 std::unique_ptr< art::Assns<recob::Hit,anab::CosmicTag> > assnHitTag(
new art::Assns<recob::Hit,anab::CosmicTag>);
148 for(
size_t hit_iter=0; hit_iter<assnHitTagVector.size(); hit_iter++){
149 art::Ptr<recob::Hit> hit_ptr(hitHandle,hit_iter);
150 for(
size_t tag_iter=0; tag_iter<assnHitTagVector[hit_iter].size(); tag_iter++)
151 util::CreateAssn(*
this,
evt, cosmicTagVector, hit_ptr, *assnHitTag, assnHitTagVector[hit_iter][tag_iter]);
154 evt.put( std::move(assnHitTag));
158 evt.put(std::move(cosmicTagPtr));
159 evt.put(std::move(assnTrackTag));
ProviderPackFromServices< Services...> extractProviders()
Returns a provider pack with providers from specified services.
void RunCompatibilityCheck(std::vector< recob::OpFlash > const &, std::vector< recob::Track > const &, std::vector< anab::CosmicTag > &, std::vector< size_t > &, Providers_t, phot::PhotonVisibilityService const &, opdet::OpDigiProperties const &)
BeamFlashTrackMatchTaggerAlg fAlg
HitTagAssociatorAlg fHitTagAssnsAlg
The geometry of one entire detector, as served by art.
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.
std::string fTrackModuleLabel
std::vector< std::vector< size_t > > GetAssociatedVectorManyI(art::Handle< art::Assns< T, U > > h, art::Handle< std::vector< T > > index_p)
void MakeHitTagAssociations(std::vector< std::vector< size_t > > const &bridges_per_hit, std::vector< std::vector< size_t > > const &tags_per_bridges, std::vector< std::vector< size_t > > &tags_per_hit)
std::string fHitModuleLabel
std::string fFlashModuleLabel