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

Public Member Functions

 CVNMapperSim (fhicl::ParameterSet const &pset)
 
 ~CVNMapperSim ()
 
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...
 
PixelMapSimProducer 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 CVNMapperSim_module.cc.

Constructor & Destructor Documentation

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

Definition at line 84 of file CVNMapperSim_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  }
std::string fHitsModuleLabel
Module lablel for input clusters.
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
std::string string
Definition: nybbler.cc:12
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
PixelMapSimProducer fProducer
PixelMapProducer does the work for us.
unsigned short fWireLength
Length of pixel map in wires.
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
unsigned short fUnwrappedPixelMap
Use unwrapped pixel maps?
double fThreshold
ADC threshold for calculating charge from wires directly.
double fTimeResolution
Length of pixel map in wires.
unsigned short fTdcWidth
Width of pixel map in tdcs.
cvn::CVNMapperSim::~CVNMapperSim ( )

Definition at line 101 of file CVNMapperSim_module.cc.

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

Member Function Documentation

void cvn::CVNMapperSim::beginJob ( )
virtual

Reimplemented from art::EDProducer.

Definition at line 109 of file CVNMapperSim_module.cc.

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

Reimplemented from art::EDProducer.

Definition at line 113 of file CVNMapperSim_module.cc.

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

Implements art::EDProducer.

Definition at line 118 of file CVNMapperSim_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< sim::SimChannel > > hitlist;
125  auto hitListHandle = evt.getHandle< std::vector< sim::SimChannel > >(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  }
std::string fHitsModuleLabel
Module lablel for input clusters.
unsigned short fMinClusterHits
Minimum number of hits for cluster to be converted to pixel map.
Handle< PROD > getHandle(SelectorBase const &) const
Definition: DataViewImpl.h:382
PixelMapSimProducer fProducer
PixelMapProducer does the work for us.
void SetUnwrapped(unsigned short unwrap)
def move(depos, offset)
Definition: depos.py:107
std::string fClusterPMLabel
Instance lablel for cluster pixelmaps.
ProductID put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
Definition: DataViewImpl.h:686
PixelMap CreateMap(detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< sim::SimChannel > > &slice)
unsigned short fUnwrappedPixelMap
Use unwrapped pixel maps?
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::string cvn::CVNMapperSim::fClusterPMLabel
private

Instance lablel for cluster pixelmaps.

Definition at line 51 of file CVNMapperSim_module.cc.

std::string cvn::CVNMapperSim::fHitsModuleLabel
private

Module lablel for input clusters.

Definition at line 48 of file CVNMapperSim_module.cc.

unsigned short cvn::CVNMapperSim::fMinClusterHits
private

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

Definition at line 54 of file CVNMapperSim_module.cc.

PixelMapSimProducer cvn::CVNMapperSim::fProducer
private

PixelMapProducer does the work for us.

Definition at line 77 of file CVNMapperSim_module.cc.

unsigned short cvn::CVNMapperSim::fTdcWidth
private

Width of pixel map in tdcs.

Definition at line 57 of file CVNMapperSim_module.cc.

double cvn::CVNMapperSim::fThreshold
private

ADC threshold for calculating charge from wires directly.

Definition at line 74 of file CVNMapperSim_module.cc.

double cvn::CVNMapperSim::fTimeResolution
private

Length of pixel map in wires.

Definition at line 63 of file CVNMapperSim_module.cc.

unsigned short cvn::CVNMapperSim::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 CVNMapperSim_module.cc.

unsigned short cvn::CVNMapperSim::fWireLength
private

Length of pixel map in wires.

Definition at line 60 of file CVNMapperSim_module.cc.


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