17 #include <unordered_map> 46 for (
auto const&
t : trees) {
51 for (
size_t i = 0; i <
hitData.size(); ++i)
102 HitProcessingQueue.push_back(std::make_pair(std::cref(HitVector), std::cref(AssocVector)));
110 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
118 for (
size_t iwire = 0; iwire < WireVector.size(); iwire++)
119 FillWireInfo(WireVector[iwire], iwire, MCHitCollectionVector, AssocVector[iwire], clock_data);
158 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
159 std::vector<int>
const& thisAssocVector,
165 unsigned int range_index = 0;
175 ProcessROI(range, WireIndex, MCHitCollectionVector, thisAssocVector, clock_data);
185 float& charge_peak_time)
192 for (
auto const&
value : range) {
194 if (
value > charge_peak) {
196 charge_peak_time = (
float)counter;
205 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
206 std::vector<int>
const& thisAssocVector,
235 std::vector<int>
const& HitsOnWire,
236 size_t hitmodule_iter,
237 size_t begin_wire_tdc,
243 for (
auto const& hit_index : HitsOnWire) {
244 recob::Hit const& thishit = HitVector.at(hit_index);
263 *(
hitData.at(hitmodule_iter)) = thishit;
279 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
280 std::vector<int>
const& HitsOnWire,
281 size_t begin_wire_tdc,
288 for (
auto const& hit_index : HitsOnWire) {
292 std::unordered_map<int, unsigned int> nmchits_per_trackID_map;
293 for (
auto const& thishit : thismchitcol) {
300 if (clock_data.
TPCTDC2Tick(thishit.PeakTime() - thishit.PeakWidth()) < begin_wire_tdc ||
301 clock_data.
TPCTDC2Tick(thishit.PeakTime() + thishit.PeakWidth()) > end_wire_tdc)
304 nmchits_per_trackID_map[thishit.PartTrackId()] += 1;
328 HitInfoVector.emplace_back(hit.
PeakTime(),
std::vector< std::string > HitModuleLabels
void LoadHitAssocPair(std::vector< recob::Hit > const &, std::vector< std::vector< int >> const &, std::string const &)
void SetHitDataTree(std::vector< TTree * > &trees)
void ProcessROI(lar::sparse_vector< float >::datarange_t const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, detinfo::DetectorClocksData const &)
void FillHitInfo(recob::Hit const &, std::vector< HitInfo > &)
std::vector< float > Hits_wAverageCharge
std::vector< float > Hits_MeanMultiplicity
float RMS() const
RMS of the hit shape, in tick units.
hit::HitAnaAlgException hitanaalgexception
std::vector< recob::Hit * > hitData
void ClearWireDataHitInfo()
float SigmaPeakAmplitude() const
Uncertainty on estimated amplitude of the hit at its peak, in ADC units.
float SigmaIntegral() const
std::vector< float > Hits_PeakTime
const range_list_t & get_ranges() const
Returns the internal list of non-void ranges.
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
size_type begin_index() const
Returns the first absolute index included in the range.
float GoodnessOfFit() const
Degrees of freedom in the determination of the hit signal shape (-1 by default)
short int Multiplicity() const
How many hits could this one be shared with.
double TPCTDC2Tick(double const tdc) const
Given electronics clock count [tdc] returns TPC time-tick.
void SetWireDataTree(TTree *)
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
std::vector< std::string > HitModuleLabels
geo::View_t View() const
Returns the view the channel belongs to.
float MCHits_wAverageTime
std::vector< float > Hits_PeakCharge
float MCHits_IntegratedCharge
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
float MCHits_wAverageCharge
std::vector< float > Hits_AverageCharge
const RegionsOfInterest_t & SignalROI() const
Returns the list of regions of interest.
void AnalyzeWires(std::vector< recob::Wire > const &, std::vector< sim::MCHitCollection > const &, std::vector< std::vector< int >> const &, detinfo::DetectorClocksData const &, unsigned int, unsigned int)
std::vector< float > Hits_wAverageTime
raw::TDCtick_t StartTick() const
Initial tdc tick for hit.
float PeakTimeMinusRMS(float sigmas=+1.) const
Detector simulation of raw signals on wires.
raw::TDCtick_t EndTick() const
Final tdc tick for hit.
std::vector< reco::ClusterHit2D * > HitVector
What follows are several highly useful typedefs which we want to expose to the outside world...
float PeakTime() const
Time of the signal peak, in tick units.
size_type size() const
Returns the size of the range.
void InitWireData(unsigned int, unsigned int)
Contains all timing reference information for the detector.
std::vector< art::Ptr< recob::Wire > > WireVector
std::vector< float > Hits_IntegratedCharge
std::vector< TTree * > hitDataTree
std::vector< std::vector< HitInfo > > Hits
Class holding the regions of interest of signal from a channel.
Range class, with range and data.
float MCHits_AverageCharge
float SigmaPeakTime() const
Uncertainty for the signal peak, in tick units.
2D representation of charge deposited in the TDC/wire plane
float PeakTimePlusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
void FindAndStoreHitsInRange(std::vector< recob::Hit > const &, std::vector< int > const &, size_t, size_t, size_t)
second_as<> second
Type of time stored in seconds, in double precision.
std::vector< HitAssocPair > HitProcessingQueue
void ROIInfo(lar::sparse_vector< float >::datarange_t const &, float &, float &, float &)
void FindAndStoreMCHitsInRange(std::vector< sim::MCHitCollection > const &, std::vector< int > const &, size_t, size_t, detinfo::DetectorClocksData const &)
Event finding and building.
pure virtual base interface for detector clocks
void FillWireInfo(recob::Wire const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, detinfo::DetectorClocksData const &)