Skip to content

Commit

Permalink
Change tracking timing precision, fixes to DQM histo names (#1448)
Browse files Browse the repository at this point in the history
* Change tracking timing precision, so it's not changing due to running on different machines.
* Dont use slash in DQM histo name (dof) Chi2/ndf is now Chi2_per_ndf
* Change Tracking DQM to not hardcode ecal as extrapolated state (could be at beam, target, ecal)
  • Loading branch information
tvami authored Sep 13, 2024
1 parent ac0a33f commit a03100b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
22 changes: 11 additions & 11 deletions Tracking/python/dqm.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def buildHistograms(self) :
"Chi2",nbins,0,100)
self.build1DHistogram("ndf",
"ndf",10,0,10)
self.build1DHistogram("Chi2/ndf",
self.build1DHistogram("Chi2_per_ndf",
"Chi2/ndf",nbins,0,10)
self.build1DHistogram("nShared",
"nShared",5,0,5)
Expand Down Expand Up @@ -337,7 +337,7 @@ def buildHistograms(self) :
"fake nHits",15,0,15)
self.build1DHistogram("fake_Chi2",
"fake Chi2",100,0,chi2Fake_max)
self.build1DHistogram("fake_Chi2/ndf",
self.build1DHistogram("fake_Chi2_per_ndf",
"fake Chi2/ndf",100,0,chi2NdfFake_max)
self.build1DHistogram("fake_nShared",
"fake nShared",5,0,5)
Expand All @@ -363,7 +363,7 @@ def buildHistograms(self) :
"dup nHits",15,0,15)
self.build1DHistogram("dup_Chi2",
"dup Chi2",100,0,100)
self.build1DHistogram("dup_Chi2/ndf",
self.build1DHistogram("dup_Chi2_per_ndf",
"dup Chi2/ndf",100,0,10)
self.build1DHistogram("dup_nShared",
"dup nShared",5,0,5)
Expand All @@ -377,14 +377,14 @@ def buildHistograms(self) :
#Track states extrapolations
for trackState in self.trackStates:

self.build1DHistogram("trk_"+trackState+"_loc0","trk_ecal_loc0 [mm]",200,-50,50)
self.build1DHistogram("trk_"+trackState+"_loc1","trk_ecal_loc1 [mm]",200,-50,50)
self.build1DHistogram(trackState+"_sp_hit_X","ecal_sp_hit_X [mm]",200,-50,50)
self.build1DHistogram(trackState+"_sp_hit_Y","ecal_sp_hit_Y [mm]",200,-50,50)
self.build1DHistogram("trk_"+trackState+"_loc0-sp_hit_X","ecal_diff loc0 and hit_X [mm]",200,-0.2,0.2)
self.build1DHistogram("trk_"+trackState+"_loc1-sp_hit_Y","ecal_diff loc1 and hit_Y [mm]",200,-5,5)
self.build1DHistogram(trackState+"_Pulls_of_loc0","ecal_pulls_of_loc0 [mm]",200,-5,5)
self.build1DHistogram(trackState+"_Pulls_of_loc1","ecal_pulls_of_loc1 [mm]",200,-5,5)
self.build1DHistogram("trk_"+trackState+"_loc0","trk_"+trackState+"_loc0 [mm]",200,-50,50)
self.build1DHistogram("trk_"+trackState+"_loc1","trk_"+trackState+"_loc1 [mm]",200,-50,50)
self.build1DHistogram(trackState+"_sp_hit_X",trackState+"_sp_hit_X [mm]",200,-50,50)
self.build1DHistogram(trackState+"_sp_hit_Y",trackState+"_sp_hit_Y [mm]",200,-50,50)
self.build1DHistogram("trk_"+trackState+"_loc0-sp_hit_X",trackState+"_diff loc0 and hit_X [mm]",200,-0.2,0.2)
self.build1DHistogram("trk_"+trackState+"_loc1-sp_hit_Y",trackState+"_diff loc1 and hit_Y [mm]",200,-5,5)
self.build1DHistogram(trackState+"_Pulls_of_loc0",trackState+"_pulls_of_loc0 [mm]",200,-5,5)
self.build1DHistogram(trackState+"_Pulls_of_loc1",trackState+"_pulls_of_loc1 [mm]",200,-5,5)

self.build2DHistogram(trackState+"_res_loc0-vs-N_hits","N_hits", 5,6.5,11.5,trackState+"_res_loc0 [mm]",100,-0.2,0.2)
self.build2DHistogram(trackState+"_res_loc1-vs-N_hits","N_hits", 5,6.5,11.5,trackState+"_res_loc1 [mm]",100,-5,5)
Expand Down
14 changes: 7 additions & 7 deletions Tracking/src/Tracking/Reco/CKFProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -633,26 +633,26 @@ void CKFProcessor::onProcessStart() {
void CKFProcessor::onProcessEnd() {
ldmx_log(info) << "found " << ntracks_ << " tracks / " << nseeds_
<< " nseeds";
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4)
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(1)
<< processing_time_ / nevents_ << " ms";
ldmx_log(info) << "Breakdown::";
ldmx_log(info) << "setup Avg Time/Event = " << std::fixed
<< std::setprecision(4) << profiling_map_["setup"] / nevents_
<< std::setprecision(3) << profiling_map_["setup"] / nevents_
<< " ms";
ldmx_log(info) << "hits Avg Time/Event = " << std::fixed
<< std::setprecision(4) << profiling_map_["hits"] / nevents_
<< std::setprecision(3) << profiling_map_["hits"] / nevents_
<< " ms";
ldmx_log(info) << "seeds Avg Time/Event = " << std::fixed
<< std::setprecision(4) << profiling_map_["seeds"] / nevents_
<< std::setprecision(3) << profiling_map_["seeds"] / nevents_
<< " ms";
ldmx_log(info) << "cf_setup Avg Time/Event = " << std::fixed
<< std::setprecision(4)
<< std::setprecision(3)
<< profiling_map_["ckf_setup"] / nevents_ << " ms";
ldmx_log(info) << "ckf_run Avg Time/Event = " << std::fixed
<< std::setprecision(4) << profiling_map_["ckf_run"] / nevents_
<< std::setprecision(3) << profiling_map_["ckf_run"] / nevents_
<< " ms";
ldmx_log(info) << "result_loop Avg Time/Event = " << std::fixed
<< std::setprecision(4)
<< std::setprecision(1)
<< profiling_map_["result_loop"] / nevents_ << " ms";
}

Expand Down
2 changes: 1 addition & 1 deletion Tracking/src/Tracking/Reco/SeedFinderProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ void SeedFinderProcessor::onProcessEnd() {
// outputFile_->cd();
// outputTree_->Write();
// outputFile_->Close();
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4)
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(1)
<< processing_time_ / nevents_ << " ms";
ldmx_log(info) << "Total Seeds/Events: " << ntracks_ << "/" << nevents_;
ldmx_log(info) << "Seeds discarded due to multiple hits on layers "
Expand Down
2 changes: 1 addition & 1 deletion Tracking/src/Tracking/Reco/VertexProcessor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void VertexProcessor::onProcessEnd() {
outfile->Close();
delete outfile;

ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(4)
ldmx_log(info) << "AVG Time/Event: " << std::fixed << std::setprecision(3)
<< processing_time_ / nevents_ << " ms";
}

Expand Down
3 changes: 2 additions & 1 deletion Tracking/src/Tracking/dqm/TrackingRecoDQM.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ void TrackingRecoDQM::TrackMonitoring(const std::vector<ldmx::Track>& tracks,
histograms_.fill(title + "nHits", track.getNhits());
histograms_.fill(title + "Chi2", track.getChi2());
histograms_.fill(title + "ndf", track.getNdf());
histograms_.fill(title + "Chi2/ndf", track.getChi2() / track.getNdf());
histograms_.fill(title + "Chi2_per_ndf",
track.getChi2() / track.getNdf());
histograms_.fill(title + "nShared", track.getNsharedHits());

histograms_.fill(title + "d0_err", sigmad0);
Expand Down

0 comments on commit a03100b

Please sign in to comment.