9 #include "art/Framework/Core/EDProducer.h"
10 #include "art/Framework/Principal/Event.h"
11 #include "art/Framework/Principal/Handle.h"
12 #include "art/Framework/Services/Registry/ServiceHandle.h"
13 #include "art/Persistency/Common/PtrMaker.h"
14 #include "art/Utilities/ToolMacros.h"
15 #include "cetlib/cpu_timer.h"
16 #include "fhiclcpp/ParameterSet.h"
17 #include "messagefacility/MessageLogger/MessageLogger.h"
27 #include "icarus_signal_processing/Filters/ICARUSFFT.h"
61 virtual void configure(
const fhicl::ParameterSet&)
override;
91 using FFTPointer = std::unique_ptr<icarus_signal_processing::ICARUSFFT<double>>;
116 fWireEndPoints = pset.get<std::vector<size_t>>(
"WireEndPoints", std::vector<size_t>()={25,550});
117 fStartTick = pset.get<
size_t >(
"StartTick", 1000);
122 fGeometry = art::ServiceHandle<geo::Geometry const>{}.get();
126 auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
127 auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataForJob(clockData);
128 double driftVelocity =
detProp.DriftVelocity() * 10.;
136 fTanTheta = std::tan(fStartAngle * M_PI / 180.);
153 if (std::fabs(fStartAngle) < 90)
167 fFFT = std::make_unique<icarus_signal_processing::ICARUSFFT<double>>(numberTimeSamples);
195 for(
size_t wireIdx =
fWireEndPoints[0]; wireIdx < maxWire; wireIdx++)
208 size_t endTick = startTick + deltaTicks;
218 float arcLenPerTick = arcLenPerWire / float(deltaTicks);
220 float fracElecPerTick = numElectronsWire * arcLenPerTick / arcLenPerWire;
226 for(
size_t tickIdx = startTick; tickIdx < endTick; tickIdx++)
icarusutil::TimeVec fFFTTimeVec
icarusutil::SignalShapingICARUSService * fSignalShapingService
double GetASICGain(unsigned int const channel) const
virtual unsigned int NumberTimeSamples() const =0
std::vector< size_t > fTickEndPoints
std::vector< float > VectorFloat
FakeParticle(fhicl::ParameterSet const &pset)
Constructor.
~FakeParticle()
Destructor.
This provides an art tool interface definition for tools which can create "fake" particles to overlay...
std::vector< VectorFloat > ArrayFloat
const detinfo::DetectorProperties * fDetector
virtual void configure(const fhicl::ParameterSet &) override
Interface for configuring the particular algorithm tool.
std::vector< size_t > fWireEndPoints
std::vector< SigProcPrecision > TimeVec
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
FakeParticle class definiton.
The geometry of one entire detector, as served by art.
IFakeParticle interface class definiton.
raw::ChannelID_t PlaneWireToChannel(WireID const &wireid) const
Returns the ID of the TPC channel connected to the specified wire.
Contains all timing reference information for the detector.
virtual void overlayFakeParticle(detinfo::DetectorClocksData const &clockData, ArrayFloat &waveforms) override
Creates a fake particle and overlays on the input fragment.
std::unique_ptr< icarus_signal_processing::ICARUSFFT< double >> FFTPointer
const geo::Geometry * fGeometry
const icarus_tool::IResponse & GetResponse(size_t channel) const
unsigned int ChannelID_t
Type representing the ID of a readout channel.
double sampling_rate(DetectorClocksData const &data)
Returns the period of the TPC readout electronics clock.
int ResponseTOffset(unsigned int const channel) const
art framework interface to geometry description