9 const std::vector<art::Ptr<recob::Hit>>& slice_hits = sliceIDToHitsMap.at(nuSliceID);
10 bool found_hit_in_slice =
false, found_hit_not_in_slice =
false;
12 auto iter = std::find(slice_hits.begin(), slice_hits.end(),
hit);
13 if( iter == slice_hits.end())
14 found_hit_not_in_slice =
true;
16 found_hit_in_slice =
true;
19 if(found_hit_in_slice && found_hit_not_in_slice)
return 0;
22 return found_hit_in_slice ? 1 : -1;
29 double max_ioc_to_shower_start = DBL_MIN;
30 size_t num_hits = cl.
f_hits.size();
33 for(
size_t i = 0; i!= num_hits; ++i){
35 double h_tick = (double)
h->PeakTime();
36 double h_wire = (double)
h->WireID().Wire;
39 double impact_parameter_to_shower =
dist_line_point(shower_start_pt_2D, shower_other_pt_2D, {h_wire, h_tick});
40 double conversion_dist_to_shower_start =
dist_point_point(h_wire, h_tick, shower_start_pt_2D[0], shower_start_pt_2D[1]);
41 double ioc_to_shower_start = impact_parameter_to_shower/conversion_dist_to_shower_start;
50 if( ioc_to_shower_start > max_ioc_to_shower_start){
51 max_ioc_to_shower_start = ioc_to_shower_start;
62 std::vector<double> start_hit_point = { (double)start_hit_ptr->WireID().Wire, (double)start_hit_ptr->PeakTime()};
63 std::vector<double> end_hit_point= { (double)end_hit_ptr->WireID().Wire, (double)end_hit_ptr->PeakTime()};
64 std::vector<double> mid_point = { (start_hit_point[0] + end_hit_point[0])/2, (start_hit_point[1] + end_hit_point[1])/2};
65 std::vector<double> start_to_mid_vec = { (- start_hit_point[0] + end_hit_point[0])/2, ( - start_hit_point[1] + end_hit_point[1])/2};
69 for(
size_t i = 0; i!=num_hits; ++i){
71 double h_tick = (double)
h->PeakTime();
72 double h_wire = (double)
h->WireID().Wire;
74 std::vector<double> mid_to_h_vec = { h_wire - mid_point[0], h_tick - mid_point[1]};
76 if( start_to_mid_vec[0]*mid_to_h_vec[0]*pow(wire_con, 2.0) + start_to_mid_vec[1] * mid_to_h_vec[1] *pow(tick_con, 2.0)<= 0 ){
94 std::cerr <<
"SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster only has " << num_hits <<
" hits, can't calculate direction, skipping it... " << std::endl;
100 double start_to_mid_length = sqrt( pow(start_to_mid_vec[0]*wire_con, 2.0) + pow(start_to_mid_vec[1]*tick_con, 2.0));
101 std::vector<double> cluster_dir = {start_to_mid_vec[0]*wire_con/start_to_mid_length, start_to_mid_vec[1]*tick_con/start_to_mid_length};
103 double shower_direction_length = sqrt(pow((shower_start_pt_2D[0] - shower_other_pt_2D[0])*wire_con, 2.0) + pow((shower_start_pt_2D[1] - shower_other_pt_2D[1])*tick_con, 2.0));
104 std::vector<double> shower_dir = { (shower_other_pt_2D[0] - shower_start_pt_2D[0])*wire_con/shower_direction_length, (shower_other_pt_2D[1] - shower_start_pt_2D[1])*tick_con/shower_direction_length};
110 std::cout <<
"SEAviewer::TrackLikeClusterAnalyzer\t|| this cluster spans only on 1 wire: " << cl.
f_score.
min_wire <<
", setting its straight-line fit chi2 to 0.." << std::endl;
117 int fit_status = cl.
f_graph.Fit(f1,
"RQ0");
120 f1 = cl.
f_graph.GetFunction(
"f1");
132 : tag(intag), geom(ingeom), theDetector(intheDetector){
175 std::vector<art::Ptr<recob::Hit>> current_hits;
177 current_hits.push_back(map_iter->first);
181 for(
auto &
h: current_hits){
183 double wire = (double)
h->WireID().Wire;
184 double tick = (double)
h->PeakTime();
187 if(dist > dist_to_vertex){
202 std::vector<std::vector<double>> vec_tick(3);
203 std::vector<std::vector<double>> vec_chan(3);
207 double wire = (double)
h->WireID().Wire;
208 vec_chan[(int)
h->View()].push_back(wire);
209 vec_tick[(int)
h->View()].push_back((
double)
h->PeakTime());
217 for(
int i=0; i<3; i++){
229 int n_below_thresh = 0;
230 std::vector<std::vector<double>> vec_tick(3);
231 std::vector<std::vector<double>> vec_chan(3);
232 std::vector<std::vector<std::vector<double>>> vec_pts(3);
233 std::vector<std::vector<art::Ptr<recob::Hit>>> vec_hits(3);
239 auto&
h = pair.first;
249 double wire = (double)
h->WireID().Wire;
250 double tick = (double)
h->PeakTime();
251 vec_chan[(int)
h->View()].push_back(wire);
252 vec_tick[(int)
h->View()].push_back(tick);
254 vec_pts[(int)
h->View()].push_back({wire,tick});
255 vec_hits[(int)
h->View()].push_back(
h);
260 chan_min[(int)
h->View()] = std::min( chan_min[(
int)
h->View()],wire);
266 for(
int i=0; i<3; i++){
275 return {n_all,n_unassoc,n_below_thresh};
286 std::vector<std::vector<double>> vec_tick(3);
287 std::vector<std::vector<double>> vec_chan(3);
290 double wire = (double)
h->WireID().Wire;
291 vec_chan[(int)
h->View()].push_back(wire);
292 vec_tick[(int)
h->View()].push_back((
double)
h->PeakTime());
294 tick_min = std::min(tick_min, (
double)
h->PeakTime());
295 chan_max[(int)
h->View()] = std::max( chan_max[(
int)
h->View()],wire);
296 chan_min[(int)
h->View()] = std::min( chan_min[(
int)
h->View()],wire);
302 std::vector<TGraph> t_graphs;
303 for(
int i=0; i<3; i++){
304 t_graphs.emplace_back(vec_tick[i].
size(),&vec_chan[i][0],&vec_tick[i][0]);
331 auto const TPC = (*geom).begin_TPC();
333 int fCryostat = ID.Cryostat;
336 std::vector<std::vector<double>> ans(3);
338 for(
int i=0; i<3; i++){
339 double wire = (double)
calcWire(threeD[1], threeD[2], i, fTPC, fCryostat, *
geom);
342 ans[i] = {wire,time};
352 auto const TPC = (*geom).begin_TPC();
354 int fCryostat = ID.Cryostat;
357 for(
int i=0; i<3; i++){
360 std::vector<double> wire = {(double)
calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *
geom)};
369 TGraph gtmp(1, &wire[0], &time[0]);
381 auto const TPC = (*geom).begin_TPC();
383 int fCryostat = ID.Cryostat;
386 for(
int i=0; i<3; i++){
388 std::vector<double> wire = {(double)
calcWire(m_vertex_pos_y, m_vertex_pos_z, i, fTPC, fCryostat, *
geom)};
397 TGraph gtmp(1, &wire[0], &time[0]);
408 std::string print_name =
"SEAview_"+
tag;
409 TCanvas *can=
new TCanvas(print_name.c_str(),print_name.c_str(),3000,800);
410 can->Divide(4,1,0,0.1);
412 double plot_point_size=0.4;
424 std::vector<double> real_wire_min(3);
425 std::vector<double> real_wire_max(3);
427 for(
int i=0; i<3; i++){
428 TPad * pader = (TPad*)can->cd(i+1);
430 if(i==0 || i ==4 || i == 8) pader->SetLeftMargin(0.1);
443 vertex_graph[i].GetYaxis()->SetRangeUser(real_tick_min,real_tick_max);
444 vertex_graph[i].GetXaxis()->SetLimits(real_wire_min[i], real_wire_max[i]);
446 vertex_graph[i].GetYaxis()->SetTitle(
"Peak Hit Time Tick");
459 for(
int i=0; i<3; i++){
478 int thisp = (int)hs[0].
Plane;
479 double bc = hs[0].Wire;
481 if(real_wire_min[thisp] < bc && bc < real_wire_max[thisp] ){
484 TLine *l =
new TLine(bc, real_tick_min, bc, real_tick_max);
486 l->SetLineColor(kGray+1);
498 std::vector<int> tcols = {kRed-7, kBlue-7, kGreen-3, kOrange-3, kCyan-3, kMagenta-3, kGreen+1 , kRed+1};
501 if(
n_pfps > (
int)tcols.size()){
502 for(
int i =0; i< (int)(
n_pfps +2); i++){
504 tcols.push_back(kRed);
511 int tcol = tcols[used_col];
514 for(
int i=0; i<3; i++){
529 std::vector<TLine*> lines;
538 std::vector<std::vector<double>> start_pt = this->
to2D(shr_start_3D);
539 std::vector<std::vector<double>> other_pt = this->
to2D(shr_other_3D);
541 for(
int i=0; i<3; i++){
544 double slope = (start_pt[i][1]-other_pt[i][1])/(start_pt[i][0]-other_pt[i][0]);
545 double inter = start_pt[i][1]-slope*start_pt[i][0];
547 double x1_plot = other_pt[i][0];
548 double y1_plot = slope*x1_plot+inter;
551 if(other_pt[i][0]<start_pt[i][0]){
553 x2_plot = real_wire_max[i];
556 x2_plot = real_wire_min[i];
558 double y2_plot = slope*x2_plot+inter;
561 TLine *l =
new TLine(x1_plot, y1_plot, x2_plot, y2_plot);
563 l->SetLineColorAlpha(tcols[
s],0.5);
573 for(
int i=0; i<3; i++){
589 std::vector<int> cluster_colors(
vec_clusters.size()+1,0);
590 std::vector<int> base_col = {632,416, 600, 400, 616, 432, 800, 820, 840, 860, 880, 900};
593 int b = (int)
rangen->Uniform(0,11);
594 int mod = (int)
rangen->Uniform(-10,+3);
596 cluster_colors[j] = base_col[b]+mod;
601 int pl = c.getPlane();
603 if (c.getGraph()->GetN()>0){
604 c.getGraph()->Draw(
"p same");
605 c.getGraph()->SetMarkerColor(cluster_colors[c_offset]);
606 c.getGraph()->SetFillColor(cluster_colors[c_offset]);
607 c.getGraph()->SetMarkerStyle(20);
609 c.getGraph()->SetMarkerSize(plot_point_size*1.5);
623 for(
int i=0; i<3; i++){
627 double rad_cm = 12.0;
629 ell_p.SetLineColor(kRed);
630 ell_p.SetFillStyle(0);
635 TPad *p_top_info = (TPad*)can->cd(4);
645 TLegend l_top(0.1,0.0,0.9,1.0);
646 l_top.SetTextSize(0.05);
673 l_top.SetHeader(print_name.c_str(),
"C");
674 l_top.SetLineWidth(0);
675 l_top.SetLineColor(kWhite);
681 can->SaveAs((print_name+
".pdf").c_str(),
"pdf");
693 for(
int i=0; i<3; i++){
695 std::cout<<
"SinglePhoton::seaDBSCAN\t||\tStarting to run seaDBSCAN for plane: "<<i<<
" has "<<
vec_unass_pts[i].size()<<
" pts to do using eps: "<<eps<<
" and min_pts: "<<min_pts<<std::endl;
704 std::cout <<
"SinglePhoton::seaDBSCAN\t||\tOn this plane "<<i<<
" seaDBSCAN found: "<<
num_clusters[i]<<
" clusters"<<std::endl;
709 for(
int i=0; i<3; i++){
713 std::vector<std::vector<double>> t_pts;
714 std::vector<art::Ptr<recob::Hit>> hitz;
728 std::cout<<
"SinglePhoton::seaDBSCAN\t||\t Cluster "<<
vec_clusters.size()+1<<
" has "<<hitz.size()<<
" hitz on plane "<<i<<std::endl;
737 std::vector<double>
SEAviewer::analyzeTrackLikeClusters(
double eps,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap,std::vector<seaview::cluster>& vec_in_clusters ){
744 std::vector<std::vector<double>> shr_start_pt = this->
to2D(shr_start_3D);
745 std::vector<std::vector<double>> shr_other_pt = this->
to2D(shr_other_3D);
753 int num_hits_in_cluster =
vec_clusters[c].getHits().size();
759 vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*
wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*
tick_con, 2.0)));
783 std::vector<double>
SEAviewer::analyzeShowerLikeClusters(
double eps,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap,std::vector<seaview::cluster>& vec_in_clusters ){
811 std::vector<std::vector<double>> shr_start_pt = this->
to2D(shr_start_3D);
812 std::vector<std::vector<double>> shr_other_pt = this->
to2D(shr_other_3D);
820 int num_hits_in_cluster =
vec_clusters[c].getHits().size();
826 vec_clusters[c].setWireTickBasedLength(sqrt(pow((ssscorz.max_wire-ssscorz.min_wire)*
wire_con, 2.0) + pow((ssscorz.max_tick - ssscorz.min_tick)*
tick_con, 2.0)));
841 if(num_hits_in_cluster>0){
850 core->Draw(
"p same");
855 for(
int b=0; b<core->GetN(); b++){
858 core->GetPoint(b,ttx,tty);
859 fmax = std::max(fmax, ttx);
860 fmin = std::min(fmin,ttx);
871 core->Fit(
"pol1",
"Q",
"same",fmin,fmax);
872 con = core->GetFunction(
"pol1")->GetParameter(0);
873 slope = core->GetFunction(
"pol1")->GetParameter(1);
876 double impact_parameter = 1
e10;
880 double y = slope*
k+con;
882 impact_parameter = std::min(impact_parameter,dist);
889 std::vector<double> vec_c = {(double)(
vertex_chan[pl]-ssscorz.close_wire), (double)(
vertex_tick[pl]-ssscorz.close_tick)};
890 std::vector<double> vec_s = {(double)
vertex_chan[pl]-shr_start_pt[pl][0], (
double)
vertex_tick[pl]-shr_start_pt[pl][1]};
892 double l_s = sqrt(pow(
wire_con*vec_s[0],2)+pow(vec_s[1]*tick_con,2));
893 double kinda_angle = acos((
wire_con*vec_s[0]*
wire_con*vec_c[0]+vec_c[1]*vec_s[1]*tick_con*tick_con )/(l_c*l_s));
897 std::cout<<pl<<
" Num Hits "<<num_hits_in_cluster<<std::endl;
898 std::cout<<pl<<
" Num Wires "<< (int)ssscorz.n_wires<<std::endl;
899 std::cout<<pl<<
" Num Ticks "<< (
int)ssscorz.n_ticks<<std::endl;
901 std::cout<<pl<<
" PCA "<<ssscorz.pca_0<<std::endl;
902 std::cout<<pl<<
" Impact "<<impact_parameter<<std::endl;
903 std::cout<<pl<<
" Fit Slope "<<slope<<std::endl;
904 std::cout<<pl<<
" Fit Constant "<<con<<std::endl;
905 std::cout<<pl<<
" Mean Tick "<<ssscorz.mean_tick<<std::endl;
906 std::cout<<pl<<
" Max Tick "<<ssscorz.max_tick<<std::endl;
907 std::cout<<pl<<
" Min Tick "<<ssscorz.min_tick<<std::endl;
908 std::cout<<pl<<
" Mean Wire "<<ssscorz.mean_wire<<std::endl;
909 std::cout<<pl<<
" Max Wire "<<ssscorz.max_wire<<std::endl;
910 std::cout<<pl<<
" Min Wire "<<ssscorz.min_wire<<std::endl;
911 std::cout<<pl<<
" Kinda Angle "<<kinda_angle<<std::endl;
1005 double t = -(x10*x21+y10*y21)/fabs(x21*x21+y21*y21);
1007 double d2 = pow(x1-x0,2)+pow(y1-y0,2)+2*t*((x2-x1)*(x1-x0)+(y2-y1)*(y1-y0))+t*t*( pow(x2-x1,2)+pow(y2-y1,2));
1016 score.
n_hits = hits.size();
1018 std::vector<double> t_wires;
1019 std::vector<double> t_ticks;
1022 int n_min_ticks = 4;
1023 int n_min_wires = 3;
1024 double n_max_pca = 0.9999;
1057 std::map<int,bool> wire_count;
1058 std::map<int,bool> tick_count;
1062 double h_tick = (double)
h->PeakTime();
1063 double h_wire = (double)
h->WireID().Wire;
1095 t_wires.push_back(h_wire);
1096 t_ticks.push_back(h_tick);
1098 if(wire_count.count((
int)h_wire)<1){
1099 wire_count[((int)h_wire)] =
true;
1102 if(tick_count.count((
int)h_tick)<1){
1103 tick_count[((int)h_tick)] =
true;
1123 TPrincipal* principal =
new TPrincipal(2,
"D");
1124 double mod_wire = 1.0;
1125 double mod_tick = 1.0;
1127 for(
int i = 0; i < score.
n_hits; i++){
1128 std::vector<double> tmp_pts = {t_wires[i]*mod_wire, t_ticks[i]/mod_tick};
1129 principal->AddRow(&tmp_pts[0]);
1131 principal->MakePrincipals();
1134 TVectorD * eigenval = (TVectorD*) principal->GetEigenValues();
1136 TMatrixD * covar = (TMatrixD*) principal->GetCovarianceMatrix();
1138 score.
pca_0 = (*eigenval)(0);
1139 score.
pca_1 = (*eigenval)(1);
1145 score.
pca_theta = atan((*covar)[0][0]/(*covar)[0][1])*180.0/3.14159;
1148 double slope = ((*covar)[0][0]/(*covar)[0][1]);
1150 score.
impact_parameter = fabs(slope*vertex_wire*mod_wire +vertex_tick/mod_tick+c)/sqrt(slope*slope+1.0*1.0);
1154 if(score.
n_wires < n_min_wires || score.
n_ticks < n_min_ticks || score.
pca_0 >= n_max_pca){
1166 int SEAviewer::SeaviewCompareToShowers(
int p ,
int cl,
std::vector<art::Ptr<recob::Hit>>& hitz,
double vertex_wire,
double vertex_tick,
std::vector<art::Ptr<recob::Shower>>& showers,
const std::map<art::Ptr<recob::Shower>, art::Ptr<recob::PFParticle>> & showerToPFParticleMap,
const std::map<art::Ptr<recob::PFParticle>,
std::vector<art::Ptr<recob::Hit>> > & pfParticleToHitsMap,
double eps){
1169 for(
size_t s =0;
s< showers.size();
s++){
1170 art::Ptr<recob::Shower>
shower = showers[
s];
1171 art::Ptr<recob::PFParticle> pfp = showerToPFParticleMap.at(shower);
1172 std::vector<art::Ptr<recob::Hit>> showerhits = pfParticleToHitsMap.at(pfp);
1174 bool in_primary_shower =
false;
1175 for(
size_t h = 0;
h< hitz.size();
h++){
1177 double h_wire = (double)
hit->WireID().Wire;
1178 double h_tick = (double)
hit->PeakTime();
1181 for(
auto &sh: showerhits){
1183 if(sh->View() !=
hit->View())
continue;
1185 double sh_wire = (double)sh->WireID().Wire;
1186 double sh_tick = (double)sh->PeakTime();
1191 in_primary_shower =
true;
1199 if(in_primary_shower){
1212 std::vector<double>t_wire;
1213 std::vector<double>t_tick;
1216 std::vector<double>all_wire;
1217 std::vector<double>all_tick;
1218 std::vector<double>all_dist;
1221 for(
size_t h = 0;
h< hitz.size();
h++){
1223 double h_wire = (double)
hit->WireID().Wire;
1224 double h_tick = (double)
hit->PeakTime();
1227 all_wire.push_back(h_wire);
1228 all_tick.push_back(h_tick);
1229 all_dist.push_back(dd);
1234 size_t max_e = std::min((
size_t)Npts,hitz.size());
1236 for(
size_t i =0; i<max_e; i++){
1237 t_wire.push_back(all_wire[sorted_in[hitz.size()-1-i]]);
1238 t_tick.push_back(all_tick[sorted_in[hitz.size()-1-i]]);
1241 return new TGraph(t_wire.size(),&t_wire[0],&t_tick[0]);
1248 const std::vector<art::Ptr<recob::Hit>>& hitz = cl.
getHits();
1251 for(
auto&
h : hitz){
1266 double min_ioc_to_shower =
vec_clusters.at(cluster).getMinHitIOC();
1269 std::ostringstream ss1, ss2, ss3;
1270 ss1 << std::setprecision(1) << std::fixed << energy;
1271 ss2 << std::setprecision(1) << std::fixed << min_ioc_to_shower;
1272 ss3 << std::setprecision(2) << std::fixed << overlay_fraction;
1276 if(is_matched == 1){
1277 legend =
"#splitline{" +
std::to_string(plane) +
", " + ss1.str() +
"MeV, Min IOC: "
1278 + ss2.str() +
"}{#splitline{Matched: " + (is_matched == 1 ?
"true" :
"false") +
", PDG: "
1279 +
std::to_string(matched_pdg) +
"}{Ovelay Frac: "+ ss3.str() +
"}}";
1282 legend =
std::to_string(plane) +
", " + ss1.str() +
"MeV, Min IOC: " + ss2.str();
1289 std::ostringstream ss1, ss2, ss3;
1290 ss1 << std::setprecision(1) << std::fixed << arg1;
1291 ss2 << std::setprecision(2) << std::fixed << arg2;
1292 ss3 << std::setprecision(1) << std::fixed << arg3;
1294 if(leg ==
"Shower"){
1295 leg =
"#splitline{" + leg +
": " + ss1.str() +
" MeV | " + ss2.str() +
" cm }{conv. dist | "
1296 + ss3.str() +
" impact par.}";
1301 leg +=
": "+ ss1.str() +
" cm | " + ss2.str() +
" PCA";
double f_mean_ADC_second_half
int loadVertex(double m_vertex_pos_x, double m_vertex_pos_y, double m_vertex_pos_z)
std::vector< TGraph > true_vertex_graph
std::vector< std::vector< TGraph > > vec_graphs
std::vector< std::vector< double > > vec_all_ticks
BEGIN_PROLOG true icarus_rawdigitfilter FilterTools FilterPlane1 Plane
int addPFParticleHits(std::vector< art::Ptr< recob::Hit >> &hits, std::string leg, double arg1=0.0, double arg2=0.0, double arg3=0.0)
BEGIN_PROLOG could also be cerr
std::vector< TGraph > vertex_graph
std::vector< seaview::cluster > vec_clusters
std::vector< std::vector< std::vector< double > > > vec_unass_pts
int InNuSlice(const std::map< int, std::vector< art::Ptr< recob::Hit >> > &sliceIDToHitsMap, int nuSliceID)
std::vector< double > analyzeShowerLikeClusters(double eps, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, std::vector< seaview::cluster > &vec_c)
std::map< art::Ptr< recob::Hit >, bool > map_unassociated_hits
std::vector< art::Ptr< recob::Shower > > vec_showers
double calcTime(double X, int plane, int fTPC, int fCryostat, detinfo::DetectorPropertiesData const &detprop)
BEGIN_PROLOG or score(default)}sbnd_crttrackmatchingalg_crID
int setHitThreshold(double)
std::vector< std::vector< art::Ptr< recob::Hit > > > vec_unass_hits
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
std::size_t size(FixedBins< T, C > const &) noexcept
int addTrack(art::Ptr< recob::Track > &trk)
std::vector< int > num_clusters
std::vector< std::vector< double > > vec_all_chans
bool InRange(double tick_max, double tick_min, double wire_max, double wire_min) const
std::vector< art::Ptr< recob::Hit > > f_hits
double f_mean_ADC_first_to_second_ratio
std::vector< std::vector< std::vector< double > > > vec_ticks
geo::GeometryCore const * geom
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
process_name opflash particleana ie ie y
cluster_score SeaviewScoreCluster(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hits, double vertex_wire, double vertex_tick, const art::Ptr< recob::Shower > &shower)
double f_ioc_based_length
double f_min_ioc_to_shower_start
static constexpr double wire_con
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
std::vector< double > vertex_chan
std::vector< TGraph > vec_all_graphs
std::vector< std::pair< int, int > > m_bad_channel_list
double f_angle_wrt_shower_direction
detinfo::DetectorPropertiesData const & theDetector
std::vector< double > analyzeTrackLikeClusters(double eps, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, std::vector< seaview::cluster > &vec_c)
std::vector< std::vector< double > > to2D(std::vector< double > &threeD)
const std::string & getLegend() const
Description of geometry of one entire detector.
std::vector< int > Scan2D(std::vector< std::vector< double >> &pts)
int Print(double plot_distance)
int setBadChannelList(std::vector< std::pair< int, int >> &in)
std::vector< double > chan_max
TGraph * SeaviewGetNearestNpts(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, int Npts)
double f_mean_ADC_first_half
int addShower(art::Ptr< recob::Shower > &shr)
void TrackLikeClusterAnalyzer(cluster &cl, const std::vector< double > &shower_start_pt_2D, const std::vector< double > &shower_other_pt_2D)
std::vector< std::string > vec_pfp_legend
int addAllHits(std::vector< art::Ptr< recob::Hit >> &hits)
std::vector< std::vector< double > > vec_unass_ticks
std::vector< double > true_vertex_tick
std::map< art::Ptr< recob::Hit >, bool > map_considered_hits
if &&[-z"$BASH_VERSION"] then echo Attempting to switch to bash bash shellSwitch exit fi &&["$1"= 'shellSwitch'] shift declare a IncludeDirectives for Dir in
std::vector< std::vector< int > > cluster_labels
void format_legend(std::string &leg, double arg1=0.0, double arg2=0.0, double arg3=0.0)
constexpr double dist(const TReal *x, const TReal *y, const unsigned int dimension)
double dist_point_point(double w1, double t1, double w2, double t2) const
std::vector< double > true_vertex_chan
int SeaviewCompareToShowers(int p, int cl, std::vector< art::Ptr< recob::Hit >> &hitz, double vertex_wire, double vertex_tick, std::vector< art::Ptr< recob::Shower >> &showers, const std::map< art::Ptr< recob::Shower >, art::Ptr< recob::PFParticle >> &showerToPFParticleMap, const std::map< art::Ptr< recob::PFParticle >, std::vector< art::Ptr< recob::Hit >> > &pfParticleToHitsMap, double eps)
double dist_line_point(const std::vector< double > &X1, const std::vector< double > &X2, const std::vector< double > &point)
std::vector< int > f_hit_group
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
std::vector< double > chan_min
double calcWire(double Y, double Z, int plane, int fTPC, int fCryostat, geo::GeometryCore const &geo)
void SetClusterLegend(int cluster, double energy, int is_matched, int matched_pdg, double overlay_fraction)
std::vector< size_t > seaview_sort_indexes(const std::vector< T > &v)
std::vector< art::Ptr< recob::Track > > vec_tracks
int runseaDBSCAN(double min_pts, double eps)
static constexpr double tick_con
std::vector< std::vector< double > > vec_unass_chans
int addTrueVertex(double x, double y, double z)
then echo ***************************************echo Variable FHICL_FILE_PATH not found echo You porbably haven t set up larsoft echo Try setup uboonecode vXX_XX_XX q e10
std::vector< TGraph > vec_unass_graphs
const std::vector< art::Ptr< recob::Hit > > & getHits()
int addHitsToConsider(std::vector< art::Ptr< recob::Hit >> &hits)
std::size_t count(Cont const &cont)
SEAviewer(std::string tag, geo::GeometryCore const *geom, detinfo::DetectorPropertiesData const &theDetector)
std::vector< int > calcUnassociatedHits()
double f_min_conversion_dist_to_shower_start
BEGIN_PROLOG could also be cout
void BasicClusterCalorimetry(cluster &cl)
std::vector< std::vector< std::vector< double > > > vec_chans
double f_min_impact_parameter_to_shower
std::vector< double > vertex_tick
int filterConsideredHits(double dist_to_vertex)