16 #include "art_root_io/TFileDirectory.h" 17 #include "art_root_io/TFileService.h" 23 #include "canvas/Persistency/Common/FindManyP.h" 109 fTdcWidth (pset.get<
unsigned short> (
"TdcWidth")),
110 fWireLength (pset.get<
unsigned short> (
"WireLength")),
145 std::unique_ptr< std::vector<cvn::PixelMap> > pmCol(
new std::vector<cvn::PixelMap>);
155 std::vector< art::Ptr< recob::Hit > > hitlist;
159 unsigned short nhits = hitlist.size();
161 std::cout <<
"nhits: " << nhits <<
std::endl;
165 pmCol->push_back(pm);
177 pmCol->push_back(pm);
183 const art::FindManyP<recob::Hit> findTrackHits(allTracks,evt,
fTrackLabel);
186 const art::FindManyP<recob::Hit> findShowerHits(allShowers,evt,
fShowerLabel);
188 std::cout <<
"Event contains " << allTracks->size() <<
" tracks and " << allShowers->size() <<
" showers" <<
std::endl;
191 for(
unsigned int t = 0;
t < allTracks->size(); ++
t){
193 std::vector<art::Ptr<recob::Hit> > trackHits = findTrackHits.at(
t);
198 pmCol->push_back(pm);
203 for(
unsigned int s = 0;
s < allShowers->
size(); ++
s){
205 std::vector<art::Ptr<recob::Hit> > showerHits = findShowerHits.at(
s);
208 pmCol->push_back(pm);
213 std::cout <<
"Made " << pmCol->size() <<
" pixel maps for this event" <<
std::endl;
std::string fTrackLabel
Module label for input tracks.
unsigned short fTdcWidth
Width of pixel map in tdcs.
PixelMapProducer fProducer
PixelMapProducer does the work for us.
Handle< PROD > getHandle(SelectorBase const &) const
bool fUseWholeEvent
Use the whole event instead of each track and shower.
EDProducer(fhicl::ParameterSet const &pset)
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
Utility class for truth labels.
double fTimeResolution
Length of pixel map in wires.
void produce(art::Event &evt)
CVNMapperProtoDUNE(fhicl::ParameterSet const &pset)
#define DEFINE_ART_MODULE(klass)
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
void SetUnwrapped(unsigned short unwrap)
const std::vector< const recob::Hit * > GetRecoSliceHits(const recob::Slice &slice, art::Event const &evt, const std::string sliceModule) const
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
float fTrackLengthCut
Track length cut.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
bool fUseBeamSliceOnly
For protoDUNE vertex finding, we only want the beam slice.
std::string fParticleModuleLabel
Module label for input particles.
unsigned short fUnwrappedPixelMap
Use unwrapped pixel maps?
Declaration of signal hit object.
std::string fShowerLabel
Module label for input showers.
unsigned short GetBeamSlice(art::Event const &evt, const std::string particleLabel) const
Try to get the slice tagged as beam. Returns 9999 if no beam slice was found.
PixelMap, basic input to CVN neural net.
PixelMapProducer for CVN.
Provides recob::Track data product.
unsigned short fWireLength
Length of pixel map in wires.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Producer algorithm for PixelMap, input to CVN neural net.
QTextStream & endl(QTextStream &s)
PixelMap CreateMap(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit > > &slice)
std::string fHitsModuleLabel
Module label for input hits.