Commit 033b5301 authored by Johnston's avatar Johnston
Browse files

Set hits upper limit to remove pathological events

	modified:   hough_transform2.cxx
parent b0bdd0b8
......@@ -19,6 +19,8 @@ void hough_transform2(
HoughTransform* ht = new HoughTransform();
TH2F * hxy = new TH2F("hxy", "hxy", 100, -1000, 1000, 100, -1000, 1000);
TH2F * hxz = new TH2F("hxz", "hxz", 100, -1000, 1000, 100, -1000, 1000);
TH2F * hyz = new TH2F("hyz", "hyz", 100, -1000, 1000, 100, -1000, 1000);
TH2F * hxy2 = new TH2F("hxy2", "hxy2", 50, -100 , 100, 50, -100, 100);
TH2F * hpeaky = new TH2F("hpeakxy", "hxy", 100, -1000, 1000, 100, -1000, 1000);
TH2F * hpeaky2 = new TH2F("hpeakxy2", "hxy2", 50, -100 , 100, 50, -100, 100);
......@@ -40,6 +42,8 @@ void hough_transform2(
hits.push_back( {thit->position.X(), thit->position.Y(), thit->position.Z(), 0.0} );
std::cout << thit->position.X() << " , " << thit->position.Y() << std::endl;
hxy->Fill(thit->position.X(), thit->position.Y());
hxz->Fill(thit->position.X(), thit->position.Z());
hyz->Fill(thit->position.Y(), thit->position.Z());
hxy2->Fill(thit->position.X(), thit->position.Y());
}
......@@ -47,6 +51,8 @@ void hough_transform2(
hits.push_back( {thit->position.X(), thit->position.Y(), thit->position.Z(), 0.0} );
std::cout << thit->position.X() << " , " << thit->position.Y() << std::endl;
hxy->Fill(thit->position.X(), thit->position.Y());
hxz->Fill(thit->position.X(), thit->position.Z());
hyz->Fill(thit->position.Y(), thit->position.Z());
hxy2->Fill(thit->position.X(), thit->position.Y());
}
}
......@@ -54,7 +60,7 @@ void hough_transform2(
std::vector<std::tuple<XYZTVector,XYZTVector,XYZTVector>> master_hits ;
std::vector<XYZTVector> all_chits ;
std::cout << "DERP\n";
std::cout << "Created 'event' by combining " << Ntracks << " real events from file\n";
for(const auto& fhit : hits){
//auto fhit = hits.at(0);
auto chits = ht->GetConformalCoordinates(fhit, hits);
......@@ -66,7 +72,10 @@ void hough_transform2(
}
}
std::cout << " Master " << master_hits.size() << std::endl;
if(master_hits.size()>2500){
std::cout << "too many master hits " << std::endl;
return;
}
for(auto ahit : all_chits) {
std::cout << ahit.X() << " , " << ahit.Y() << std::endl;
......@@ -118,6 +127,16 @@ void hough_transform2(
hphi->Draw();
//hrphi->Draw("lego2");
c = new TCanvas();
c->Divide(2,2);
c->cd(1);
hxy->Draw("box");
c->cd(2);
hxz->Draw("box");
c->cd(3);
hyz->Draw("box");
c = new TCanvas();
c->Divide(2,2);
c->cd(1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment