Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
cvn::RegCVNMapper Class Reference
Inheritance diagram for cvn::RegCVNMapper:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 RegCVNMapper (fhicl::ParameterSet const &pset)
 
 ~RegCVNMapper ()
 
void produce (art::Event &evt)
 
void beginJob ()
 
void endJob ()
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

const art::ProductToken< std::vector< rb::Cluster > > fClusterToken
 Module lablel for input clusters. More...
 
bool fProngInput
 Use Prong or Track as input. More...
 
std::string fProngModLabel
 Module lablel for input prongs. More...
 
std::string fProng3DLabel
 Instance lablel for input 3D prongs. More...
 
std::string fProng2DLabel
 Instance lablel for input 2D prongs. More...
 
std::string fTrack3DLabel
 Instance lablel for input 3D tracks. More...
 
std::string fTrack2DLabel
 Instance lablel for input 2D tracks. More...
 
std::string fShowerLabel
 Instance lablel for Regression CVN input Shower. More...
 
std::string fClusterPMLabel
 Instance lablel for cluster pixelmaps. More...
 
std::string fProngPMLabel
 Instance lablel for prong pixelmaps. More...
 
bool fMapProngs
 Option to save maps for prongs. More...
 
bool fObeyPreselection
 Check rb::IsFiltered? More...
 
std::vector< std::stringfPreselectionLabels
 Filter labels. More...
 
unsigned short fMinClusterHits
 Minimum number of hits for cluster to be converted to pixel map. More...
 
unsigned short fCellWidth
 Width of pixel map in cells. More...
 
unsigned short fPlaneLength
 Length of pixel map in planes. More...
 
unsigned int fMaxPlaneGap
 
bool fUseGeV
 true=GeV, false=PECorr More...
 
RegPixelMapProducer fProducer
 PixelMapProducer does the work for us. More...
 

Detailed Description

Definition at line 55 of file RegCVNMapper_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

cvn::RegCVNMapper::RegCVNMapper ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 132 of file RegCVNMapper_module.cc.

References fClusterPMLabel, and fProngPMLabel.

132  :
133  fClusterToken(consumes<std::vector<rb::Cluster>>(pset.get<std::string>("ClusterLabel"))),
134  fProngInput (pset.get<bool> ("ProngInput")),
135  fProngModLabel (pset.get<std::string> ("ProngModLabel")),
136  fProng3DLabel (pset.get<std::string> ("Prong3DLabel")),
137  fProng2DLabel (pset.get<std::string> ("Prong2DLabel")),
138  fTrack3DLabel (pset.get<std::string> ("Track3DLabel")),
139  fTrack2DLabel (pset.get<std::string> ("Track2DLabel")),
140  fShowerLabel (pset.get<std::string> ("ShowerLabel")),
141  fClusterPMLabel(pset.get<std::string> ("ClusterPMLabel")),
142  fProngPMLabel (pset.get<std::string> ("ProngPMLabel")),
143  fMapProngs (pset.get<bool> ("MapProngs")),
144  fObeyPreselection(pset.get<bool> ("ObeyPreselection")),
145  fPreselectionLabels (pset.get<std::vector<std::string>>("PreselectionLabels")),
146  fMinClusterHits(pset.get<unsigned short> ("MinClusterHits")),
147  fCellWidth (pset.get<unsigned short> ("CellWidth")),
148  fPlaneLength (pset.get<unsigned short> ("PlaneLength")),
149  fMaxPlaneGap (pset.get<unsigned int> ("MaxPlaneGap")),
150  fUseGeV (pset.get<bool> ("UseGeV")),
152  {
153 
154  produces< std::vector<cvn::RegPixelMap> >(fClusterPMLabel);
155  produces< std::vector<cvn::RegPixelMap> >(fProngPMLabel);
156  produces< art::Assns<cvn::RegPixelMap, rb::Cluster> >();
157  produces< art::Assns<cvn::RegPixelMap, rb::Prong> >();
158  }
bool fProngInput
Use Prong or Track as input.
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
std::vector< std::string > fPreselectionLabels
Filter labels.
std::string fProng3DLabel
Instance lablel for input 3D prongs.
unsigned short fPlaneLength
Length of pixel map in planes.
RegPixelMapProducer fProducer
PixelMapProducer does the work for us.
std::string fProng2DLabel
Instance lablel for input 2D prongs.
bool fMapProngs
Option to save maps for prongs.
std::string fTrack2DLabel
Instance lablel for input 2D tracks.
unsigned short fCellWidth
Width of pixel map in cells.
bool fUseGeV
true=GeV, false=PECorr
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?
std::string fShowerLabel
Instance lablel for Regression CVN input Shower.
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.
ProductToken< T > consumes(InputTag const &)
enum BeamMode string
cvn::RegCVNMapper::~RegCVNMapper ( )

Definition at line 161 of file RegCVNMapper_module.cc.

162  {
163  //======================================================================
164  // Clean up any memory allocated by your module
165  //======================================================================
166  }

Member Function Documentation

void cvn::RegCVNMapper::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 169 of file RegCVNMapper_module.cc.

170  {
171 }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDProducer::currentContext ( ) const
protectedinherited
void cvn::RegCVNMapper::endJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 174 of file RegCVNMapper_module.cc.

175  {
176  }
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

Referenced by skim::NueSkimmer::CopyMichelSlice(), and skim::NueSkimmer::CopyMichelTrack().

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID(), and string.

41  {
42  return true;
43  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
void cvn::RegCVNMapper::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 179 of file RegCVNMapper_module.cc.

References cvn::RegPixelMap::Bound(), geo::PlaneGeo::Cell(), util::CreateAssn(), cvn::RegPixelMapProducer::CreateMap(), cvn::RegPixelMapProducer::CreateMapGivenBoundary(), cvn::RegPixelMapProducer::CreateMapGivenShowerVertex(), cvn::RegPixelMapProducer::CreateMapGivenVertex(), DEFINE_ART_MODULE(), stan::math::fabs(), fClusterPMLabel, fClusterToken, fMapProngs, fMinClusterHits, fObeyPreselection, fPreselectionLabels, fProducer, fProng2DLabel, fProng3DLabel, fProngInput, fProngModLabel, fProngPMLabel, fShowerLabel, fTrack2DLabel, fTrack3DLabel, geom(), art::DataViewImpl::getByToken(), geo::CellGeo::GetCenter(), GetX(), GetY(), MECModelEnuComparisons::i, ip, rb::IsFiltered(), calib::j, geo::kY, geo::PlaneGeo::Ncells(), geo::GeometryBase::NPlanes(), geo::GeometryBase::Plane(), art::PtrVector< T >::push_back(), art::Event::put(), art::PtrVector< T >::size(), registry_explorer::v, geo::PlaneGeo::View(), and xx.

180  {
181 
182 
184  evt.getByToken(fClusterToken,sliceHandle);
185 
186  if(sliceHandle->empty()){
187  mf::LogWarning ("No Slices")<<"No Slices in the input file";
188  return;
189  }
190 
192  for(unsigned int i = 0; i<sliceHandle->size();++i){
193  art::Ptr<rb::Cluster> clust(sliceHandle,i);
194  sliceCol.push_back(clust);
195  }
196 
197 
198  //Declaring containers for things to be stored in event
199  std::unique_ptr< std::vector<RegPixelMap> >
200  pmCol(new std::vector<RegPixelMap>);
201  std::unique_ptr< std::vector<RegPixelMap> >
202  prong_pmCol(new std::vector<RegPixelMap>);
203  std::unique_ptr< art::Assns<RegPixelMap, rb::Cluster> >
205  std::unique_ptr< art::Assns<RegPixelMap, rb::Prong> >
206  prong_assoc(new art::Assns<RegPixelMap,
207  rb::Prong>);
208 
210 
211  art::FindManyP<rb::Prong> fmProng3D(sliceHandle, evt,
213 
214  art::FindManyP<rb::Prong> fmProng2D(sliceHandle, evt,
216 
217  art::FindManyP<rb::Track> fmTrack3D(sliceHandle, evt, fTrack3DLabel);
218 
219  art::FindManyP<rb::Track> fmTrack2D(sliceHandle, evt, fTrack2DLabel);
220 
221  art::FindManyP<rb::Vertex> fmv(sliceHandle, evt, "elasticarmshs");
222 
223  for(unsigned int iSlice = 0; iSlice < sliceCol.size(); ++iSlice)
224  {
225  if (sliceCol[iSlice]->IsNoise() ||
226  sliceCol[iSlice]->NCell() < fMinClusterHits)
227  continue;
228  // Skip if we're obeying preselection
229  if(fObeyPreselection && rb::IsFiltered(evt, sliceHandle, iSlice, fPreselectionLabels))
230  continue;
231 // std::cout<<"CVN CreatMap, iSlice "<<iSlice<<std::endl;
232  RegPixelMap pm = fProducer.CreateMap(*sliceCol[iSlice]);
233  Boundary bound = pm.Bound();
234 
235 // pmCol->push_back(pm);
236 // util::CreateAssn(*this, evt, *(pmCol.get()),
237 // sliceCol[iSlice], *(assoc.get()), UINT_MAX,
238 // fClusterPMLabel);
239 
240  // Option to save prong level pixel maps
241  if ( fMapProngs ){
242  unsigned int vtxPlane = 0;
243  unsigned int vtxXCell = 0;
244  unsigned int vtxYCell = 0;
245 
246  if ((fmv.isValid())){
247  std::vector<art::Ptr<rb::Vertex> > v = fmv.at(iSlice);
248  for (unsigned int j=0; j<v.size(); ++j) {
249  TVector3 evtVtx(0,0,0);
250  //store vertex coordinates
251  evtVtx.SetX(v[j]->GetX());
252  evtVtx.SetY(v[j]->GetY());
253  evtVtx.SetZ(v[j]->GetZ());
254  double dmin = 9999999;
255  //find plane number closest to vertex
256  for(unsigned int pp = 0; pp < geom->NPlanes();pp++){
257  if(pp%2==0)continue;
258  Double_t cellXYZ[3]={0,0,0};
259  geom->Plane(pp)->Cell(0)->GetCenter(cellXYZ);
260  double mind = fabs(cellXYZ[2]-evtVtx[2]);
261  if(mind<=dmin){
262  dmin=mind;
263  vtxPlane = pp;
264  }
265  }
266 // if(vtxPlane%2==1)vtxPlane = vtxPlane-1;
267  double dminx = 9999999;
268  double dminy = 9999999;
269  unsigned int xp=0;
270  unsigned int yp=1;
271  if(geom->Plane(0)->View()==geo::kY){xp=1;yp=0;}
272 
273  for(unsigned int xx = 0; xx < geom->Plane(xp)->Ncells();xx++){
274  Double_t cellXYZ[3]={0,0,0};
275  geom->Plane(xp)->Cell(xx)->GetCenter(cellXYZ);
276  double mind = fabs(cellXYZ[0]-evtVtx[0]);
277  if(mind<=dminx){
278  dminx=mind;
279  vtxXCell = xx;
280  }
281  }
282 
283  for(unsigned int yy = 0; yy < geom->Plane(yp)->Ncells();yy++){
284  Double_t cellXYZ[3]={0,0,0};
285  geom->Plane(yp)->Cell(yy)->GetCenter(cellXYZ);
286  double mind = fabs(cellXYZ[1]-evtVtx[1]);
287  if(mind<=dminy){
288  dminy=mind;
289  vtxYCell = yy;
290  }
291  }
292  }
293  }
294 // std::cout<<"In PixelMapper - Evt: Run, SubRun, Event, SubEvent "<<evt.run()<<" "<<evt.subRun()<<" "<<evt.id().event()<<" "<<iSlice<<std::endl;
295  RegPixelMap pm_evt = fProducer.CreateMapGivenVertex(*sliceCol[iSlice],
296  bound, vtxPlane, vtxXCell, vtxYCell);
297 
298 // std::cout<<"Finish fProducer.CreateMapGivenVertex **************************************************************"<<std::endl;
299 // pmCol->push_back(pm_evt);
300 // util::CreateAssn(*this, evt, *(pmCol.get()),
301 // sliceCol[iSlice], *(assoc.get()), UINT_MAX,
302 // fClusterPMLabel);
303 
304 
305  std::vector<art::Ptr<rb::Prong>> prongs3D;
306  std::vector<art::Ptr<rb::Prong>> prongs2D;
307  std::vector<art::Ptr<rb::Shower>> showers3D;
308 // std::cout<<"fmProng2D.isValid(), fmProng3D.isValid() "<<fmProng2D.isValid()<<" "<<fmProng3D.isValid()<<std::endl;
309  if(fProngInput==true && fmProng2D.isValid() ){
310  prongs2D = fmProng2D.at(iSlice);
311  }
312  if(fProngInput==false && fmTrack2D.isValid() ){
313  std::vector<art::Ptr<rb::Track> > tracks2D;
314  tracks2D.clear();
315  tracks2D = fmTrack2D.at(iSlice);
316  for (unsigned int ip=0; ip<tracks2D.size(); ++ip){
317  prongs2D.push_back(tracks2D[ip]);
318  }
319  }
320 
321  if(fProngInput==true && fmProng3D.isValid() ){
322  prongs3D = fmProng3D.at(iSlice);
323  }
324  if(fProngInput==false && fmTrack3D.isValid() ){
325  std::vector<art::Ptr<rb::Track> > tracks3D;
326  tracks3D.clear();
327  tracks3D = fmTrack3D.at(iSlice);
328  for (unsigned int ip=0; ip<tracks3D.size(); ++ip){
329  prongs3D.push_back(tracks3D[ip]);
330  }
331  }
332 
333  if(!prongs3D.empty()){
334  unsigned int pngId = 0;
335  art::FindOneP<rb::Shower> fmShower3D(prongs3D, evt, fShowerLabel);
336  for(unsigned int iPng = 0; iPng < prongs3D.size(); ++iPng){
337  if(fmShower3D.isValid()){
338  art::Ptr<rb::Shower> slid = fmShower3D.at(pngId);
339  if(slid){
340  showers3D.push_back(slid);
341  }
342  }
343  pngId++;
344  }
345  }else continue;
346  if(prongs3D.size()!=showers3D.size()) continue;
347 
348 // std::cout<<"prongs3D.size(), prongs2D.size, shower3D.size() "<<prongs3D.size()<<" "<<prongs2D.size()<<" "<<showers3D.size()<<std::endl;
349 // RegPixelMap pm_evt_sh = fProducer.CreateMapGivenVertex(showers3D,
350 // bound, vtxPlane, vtxXCell, vtxYCell);
351 // pmCol->push_back(pm_evt_sh);
352  pmCol->push_back(pm_evt);
353  util::CreateAssn(*this, evt, *(pmCol.get()),
354  sliceCol[iSlice], *(assoc.get()), UINT_MAX,
356 
357  for( unsigned int iProng = 0; iProng < showers3D.size(); ++iProng ){
358 // std::cout<<"CreateMapGivenBoundary 3D Prong, NCell, NPlane "<<prongs3D[iProng]->NCell()<<" "<<prongs3D[iProng]->ExtentPlane()<<std::endl;
359 // std::cout<<"CreateMapGivenBoundary 3D Shwoer, NCell, NPlane "<<showers3D[iProng]->NCell()<<" "<<showers3D[iProng]->ExtentPlane()<<std::endl;
360 // std::cout<<"vtxPlane, vtxXCell, vtxYCell "<<vtxPlane<<" "<<vtxXCell<<" "<<vtxYCell<<std::endl;
361  RegPixelMap new_pm = fProducer.CreateMapGivenShowerVertex(*showers3D[iProng],
362  bound, vtxPlane, vtxXCell, vtxYCell);
363 
364 
365  prong_pmCol->push_back(new_pm);
366  util::CreateAssn(*this, evt, *(prong_pmCol.get()),
367  prongs3D[iProng], *(prong_assoc.get()), UINT_MAX, fProngPMLabel);
368  }// 3D prongs
369 
370  for( unsigned int iProng2 = 0; iProng2 < prongs2D.size(); ++iProng2 ){
371 
372  // make prong maps with the same boundary as the slice maps
373  RegPixelMap new_pm = fProducer.CreateMapGivenBoundary(*prongs2D[iProng2],
374  bound);
375 
376  prong_pmCol->push_back(new_pm);
377  util::CreateAssn(*this, evt, *(prong_pmCol.get()),
378  prongs2D[iProng2], *(prong_assoc.get()), UINT_MAX, fProngPMLabel);
379  }// 2D prongs
380 
381  }// MapProngs
382 
383  }
384  evt.put(std::move(pmCol), fClusterPMLabel);
385  evt.put(std::move(prong_pmCol), fProngPMLabel);
386  evt.put(std::move(assoc));
387  evt.put(std::move(prong_assoc));
388  // evt.put(std::move(prong_assoc),fProng3DLabel);
389 
390  }
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
Definition: CellGeo.cxx:159
Double_t xx
Definition: macro.C:12
fvar< T > fabs(const fvar< T > &x)
Definition: fabs.hpp:15
bool fProngInput
Use Prong or Track as input.
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
const CellGeo * Cell(int icell) const
Definition: PlaneGeo.h:48
std::vector< std::string > fPreselectionLabels
Filter labels.
unsigned int Ncells() const
Number of cells in this plane.
Definition: PlaneGeo.h:43
std::string fProng3DLabel
Instance lablel for input 3D prongs.
TString ip
Definition: loadincs.C:5
RegPixelMapProducer fProducer
PixelMapProducer does the work for us.
const PlaneGeo * Plane(unsigned int i) const
Horizontal planes which measure Y.
Definition: PlaneGeo.h:29
std::string fProng2DLabel
Instance lablel for input 2D prongs.
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
Boundary Bound() const
Map boundary.
Definition: RegPixelMap.h:39
RegPixelMap CreateMapGivenBoundary(const rb::Cluster &cluster, const Boundary &bound)
View_t View() const
Which coordinate does this plane measure.
Definition: PlaneGeo.h:53
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)
Definition: PtrVector.h:441
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"?
Definition: FilterList.h:96
const double j
Definition: BetheBloch.cxx:29
double GetY(int dcm=1, int feb=0, int pix=0)
Definition: PlotOnMon.C:119
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?
size_type size() const
Definition: PtrVector.h:308
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.
Definition: Prong.h:19
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void geom(int which=0)
Definition: geom.C:163
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...
Definition: FillPIDs.h:13
unsigned int NPlanes() const
bool getByToken(ProductToken< PROD > const &token, Handle< PROD > &result) const
Definition: DataViewImpl.h:387
double GetX(int ndb=14, int db=1, int feb=0, int pix=0)
Definition: PlotOnMon.C:111
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Member Data Documentation

unsigned short cvn::RegCVNMapper::fCellWidth
private

Width of pixel map in cells.

Definition at line 112 of file RegCVNMapper_module.cc.

std::string cvn::RegCVNMapper::fClusterPMLabel
private

Instance lablel for cluster pixelmaps.

Definition at line 93 of file RegCVNMapper_module.cc.

Referenced by produce(), and RegCVNMapper().

const art::ProductToken<std::vector<rb::Cluster> > cvn::RegCVNMapper::fClusterToken
private

Module lablel for input clusters.

Definition at line 68 of file RegCVNMapper_module.cc.

Referenced by produce().

bool cvn::RegCVNMapper::fMapProngs
private

Option to save maps for prongs.

Definition at line 99 of file RegCVNMapper_module.cc.

Referenced by produce().

unsigned int cvn::RegCVNMapper::fMaxPlaneGap
private

Maximum gap in planes at front of cluster to prevent pruning of upstream hits

Definition at line 119 of file RegCVNMapper_module.cc.

unsigned short cvn::RegCVNMapper::fMinClusterHits
private

Minimum number of hits for cluster to be converted to pixel map.

Definition at line 109 of file RegCVNMapper_module.cc.

Referenced by produce().

bool cvn::RegCVNMapper::fObeyPreselection
private

Check rb::IsFiltered?

Definition at line 102 of file RegCVNMapper_module.cc.

Referenced by produce().

unsigned short cvn::RegCVNMapper::fPlaneLength
private

Length of pixel map in planes.

Definition at line 115 of file RegCVNMapper_module.cc.

std::vector<std::string> cvn::RegCVNMapper::fPreselectionLabels
private

Filter labels.

Definition at line 105 of file RegCVNMapper_module.cc.

Referenced by produce().

RegPixelMapProducer cvn::RegCVNMapper::fProducer
private

PixelMapProducer does the work for us.

Definition at line 125 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fProng2DLabel
private

Instance lablel for input 2D prongs.

Definition at line 80 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fProng3DLabel
private

Instance lablel for input 3D prongs.

Definition at line 77 of file RegCVNMapper_module.cc.

Referenced by produce().

bool cvn::RegCVNMapper::fProngInput
private

Use Prong or Track as input.

Definition at line 71 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fProngModLabel
private

Module lablel for input prongs.

Definition at line 74 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fProngPMLabel
private

Instance lablel for prong pixelmaps.

Definition at line 96 of file RegCVNMapper_module.cc.

Referenced by produce(), and RegCVNMapper().

std::string cvn::RegCVNMapper::fShowerLabel
private

Instance lablel for Regression CVN input Shower.

Definition at line 90 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fTrack2DLabel
private

Instance lablel for input 2D tracks.

Definition at line 86 of file RegCVNMapper_module.cc.

Referenced by produce().

std::string cvn::RegCVNMapper::fTrack3DLabel
private

Instance lablel for input 3D tracks.

Definition at line 83 of file RegCVNMapper_module.cc.

Referenced by produce().

bool cvn::RegCVNMapper::fUseGeV
private

true=GeV, false=PECorr

Definition at line 122 of file RegCVNMapper_module.cc.


The documentation for this class was generated from the following file: