22 #include "canvas/Persistency/Common/FindManyP.h" 28 #include "canvas/Persistency/Common/FindOneP.h" 56 produces< std::vector<recob::Event> >();
57 produces< art::Assns<recob::Event, recob::Vertex> >();
58 produces< art::Assns<recob::Event, recob::Hit> >();
72 std::map<int, int> trackIDToPColEntry;
73 for(
size_t p = 0;
p < pcol.
vals().size(); ++
p) trackIDToPColEntry[pcol.
vals().at(
p)->TrackId()] =
p;
83 std::vector< art::Ptr<recob::Vertex> > vertices;
87 std::vector< art::Ptr<recob::Vertex> >
::iterator vertexitr = vertices.begin();
90 std::map<art::Ptr<simb::MCTruth>, std::vector< art::Ptr<recob::Vertex> > > vertexMap;
91 std::map<art::Ptr<simb::MCTruth>, std::vector< art::Ptr<recob::Vertex> > >
::iterator vertexMapItr = vertexMap.begin();
94 while( vertexitr != vertices.end() ){
96 size_t pcolEntry = trackIDToPColEntry.find((*vertexitr)->ID())->
second;
99 vertexMap[primary].push_back(*vertexitr);
104 std::unique_ptr< std::vector<recob::Event> > eventcol(
new std::vector<recob::Event>);
109 for(vertexMapItr = vertexMap.begin(); vertexMapItr != vertexMap.end(); vertexMapItr++){
113 std::vector< art::Ptr<recob::Vertex> > verts( (*vertexMapItr).second );
122 for(
size_t p = 0;
p < ptrvs.
size(); ++
p){
123 std::vector< art::Ptr<recob::Hit> > hits = fm.at(
p);
130 <<
"\nto collection";
std::string fCheatedVertexLabel
label for module creating recob::Vertex objects
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
EDProducer(fhicl::ParameterSet const &pset)
void produce(art::Event &evt)
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
std::string fG4ModuleLabel
label for module running G4 and making particles, etc
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
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.
Declaration of signal hit object.
static constexpr double fm
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName, std::vector< ELEMENT const * > &result) const
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
second_as<> second
Type of time stored in seconds, in double precision.
EventCheater(fhicl::ParameterSet const &pset)
Event finding and building.