12 #include "TGeoManager.h" 27 #include "CLHEP/Random/JamesRandom.h" 36 #include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" 37 #include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" 86 produces< std::vector<recob::Cluster> >();
87 produces< art::Assns<recob::Cluster, recob::Hit> >();
114 fhitwidth= tfs->
make<TH1F>(
" fhitwidth",
"width of hits in cm", 50000,0 ,5 );
125 std::unique_ptr<std::vector<recob::Cluster> > ccol(
new std::vector<recob::Cluster>);
134 std::vector<art::Ptr<recob::Hit> > allhits;
140 CLHEP::HepRandomEngine &engine = rng->
getEngine();
146 lariov::ChannelStatusProvider
const& channelStatus
149 lariov::ChannelStatusProvider::ChannelSet_t
const BadChannels
150 = channelStatus.BadChannels();
158 std::map<geo::PlaneID, std::vector< art::Ptr<recob::Hit> > > planeIDToHits;
159 for(
size_t i = 0; i < hitcol->size(); ++i)
163 for(
auto & itr : planeIDToHits){
166 allhits.resize(itr.second.size());
167 allhits.swap(itr.second);
191 std::vector<art::Ptr<recob::Hit> > clusterHits;
195 clusterHits.push_back(allhits[j]);
201 if (!clusterHits.empty()){
203 const geo::WireID& wireID = clusterHits.front()->WireID();
204 unsigned int sw = wireID.
Wire;
205 unsigned int ew = clusterHits.back()->WireID().Wire;
215 clusterHits.front()->PeakTime(),
216 clusterHits.front()->SigmaPeakTime(),
219 clusterHits.back()->PeakTime(),
220 clusterHits.back()->SigmaPeakTime(),
222 clusterHits.front()->View(),
227 ccol->emplace_back(
cluster.move());
241 mf::LogVerbatim(
"Summary") << std::setfill(
'-') << std::setw(175) <<
"-" << std::setfill(
' ');
243 for(
size_t i = 0; i<ccol->size(); ++i)
mf::LogVerbatim(
"Summary") << ccol->at(i) ;
245 evt.
put(std::move(ccol));
246 evt.
put(std::move(assn));
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
PlaneID const & planeID() const
Class managing the creation of a new recob::Cluster object.
void run_fuzzy_cluster(const std::vector< art::Ptr< recob::Hit > > &allhits)
Encapsulate the construction of a single cyostat.
TH1F * fhitwidth_coll_test
Declaration of signal hit object.
Definition of basic raw digits.
WireID_t Wire
Index of the wire within its plane.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
Cluster finding and building.
static const SentryArgument_t Sentry
An instance of the sentry object.
ProductID put(std::unique_ptr< PROD > &&product)
void InitFuzzy(std::vector< art::Ptr< recob::Hit > > &allhits, std::set< uint32_t > badChannels)
fuzzyClusterAlg ffuzzyCluster
object that implements the fuzzy cluster algorithm
base_engine_t & getEngine() const
base_engine_t & createEngine(seed_t seed)
#define DEFINE_ART_MODULE(klass)
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.
Collect all the RawData header files together.
T get(std::string const &key) const
Wrapper for ClusterParamsAlgBase objects to accept arbitrary input.
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
std::string fhitsModuleLabel
std::vector< std::vector< double > > fps
the collection of points we are working on
Declaration of cluster object.
An art service to assist in the distribution of guaranteed unique seeds to all engines within an art ...
void produce(art::Event &evt)
T * make(ARGS...args) const
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
std::vector< unsigned int > fpointId_to_clusterId
mapping point_id -> clusterId
Utility object to perform functions of association.
Encapsulate the construction of a single detector plane.
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
void ImportHits(Iter begin, Iter end)
Calls SetHits() with the hits in the sequence.
std::vector< std::vector< unsigned int > > fclusters
collection of something
void reconfigure(fhicl::ParameterSet const &p)
Interface to class computing cluster parameters.
TH1F * fhitwidth_ind_test
void reconfigure(fhicl::ParameterSet const &p)
fuzzyCluster(fhicl::ParameterSet const &pset)
art framework interface to geometry description
Encapsulate the construction of a single detector plane.
Signal from collection planes.