12 #ifndef BlurredClustering_h 13 #define BlurredClustering_h 27 #include "larevt/CalibrationDBI/Interface/ChannelStatusService.h" 28 #include "larevt/CalibrationDBI/Interface/ChannelStatusProvider.h" 47 #include <TVirtualPad.h> 52 #include <TPrincipal.h> 66 class BlurredClusteringAlg;
82 std::vector<std::vector<int> >
const& allClusterBins,
108 void SaveImage(TH2F* image,
int pad,
int tpc,
int plane);
112 void SaveImage(TH2F* image,
std::vector<std::vector<int> >
const& allClusterBins,
int pad,
int tpc,
int plane);
142 unsigned int NumNeighbours(
int nx, std::vector<bool>
const& used,
int bin);
145 bool PassesTimeCut(std::vector<double>
const& times,
double time);
171 std::vector<std::vector<art::Ptr<recob::Hit> > >
fHitMap;
void FindBlurringParameters(int &blurwire, int &blurtick, int &sigmawire, int &sigmatick)
Dynamically find the blurring radii and Gaussian sigma in each dimension.
void SaveImage(TH2F *image, std::vector< art::PtrVector< recob::Hit > > const &allClusters, int pad, int tpc, int plane)
unsigned int fNeighboursThreshold
int FindClusters(std::vector< std::vector< double > > const &image, std::vector< std::vector< int > > &allcluster)
Find clusters in the histogram.
BlurredClusteringAlg(fhicl::ParameterSet const &pset)
Utilities related to art service access.
std::pair< int, int > DeadWireCount(int wire_bin, int width)
std::vector< std::vector< double > > GaussianBlur(std::vector< std::vector< double > > const &image)
Applies Gaussian blur to image.
void reconfigure(fhicl::ParameterSet const &p)
std::vector< std::vector< art::Ptr< recob::Hit > > > fHitMap
Declaration of signal hit object.
unsigned int NumNeighbours(int nx, std::vector< bool > const &used, int bin)
Determines the number of clustered neighbours of a hit.
double GetTimeOfBin(std::vector< std::vector< double > > const &image, int bin)
Returns the hit time of a hit in a particular bin.
std::string fDebugPDFName
Cluster finding and building.
art::ServiceHandle< geo::Geometry > fGeom
std::vector< bool > fDeadWires
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
bool PassesTimeCut(std::vector< double > const ×, double time)
Determine if a hit is within a time threshold of any other hits in a cluster.
void CreateDebugPDF(int run, int subrun, int event)
Create the PDF to save debug images.
int ConvertWireTickToBin(std::vector< std::vector< double > > const &image, int xbin, int ybin)
Converts an xbin and a ybin to a global bin number.
art::PtrVector< recob::Hit > ConvertBinsToRecobHits(std::vector< std::vector< double > > const &image, std::vector< int > const &bins)
Converts a vector of bins into a hit selection - not all the hits in the bins vector are real hits...
Provides recob::Track data product.
Encapsulate the geometry of a wire.
void MakeKernels()
Makes all the kernels which could be required given the tuned parameters.
TH2F * MakeHistogram(std::vector< std::vector< double > > const &image, TString name)
Converts a 2D vector in a histogram for the debug pdf.
Encapsulate the construction of a single detector plane.
art::Ptr< recob::Hit > ConvertBinToRecobHit(std::vector< std::vector< double > > const &image, int bin)
Converts a bin into a recob::Hit (not all of these bins correspond to recob::Hits - some are fake hit...
std::vector< std::vector< double > > ConvertRecobHitsToVector(std::vector< art::Ptr< recob::Hit > > const &hits)
Takes hit map and returns a 2D vector representing wire and tick, filled with the charge...
std::vector< std::vector< std::vector< double > > > fAllKernels
virtual ~BlurredClusteringAlg()
double ConvertBinToCharge(std::vector< std::vector< double > > const &image, int bin)
Returns the charge stored in the global bin value.
lariov::ChannelStatusProvider const & fChanStatus
detinfo::DetectorProperties const * fDetProp
void ConvertBinsToClusters(std::vector< std::vector< double > > const &image, std::vector< std::vector< int > > const &allClusterBins, std::vector< art::PtrVector< recob::Hit > > &clusters)
Takes a vector of clusters (itself a vector of hits) and turns them into clusters using the initial h...
unsigned int GetMinSize()
Minimum size of cluster to save.
art framework interface to geometry description
Event finding and building.
int GlobalWire(geo::WireID const &wireID)
Find the global wire position.