16 #include <unordered_map> 38 for(
auto const& t : trees) {
43 for(
size_t i=0; i<
hitData.size(); ++i)
88 std::string
const& HitModuleLabel){
90 HitProcessingQueue.push_back( std::make_pair( std::cref(HitVector), std::cref(AssocVector)) );
99 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
100 std::vector< std::vector<int> >
const& AssocVector,
102 unsigned int event,
unsigned int run){
105 for(
size_t iwire=0 ; iwire < WireVector.size(); iwire++)
106 FillWireInfo(WireVector[iwire], iwire, MCHitCollectionVector, AssocVector[iwire], ts);
141 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
142 std::vector<int>
const& thisAssocVector,
147 unsigned int range_index = 0;
157 ProcessROI(range, WireIndex, MCHitCollectionVector, thisAssocVector, ts);
167 float& charge_peak_time){
173 for(
auto const&
value : range){
175 if(
value > charge_peak){
177 charge_peak_time = (float)counter;
186 std::vector<sim::MCHitCollection>
const& MCHitCollectionVector,
187 std::vector<int>
const& thisAssocVector,
214 std::vector<int>
const& HitsOnWire,
215 size_t hitmodule_iter,
216 size_t begin_wire_tdc,
217 size_t end_wire_tdc){
221 for(
auto const& hit_index : HitsOnWire){
222 recob::Hit const& thishit = HitVector.at(hit_index);
242 *(
hitData.at(hitmodule_iter)) = thishit;
258 std::vector<int>
const& HitsOnWire,
259 size_t begin_wire_tdc,
265 for(
auto const& hit_index : HitsOnWire){
269 std::unordered_map<int,unsigned int> nmchits_per_trackID_map;
270 for(
auto const& thishit : thismchitcol){
277 if( ts->
TPCTDC2Tick( thishit.PeakTime()-thishit.PeakWidth() ) < begin_wire_tdc ||
278 ts->
TPCTDC2Tick( thishit.PeakTime()+thishit.PeakWidth() ) > end_wire_tdc )
281 nmchits_per_trackID_map[thishit.PartTrackId()] += 1;
308 HitInfoVector.emplace_back(hit.
PeakTime(),
std::vector< std::string > HitModuleLabels
virtual double TPCTDC2Tick(double tdc) const =0
Given electronics clock count [tdc] returns TPC time-tick.
void FindAndStoreMCHitsInRange(std::vector< sim::MCHitCollection > const &, std::vector< int > const &, size_t, size_t, const detinfo::DetectorClocks *)
void SetHitDataTree(std::vector< TTree * > &trees)
std::vector< std::vector< HitInfo > > Hits
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
TNtupleSim Fill(f1, f2, f3, f4)
std::vector< HitAssocPair > HitProcessingQueue
void ClearWireDataHitInfo()
float SigmaPeakAmplitude() const
Uncertainty on estimated amplitude of the hit at its peak, in ADC units.
float SigmaIntegral() const
Initial tdc tick for hit.
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.
void LoadHitAssocPair(std::vector< recob::Hit > const &, std::vector< std::vector< int > > const &, std::string const &)
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.
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
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
void ProcessROI(lar::sparse_vector< float >::datarange_t const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
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< art::Ptr< recob::Wire > > WireVector
std::vector< float > Hits_AverageCharge
const RegionsOfInterest_t & SignalROI() const
Returns the list of regions of interest.
std::vector< float > Hits_wAverageTime
raw::TDCtick_t StartTick() const
Initial tdc tick for hit.
float PeakTimeMinusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
std::vector< art::Ptr< recob::Hit > > HitVector
Detector simulation of raw signals on wires.
Conversion of times between different formats and references.
raw::TDCtick_t EndTick() const
Final tdc tick for hit.
void FillWireInfo(recob::Wire const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
float PeakTime() const
Time of the signal peak, in tick units.
size_type size() const
Returns the size of the range.
std::string value(boost::any const &)
void InitWireData(unsigned int, unsigned int)
std::vector< float > Hits_IntegratedCharge
std::vector< TTree * > hitDataTree
Class holding the deconvoluted signals 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)
void AnalyzeWires(std::vector< recob::Wire > const &, std::vector< sim::MCHitCollection > const &, std::vector< std::vector< int > > const &, const detinfo::DetectorClocks *, unsigned int, unsigned int)
void ROIInfo(lar::sparse_vector< float >::datarange_t const &, float &, float &, float &)
Event finding and building.