LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
hit::HitAnaAlg Class Reference

#include "HitAnaAlg.h"

Public Member Functions

 HitAnaAlg ()
 
void SetWireDataTree (TTree *)
 
void SetHitDataTree (std::vector< TTree * > &trees)
 
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 LoadHitAssocPair (std::vector< recob::Hit > const &, std::vector< std::vector< int > > const &, std::string const &)
 
void ClearHitModules ()
 

Private Types

typedef std::pair< const std::vector< recob::Hit > &, const std::vector< std::vector< int > > & > HitAssocPair
 

Private Member Functions

void InitWireData (unsigned int, unsigned int)
 
void ClearWireDataHitInfo ()
 
void FillHitInfo (recob::Hit const &, std::vector< HitInfo > &)
 
void FillWireInfo (recob::Wire const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
 
void ProcessROI (lar::sparse_vector< float >::datarange_t const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
 
void ROIInfo (lar::sparse_vector< float >::datarange_t const &, float &, float &, float &)
 
void FindAndStoreHitsInRange (std::vector< recob::Hit > const &, std::vector< int > const &, size_t, size_t, size_t)
 
void FindAndStoreMCHitsInRange (std::vector< sim::MCHitCollection > const &, std::vector< int > const &, size_t, size_t, const detinfo::DetectorClocks *)
 
void SetupWireDataTree ()
 

Private Attributes

WireROIInfo wireData
 
std::vector< recob::Hit * > hitData
 
std::vector< std::string > HitModuleLabels
 
std::vector< HitAssocPairHitProcessingQueue
 
TTree * wireDataTree
 
std::vector< TTree * > hitDataTree
 

Friends

class HitAnaAlgTest
 

Detailed Description

Definition at line 102 of file HitAnaAlg.h.

Member Typedef Documentation

typedef std::pair< const std::vector<recob::Hit>& , const std::vector< std::vector<int> >& > hit::HitAnaAlg::HitAssocPair
private

Definition at line 104 of file HitAnaAlg.h.

Constructor & Destructor Documentation

hit::HitAnaAlg::HitAnaAlg ( )

Title: HitAnaModule Author: wketc.nosp@m.hum@.nosp@m.lanl..nosp@m.gov Inputs: recob::Wire (calibrated), recob::Hit, Assns<recob::Wire, recob::Hit> Outputs: validation histograms

Description: This module is intended to be yet another hit analyzer module. Its intention is (1) to compare hit-finding modules against each other, and eventually (2) to compare those to truth

Definition at line 18 of file HitAnaAlg.cxx.

References hit::WireROIInfo::NHitModules, and wireData.

18  {
20 }
WireROIInfo wireData
Definition: HitAnaAlg.h:156

Member Function Documentation

void hit::HitAnaAlg::AnalyzeWires ( std::vector< recob::Wire > const &  WireVector,
std::vector< sim::MCHitCollection > const &  MCHitCollectionVector,
std::vector< std::vector< int > > const &  AssocVector,
const detinfo::DetectorClocks ts,
unsigned int  event,
unsigned int  run 
)

Definition at line 98 of file HitAnaAlg.cxx.

References FillWireInfo(), and InitWireData().

Referenced by hit::HitAnaModule::analyze().

102  {
103 
104  InitWireData(event,run);
105  for(size_t iwire=0 ; iwire < WireVector.size(); iwire++)
106  FillWireInfo(WireVector[iwire], iwire, MCHitCollectionVector, AssocVector[iwire], ts);
107 
108 }
void FillWireInfo(recob::Wire const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
Definition: HitAnaAlg.cxx:139
void InitWireData(unsigned int, unsigned int)
Definition: HitAnaAlg.cxx:110
Event finding and building.
void hit::HitAnaAlg::ClearHitModules ( )

Definition at line 80 of file HitAnaAlg.cxx.

References HitModuleLabels, HitProcessingQueue, hit::WireROIInfo::NHitModules, and wireData.

Referenced by hit::HitAnaModule::analyze().

80  {
81  HitModuleLabels.clear();
82  HitProcessingQueue.clear();
84 }
std::vector< std::string > HitModuleLabels
Definition: HitAnaAlg.h:159
WireROIInfo wireData
Definition: HitAnaAlg.h:156
std::vector< HitAssocPair > HitProcessingQueue
Definition: HitAnaAlg.h:160
void hit::HitAnaAlg::ClearWireDataHitInfo ( )
private

Definition at line 119 of file HitAnaAlg.cxx.

References hit::WireROIInfo::Hits, hit::WireROIInfo::Hits_AverageCharge, hit::WireROIInfo::Hits_IntegratedCharge, hit::WireROIInfo::Hits_MeanMultiplicity, hit::WireROIInfo::Hits_PeakCharge, hit::WireROIInfo::Hits_PeakTime, hit::WireROIInfo::Hits_wAverageCharge, hit::WireROIInfo::Hits_wAverageTime, hit::WireROIInfo::MCHits_AverageCharge, hit::WireROIInfo::MCHits_IntegratedCharge, hit::WireROIInfo::MCHits_PeakCharge, hit::WireROIInfo::MCHits_PeakTime, hit::WireROIInfo::MCHits_wAverageCharge, hit::WireROIInfo::MCHits_wAverageTime, hit::WireROIInfo::NHitModules, hit::WireROIInfo::NHits, hit::WireROIInfo::NMCHits, and wireData.

Referenced by FillWireInfo().

119  {
120  wireData.NMCHits = 0;
127 
136  wireData.Hits.clear(); wireData.Hits.resize(wireData.NHitModules);
137 }
std::vector< std::vector< HitInfo > > Hits
Definition: HitAnaAlg.h:85
WireROIInfo wireData
Definition: HitAnaAlg.h:156
std::vector< float > Hits_wAverageCharge
Definition: HitAnaAlg.h:82
std::vector< float > Hits_MeanMultiplicity
Definition: HitAnaAlg.h:84
std::vector< float > Hits_PeakTime
Definition: HitAnaAlg.h:81
float MCHits_wAverageTime
Definition: HitAnaAlg.h:92
std::vector< float > Hits_PeakCharge
Definition: HitAnaAlg.h:80
std::vector< int > NHits
Definition: HitAnaAlg.h:77
float MCHits_IntegratedCharge
Definition: HitAnaAlg.h:87
float MCHits_wAverageCharge
Definition: HitAnaAlg.h:91
std::vector< float > Hits_AverageCharge
Definition: HitAnaAlg.h:79
std::vector< float > Hits_wAverageTime
Definition: HitAnaAlg.h:83
float MCHits_PeakCharge
Definition: HitAnaAlg.h:89
float MCHits_PeakTime
Definition: HitAnaAlg.h:90
std::vector< float > Hits_IntegratedCharge
Definition: HitAnaAlg.h:78
float MCHits_AverageCharge
Definition: HitAnaAlg.h:88
void hit::HitAnaAlg::FillHitInfo ( recob::Hit const &  hit,
std::vector< HitInfo > &  HitInfoVector 
)
private

Definition at line 307 of file HitAnaAlg.cxx.

References recob::Hit::EndTick(), recob::Hit::GoodnessOfFit(), recob::Hit::Integral(), recob::Hit::PeakAmplitude(), recob::Hit::PeakTime(), recob::Hit::RMS(), recob::Hit::SigmaIntegral(), recob::Hit::SigmaPeakAmplitude(), recob::Hit::SigmaPeakTime(), and recob::Hit::StartTick().

Referenced by FindAndStoreHitsInRange().

307  {
308  HitInfoVector.emplace_back(hit.PeakTime(),
309  hit.SigmaPeakTime(),
310  hit.RMS(),
311  hit.StartTick(),
312  hit.EndTick(),
313  hit.Integral(),
314  hit.SigmaIntegral(),
315  hit.PeakAmplitude(),
316  hit.SigmaPeakAmplitude(),
317  hit.GoodnessOfFit());
318 }
Detector simulation of raw signals on wires.
void hit::HitAnaAlg::FillWireInfo ( recob::Wire const &  wire,
int  WireIndex,
std::vector< sim::MCHitCollection > const &  MCHitCollectionVector,
std::vector< int > const &  thisAssocVector,
const detinfo::DetectorClocks ts 
)
private

Definition at line 139 of file HitAnaAlg.cxx.

References hit::WireROIInfo::channel, recob::Wire::Channel(), ClearWireDataHitInfo(), lar::sparse_vector< T >::get_ranges(), hit::WireROIInfo::plane, ProcessROI(), hit::WireROIInfo::range_index, hit::WireROIInfo::range_size, hit::WireROIInfo::range_start, recob::Wire::SignalROI(), recob::Wire::View(), and wireData.

Referenced by AnalyzeWires().

143  {
144 
145  wireData.channel = wire.Channel();
146  wireData.plane = wire.View();
147  unsigned int range_index = 0;
148 
149  for( auto const& range : wire.SignalROI().get_ranges() ){
150 
151  wireData.range_index = range_index;
152  wireData.range_start = range.begin_index();
153  wireData.range_size = range.size();
154 
156 
157  ProcessROI(range, WireIndex, MCHitCollectionVector, thisAssocVector, ts);
158  range_index++;
159 
160  }//end loop over roi ranges
161 
162 }
unsigned int range_index
Definition: HitAnaAlg.h:69
WireROIInfo wireData
Definition: HitAnaAlg.h:156
void ClearWireDataHitInfo()
Definition: HitAnaAlg.cxx:119
unsigned int range_start
Definition: HitAnaAlg.h:70
void ProcessROI(lar::sparse_vector< float >::datarange_t const &, int, std::vector< sim::MCHitCollection > const &, std::vector< int > const &, const detinfo::DetectorClocks *)
Definition: HitAnaAlg.cxx:184
unsigned int channel
Definition: HitAnaAlg.h:67
size_t range_size
Definition: HitAnaAlg.h:71
unsigned int plane
Definition: HitAnaAlg.h:68
void hit::HitAnaAlg::FindAndStoreHitsInRange ( std::vector< recob::Hit > const &  HitVector,
std::vector< int > const &  HitsOnWire,
size_t  hitmodule_iter,
size_t  begin_wire_tdc,
size_t  end_wire_tdc 
)
private

Definition at line 213 of file HitAnaAlg.cxx.

References Fill(), FillHitInfo(), hitData, hitDataTree, hit::WireROIInfo::Hits, hit::WireROIInfo::Hits_AverageCharge, hit::WireROIInfo::Hits_IntegratedCharge, hit::WireROIInfo::Hits_MeanMultiplicity, hit::WireROIInfo::Hits_PeakCharge, hit::WireROIInfo::Hits_PeakTime, hit::WireROIInfo::Hits_wAverageCharge, hit::WireROIInfo::Hits_wAverageTime, recob::Hit::Integral(), recob::Hit::Multiplicity(), hit::WireROIInfo::NHits, recob::Hit::PeakAmplitude(), recob::Hit::PeakTime(), recob::Hit::PeakTimeMinusRMS(), recob::Hit::PeakTimePlusRMS(), and wireData.

Referenced by ProcessROI().

217  {
218 
219  wireData.Hits_PeakCharge[hitmodule_iter]=-999;
220 
221  for( auto const& hit_index : HitsOnWire){
222  recob::Hit const& thishit = HitVector.at(hit_index);
223 
224  //check if this hit is on this ROI
225  if( thishit.PeakTimeMinusRMS() < begin_wire_tdc ||
226  thishit.PeakTimePlusRMS() > end_wire_tdc)
227  continue;
228 
229  FillHitInfo(thishit,wireData.Hits[hitmodule_iter]);
230  wireData.NHits[hitmodule_iter]++;
231  wireData.Hits_IntegratedCharge[hitmodule_iter] += thishit.Integral();
232 
233  if(thishit.PeakAmplitude() > wireData.Hits_PeakCharge[hitmodule_iter]){
234  wireData.Hits_PeakCharge[hitmodule_iter] = thishit.PeakAmplitude();
235  wireData.Hits_PeakTime[hitmodule_iter] = thishit.PeakTime();
236  }
237 
238  wireData.Hits_wAverageCharge[hitmodule_iter] += thishit.Integral()*thishit.Integral();
239  wireData.Hits_wAverageTime[hitmodule_iter] += thishit.Integral()*thishit.PeakTime();
240  wireData.Hits_MeanMultiplicity[hitmodule_iter] += thishit.Multiplicity();
241 
242  *(hitData.at(hitmodule_iter)) = thishit;
243  (hitDataTree.at(hitmodule_iter))->Fill();
244  }
245 
246  wireData.Hits_AverageCharge[hitmodule_iter] =
247  wireData.Hits_IntegratedCharge[hitmodule_iter]/wireData.NHits[hitmodule_iter];
248  wireData.Hits_wAverageCharge[hitmodule_iter] =
249  wireData.Hits_wAverageCharge[hitmodule_iter]/wireData.Hits_IntegratedCharge[hitmodule_iter];
250  wireData.Hits_wAverageTime[hitmodule_iter] =
251  wireData.Hits_wAverageTime[hitmodule_iter]/wireData.Hits_IntegratedCharge[hitmodule_iter];
252 
253  wireData.Hits_MeanMultiplicity[hitmodule_iter] /=wireData.NHits[hitmodule_iter];
254 
255 }
std::vector< std::vector< HitInfo > > Hits
Definition: HitAnaAlg.h:85
WireROIInfo wireData
Definition: HitAnaAlg.h:156
void FillHitInfo(recob::Hit const &, std::vector< HitInfo > &)
Definition: HitAnaAlg.cxx:307
std::vector< float > Hits_wAverageCharge
Definition: HitAnaAlg.h:82
std::vector< float > Hits_MeanMultiplicity
Definition: HitAnaAlg.h:84
std::vector< recob::Hit * > hitData
Definition: HitAnaAlg.h:157
TNtupleSim Fill(f1, f2, f3, f4)
std::vector< float > Hits_PeakTime
Definition: HitAnaAlg.h:81
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
Definition: Hit.h:225
short int Multiplicity() const
How many hits could this one be shared with.
Definition: Hit.h:227
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:222
std::vector< float > Hits_PeakCharge
Definition: HitAnaAlg.h:80
std::vector< int > NHits
Definition: HitAnaAlg.h:77
std::vector< float > Hits_AverageCharge
Definition: HitAnaAlg.h:79
std::vector< float > Hits_wAverageTime
Definition: HitAnaAlg.h:83
float PeakTimeMinusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
Definition: Hit.h:240
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:219
std::vector< float > Hits_IntegratedCharge
Definition: HitAnaAlg.h:78
std::vector< TTree * > hitDataTree
Definition: HitAnaAlg.h:166
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
float PeakTimePlusRMS(float sigmas=+1.) const
Returns a time sigmas RMS away from the peak time.
Definition: Hit.h:237
void hit::HitAnaAlg::FindAndStoreMCHitsInRange ( std::vector< sim::MCHitCollection > const &  MCHitCollectionVector,
std::vector< int > const &  HitsOnWire,
size_t  begin_wire_tdc,
size_t  end_wire_tdc,
const detinfo::DetectorClocks ts 
)
private

Definition at line 257 of file HitAnaAlg.cxx.

References hit::WireROIInfo::MCHits_AverageCharge, hit::WireROIInfo::MCHits_IntegratedCharge, hit::WireROIInfo::MCHits_PeakCharge, hit::WireROIInfo::MCHits_PeakTime, hit::WireROIInfo::MCHits_wAverageCharge, hit::WireROIInfo::MCHits_wAverageTime, hit::WireROIInfo::NMCHits, detinfo::DetectorClocks::TPCTDC2Tick(), and wireData.

Referenced by ProcessROI().

261  {
262 
264 
265  for( auto const& hit_index : HitsOnWire){
266  sim::MCHitCollection const& thismchitcol = MCHitCollectionVector.at(hit_index);
267 
268  //let's have a map to keep track of the number of total particles
269  std::unordered_map<int,unsigned int> nmchits_per_trackID_map;
270  for( auto const& thishit : thismchitcol){
271 
272  //std::cout << "\t************************************************************" << std::endl;
273  //std::cout << "\t\tMCHit begin: " << ts->TPCTDC2Tick( thishit.PeakTime()-thishit.PeakWidth() ) << std::endl;
274  //std::cout << "\t\tMCHit end: " << ts->TPCTDC2Tick( thishit.PeakTime()+thishit.PeakWidth() ) << std::endl;
275 
276  //check if this hit is on this ROI
277  if( ts->TPCTDC2Tick( thishit.PeakTime()-thishit.PeakWidth() ) < begin_wire_tdc ||
278  ts->TPCTDC2Tick( thishit.PeakTime()+thishit.PeakWidth() ) > end_wire_tdc )
279  continue;
280 
281  nmchits_per_trackID_map[thishit.PartTrackId()] += 1;
282  wireData.MCHits_IntegratedCharge += thishit.Charge();
283 
284  if(thishit.Charge(true) > wireData.MCHits_PeakCharge){
285  wireData.MCHits_PeakCharge = thishit.Charge(true);
286  wireData.MCHits_PeakTime = ts->TPCTDC2Tick(thishit.PeakTime());
287  }
288 
289  wireData.MCHits_wAverageCharge += thishit.Charge()*thishit.Charge();
290  wireData.MCHits_wAverageTime += thishit.Charge()*ts->TPCTDC2Tick(thishit.PeakTime());
291 
292  }
293 
294  wireData.NMCHits = nmchits_per_trackID_map.size();
295 
302 
303  }
304 
305 }
virtual double TPCTDC2Tick(double tdc) const =0
Given electronics clock count [tdc] returns TPC time-tick.
WireROIInfo wireData
Definition: HitAnaAlg.h:156
float MCHits_wAverageTime
Definition: HitAnaAlg.h:92
float MCHits_IntegratedCharge
Definition: HitAnaAlg.h:87
float MCHits_wAverageCharge
Definition: HitAnaAlg.h:91
float MCHits_PeakCharge
Definition: HitAnaAlg.h:89
float MCHits_PeakTime
Definition: HitAnaAlg.h:90
float MCHits_AverageCharge
Definition: HitAnaAlg.h:88
void hit::HitAnaAlg::InitWireData ( unsigned int  event,
unsigned int  run 
)
private

Definition at line 110 of file HitAnaAlg.cxx.

References hit::WireROIInfo::event, hit::WireROIInfo::HitModuleLabels, HitModuleLabels, hit::WireROIInfo::NHitModules, hit::WireROIInfo::run, and wireData.

Referenced by AnalyzeWires().

110  {
111 
112  wireData.event = event;
113  wireData.run = run;
116 
117 }
std::vector< std::string > HitModuleLabels
Definition: HitAnaAlg.h:159
unsigned int event
Definition: HitAnaAlg.h:65
WireROIInfo wireData
Definition: HitAnaAlg.h:156
std::vector< std::string > HitModuleLabels
Definition: HitAnaAlg.h:76
unsigned int run
Definition: HitAnaAlg.h:66
Event finding and building.
void hit::HitAnaAlg::LoadHitAssocPair ( std::vector< recob::Hit > const &  HitVector,
std::vector< std::vector< int > > const &  AssocVector,
std::string const &  HitModuleLabel 
)

Definition at line 86 of file HitAnaAlg.cxx.

References hit::hitanaalgexception, HitModuleLabels, and HitProcessingQueue.

Referenced by hit::HitAnaModule::analyze().

88  {
89 
90  HitProcessingQueue.push_back( std::make_pair( std::cref(HitVector), std::cref(AssocVector)) );
91  HitModuleLabels.push_back(HitModuleLabel);
92 
93  if(HitProcessingQueue.size()!=HitModuleLabels.size())
94  throw hitanaalgexception;
95 
96 }
std::vector< std::string > HitModuleLabels
Definition: HitAnaAlg.h:159
hit::HitAnaAlgException hitanaalgexception
std::vector< HitAssocPair > HitProcessingQueue
Definition: HitAnaAlg.h:160
void hit::HitAnaAlg::ProcessROI ( lar::sparse_vector< float >::datarange_t const &  range,
int  WireIndex,
std::vector< sim::MCHitCollection > const &  MCHitCollectionVector,
std::vector< int > const &  thisAssocVector,
const detinfo::DetectorClocks ts 
)
private

Definition at line 184 of file HitAnaAlg.cxx.

References lar::range_t< SIZE >::begin_index(), FindAndStoreHitsInRange(), FindAndStoreMCHitsInRange(), HitProcessingQueue, hit::WireROIInfo::integrated_charge, hit::WireROIInfo::peak_charge, hit::WireROIInfo::peak_time, ROIInfo(), lar::range_t< SIZE >::size(), wireData, and wireDataTree.

Referenced by FillWireInfo().

188  {
189 
191 
192  //std::cout << "----------------------------------------------------------------" << std::endl;
193  //std::cout << "WireIndex = " << WireIndex << std::endl;
194  //std::cout << "\tRange begin: " << range.begin_index() << std::endl;
195  //std::cout << "\tRange end: " << range.begin_index()+range.size() << std::endl;
196 
197  for(size_t iter = 0; iter < HitProcessingQueue.size(); iter++)
199  HitProcessingQueue[iter].second.at(WireIndex),
200  iter,
201  range.begin_index(),
202  range.begin_index()+range.size());
203 
204  FindAndStoreMCHitsInRange(MCHitCollectionVector,
205  thisAssocVector,
206  range.begin_index(),
207  range.begin_index()+range.size(),
208  ts);
209 
210  wireDataTree->Fill();
211 }
TTree * wireDataTree
Definition: HitAnaAlg.h:164
void FindAndStoreMCHitsInRange(std::vector< sim::MCHitCollection > const &, std::vector< int > const &, size_t, size_t, const detinfo::DetectorClocks *)
Definition: HitAnaAlg.cxx:257
WireROIInfo wireData
Definition: HitAnaAlg.h:156
size_type size() const
Returns the size of the vector.
std::vector< HitAssocPair > HitProcessingQueue
Definition: HitAnaAlg.h:160
float peak_charge
Definition: HitAnaAlg.h:73
float integrated_charge
Definition: HitAnaAlg.h:72
void FindAndStoreHitsInRange(std::vector< recob::Hit > const &, std::vector< int > const &, size_t, size_t, size_t)
Definition: HitAnaAlg.cxx:213
void ROIInfo(lar::sparse_vector< float >::datarange_t const &, float &, float &, float &)
Definition: HitAnaAlg.cxx:164
void hit::HitAnaAlg::ROIInfo ( lar::sparse_vector< float >::datarange_t const &  range,
float &  charge_sum,
float &  charge_peak,
float &  charge_peak_time 
)
private

Definition at line 164 of file HitAnaAlg.cxx.

References lar::range_t< SIZE >::begin_index(), and fhicl::detail::atom::value().

Referenced by ProcessROI().

167  {
168 
169  charge_sum=0;
170  charge_peak = -999;
171  unsigned int counter=range.begin_index();
172 
173  for(auto const& value : range){
174  charge_sum += value;
175  if(value > charge_peak){
176  charge_peak = value;
177  charge_peak_time = (float)counter;
178  }
179  counter++;
180  }
181 
182 }
std::string value(boost::any const &)
void hit::HitAnaAlg::SetHitDataTree ( std::vector< TTree * > &  trees)

Definition at line 27 of file HitAnaAlg.cxx.

References hitData, and hitDataTree.

Referenced by hit::HitAnaModule::beginJob().

27  {
28 
29  hitDataTree.clear();
30  hitData.clear();
31 
32  hitDataTree.reserve (trees.size());
33  // This is particularly important: to establish the hitData memory -- all before
34  // individually making the tree->Branch() calls, specifying those addresses.
35  hitData.reserve (trees.size());
36 
37  // Construct the local attribute data container
38  for(auto const& t : trees) {
39  hitDataTree.push_back(t);
40  hitData.push_back(new recob::Hit);
41  }
42 
43  for(size_t i=0; i<hitData.size(); ++i)
44  hitDataTree[i]->Branch(hitDataTree[i]->GetName(),"recob::Hit",&(hitData[i]));
45 }
std::vector< recob::Hit * > hitData
Definition: HitAnaAlg.h:157
std::vector< TTree * > hitDataTree
Definition: HitAnaAlg.h:166
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
void hit::HitAnaAlg::SetupWireDataTree ( )
private

Definition at line 47 of file HitAnaAlg.cxx.

References hit::WireROIInfo::channel, hit::WireROIInfo::event, hit::WireROIInfo::HitModuleLabels, hit::WireROIInfo::Hits_AverageCharge, hit::WireROIInfo::Hits_IntegratedCharge, hit::WireROIInfo::Hits_MeanMultiplicity, hit::WireROIInfo::Hits_PeakCharge, hit::WireROIInfo::Hits_PeakTime, hit::WireROIInfo::Hits_wAverageCharge, hit::WireROIInfo::Hits_wAverageTime, hit::WireROIInfo::integrated_charge, hit::WireROIInfo::MCHits_AverageCharge, hit::WireROIInfo::MCHits_IntegratedCharge, hit::WireROIInfo::MCHits_PeakCharge, hit::WireROIInfo::MCHits_PeakTime, hit::WireROIInfo::MCHits_wAverageCharge, hit::WireROIInfo::MCHits_wAverageTime, hit::WireROIInfo::NHitModules, hit::WireROIInfo::NHits, hit::WireROIInfo::NMCHits, hit::WireROIInfo::peak_charge, hit::WireROIInfo::peak_time, hit::WireROIInfo::plane, hit::WireROIInfo::range_index, hit::WireROIInfo::range_size, hit::WireROIInfo::range_start, hit::WireROIInfo::run, wireData, and wireDataTree.

Referenced by SetWireDataTree().

47  {
48  wireDataTree->Branch("event", &wireData.event, "event/i");
49  wireDataTree->Branch("run", &wireData.run, "run/i");
50  wireDataTree->Branch("channel", &wireData.channel, "channel/i");
51  wireDataTree->Branch("plane", &wireData.plane, "plane/i");
52  wireDataTree->Branch("roi_index", &wireData.range_index, "roi_index/i");
53  wireDataTree->Branch("roi_start", &wireData.range_start, "roi_start/i");
54  wireDataTree->Branch("roi_size", &wireData.range_size, "roi_size/i");
55  wireDataTree->Branch("roi_charge", &wireData.integrated_charge, "roi_charge/F");
56  wireDataTree->Branch("roi_peak_charge", &wireData.peak_charge, "roi_peak_charge/F");
57  wireDataTree->Branch("roi_peak_time", &wireData.peak_time, "roi_peak_time/F");
58  wireDataTree->Branch("nHitModules", &wireData.NHitModules, "nHitModules/I");
59  wireDataTree->Branch("HitModuleLabels",&wireData.HitModuleLabels);
60  wireDataTree->Branch("NHits",&wireData.NHits);
61  wireDataTree->Branch("Hits_IntegratedCharge",&wireData.Hits_IntegratedCharge);
62  wireDataTree->Branch("Hits_AverageCharge",&wireData.Hits_AverageCharge);
63  wireDataTree->Branch("Hits_PeakCharge",&wireData.Hits_PeakCharge);
64  wireDataTree->Branch("Hits_Peak",&wireData.Hits_PeakTime);
65  wireDataTree->Branch("Hits_wAverageCharge",&wireData.Hits_wAverageCharge);
66  wireDataTree->Branch("Hits_wAverageTime",&wireData.Hits_wAverageTime);
67  wireDataTree->Branch("Hits_MeanMultiplicity",&wireData.Hits_MeanMultiplicity);
68 
69  wireDataTree->Branch("NMCHits",&wireData.NMCHits);
70  wireDataTree->Branch("MCHits_IntegratedCharge",&wireData.MCHits_IntegratedCharge);
71  wireDataTree->Branch("MCHits_AverageCharge",&wireData.MCHits_AverageCharge);
72  wireDataTree->Branch("MCHits_PeakCharge",&wireData.MCHits_PeakCharge);
73  wireDataTree->Branch("MCHits_Peak",&wireData.MCHits_PeakTime);
74  wireDataTree->Branch("MCHits_wAverageCharge",&wireData.MCHits_wAverageCharge);
75  wireDataTree->Branch("MCHits_wAverageTime",&wireData.MCHits_wAverageTime);
76 
77 }
TTree * wireDataTree
Definition: HitAnaAlg.h:164
unsigned int range_index
Definition: HitAnaAlg.h:69
unsigned int event
Definition: HitAnaAlg.h:65
WireROIInfo wireData
Definition: HitAnaAlg.h:156
std::vector< float > Hits_wAverageCharge
Definition: HitAnaAlg.h:82
std::vector< float > Hits_MeanMultiplicity
Definition: HitAnaAlg.h:84
std::vector< float > Hits_PeakTime
Definition: HitAnaAlg.h:81
unsigned int range_start
Definition: HitAnaAlg.h:70
std::vector< std::string > HitModuleLabels
Definition: HitAnaAlg.h:76
float MCHits_wAverageTime
Definition: HitAnaAlg.h:92
unsigned int run
Definition: HitAnaAlg.h:66
std::vector< float > Hits_PeakCharge
Definition: HitAnaAlg.h:80
std::vector< int > NHits
Definition: HitAnaAlg.h:77
float MCHits_IntegratedCharge
Definition: HitAnaAlg.h:87
float MCHits_wAverageCharge
Definition: HitAnaAlg.h:91
float peak_charge
Definition: HitAnaAlg.h:73
std::vector< float > Hits_AverageCharge
Definition: HitAnaAlg.h:79
std::vector< float > Hits_wAverageTime
Definition: HitAnaAlg.h:83
unsigned int channel
Definition: HitAnaAlg.h:67
float MCHits_PeakCharge
Definition: HitAnaAlg.h:89
size_t range_size
Definition: HitAnaAlg.h:71
float MCHits_PeakTime
Definition: HitAnaAlg.h:90
unsigned int plane
Definition: HitAnaAlg.h:68
std::vector< float > Hits_IntegratedCharge
Definition: HitAnaAlg.h:78
float integrated_charge
Definition: HitAnaAlg.h:72
float MCHits_AverageCharge
Definition: HitAnaAlg.h:88
void hit::HitAnaAlg::SetWireDataTree ( TTree *  wdt)

Definition at line 22 of file HitAnaAlg.cxx.

References SetupWireDataTree(), and wireDataTree.

Referenced by hit::HitAnaModule::beginJob().

22  {
23  wireDataTree = wdt;
25 }
TTree * wireDataTree
Definition: HitAnaAlg.h:164
void SetupWireDataTree()
Definition: HitAnaAlg.cxx:47

Friends And Related Function Documentation

friend class HitAnaAlgTest
friend

Definition at line 169 of file HitAnaAlg.h.

Member Data Documentation

std::vector<recob::Hit*> hit::HitAnaAlg::hitData
private

Definition at line 157 of file HitAnaAlg.h.

Referenced by FindAndStoreHitsInRange(), and SetHitDataTree().

std::vector<TTree*> hit::HitAnaAlg::hitDataTree
private

Definition at line 166 of file HitAnaAlg.h.

Referenced by FindAndStoreHitsInRange(), and SetHitDataTree().

std::vector<std::string> hit::HitAnaAlg::HitModuleLabels
private

Definition at line 159 of file HitAnaAlg.h.

Referenced by ClearHitModules(), InitWireData(), and LoadHitAssocPair().

std::vector< HitAssocPair > hit::HitAnaAlg::HitProcessingQueue
private

Definition at line 160 of file HitAnaAlg.h.

Referenced by ClearHitModules(), LoadHitAssocPair(), and ProcessROI().

TTree* hit::HitAnaAlg::wireDataTree
private

Definition at line 164 of file HitAnaAlg.h.

Referenced by ProcessROI(), SetupWireDataTree(), and SetWireDataTree().


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