200 std::vector< art::Ptr< recob::Hit > > hitlist;
209 unsigned short nhits = hitlist.size();
212 std::vector<art::Ptr<recob::Vertex> > vertex_list;
221 std::unique_ptr< std::vector<cnn::RegPixelMap> >
222 pmCol(
new std::vector<cnn::RegPixelMap>);
224 std::unique_ptr< std::vector<cnn::RegPixelMap3D> >
225 pm3DCol(
new std::vector<cnn::RegPixelMap3D>);
240 auto cnnresultListHandle = evt.
getHandle<std::vector<cnn::RegCNNResult>>(itag1);
241 std::vector<float> vtx(3, -99999);
242 if (!cnnresultListHandle.failedToGet())
244 if (!cnnresultListHandle->empty())
246 const std::vector<float>& v = (*cnnresultListHandle)[0].fOutput;
247 for (
unsigned int ii = 0; ii < 3; ii++){
249 std::cout<<
"vertex "<<ii<<
" : "<<vtx[ii]<<
std::endl;
268 int n_pand_particles = particleVector.size();
270 double xyz_temp[3] = {0.0, 0.0, 0.0};
271 std::vector<float> vtx(3, -99999);
272 for (
int ipfp = 0; ipfp< n_pand_particles; ipfp++) {
278 if (particlesToVertices.end() != vIter) {
280 if (!vertexVector.empty()) {
281 if (vertexVector.size()!=1)
282 std::cout<<
" Warning: Found particle with more than one associated vertex "<<
std::endl;
285 vertex_pfp->
XYZ(xyz_temp);
286 for (
unsigned int ii=0; ii<3; ++ii) {
287 vtx[ii] = xyz_temp[ii];
296 std::cout<<
"FIXME: CreateMap from fmshwhit and pandora vtx"<<
std::endl;
304 auto cnnresultListHandle = evt.
getHandle<std::vector<cnn::RegCNNResult>>(itag2);
305 std::vector<float> vtx(6, -99999);
306 if (!cnnresultListHandle.failedToGet())
308 if (!cnnresultListHandle->empty())
310 const std::vector<float>& v = (*cnnresultListHandle)[0].fOutput;
311 for (
unsigned int ii = 0; ii < 6; ii++){
323 if (pm.fInPM) pmCol->push_back(pm);
328 std::cout<<
"Making 3D pixel maps ......"<<
std::endl;
337 int n_pand_particles = particleVector.size();
339 double xyz_temp[3] = {0.0, 0.0, 0.0};
340 std::vector<float> vtx(3, -99999);
341 for (
int ipfp = 0; ipfp< n_pand_particles; ipfp++) {
347 if (particlesToVertices.end() != vIter) {
349 if (!vertexVector.empty()) {
350 if (vertexVector.size()!=1)
351 std::cout<<
" Warning: Found particle with more than one associated vertex "<<std::endl;
354 vertex_pfp->
XYZ(xyz_temp);
355 for (
unsigned int ii=0; ii<3; ++ii) {
356 vtx[ii] = xyz_temp[ii];
368 if (pm.fInPM) pm3DCol->push_back(pm);
void XYZ(double *xyz) const
Legacy method to access vertex position, preserved to avoid breaking code. Please try to use Vertex::...
RegPixelMap3D Create3DMap(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit > > const &cluster, art::FindManyP< recob::SpacePoint > const &fmSPFromHits, art::FindManyP< recob::Track > const &fmtrkhit, const std::vector< float > &vtx)
int fUseThreeDMap
choose to create 3D pixel maps
RegPixelMap CreateMap(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit > > const &cluster, art::FindManyP< recob::Wire > const &fmwire)
Handle< PROD > getHandle(SelectorBase const &) const
std::string fPFParticleModuleLabel
std::string fHitsModuleLabel
Module lablel for input clusters.
std::string fShowerModuleLabel
std::string fRegCNNResultLabel
std::map< art::Ptr< recob::PFParticle >, VertexVector > PFParticlesToVertices
RegPixelMap3DProducer fProducer3D
int fProngTagMethod
select how to tag prong
std::vector< art::Ptr< recob::PFParticle > > PFParticleVector
static void CollectVertices(const art::Event &evt, const std::string &label, VertexVector &vertexVector, PFParticlesToVertices &particlesToVertices)
Collect the reconstructed PFParticles and associated Vertices from the ART event record.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
bool IsPrimary() const
Returns whether the particle is the root of the flow.
static void CollectPFParticles(const art::Event &evt, const std::string &label, PFParticleVector &particleVector)
Collect the reconstructed PFParticles from the ART event record.
int fUseRecoVertex
select how to choose center of pixel map
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
std::string fPandoraNuVertexModuleLabel
std::string fTrackModuleLabel
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
std::string fRegCNNModuleLabel
std::vector< art::Ptr< recob::Vertex > > VertexVector
RegPixelMapProducer fProducer
PixelMapProducer does the work for us.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
QTextStream & endl(QTextStream &s)
std::string fVertexModuleLabel