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

Public Member Functions

 CVNMapper (fhicl::ParameterSet const &pset)
 
 ~CVNMapper ()
 
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...
 
PixelMapProducer 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 CVNMapper_module.cc.

Constructor & Destructor Documentation

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

Definition at line 81 of file CVNMapper_module.cc.

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

Definition at line 97 of file CVNMapper_module.cc.

98  {
99  //======================================================================
100  // Clean up any memory allocated by your module
101  //======================================================================
102  }

Member Function Documentation

void cvn::CVNMapper::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 105 of file CVNMapper_module.cc.

106  { }
void cvn::CVNMapper::endJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 109 of file CVNMapper_module.cc.

110  {
111  }
void cvn::CVNMapper::produce ( art::Event evt)
virtual

Implements art::EDProducer.

Definition at line 114 of file CVNMapper_module.cc.

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

Member Data Documentation

std::string cvn::CVNMapper::fClusterPMLabel
private

Instance lablel for cluster pixelmaps.

Definition at line 51 of file CVNMapper_module.cc.

std::string cvn::CVNMapper::fHitsModuleLabel
private

Module lablel for input clusters.

Definition at line 48 of file CVNMapper_module.cc.

unsigned short cvn::CVNMapper::fMinClusterHits
private

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

Definition at line 54 of file CVNMapper_module.cc.

PixelMapProducer cvn::CVNMapper::fProducer
private

PixelMapProducer does the work for us.

Definition at line 74 of file CVNMapper_module.cc.

unsigned short cvn::CVNMapper::fTdcWidth
private

Width of pixel map in tdcs.

Definition at line 57 of file CVNMapper_module.cc.

double cvn::CVNMapper::fTimeResolution
private

Length of pixel map in wires.

Definition at line 63 of file CVNMapper_module.cc.

unsigned short cvn::CVNMapper::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 CVNMapper_module.cc.

unsigned short cvn::CVNMapper::fWireLength
private

Length of pixel map in wires.

Definition at line 60 of file CVNMapper_module.cc.


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