22 #include "art_root_io/TFileService.h" 62 _treeHit = tfs->make<TTree>(
"NuGraphHitOutput",
"NuGraphHitOutput");
78 _treeEvt = tfs->make<TTree>(
"NuGraphEventOutput",
"NuGraphEventOutput");
92 auto const& hitsWithScores = proxy::getCollection<std::vector<recob::Hit>>(
94 GNNDescription->dataTag(),
98 std::cout << hitsWithScores.
size() << std::endl;
99 for (
auto& h : hitsWithScores) {
107 _MIP = assocSemantic.
at(GNNDescription->getIndex(
"MIP"));
108 _HIP = assocSemantic.
at(GNNDescription->getIndex(
"HIP"));
109 _shower = assocSemantic.
at(GNNDescription->getIndex(
"shower"));
110 _michel = assocSemantic.
at(GNNDescription->getIndex(
"michel"));
111 _diffuse = assocSemantic.
at(GNNDescription->getIndex(
"diffuse"));
112 _wire = h->WireID().Wire;
113 _plane = h->WireID().Plane;
114 _tpc = h->WireID().TPC;
115 _cryo = h->WireID().Cryostat;
116 _time = h->PeakTime();
120 auto PredVertexColl = e.getHandle<std::vector<recob::Vertex>>(
art::InputTag(
nglabel,
"vertex"));
121 if (PredVertexColl.isValid() && PredVertexColl->size() > 0) {
122 _vtx_x = PredVertexColl->at(0).position().X();
123 _vtx_y = PredVertexColl->at(0).position().Y();
124 _vtx_z = PredVertexColl->at(0).position().Z();
NuGraphAnalyzer(fhicl::ParameterSet const &p)
Declaration of signal hit object.
Base utilities for the implementation of data product facades.
EDAnalyzer(fhicl::ParameterSet const &pset)
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
auto withParallelData(Args &&...args)
Helper function to merge an auxiliary data product into the proxy.
#define DEFINE_ART_MODULE(klass)
void analyze(art::Event const &e) override
Handle< PROD > getHandle(SelectorBase const &) const
float at(size_t index) const
NuGraphAnalyzer & operator=(NuGraphAnalyzer const &)=delete