Commit 992ff5ed authored by Lennart Huth's avatar Lennart Huth
Browse files

added a histogram of the track-z position on the global dut plane

parent 188ef517
......@@ -55,6 +55,11 @@ void AnalysisDUT::initialise() {
0,
500);
hTrackZPosDUT = new TH1F("trackZPos",
"trackZPos; track intersection [mm]; #entries ",
400,
m_detector->displacement().z() - 10,
m_detector->displacement().z() + 10);
// Per-pixel histograms
hHitMapAssoc = new TH2F("hitMapAssoc",
"hitMapAssoc; hit column; hit row",
......@@ -398,6 +403,7 @@ StatusCode AnalysisDUT::run(std::shared_ptr<Clipboard> clipboard) {
}
has_associated_cluster = true;
hTrackZPosDUT->Fill(track->state(m_detector->name()).z());
// Check distance between track and cluster
ROOT::Math::XYZPoint intercept = track->intercept(assoc_cluster->global().z());
double xdistance = intercept.X() - assoc_cluster->global().x();
......
......@@ -68,6 +68,7 @@ namespace corryvreckan {
TH1F* hTrackCorrelationPos;
TH2F* hTrackCorrelationPosVsCorrelationTime;
TH1F* hTrackCorrelationTime;
TH1F* hTrackZPosDUT;
TH1F* residualsTime;
TH2F* residualsTimeVsTime;
TH2F* residualsTimeVsSignal;
......
......@@ -314,17 +314,9 @@ ROOT::Math::XYZPoint GblTrack::state(std::string detectorID) const {
// Let's check first if the data is fitted and all components are there
if(!m_isFitted)
throw TrackError(typeid(GblTrack), " detector " + detectorID + " state is not defined before fitting");
if(m_materialBudget.count(detectorID) != 1) {
std::string list;
for(auto l : m_materialBudget)
list.append("\n " + l.first + " with <materialBudget, z position>(" + std::to_string(l.second.first) + ", " +
std::to_string(l.second.second) + ")");
throw TrackError(typeid(GblTrack),
" detector " + detectorID + " is not appearing in the material budget map" + list);
if(m_localTrackPoints.count(detectorID) != 1) {
throw TrackError(typeid(GblTrack), "Detector " + detectorID + " is not part of the GBL");
}
if(m_corrections.count(detectorID) != 1)
throw TrackError(typeid(GblTrack), " detector " + detectorID + " is not appearing in the corrections map");
auto p =
std::find_if(m_planes.begin(), m_planes.end(), [detectorID](auto plane) { return (plane.name() == detectorID); });
return (p->toGlobal() * ROOT::Math::XYZPoint(m_localTrackPoints.at(detectorID).x() + correction(detectorID).x(),
......
Markdown is supported
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