80 if(clusters->empty()){
94 for(
auto const& clust: *clusters){
113 unsigned int xsize = bound-hlist.begin();
114 unsigned int ysize = hlist.end()-bound;
120 std::vector<double> XXpoints;
121 std::vector<double> XZpoints;
122 std::vector<double> YYpoints;
123 std::vector<double> YZpoints;
125 XXpoints.reserve(xsize);
126 XZpoints.reserve(xsize);
127 YYpoints.reserve(ysize);
128 YZpoints.reserve(ysize);
131 auto it = hlist.begin();
132 for(
it=hlist.begin();
it!=bound;++
it){
133 XXpoints.emplace_back((*it).Cell().val);
134 XZpoints.emplace_back((*it).Plane().val);
137 for(
it=bound;
it!=hlist.end();++
it){
138 YYpoints.emplace_back((*it).Cell().val);
139 YZpoints.emplace_back((*it).Plane().val);
146 unsigned int xdof = xsize-1;
155 for(
unsigned int xi=0;xi<xsize;++xi){
156 pred = xslope*XXpoints[xi] + xint;
171 unsigned int ydof = ysize-1;
178 for(
unsigned int yi=0;yi<ysize;++yi){
179 pred = yslope*YYpoints[yi] + yint;
210 fClusterEnDenHist = f->
make<TH1F>(
"fClusterEnergyDensity",
";ADC per plane*cell^2;Clusters",10000,0.,0.5);
211 fXViewTrackGood = f->
make<TH1F>(
"fXViewTrackGood",
";Goodness of Lin Fit;Tracks",1000,0.,100.);
212 fYViewTrackGood = f->
make<TH1F>(
"fYViewTrackGood",
";Goodness of Lin Fit;Tracks",1000,0.,100.);
ClusterAna(fhicl::ParameterSet const &p)
TH1F * fNHitsPerClusterHist
TH1F * fClusterEnergyHist
std::vector< DAQHit > HitList
DEFINE_ART_MODULE(TestTMapFile)
T sqr(T x)
More efficient square function than pow(x,2)
TH1F * fCombViewTrackGood
EDAnalyzer(Table< Config > const &config)
void LinFitUnweighted(const std::vector< double > &x, const std::vector< double > &y, double &m, double &c)
Simplified version of LinFit.
T * make(ARGS...args) const
std::string fClusterModule
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void analyze(art::Event const &e) override