187 if(sliceHandle->empty()){
193 for(
unsigned int i = 0;
i<sliceHandle->size();++
i){
200 std::unique_ptr< std::vector<RegPixelMap> >
201 pmCol(
new std::vector<RegPixelMap>);
202 std::unique_ptr< std::vector<RegPixelMap> >
203 prong_pmCol(
new std::vector<RegPixelMap>);
204 std::unique_ptr< art::Assns<RegPixelMap, rb::Cluster> >
206 std::unique_ptr< art::Assns<RegPixelMap, rb::Prong> >
224 for(
unsigned int iSlice = 0; iSlice < sliceCol.
size(); ++iSlice)
226 if (sliceCol[iSlice]->IsNoise() ||
234 Boundary bound = pm.
Bound();
243 unsigned int vtxPlane = 0;
244 unsigned int vtxXCell = 0;
245 unsigned int vtxYCell = 0;
247 if ((fmv.isValid())){
248 std::vector<art::Ptr<rb::Vertex> >
v = fmv.at(iSlice);
249 for (
unsigned int j=0;
j<v.size(); ++
j) {
250 TVector3 evtVtx(0,0,0);
252 evtVtx.SetX(v[
j]->
GetX());
253 evtVtx.SetY(v[
j]->
GetY());
254 evtVtx.SetZ(v[
j]->GetZ());
255 double dmin = 9999999;
257 for(
unsigned int pp = 0; pp < geom->
NPlanes();pp++){
259 Double_t cellXYZ[3]={0,0,0};
261 double mind = fabs(cellXYZ[2]-evtVtx[2]);
268 double dminx = 9999999;
269 double dminy = 9999999;
275 Double_t cellXYZ[3]={0,0,0};
277 double mind = fabs(cellXYZ[0]-evtVtx[0]);
284 for(
unsigned int yy = 0; yy < geom->
Plane(yp)->
Ncells();yy++){
285 Double_t cellXYZ[3]={0,0,0};
287 double mind = fabs(cellXYZ[1]-evtVtx[1]);
297 bound, vtxPlane, vtxXCell, vtxYCell);
306 std::vector<art::Ptr<rb::Prong>> prongs3D;
307 std::vector<art::Ptr<rb::Prong>> prongs2D;
308 std::vector<art::Ptr<rb::Shower>> showers3D;
311 prongs2D = fmProng2D.at(iSlice);
314 std::vector<art::Ptr<rb::Track> > tracks2D;
316 tracks2D = fmTrack2D.at(iSlice);
317 for (
unsigned int ip=0;
ip<tracks2D.size(); ++
ip){
318 prongs2D.push_back(tracks2D[
ip]);
323 prongs3D = fmProng3D.at(iSlice);
326 std::vector<art::Ptr<rb::Track> > tracks3D;
328 tracks3D = fmTrack3D.at(iSlice);
329 for (
unsigned int ip=0;
ip<tracks3D.size(); ++
ip){
330 prongs3D.push_back(tracks3D[
ip]);
334 if(!prongs3D.empty()){
335 unsigned int pngId = 0;
337 for(
unsigned int iPng = 0; iPng < prongs3D.size(); ++iPng){
338 if(fmShower3D.isValid()){
341 showers3D.push_back(slid);
347 if(prongs3D.size()!=showers3D.size())
continue;
353 pmCol->push_back(pm_evt);
355 sliceCol[iSlice], *(assoc.get()), UINT_MAX,
358 for(
unsigned int iProng = 0; iProng < showers3D.size(); ++iProng ){
363 bound, vtxPlane, vtxXCell, vtxYCell);
366 prong_pmCol->push_back(new_pm);
368 prongs3D[iProng], *(prong_assoc.get()), UINT_MAX,
fProngPMLabel);
371 for(
unsigned int iProng2 = 0; iProng2 < prongs2D.size(); ++iProng2 ){
377 prong_pmCol->push_back(new_pm);
379 prongs2D[iProng2], *(prong_assoc.get()), UINT_MAX,
fProngPMLabel);
387 evt.
put(std::move(assoc));
388 evt.
put(std::move(prong_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.
void GetCenter(double *xyz, double localz=0.0) const
bool getByToken(ProductToken< PROD > const &, Handle< PROD > &result) const
bool fProngInput
Use Prong or Track as input.
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
const CellGeo * Cell(int icell) const
std::vector< std::string > fPreselectionLabels
Filter labels.
unsigned int Ncells() const
Number of cells in this plane.
std::string fProng3DLabel
Instance lablel for input 3D prongs.
RegPixelMapProducer fProducer
PixelMapProducer does the work for us.
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
std::string fProng2DLabel
Instance lablel for input 2D prongs.
Boundary Bound() const
Map boundary.
RegPixelMap CreateMapGivenBoundary(const rb::Cluster &cluster, const Boundary &bound)
View_t View() const
Which coordinate does this plane measure.
RegPixelMap CreateMapGivenShowerVertex(const rb::Shower &shower, const Boundary &bound, unsigned int vtxPlane, unsigned int vtxXCell, unsigned int vtxYCell)
bool fMapProngs
Option to save maps for prongs.
void push_back(Ptr< U > const &p)
std::string fTrack2DLabel
Instance lablel for input 2D tracks.
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
double GetY(int dcm=1, int feb=0, int pix=0)
std::string fProngPMLabel
Instance lablel for prong pixelmaps.
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
bool fObeyPreselection
Check rb::IsFiltered?
RegPixelMap CreateMapGivenVertex(const rb::Cluster &cluster, const Boundary &bound, unsigned int vtxPlane, unsigned int vtxXCell, unsigned int vtxYCell)
std::string fShowerLabel
Instance lablel for Regression CVN input Shower.
A Cluster with defined start position and direction.
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
const art::ProductToken< std::vector< rb::Cluster > > fClusterToken
Module lablel for input clusters.
std::string fTrack3DLabel
Instance lablel for input 3D tracks.
std::string fProngModLabel
Module lablel for input prongs.
RegPixelMap CreateMap(const rb::Cluster &slice)
Build slid::LID objects to store electron ID, if asked for, otherwise, calculate LID info and make av...
unsigned int NPlanes() const
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
double GetX(int ndb=14, int db=1, int feb=0, int pix=0)