19 #include "Utilities/AssociationUtil.h" 58 produces<std::vector<rb::Vertex>>();
60 produces<art::Assns<rb::Vertex, rb::Cluster>>();
62 if(
fSaveMaps) produces<std::vector<TH2F>>();
73 std::unique_ptr<std::vector<rb::Vertex>> vtxcol(
new std::vector<rb::Vertex>);
74 std::unique_ptr<std::vector<TH2F>> histcol(
new std::vector<TH2F>);
83 for(
unsigned int sliceIdx = 0; sliceIdx < slices->size(); ++sliceIdx){
89 std::vector<Vector2D> xhits, yhits;
91 for(
unsigned int hitIdx = 0; hitIdx < slice.
NCell(); ++hitIdx){
101 xhits.push_back(
Vector2D(xyz.Z(), xyz.X(),
dz, dv));
104 yhits.push_back(
Vector2D(xyz.Z(), xyz.Y(),
dz, dv));
110 std::sort(xhits.begin(), xhits.end());
111 std::sort(yhits.begin(), yhits.end());
125 xmap->SetTitle(
TString::Format(
"X view Hough map, slice %d", sliceIdx));
126 ymap->SetTitle(
TString::Format(
"Y view Hough map, slice %d", sliceIdx));
128 histcol->push_back(*xmap);
129 histcol->push_back(*ymap);
144 evt.
put(std::move(vtxcol));
146 evt.
put(std::move(assns));
A 3D position and time representing an interaction vertex.
static bool CreateAssn(art::EDProducer const &prod, art::Event &evt, std::vector< T > &a, art::Ptr< U > b, art::Assns< T, U > &assn, size_t indx=UINT_MAX, std::string const &instance=std::string())
Create a 1 to 1 association between a new product and one already in the event.
unsigned int NCell(geo::View_t view) const
Number of cells in view view.
void GetCenter(double *xyz, double localz=0.0) const
unsigned short Plane() const
Find event vertex using a Hough transform.
Vertical planes which measure X.
A collection of associated CellHits.
const PlaneGeo * Plane(unsigned int i) const
DEFINE_ART_MODULE(TestTMapFile)
ProductID put(std::unique_ptr< PROD > &&product)
unsigned short Cell() const
double fMaxHitsUsedPerView
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Find event vertex using a Hough transform.
Vertex location in position and time.
Find event vertex using a Hough transform.
void produce(art::Event &evt)
art::Ptr< rb::CellHit > Cell(geo::View_t view, unsigned int viewIdx) const
Get the ith cell from view view.
HoughVertex(const fhicl::ParameterSet &pset)
A rawdata::RawDigit with channel information decoded.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
double MeanTNS(rb::AveragingScheme scheme=kDefaultScheme) const
void Format(TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
bool IsNoise() const
Is the noise flag set?
TVector3 FindVertex(const std::vector< Vector2D > &xhits, const std::vector< Vector2D > &yhits, TH2F **xmap=0, TH2F **ymap=0) const
Encapsulate the cell geometry.
Encapsulate the geometry of one entire detector (near, far, ndos)