15 #include "art_root_io/TFileService.h" 29 #include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" 30 #include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" 70 produces<std::vector<recob::Cluster>>();
71 produces<art::Assns<recob::Cluster, recob::Hit>>();
80 fhitwidth = tfs->make<TH1F>(
" fhitwidth",
"width of hits in cm", 50000, 0, 5);
81 fhitwidth_ind_test = tfs->make<TH1F>(
"fhitwidth_ind_test",
"width of hits in cm", 50000, 0, 5);
83 tfs->make<TH1F>(
"fhitwidth_coll_test",
"width of hits in cm", 50000, 0, 5);
91 std::unique_ptr<std::vector<recob::Cluster>> ccol(
new std::vector<recob::Cluster>);
92 std::unique_ptr<art::Assns<recob::Cluster, recob::Hit>> assn(
106 std::vector<art::Ptr<recob::Hit>> allhits;
109 lariov::ChannelStatusProvider
const& channelStatus =
112 lariov::ChannelStatusProvider::ChannelSet_t
const BadChannels = channelStatus.BadChannels();
115 std::map<geo::PlaneID, std::vector<art::Ptr<recob::Hit>>> planeIDToHits;
116 for (
size_t i = 0; i < hitcol->size(); ++i)
119 auto const clock_data =
121 auto const det_prop =
124 for (
auto& itr : planeIDToHits) {
127 allhits.resize(itr.second.size());
128 allhits.swap(itr.second);
133 for (
unsigned int j = 0; j <
fDBScan.
fps.size(); ++j) {
135 if (allhits.size() !=
fDBScan.
fps.size())
break;
153 if (clusterHits.
empty())
continue;
157 unsigned int sw = wireID.
Wire;
158 unsigned int ew = clusterHits.
back()->WireID().Wire;
161 ClusterParamAlgo.
ImportHits(gser, clusterHits);
168 clusterHits.
front()->PeakTime(),
169 clusterHits.
front()->SigmaPeakTime(),
172 clusterHits.
back()->PeakTime(),
173 clusterHits.
back()->SigmaPeakTime(),
175 clusterHits.
front()->View(),
180 ccol->emplace_back(
cluster.move());
190 mf::LogVerbatim(
"Summary") << std::setfill(
'-') << std::setw(175) <<
"-" << std::setfill(
' ');
192 for (
unsigned int i = 0; i < ccol->size(); ++i)
195 evt.
put(std::move(ccol));
196 evt.
put(std::move(assn));
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
Class managing the creation of a new recob::Cluster object.
Declaration of signal hit object.
EDProducer(fhicl::ParameterSet const &pset)
WireID_t Wire
Index of the wire within its plane.
std::vector< std::vector< double > > fps
the collection of points we are working on
Cluster finding and building.
static const SentryArgument_t Sentry
An instance of the sentry object.
DBScanAlg fDBScan
object that implements the DB scan algorithm
void ImportHits(util::GeometryUtilities const &gser, Iter begin, Iter end)
Calls SetHits() with the hits in the sequence.
PutHandle< PROD > put(std::unique_ptr< PROD > &&edp, std::string const &instance={})
std::vector< unsigned int > fpointId_to_clusterId
mapping point_id -> clusterId
#define DEFINE_ART_MODULE(klass)
void push_back(Ptr< U > const &p)
Signal from induction planes.
enum geo::_plane_sigtype SigType_t
Enumerate the possible plane projections.
Helper functions to create a cluster.
Wrapper for ClusterParamsAlgBase objects to accept diverse input.
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
Declaration of cluster object.
TH1F * fhitwidth_ind_test
TH1F * fhitwidth_coll_test
std::string fhitsModuleLabel
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
void InitScan(const detinfo::DetectorClocksData &clockData, const detinfo::DetectorPropertiesData &detProp, const std::vector< art::Ptr< recob::Hit >> &allhits, std::set< uint32_t > badChannels, const std::vector< geo::WireID > &wireids=std::vector< geo::WireID >())
void produce(art::Event &evt)
SigType_t SignalType(PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
Utility object to perform functions of association.
std::vector< std::vector< unsigned int > > fclusters
collection of something
DBcluster(fhicl::ParameterSet const &pset)
constexpr PlaneID const & planeID() const
Interface to class computing cluster parameters.
art framework interface to geometry description
Signal from collection planes.