All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
lar::test::TrackProxyHitMaker Class Reference

Creates some dummy hits. More...

Inheritance diagram for lar::test::TrackProxyHitMaker:

Classes

struct  Config
 

Public Types

using Parameters = art::EDProducer::Table< Config >
 

Public Member Functions

 TrackProxyHitMaker (Parameters const &config)
 
virtual void produce (art::Event &event) override
 

Private Attributes

unsigned int nHits
 Number of hits to be generated. More...
 

Detailed Description

Creates some dummy hits.

The produced hits are not associated to wires or raw digits.

Configuration parameters

Definition at line 44 of file TrackProxyHitMaker_module.cc.

Member Typedef Documentation

using lar::test::TrackProxyHitMaker::Parameters = art::EDProducer::Table<Config>

Definition at line 59 of file TrackProxyHitMaker_module.cc.

Constructor & Destructor Documentation

lar::test::TrackProxyHitMaker::TrackProxyHitMaker ( Parameters const &  config)
inlineexplicit

Definition at line 61 of file TrackProxyHitMaker_module.cc.

62  : EDProducer{config}, nHits(config().nHits())
63  {
64  produces<std::vector<recob::Hit>>();
65  }
unsigned int nHits
Number of hits to be generated.

Member Function Documentation

void lar::test::TrackProxyHitMaker::produce ( art::Event &  event)
overridevirtual

Definition at line 82 of file TrackProxyHitMaker_module.cc.

82  {
83 
84  auto hits = std::make_unique<std::vector<recob::Hit>>();
85 
86  for (unsigned int i = 0; i < nHits; ++i) {
87 
88  hits->emplace_back(
89  raw::ChannelID_t(i + 1), // channel
90  raw::TDCtick_t(10*i), // start_tick
91  raw::TDCtick_t(10*i + 40), // end_tick
92  10.0 * i, // peak_time
93  1.0, // sigma_peak_time
94  0.5, // RMS
95  200.0 + i, // peak_amplitude
96  10.0, // sigma_peak_amplitude
97  400.0, // summedADC
98  400.0, // hit_integral
99  10.0, // hit_sigma_integral
100  1, // multiplicity
101  0, // local_index
102  1.0, // goodness_of_fit
103  37, // DOF
104  geo::kUnknown, // view
105  geo::kCollection, // signal_type
106  geo::WireID{ 0, 1, 2, i } // wire ID
107  );
108 
109  } // for
110 
111  mf::LogInfo("TrackProxyHitMaker") << "Produced " << hits->size() << " hits.";
112 
113  event.put(std::move(hits));
114 
115 } // lar::test::TrackProxyHitMaker::produce()
Unknown view.
Definition: geo_types.h:136
int TDCtick_t
Type representing a TDC tick.
Definition: RawTypes.h:25
unsigned int nHits
Number of hits to be generated.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
Signal from collection planes.
Definition: geo_types.h:146

Member Data Documentation

unsigned int lar::test::TrackProxyHitMaker::nHits
private

Number of hits to be generated.

Definition at line 70 of file TrackProxyHitMaker_module.cc.


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