15 #include "NovaDAQConventions/DAQConventions.h" 35 std::unique_ptr< std::vector<rb::Cluster> >& clustercol);
39 std::vector<std::vector<art::Ptr<rb::CellHit> > >
67 produces< std::vector<rb::Cluster> >();
82 std::vector<art::Ptr<rb::CellHit > > hitlist;
83 for(
unsigned int i = 0;
i < hitcol->size(); ++
i){
86 hitlist.push_back(hit);
89 std::unique_ptr< std::vector<rb::Cluster> > clustercol(
new std::vector<rb::Cluster>);
91 evt.
put(std::move(clustercol));
98 std::unique_ptr<std::vector<rb::Cluster> >& slices)
107 std::vector<std::vector<art::Ptr<rb::CellHit> > > tSlices;
111 typedef std::vector<art::Ptr<rb::CellHit> >::iterator it_t;
113 it_t itStart =
hits.begin();
114 it_t itEnd =
hits.begin();
117 it_t itTest =
hits.begin();
123 if(itEnd ==
hits.end())
break;
125 if(itEnd ==
hits.end())
break;
142 std::vector<art::Ptr<rb::CellHit> > slice(itStart, itEnd);
143 tSlices.push_back(slice);
150 if(itEnd ==
hits.end())
break;
155 std::vector<art::Ptr<rb::CellHit> > slice(itStart, itEnd);
156 tSlices.push_back(slice);
162 for(
unsigned int s = 0;
s != tSlices.size(); ++
s){
163 std::vector<std::vector<art::Ptr<rb::CellHit> > > zSlices =
166 for(
unsigned int n = 0;
n != zSlices.size(); ++
n){
169 for(
unsigned int h = 0;
h != zSlices[
n].size(); ++
h){
170 clust.
Add(zSlices[
n][
h]);
173 slices->push_back(clust);
179 std::vector<std::vector<art::Ptr<rb::CellHit> > >
MMSlicer:: 182 std::vector<std::vector<art::Ptr<rb::CellHit> > > zSlices;
191 typedef std::vector<art::Ptr<rb::CellHit> >::iterator it_t;
192 it_t itBegin =
hits.begin();
193 it_t itEnd =
hits.begin();
195 while(itEnd !=
hits.end()-1){
196 const int endPlane = (*itEnd)->Plane();
198 const int nextPlane = (*itEnd)->Plane();
202 std::vector<art::Ptr<rb::CellHit> > slice(itBegin, itEnd);
203 if (itEnd-itBegin >
fMinHits) zSlices.push_back(slice);
214 std::vector<art::Ptr<rb::CellHit> > slice(itBegin, itEnd);
216 if (slice.size() >
fMinHits) zSlices.push_back(slice);
std::string fCellHitInput
Read CellHits from Cal/[fCellHitFolderIn].
A collection of associated CellHits.
void SortByTime(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in time order (earliest to latest).
DEFINE_ART_MODULE(TestTMapFile)
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
unsigned int fMinHits
The minimum number of hits needed to create a slice (this is in any view)
ProductID put(std::unique_ptr< PROD > &&product)
unsigned int NYCell() const
Number of cells in the y-view.
void produce(art::Event &evt)
MMSlicer(fhicl::ParameterSet const &pset)
int16_t ADC(uint32_t i) const
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
unsigned int NXCell() const
Number of cells in the x-view.
Class to help Slicer4D manage the collection of hits.
float HitTime(art::Ptr< rb::CellHit > hit)
std::vector< std::vector< art::Ptr< rb::CellHit > > > WindowSliceZ(std::vector< art::Ptr< rb::CellHit > > &hits) const
Encapsulate the geometry of one entire detector (near, far, ndos)
void WindowSlice(std::vector< art::Ptr< rb::CellHit > > hitlist, std::unique_ptr< std::vector< rb::Cluster > > &clustercol)
void SortByPlane(std::vector< art::Ptr< rb::CellHit > > &c)
Sort c in plane order (low to high).