12 #include "canvas/Persistency/Common/FindManyP.h" 22 fHitsModuleLabel (pset.
get<
std::
string> (
"HitsModuleLabel")),
23 fTFHandler1st (pset.
get<
fhicl::ParameterSet> (
"TFNetHandler1st")),
24 fTFHandler2nd (pset.
get<
fhicl::ParameterSet> (
"TFNetHandler2nd")),
25 fTdcWidth (pset.
get<unsigned short> (
"TdcWidth")),
26 fWireLength (pset.
get<unsigned short> (
"WireLength")),
27 fTimeResolution (pset.
get<unsigned short> (
"TimeResolution")),
28 fWireResolution (pset.
get<unsigned short> (
"WireResolution")),
29 fGlobalWireMethod (pset.
get<
int> (
"GlobalWireMethod")),
31 fProducer (fWireLength, fWireResolution, fTdcWidth, fTimeResolution, fGlobalWireMethod, 0, 1)
38 std::vector< art::Ptr< recob::Hit > > hitlist;
46 std::vector <float> Result(3, -99999);
48 std::vector<float> networkOutput(6, -99999);
51 std::vector <float> center_of_mass(7,0);
52 for (
int ii = 0; ii < 6; ii++){
53 center_of_mass[ii] = networkOutput[ii];
55 networkOutput[1] += 7; networkOutput[5] += 7;
56 networkOutput[3] -= 9;
71 for (
int ii = 0; ii < 3; ii++){
72 float vtx_wire = outputs[ii*2+1];
73 float vtx_tick = outputs[ii*2];
74 float dwire = pm.
fNWire/2-vtx_wire;
78 outputs[ii*2+1] = cm_wire;
79 outputs[ii*2] = cm_tdc;
84 for (
int ii = 0; ii < 3; ii++){
87 cm_list[2*ii] = mean_tdc;
88 cm_list[2*ii+1] = mean_wire;
RegPixelMapProducer fProducer
RegPixelMap CreateMap(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, std::vector< art::Ptr< recob::Hit > > const &cluster, art::FindManyP< recob::Wire > const &fmwire)
int fFirstTDC[3]
Minimum TDC in each view, inclusive.
Handle< PROD > getHandle(SelectorBase const &) const
unsigned int fNTdc
Number of tdcs, width of pixel map.
RegPixelMap, basic input to CNN neural net.
unsigned int fNWire
Number of wires, length of pixel map.
int fFirstWire[3]
Minimum wire, inclusive.
void FindGlobalVertices(const RegPixelMap &pm, std::vector< float > &outputs)
cnn::TFRegNetHandler fTFHandler1st
cnn::TFRegNetHandler fTFHandler2nd
void getCM(const RegPixelMap &pm, float *cm_list)
std::vector< float > Predict(const RegPixelMap &pm)
Return prediction arrays for RegPixelMap.
std::string fHitsModuleLabel
Defines an enumeration for cellhit classification.
Declaration of signal hit object.
Contains all timing reference information for the detector.
auto const & get(AssnsNode< L, R, D > const &r)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
std::vector< float > GetVertex(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, art::Event &evt, const RegPixelMap &pixelmap)
RegCNNVtxHandler(const fhicl::ParameterSet &pset)