Commit b9813d2d authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Rerun formatting

parent 5f71cfa4
Pipeline #228453 passed with stage
in 1 minute and 28 seconds
......@@ -123,21 +123,21 @@ void Alignment::MinimiseResiduals(Int_t& npar, Double_t* grad, Double_t& result,
// Apply new alignment conditions
globalDetector->update();
LOG(DEBUG) << "Updated parameters for "<<detectorToAlign;
LOG(DEBUG) << "Updated parameters for " << detectorToAlign;
// The chi2 value to be returned
result = 0.;
LOG(DEBUG) << "Looping over "<<globalTracks.size()<<" tracks";
LOG(DEBUG) << "Looping over " << globalTracks.size() << " tracks";
// Loop over all tracks
for(auto& track : globalTracks) {
// Get all clusters on the track
Clusters associatedClusters = track->associatedClusters();
LOG(DEBUG) << "- track has chi2 "<<track->chi2();
LOG(DEBUG) << "- track has gradient x "<<track->m_direction.X();
LOG(DEBUG) << "- track has gradient y "<<track->m_direction.Y();
LOG(DEBUG) << "- track has chi2 " << track->chi2();
LOG(DEBUG) << "- track has gradient x " << track->m_direction.X();
LOG(DEBUG) << "- track has gradient y " << track->m_direction.Y();
// Find the cluster that needs to have its position recalculated
for(auto& associatedCluster : associatedClusters) {
......@@ -154,13 +154,13 @@ void Alignment::MinimiseResiduals(Int_t& npar, Double_t* grad, Double_t& result,
double residualX = intercept.X() - positionGlobal.X();
double residualY = intercept.Y() - positionGlobal.Y();
double error = associatedCluster->error();
LOG(DEBUG) << "- track has intercept ("<<intercept.X()<<","<<intercept.Y()<<")";
LOG(DEBUG) << "- cluster has position ("<<positionGlobal.X()<<","<<positionGlobal.Y()<<")";
double deltachi2 = ((residualX * residualX + residualY * residualY) / (error * error));
LOG(DEBUG) << "- delta chi2 = "<<deltachi2;
LOG(DEBUG) << "- track has intercept (" << intercept.X() << "," << intercept.Y() << ")";
LOG(DEBUG) << "- cluster has position (" << positionGlobal.X() << "," << positionGlobal.Y() << ")";
double deltachi2 = ((residualX * residualX + residualY * residualY) / (error * error));
LOG(DEBUG) << "- delta chi2 = " << deltachi2;
// Add the new residual2
result += deltachi2;
LOG(DEBUG) << "- result is now "<<result;
LOG(DEBUG) << "- result is now " << result;
}
}
}
......@@ -313,10 +313,9 @@ void Alignment::finalise() {
for(auto& detector : get_detectors()) {
string detectorID = detector->name();
// Do not align the reference plane
if(detectorID == m_config.get<std::string>("reference") ||
detectorID == m_config.get<std::string>("DUT")) {
continue;
}
if(detectorID == m_config.get<std::string>("reference") || detectorID == m_config.get<std::string>("DUT")) {
continue;
}
// Get the alignment parameters
double displacementX = residualFitter->GetParameter(det * 6 + 0);
......
......@@ -90,7 +90,7 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
for(auto& cluster : (*referenceClusters)) {
// Make a new track
LOG(DEBUG) << "Looking next seed cluster";
LOG(DEBUG) << "Looking at next seed cluster";
Track* track = new Track();
// Add the cluster to the track
......@@ -162,6 +162,8 @@ StatusCode BasicTracking::run(Clipboard* clipboard) {
// Now should have a track with one cluster from each plane
if(track->nClusters() < minHitsOnTrack) {
LOG(DEBUG) << "Not enough clusters on the track, found " << track->nClusters() << " but " << minHitsOnTrack
<< " required.";
delete track;
continue;
}
......
......@@ -51,8 +51,8 @@ StatusCode DUTAnalysis::run(Clipboard* clipboard) {
LOG(TRACE) << "Power on time: " << m_powerOnTime / (4096. * 40000000.);
LOG(TRACE) << "Power off time: " << m_powerOffTime / (4096. * 40000000.);
// if(clipboard->get_persistent("currentTime") < 13.5)
// return Success;
// if(clipboard->get_persistent("currentTime") < 13.5)
// return Success;
// Timing cut for association
double timingCut = 200. / 1000000000.; // 200 ns
......
......@@ -176,11 +176,11 @@ void Timepix3Clustering::calculateClusterCentre(Cluster* cluster) {
// Loop over all pixels
for(int pix = 0; pix < pixels->size(); pix++) {
double pixelToT = (*pixels)[pix]->m_adc;
if(pixelToT == 0){
LOG(DEBUG) << "Pixel with ToT 0!";
pixelToT = 1;
}
double pixelToT = (*pixels)[pix]->m_adc;
if(pixelToT == 0) {
LOG(DEBUG) << "Pixel with ToT 0!";
pixelToT = 1;
}
tot += pixelToT;
row += ((*pixels)[pix]->m_row * pixelToT);
column += ((*pixels)[pix]->m_column * pixelToT);
......
......@@ -102,8 +102,9 @@ void Analysis::load_detectors() {
LOG(STATUS) << "Loaded " << detectors.size() << " detectors";
// Finally, sort the list of detectors by z position (from lowest to highest)
std::sort(detectors.begin(), detectors.end(), [](Detector* det1, Detector* det2){ return det1->displacementZ() < det2->displacementZ();});
std::sort(detectors.begin(), detectors.end(), [](Detector* det1, Detector* det2) {
return det1->displacementZ() < det2->displacementZ();
});
}
void Analysis::load_algorithms() {
......
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