188 art::Handle< std::vector< raw::OpDetWaveform > > wf_h;
192 throw std::exception();
194 for(
auto const& wf : (*wf_h)) {
195 _wf.resize(wf.size());
196 for(
size_t i=0; i<
_wf.size(); ++i) {
_wf.at(i) = wf.at(i); }
197 _ch=wf.ChannelNumber();
204 art::Handle< std::vector< recob::OpHit > > mchit_h;
206 if(!mchit_h.isValid()) {
208 throw std::exception();
214 std::vector<std::map<double,int> > mchit_db;
216 auto const geop = lar::providerFrom<geo::Geometry>();
217 mchit_db.resize(geop->NOpChannels());
218 for(
size_t mchit_index=0; mchit_index < mchit_h->size(); ++mchit_index) {
219 auto const& mchit = (*mchit_h)[mchit_index];
222 _ch = mchit.OpChannel();
225 auto&
db = mchit_db.at(mchit.OpChannel());
229 for(
size_t label_idx=0; label_idx<
_hit_label_v.size(); ++label_idx) {
233 art::Handle< std::vector< recob::OpHit > > hit_h;
234 e.getByLabel(label,hit_h);
235 if(!hit_h.isValid()){
236 std::cerr <<
"Invalid producer for recob::OpHit: " << label << std::endl;
237 throw std::exception();
241 std::vector<bool> mchit_used(mchit_h->size(),
false);
243 for(
auto const&
hit : (*hit_h)) {
252 auto const&
db = mchit_db.at(
_ch);
255 _time_true = std::numeric_limits<double>::max();
256 if(
low !=
db.begin()) {
259 auto const& mchit = (*mchit_h).at((*low).second);
265 mchit_used[(*low).second] =
true;
271 for(
size_t mchit_idx=0; mchit_idx < mchit_used.size(); ++mchit_idx) {
272 if(mchit_used[mchit_idx])
continue;
273 auto const& mchit = (*mchit_h)[mchit_idx];
274 _ch = mchit.OpChannel();
278 _time = std::numeric_limits<double>::max();
279 _amp = std::numeric_limits<double>::max();
280 _area = std::numeric_limits<double>::max();
BEGIN_PROLOG could also be cerr
std::vector< std::string > _hit_label_v
standard_dbscan3dalg useful for diagnostics hits not in a line will not be clustered on on only for track like only for track like on on the smaller the less shower like tracks low
std::vector< TTree * > _hittree_v
height to which particles are projected pnfs larsoft persistent physics cosmics Fermilab CORSIKA standard He_showers_ * db