8 #ifndef EVENT_EVENTCHEATER_H 9 #define EVENT_EVENTCHEATER_H 65 produces< std::vector<recob::Event> >();
66 produces< art::Assns<recob::Event, recob::Vertex> >();
67 produces< art::Assns<recob::Event, recob::Hit> >();
95 std::map<int, int> trackIDToPColEntry;
96 for(
size_t p = 0; p < pcol.
vals().size(); ++p) trackIDToPColEntry[pcol.
vals().at(p)->TrackId()] = p;
106 std::vector< art::Ptr<recob::Vertex> > vertices;
110 std::vector< art::Ptr<recob::Vertex> >
::iterator vertexitr = vertices.begin();
113 std::map<art::Ptr<simb::MCTruth>, std::vector< art::Ptr<recob::Vertex> > > vertexMap;
114 std::map<art::Ptr<simb::MCTruth>, std::vector< art::Ptr<recob::Vertex> > >
::iterator vertexMapItr = vertexMap.begin();
117 while( vertexitr != vertices.end() ){
119 size_t pcolEntry = trackIDToPColEntry.find((*vertexitr)->ID())->second;
122 vertexMap[primary].push_back(*vertexitr);
127 std::unique_ptr< std::vector<recob::Event> > eventcol(
new std::vector<recob::Event>);
132 for(vertexMapItr = vertexMap.begin(); vertexMapItr != vertexMap.end(); vertexMapItr++){
136 std::vector< art::Ptr<recob::Vertex> > verts( (*vertexMapItr).second );
145 for(
size_t p = 0; p < ptrvs.
size(); ++p){
146 std::vector< art::Ptr<recob::Hit> >
hits = fm.at(p);
153 <<
"\nto collection";
157 evt.
put(std::move(eventcol));
158 evt.
put(std::move(evassn));
159 evt.
put(std::move(ehassn));
std::string fCheatedVertexLabel
label for module creating recob::Vertex objects
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Declaration of signal hit object.
void produce(art::Event &evt)
ProductID put(std::unique_ptr< PROD > &&product)
std::size_t getView(std::string const &moduleLabel, std::string const &productInstanceName, std::vector< ELEMENT const * > &result) const
#define DEFINE_ART_MODULE(klass)
void reconfigure(fhicl::ParameterSet const &pset)
std::string fG4ModuleLabel
label for module running G4 and making particles, etc
T get(std::string const &key) const
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.
Utility object to perform functions of association.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Particle list in DetSim contains Monte Carlo particle information.
EventCheater(fhicl::ParameterSet const &pset)
Event finding and building.