Commit bc4357b2 authored by Daniel Hynds's avatar Daniel Hynds
Browse files

updated track degrees of freedom and added histograms of chi2/ndof


Former-commit-id: 5731cf706b06ab1a587e423c7e0763982e64d103
parent 0dc0d0be
...@@ -13,6 +13,8 @@ void BasicTracking::initialise(Parameters* par){ ...@@ -13,6 +13,8 @@ void BasicTracking::initialise(Parameters* par){
// Set up histograms // Set up histograms
trackChi2 = new TH1F("trackChi2","trackChi2",150,0,150); trackChi2 = new TH1F("trackChi2","trackChi2",150,0,150);
trackChi2ndof = new TH1F("trackChi2ndof","trackChi2ndof",100,0,50);
clustersPerTrack = new TH1F("clustersPerTrack","clustersPerTrack",10,0,10);
tracksPerEvent = new TH1F("tracksPerEvent","tracksPerEvent",100,0,100); tracksPerEvent = new TH1F("tracksPerEvent","tracksPerEvent",100,0,100);
// Loop over all Timepix3 // Loop over all Timepix3
...@@ -27,7 +29,7 @@ void BasicTracking::initialise(Parameters* par){ ...@@ -27,7 +29,7 @@ void BasicTracking::initialise(Parameters* par){
} }
// Default values for cuts // Default values for cuts
timinigCut = 200./1000000000.; // 10 ns timinigCut = 200./1000000000.; // 200 ns
spatialCut = 0.2; // 200 um spatialCut = 0.2; // 200 um
minHitsOnTrack = 6; minHitsOnTrack = 6;
...@@ -123,6 +125,8 @@ int BasicTracking::run(Clipboard* clipboard){ ...@@ -123,6 +125,8 @@ int BasicTracking::run(Clipboard* clipboard){
// Fill histograms // Fill histograms
trackChi2->Fill(track->chi2()); trackChi2->Fill(track->chi2());
clustersPerTrack->Fill(track->nClusters());
trackChi2ndof->Fill(track->chi2ndof());
// Make residuals // Make residuals
Timepix3Clusters trackClusters = track->clusters(); Timepix3Clusters trackClusters = track->clusters();
......
...@@ -29,6 +29,8 @@ public: ...@@ -29,6 +29,8 @@ public:
// Histograms // Histograms
TH1F* trackChi2; TH1F* trackChi2;
TH1F* clustersPerTrack;
TH1F* trackChi2ndof;
TH1F* tracksPerEvent; TH1F* tracksPerEvent;
map<string,TH1F*> residualsX; map<string,TH1F*> residualsX;
map<string,TH1F*> residualsY; map<string,TH1F*> residualsY;
......
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
void calculateChi2(){ void calculateChi2(){
int nClusters = m_clusters.size(); int nClusters = m_clusters.size();
m_ndof = 2.*nClusters-4.; m_ndof = nClusters-2.;
m_chi2 = 0.; m_chi2ndof = 0.; m_chi2 = 0.; m_chi2ndof = 0.;
// Loop over all clusters // Loop over all clusters
for(int iCluster=0;iCluster<nClusters;iCluster++){ for(int iCluster=0;iCluster<nClusters;iCluster++){
......
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