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

added histograms for track angle, moved parameters to initialisation


Former-commit-id: 359672a0e4e44d2a83d14c26a668700893f4c1b0
parent 16a75a91
......@@ -4,6 +4,12 @@
BasicTracking::BasicTracking(bool debugging)
: Algorithm("BasicTracking"){
debug = debugging;
// Default values for cuts
timinigCut = 200./1000000000.; // 200 ns
spatialCut = 0.2; // 200 um
minHitsOnTrack = 5;
}
......@@ -16,6 +22,8 @@ void BasicTracking::initialise(Parameters* par){
trackChi2ndof = new TH1F("trackChi2ndof","trackChi2ndof",100,0,50);
clustersPerTrack = new TH1F("clustersPerTrack","clustersPerTrack",10,0,10);
tracksPerEvent = new TH1F("tracksPerEvent","tracksPerEvent",100,0,100);
trackAngleX = new TH1F("trackAngleX","trackAngleX",2000,-1.,1.);
trackAngleY = new TH1F("trackAngleY","trackAngleY",2000,-1.,1.);
// Loop over all Timepix3
for(int det = 0; det<parameters->nDetectors; det++){
......@@ -28,11 +36,6 @@ void BasicTracking::initialise(Parameters* par){
residualsY[detectorID] = new TH1F(name.c_str(),name.c_str(),400,-0.2,0.2);
}
// Default values for cuts
timinigCut = 200./1000000000.; // 200 ns
spatialCut = 0.2; // 200 um
minHitsOnTrack = 6;
}
int BasicTracking::run(Clipboard* clipboard){
......@@ -130,6 +133,8 @@ int BasicTracking::run(Clipboard* clipboard){
trackChi2->Fill(track->chi2());
clustersPerTrack->Fill(track->nClusters());
trackChi2ndof->Fill(track->chi2ndof());
trackAngleX->Fill(atan(track->m_direction.X()));
trackAngleY->Fill(atan(track->m_direction.Y()));
// Make residuals
Timepix3Clusters trackClusters = track->clusters();
......@@ -143,7 +148,7 @@ int BasicTracking::run(Clipboard* clipboard){
}
tcout<<"Made "<<tracks->size()<<" tracks"<<endl;
// tcout<<"Made "<<tracks->size()<<" tracks"<<endl;
if(tracks->size() > 0){
clipboard->put("Timepix3","tracks",(TestBeamObjects*)tracks);
tracksPerEvent->Fill(tracks->size());
......
......@@ -32,6 +32,8 @@ public:
TH1F* clustersPerTrack;
TH1F* trackChi2ndof;
TH1F* tracksPerEvent;
TH1F* trackAngleX;
TH1F* trackAngleY;
map<string,TH1F*> residualsX;
map<string,TH1F*> residualsY;
......
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