16 std::vector<art::Ptr<brb::BeamlineDigit>>
pulses;
39 _sipmClusters.clear();
40 _clusterWindow = -999;
44 _clusterWindow = clusterWindow;
46 for (
auto d : digits) {
48 std::vector<ToFPulseCluster> *clusters;
49 switch (
d->ChannelID().Detector) {
57 auto clusterit =
std::find_if(clusters->begin(), clusters->end(),
59 return fabs(starttime - cluster.time) < clusterWindow;
62 if (clusterit == clusters->end()) {
68 clusters->push_back(cluster);
70 clusterit->pulses.push_back(
d);
81 <<
"Bad time of flight counter: " << counter <<
"." <<
std::endl;
std::vector< ToFPulseCluster > GetClusters(beamlinegeo::ToFCounter counter) const
std::vector< ToFPulseCluster > _usClusters
fvar< T > fabs(const fvar< T > &x)
void FindClusters(std::vector< art::Ptr< brb::BeamlineDigit >> digits, double clusterWindow)
Definition of the beamline offline geometry. Also implementation of a service to obtain this informat...
Encapsulation of reconstructed digitizer 'hits'. Used for ToF PMTs and SiPMs, and Cherenkov and Muon ...
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
std::vector< ToFPulseCluster > _dsClusters
std::vector< art::Ptr< brb::BeamlineDigit > > pulses
std::vector< ToFPulseCluster > _sipmClusters
beamlinegeo::ToFCounter counter