28 #include "Utilities/AssociationUtil.h" 100 produces< std::vector<cvn::PixelMap> > ();
102 if (
fWriteClusters) produces< art::Assns<cvn::PixelMap, rb::Cluster> >();
124 std::unique_ptr< std::vector<rb::Cluster>> clustercol(
new std::vector<rb::Cluster>);
125 std::unique_ptr< art::Assns<PixelMap, rb::Cluster> >
129 auto pmCol = std::make_unique<std::vector<PixelMap>>();
136 std::vector<art::Ptr<rb::CellHit > >
hits;
138 for(
unsigned int i = 0;
i < hitcol->size(); ++
i){
142 std::sort(hits.begin(), hits.end(),
144 {
return a->
TNS() <
b->TNS();});
148 std::vector<rb::CellHit> hitlist = *hitcol;
153 std::sort(hitlist.begin(), hitlist.end(),
155 {
return a.
TNS() <
b.TNS();});
171 unsigned int iCount=0;
175 for(
unsigned int j = 0;
j < hitlist.size(); ++
j) {
181 clustercol->push_back(cluster);
205 evt.
put(std::move(pmCol));
207 evt.
put(std::move(clustercol));
208 evt.
put(std::move(assoc));
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 fNumClusters
number of time windows to make
const art::ProductToken< std::vector< rb::CellHit > > fCellHitToken
Read CellHits from this input.
unsigned short Plane() const
A collection of associated CellHits.
int fTimeWinSize
Size of time window used in map.
void Add(const unsigned int &plane, const unsigned int &cell, const float &pe, unsigned int &view, unsigned int &hitID, const float &time, const HitType label, const double purity, const int object, const int nuIdx)
int fTimeWinOverlap
amount of overlap between windows
DEFINE_ART_MODULE(TestTMapFile)
Defines an enumeration for prong classification.
bool fWriteClusters
write clusters to file
virtual void Add(const art::Ptr< rb::CellHit > &cell, double weight=1)
void SetMinTime(float minTime)
ProductID put(std::unique_ptr< PROD > &&product)
unsigned short Cell() const
unsigned int fMaxPlaneGap
unsigned short fPlaneLength
Length of pixel map in planes.
Perform a "2 point" Hough transform on a collection of hits.
unsigned short fCellWidth
Ratio of Cosmic pixel maps to Nu pixel maps to create.
CVNCosmicMapper(fhicl::ParameterSet const &pset)
A rawdata::RawDigit with channel information decoded.
int fTimeWinOffset
Where to start first time window.
PixelMap, basic input to CVN neural net.
PixelMapProducer for CVN.
void produce(art::Event &evt)
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
virtual void Clear()
Forget about all owned cell hits.
ProductToken< T > consumes(InputTag const &)
void SetMaxTime(float maxTime)