Commit 5c33350c authored by Johnston's avatar Johnston
Browse files

fail message for unsafe input parameters modified: hough_transform2.cxx

parent 033b5301
......@@ -10,6 +10,12 @@ void hough_transform2(
TFile * f = new TFile("simple_example_out.root","READ");
TTree * t = (TTree*)gROOT->FindObject("EVENT");
if(!t) { std::cout << " Tree not found " << std::endl; return;}
int nentries=t->GetEntries();
if(i_event+Ntracks>nentries){
std::cout << "Only " << nentries << " in file, this parameter set fails" << std::endl;
return;
}
std::vector<DD4hep::Simulation::Geant4Tracker::Hit*> * g4hits = nullptr;
std::vector<DD4hep::Simulation::Geant4Tracker::Hit*> * g4hits2 = nullptr;
......@@ -78,7 +84,7 @@ void hough_transform2(
}
for(auto ahit : all_chits) {
std::cout << ahit.X() << " , " << ahit.Y() << std::endl;
//std::cout << ahit.X() << " , " << ahit.Y() << std::endl;
huv->Fill( ahit.X(), ahit.Y() );
hphi->Fill(TMath::ATan(ahit.Y()/ahit.X()));
for(int i_theta = 0; i_theta<180; i_theta++) {
......
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