Public Member Functions | Private Attributes | List of all members
cvn::CVNMapperWire Class Reference
Inheritance diagram for cvn::CVNMapperWire:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Member Functions

 CVNMapperWire (fhicl::ParameterSet const &pset)
 
 ~CVNMapperWire ()
 
void produce (art::Event &evt)
 
void beginJob ()
 
void endJob ()
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Attributes

std::string fHitsModuleLabel
 Module lablel for input clusters. More...
 
std::string fClusterPMLabel
 Instance lablel for cluster pixelmaps. More...
 
unsigned short fMinClusterHits
 Minimum number of hits for cluster to be converted to pixel map. More...
 
unsigned short fTdcWidth
 Width of pixel map in tdcs. More...
 
unsigned short fWireLength
 Length of pixel map in wires. More...
 
double fTimeResolution
 Length of pixel map in wires. More...
 
unsigned short fUnwrappedPixelMap
 Use unwrapped pixel maps? More...
 
double fThreshold
 ADC threshold for calculating charge from wires directly. More...
 
PixelMapWireProducer fProducer
 PixelMapProducer does the work for us. More...
 

Additional Inherited Members

- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 
- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 35 of file CVNMapperWire_module.cc.

Constructor & Destructor Documentation

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

Definition at line 84 of file CVNMapperWire_module.cc.

84  : EDProducer{pset},
85  fHitsModuleLabel (pset.get<std::string> ("HitsModuleLabel")),
86  fClusterPMLabel(pset.get<std::string> ("ClusterPMLabel")),
87  fMinClusterHits(pset.get<unsigned short> ("MinClusterHits")),
88  fTdcWidth (pset.get<unsigned short> ("TdcWidth")),
89  fWireLength (pset.get<unsigned short> ("WireLength")),
90  fTimeResolution (pset.get<unsigned short> ("TimeResolution")),
91  fUnwrappedPixelMap(pset.get<unsigned short> ("UnwrappedPixelMap")),
92  fThreshold (pset.get<double>("Threshold")),
94  {
95 
96  produces< std::vector<cvn::PixelMap> >(fClusterPMLabel);
97 
98  }
double fThreshold
ADC threshold for calculating charge from wires directly.
unsigned short fTdcWidth
Width of pixel map in tdcs.
std::string string
Definition: nybbler.cc:12
unsigned short fWireLength
Length of pixel map in wires.
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
unsigned short fUnwrappedPixelMap
Use unwrapped pixel maps?
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
double fTimeResolution
Length of pixel map in wires.
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
PixelMapWireProducer fProducer
PixelMapProducer does the work for us.
std::string fHitsModuleLabel
Module lablel for input clusters.
cvn::CVNMapperWire::~CVNMapperWire ( )

Definition at line 101 of file CVNMapperWire_module.cc.

102  {
103  //======================================================================
104  // Clean up any memory allocated by your module
105  //======================================================================
106  }

Member Function Documentation

void cvn::CVNMapperWire::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 109 of file CVNMapperWire_module.cc.

110  { }
void cvn::CVNMapperWire::endJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 113 of file CVNMapperWire_module.cc.

114  {
115  }
void cvn::CVNMapperWire::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 118 of file CVNMapperWire_module.cc.

119  {
120  // Use unwrapped pixel maps if requested
121  // 0 means no unwrap, 1 means unwrap in wire, 2 means unwrap in wire and time
123 
124  std::vector< art::Ptr< recob::Wire > > hitlist;
125  auto hitListHandle = evt.getHandle< std::vector< recob::Wire > >(fHitsModuleLabel);
126  if (hitListHandle)
127  art::fill_ptr_vector(hitlist, hitListHandle);
128  // unsigned short nhits = hitlist.size();
129 
130  //Declaring containers for things to be stored in event
131  std::unique_ptr< std::vector<cvn::PixelMap> >
132  pmCol(new std::vector<cvn::PixelMap>);
133 
134  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(evt);
135  PixelMap pm = fProducer.CreateMap(detProp, hitlist);
136  std::cout << "NROI : " << fProducer.NROI() << std::endl;
138  pmCol->push_back(pm);
139  //pm.Print();
140  //Boundary bound = pm.Bound();
141  //}
142  evt.put(std::move(pmCol), fClusterPMLabel);
143  //std::cout<<"Map Complete!"<<std::endl;
144  }
PixelMap CreateMap(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Wire > > &slice)
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
unsigned short fUnwrappedPixelMap
Use unwrapped pixel maps?
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
def move(depos, offset)
Definition: depos.py:107
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
void SetUnwrapped(unsigned short unwrap)
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
PixelMapWireProducer fProducer
PixelMapProducer does the work for us.
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
QTextStream & endl(QTextStream &s)
std::string fHitsModuleLabel
Module lablel for input clusters.

Member Data Documentation

std::string cvn::CVNMapperWire::fClusterPMLabel
private

Instance lablel for cluster pixelmaps.

Definition at line 51 of file CVNMapperWire_module.cc.

std::string cvn::CVNMapperWire::fHitsModuleLabel
private

Module lablel for input clusters.

Definition at line 48 of file CVNMapperWire_module.cc.

unsigned short cvn::CVNMapperWire::fMinClusterHits
private

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

Definition at line 54 of file CVNMapperWire_module.cc.

PixelMapWireProducer cvn::CVNMapperWire::fProducer
private

PixelMapProducer does the work for us.

Definition at line 77 of file CVNMapperWire_module.cc.

unsigned short cvn::CVNMapperWire::fTdcWidth
private

Width of pixel map in tdcs.

Definition at line 57 of file CVNMapperWire_module.cc.

double cvn::CVNMapperWire::fThreshold
private

ADC threshold for calculating charge from wires directly.

Definition at line 74 of file CVNMapperWire_module.cc.

double cvn::CVNMapperWire::fTimeResolution
private

Length of pixel map in wires.

Definition at line 63 of file CVNMapperWire_module.cc.

unsigned short cvn::CVNMapperWire::fUnwrappedPixelMap
private

Use unwrapped pixel maps?

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

Definition at line 71 of file CVNMapperWire_module.cc.

unsigned short cvn::CVNMapperWire::fWireLength
private

Length of pixel map in wires.

Definition at line 60 of file CVNMapperWire_module.cc.


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