Commit 8909499e authored by Jens Kroeger's avatar Jens Kroeger
Browse files

changed Units::get() to Units::get<double>() in all modules I previously changed

parent 1b9f672d
......@@ -9,8 +9,8 @@ using namespace std;
AnalysisCLICpix::AnalysisCLICpix(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
m_associationCut = m_config.get<double>("association_cut", Units::get(100.0, "um"));
m_proximityCut = m_config.get<double>("proximity_cut", Units::get(125.0, "um"));
m_associationCut = m_config.get<double>("association_cut", Units::get<double>(100, "um"));
m_proximityCut = m_config.get<double>("proximity_cut", Units::get<double>(125, "um"));
timepix3Telescope = m_config.get<bool>("timepix3Telescope", false);
}
......
......@@ -9,8 +9,8 @@ using namespace corryvreckan;
AnalysisDUT::AnalysisDUT(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
m_timeCutFrameEdge = m_config.get<double>("time_cut_frameedge", Units::get(20.0, "ns"));
spatialCut = m_config.get<double>("spatial_cut", Units::get(50.0, "um"));
m_timeCutFrameEdge = m_config.get<double>("time_cut_frameedge", Units::get<double>(20, "ns"));
spatialCut = m_config.get<double>("spatial_cut", Units::get<double>(50, "um"));
chi2ndofCut = m_config.get<double>("chi2ndof_cut", 3.);
}
......
......@@ -19,7 +19,7 @@ AnalysisEfficiency::AnalysisEfficiency(Configuration config, std::shared_ptr<Det
: Module(std::move(config), detector) {
m_detector = detector;
m_timeCutFrameEdge = m_config.get<double>("time_cut_frameedge", Units::get(20.0, "ns"));
m_timeCutFrameEdge = m_config.get<double>("time_cut_frameedge", Units::get<double>(20, "ns"));
m_chi2ndofCut = m_config.get<double>("chi2ndof_cut", 3.);
}
......
......@@ -6,7 +6,7 @@ using namespace std;
Clustering4D::Clustering4D(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
timingCut = m_config.get<double>("timing_cut", Units::get(100.0, "ns")); // 100 ns
timingCut = m_config.get<double>("timing_cut", Units::get<double>(100, "ns"));
neighbour_radius_row = m_config.get<int>("neighbour_radius_row", 1);
neighbour_radius_col = m_config.get<int>("neighbour_radius_col", 1);
}
......
......@@ -6,7 +6,7 @@ using namespace std;
DUTAssociation::DUTAssociation(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
timingCut = m_config.get<double>("timing_cut", Units::get(200.0, "ns"));
timingCut = m_config.get<double>("timing_cut", Units::get<double>(200, "ns"));
spatialCut = m_config.get<XYVector>("spatial_cut", 2 * m_detector->pitch());
}
......
......@@ -8,7 +8,7 @@ EventLoaderATLASpix::EventLoaderATLASpix(Configuration config, std::shared_ptr<D
: Module(std::move(config), detector), m_detector(detector) {
m_inputDirectory = m_config.getPath("input_directory");
m_clockCycle = m_config.get<double>("clock_cycle", Units::get(6.25, "ns"));
m_clockCycle = m_config.get<double>("clock_cycle", Units::get<double>(6.25, "ns"));
// Allow reading of legacy data format using the Karlsruhe readout system:
m_legacyFormat = m_config.get<bool>("legacy_format", false);
......
......@@ -10,7 +10,7 @@ FileReader::FileReader(Configuration config, std::vector<std::shared_ptr<Detecto
m_readClusters = m_config.get<bool>("read_clusters", false);
m_readTracks = m_config.get<bool>("read_tracks", false);
m_fileName = m_config.getPath("file_name", true);
m_timeWindow = m_config.get<double>("time_window", Units::get(1.0, "s"));
m_timeWindow = m_config.get<double>("time_window", Units::get<double>(1, "s"));
m_readMCParticles = m_config.get<bool>("read_mcparticles", false);
// checking if DUT parameter is in the configuration file, if so then check if should only output the DUT
m_onlyDUT = m_config.get<bool>("only_dut", false);
......
......@@ -8,7 +8,7 @@ ImproveReferenceTimestamp::ImproveReferenceTimestamp(Configuration config, std::
: Module(std::move(config), std::move(detectors)) {
m_method = m_config.get<int>("improvement_method", 1);
m_source = m_config.get<std::string>("signal_source", "W0013_G02");
m_triggerLatency = m_config.get<double>("trigger_latency", Units::get(0.0, "ns"));
m_triggerLatency = m_config.get<double>("trigger_latency", Units::get<double>(0, "ns"));
}
void ImproveReferenceTimestamp::initialise() {
......
......@@ -7,7 +7,7 @@ using namespace std;
Metronome::Metronome(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
m_eventLength = m_config.get<double>("event_length", Units::get(10.0, "us"));
m_eventLength = m_config.get<double>("event_length", Units::get<double>(10, "us"));
}
void Metronome::initialise() {
......
......@@ -6,9 +6,9 @@ using namespace std;
Prealignment::Prealignment(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
max_correlation_rms = m_config.get<double>("max_correlation_rms", Units::get(6.0, "mm"));
max_correlation_rms = m_config.get<double>("max_correlation_rms", Units::get<double>(6, "mm"));
damping_factor = m_config.get<double>("damping_factor", 1.0);
timingCut = m_config.get<double>("timing_cut", Units::get(100.0, "ns"));
timingCut = m_config.get<double>("timing_cut", Units::get<double>(100, "ns"));
LOG(DEBUG) << "Setting max_correlation_rms to : " << max_correlation_rms;
LOG(DEBUG) << "Setting damping_factor to : " << damping_factor;
}
......
......@@ -7,7 +7,7 @@ TestAlgorithm::TestAlgorithm(Configuration config, std::shared_ptr<Detector> det
: Module(std::move(config), detector), m_detector(detector) {
makeCorrelations = m_config.get<bool>("make_correlations", false);
timingCut = m_config.get<double>("timing_cut", Units::get(100.0, "ns"));
timingCut = m_config.get<double>("timing_cut", Units::get<double>(100, "ns"));
do_timing_cut_ = m_config.get<bool>("do_timing_cut", false);
}
......
......@@ -10,8 +10,8 @@ Tracking4D::Tracking4D(Configuration config, std::vector<std::shared_ptr<Detecto
: Module(std::move(config), std::move(detectors)) {
// Default values for cuts
timingCut = m_config.get<double>("timing_cut", Units::get(200.0, "ns"));
spatialCut = m_config.get<double>("spatial_cut", Units::get(0.2, "mm"));
timingCut = m_config.get<double>("timing_cut", Units::get<double>(200, "ns"));
spatialCut = m_config.get<double>("spatial_cut", Units::get<double>(200, "um"));
minHitsOnTrack = m_config.get<size_t>("min_hits_on_track", 6);
excludeDUT = m_config.get<bool>("exclude_dut", true);
}
......
......@@ -7,7 +7,7 @@ using namespace std;
TrackingSpatial::TrackingSpatial(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)) {
spatialCut = m_config.get<double>("spatial_cut", Units::get(200.0, "um"));
spatialCut = m_config.get<double>("spatial_cut", Units::get<double>(200, "um"));
minHitsOnTrack = m_config.get<size_t>("min_hits_on_track", 6);
excludeDUT = m_config.get<bool>("exclude_dut", true);
}
......
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