1 #ifndef TTSPACEPOINTFINDER_H 2 #define TTSPACEPOINTFINDER_H 69 fSpptAlg( pset.get<
fhicl::ParameterSet >(
"SpacePointAlgParams") )
72 produces< std::vector<recob::SpacePoint> >();
73 produces<art::Assns<recob::SpacePoint, recob::Hit> >();
107 std::unique_ptr<std::vector<recob::SpacePoint> > spptCollection(
new std::vector<recob::SpacePoint>);
108 std::unique_ptr<std::vector<std::vector<art::Ptr<recob::Hit> > > >
114 std::vector< art::Ptr<recob::Hit> > hitVec_U;
119 std::vector< art::Ptr<recob::Hit> > hitVec_V;
124 std::vector< art::Ptr<recob::Hit> > hitVec_Y;
128 <<
"Got handles to hits:\n" 129 << hitVec_U.size() <<
" u hits, " 130 << hitVec_V.size() <<
" v hits, " 131 << hitVec_Y.size() <<
" y hits.";
135 spptCollection,spptAssociatedHits);
137 mf::LogInfo(
"TTSpacePointFinder") <<
"Finished spacepoint alg. Created " << spptCollection->size() <<
" spacepoints.";
141 if(spptCollection->size() != spptAssociatedHits->size()){
142 mf::LogError(
"TTSpacePointFinder") <<
"ERROR in space point alg.\n" 143 <<
"Spacepoint and associated hit collections have different sizes!\n" 144 << spptCollection->size() <<
" != " << spptAssociatedHits->size()
145 <<
"\nWill return with no space points put on event.";
151 for(
unsigned int isppt=0; isppt<spptCollection->size(); isppt++){
152 util::CreateAssn(*
this,evt,*spptCollection,spptAssociatedHits->at(isppt),*spptAssns,isppt);
156 evt.
put(std::move(spptCollection));
157 evt.
put(std::move(spptAssns));
166 #endif // TTSPACEPOINTFINDER_H
std::string fHitModuleLabel
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Declaration of signal hit object.
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
ProductID put(std::unique_ptr< PROD > &&product)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
#define DEFINE_ART_MODULE(klass)
std::string fYHitsInstanceLabel
Input V hits instance name.
T get(std::string const &key) const
void produce(art::Event &evt)
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
std::string fVHitsInstanceLabel
Input U hits instance name.
Definition of data types for geometry description.
void createSpacePoints(std::vector< art::Ptr< recob::Hit > > &hitVec_U, std::vector< art::Ptr< recob::Hit > > &hitVec_V, std::vector< art::Ptr< recob::Hit > > &hitVec_Y, std::unique_ptr< std::vector< recob::SpacePoint > > &spptCollection, std::unique_ptr< std::vector< std::vector< art::Ptr< recob::Hit > > > > &spptAssociatedHits)
void beginRun(art::Run &run)
Utility object to perform functions of association.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void reconfigure(fhicl::ParameterSet const &p)
void reconfigure(fhicl::ParameterSet const &pset)
void fillCoordinatesArrays()
std::string fUHitsInstanceLabel
Input hit module name.
virtual ~TTSpacePointFinder()
SpacePointAlg_TimeSort fSpptAlg
Input Y hits instance name.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
TTSpacePointFinder(fhicl::ParameterSet const &pset)
art framework interface to geometry description