Commit 4dcf2d79 authored by Daniel Hynds's avatar Daniel Hynds
Browse files

formatting on mac, adds end of corryvreckan namespace

parent 80bae02b
......@@ -44,5 +44,5 @@ namespace corryvreckan {
TH1F* hPixelToT;
TH1F* hPixelsPerFrame;
};
}
} // namespace corryvreckan
#endif // ATLASpixEventLoader_H
......@@ -41,5 +41,5 @@ namespace corryvreckan {
std::map<std::string, TGraph*> align_correction_rotY;
std::map<std::string, TGraph*> align_correction_rotZ;
};
}
} // namespace corryvreckan
#endif // ALIGNMENT_H
......@@ -50,5 +50,5 @@ namespace corryvreckan {
int minHitsOnTrack;
bool excludeDUT;
};
}
} // namespace corryvreckan
#endif // BASICTRACKING_H
......@@ -37,5 +37,5 @@ namespace corryvreckan {
TH1F* hShutterLength;
TH1F* hPixelsPerFrame;
};
}
} // namespace corryvreckan
#endif // CLICpixEventLoader_H
......@@ -35,5 +35,5 @@ namespace corryvreckan {
std::map<std::string, TH1F*> hTrackDiffX;
std::map<std::string, TH1F*> hTrackDiffY;
};
}
} // namespace corryvreckan
#endif // Clicpix2Correlator_H
......@@ -43,5 +43,5 @@ namespace corryvreckan {
TH1F* hPixelToT;
TH1F* hPixelsPerFrame;
};
}
} // namespace corryvreckan
#endif // Clicpix2EventLoader_H
......@@ -126,5 +126,5 @@ namespace corryvreckan {
double m_lostHits;
bool timepix3Telescope;
};
}
} // namespace corryvreckan
#endif // ClicpixAnalysis_H
......@@ -53,5 +53,5 @@ namespace corryvreckan {
long long int m_shutterCloseTime;
bool m_digitalPowerPulsing;
};
}
} // namespace corryvreckan
#endif // DUTAnalysis_H
......@@ -31,5 +31,5 @@ namespace corryvreckan {
int m_eventNumber;
std::string m_detector;
};
}
} // namespace corryvreckan
#endif // DataDump_H
#include "EtaCorrection.h"
using namespace corryvreckan;
using namespace std;
EtaCorrection::EtaCorrection(Configuration config, std::vector<Detector*> detectors)
: Algorithm(std::move(config), std::move(detectors)) {}
void EtaCorrection::initialise() {
// Initialise histograms per device
for(auto& detector : get_detectors()) {
// Check if they are a Timepix3
if(detector->type() != "Timepix3")
continue;
// Simple histogram per device
string name = "plotForDevice_" + detector->name();
plotPerDevice[detector->name()] = new TH2F(name.c_str(), name.c_str(), 256, 0, 256, 256, 0, 256);
}
// Initialise single histograms
string name = "singlePlot";
singlePlot = new TH1F(name.c_str(), name.c_str(), 1000, 0, 1000);
// Initialise member variables
m_eventNumber = 0;
}
StatusCode EtaCorrection::run(Clipboard* clipboard) {
// Loop over all Timepix3 and make plots
for(auto& detector : get_detectors()) {
// Check if they are a Timepix3
if(detector->type() != "Timepix3")
continue;
// Get the pixels
Pixels* pixels = (Pixels*)clipboard->get(detector->name(), "pixels");
if(pixels == NULL) {
LOG(DEBUG) << "Detector " << detector->name() << " does not have any pixels on the clipboard";
continue;
}
// Get the clusters
Clusters* clusters = (Clusters*)clipboard->get(detector->name(), "clusters");
if(clusters == NULL) {
LOG(DEBUG) << "Detector " << detector->name() << " does not have any clusters on the clipboard";
continue;
}
// Loop over all pixels and make hitmaps
for(auto& pixel : (*pixels)) {
// Fill the plots for this device
plotPerDevice[detector->name()]->Fill(pixel->m_column, pixel->m_row);
}
}
// Fill single histogram
singlePlot->Fill(m_eventNumber);
// Increment event counter
m_eventNumber++;
// Return value telling analysis to keep running
return Success;
}
void EtaCorrection::finalise() {
LOG(DEBUG) << "Analysed " << m_eventNumber << " events";
}
#ifndef EtaCorrection_H
#define EtaCorrection_H 1
#include <iostream>
#include "TCanvas.h"
#include "TH1F.h"
#include "TH2F.h"
#include "core/algorithm/Algorithm.h"
#include "objects/Cluster.h"
#include "objects/Pixel.h"
#include "objects/Track.h"
namespace corryvreckan {
class EtaCorrection : public Algorithm {
public:
// Constructors and destructors
EtaCorrection(Configuration config, std::vector<Detector*> detectors);
~EtaCorrection() {}
// Functions
void initialise();
StatusCode run(Clipboard* clipboard);
void finalise();
// Histograms for several devices
std::map<std::string, TH2F*> plotPerDevice;
// Single histograms
TH1F* singlePlot;
// Member variables
int m_eventNumber;
};
} // namespace corryvreckan
#endif // EtaCorrection_H
......@@ -47,5 +47,5 @@ namespace corryvreckan {
std::map<std::string, long long int> m_currentPosition;
double m_timeWindow;
};
}
} // namespace corryvreckan
#endif // FileReader_H
......@@ -41,5 +41,5 @@ namespace corryvreckan {
// List of objects to write out
std::vector<std::string> m_objectList;
};
}
} // namespace corryvreckan
#endif // FileWriter_H
......@@ -44,5 +44,5 @@ namespace corryvreckan {
int eventNumber;
int updateNumber;
};
}
} // namespace corryvreckan
#endif // GUI_H
......@@ -32,5 +32,5 @@ namespace corryvreckan {
// Member variables
int m_eventNumber;
};
}
} // namespace corryvreckan
#endif // GenericAlgorithm_H
......@@ -47,5 +47,5 @@ namespace corryvreckan {
int eventNumber;
int updateNumber;
};
}
} // namespace corryvreckan
#endif // OnlineMonitor_H
......@@ -34,5 +34,5 @@ namespace corryvreckan {
double max_correlation_rms;
double damping_factor;
};
}
} // namespace corryvreckan
#endif // PREALIGNMENT_H
......@@ -26,5 +26,5 @@ namespace corryvreckan {
// Member variables
int m_eventNumber;
};
}
} // namespace corryvreckan
#endif // SpatialClustering_H
......@@ -44,5 +44,5 @@ namespace corryvreckan {
double nTracksTotal;
bool excludeDUT;
};
}
} // namespace corryvreckan
#endif // SpatialTracking_H
......@@ -39,5 +39,5 @@ namespace corryvreckan {
// Parameters which can be set by user
bool makeCorrelations;
};
}
} // namespace corryvreckan
#endif // TESTALGORITHM_H
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