Commit 1fb8f34a authored by Jens Kroeger's avatar Jens Kroeger
Browse files

resolved merge conflict in doc/CMakeLists.txt related to new images

parents 9015f247 82ac9e88
......@@ -109,6 +109,11 @@ IF(LATEX_COMPILER)
usermanual/figures/trackChi2ndof_goodexample.pdf
usermanual/figures/residualX_goodexample.pdf
usermanual/figures/correlationX_goodexample.pdf
usermanual/figures/datadrivenandframebased.png
usermanual/figures/datadrivendevice.png
usermanual/figures/framebaseddevice.png
usermanual/figures/reconstruction-chain-simple.png
usermanual/figures/reconstruction-chain-complicated.png
INPUTS
usermanual/chapters/introduction.tex
usermanual/chapters/installation.tex
......
......@@ -13,3 +13,30 @@
\section{Mixing Devices}
\todo{set triggered device first, start/stop information from frame is taken as event (metronome information replacement) and subsequent untriggered devices use this time window to define the event}
\begin{figure}[h]
\centering
\includegraphics[width=0.66\textwidth]{framebaseddevice.png}
\caption{text here}
\label{fig:framebased}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=0.66\textwidth]{datadrivendevice.png}
\caption{text here}
\label{fig:datadriven}
\end{figure}
\begin{figure}[h]
\centering
\includegraphics[width=0.66\textwidth]{datadrivenandframebased.png}
\caption{text here}
\label{fig:datadrivenandframebased}
\end{figure}
......@@ -128,7 +128,7 @@ Two sources of values are currently supported, and are described in the followin
```
Using this table, the variables `@BeamEnergy@` and `@telescopeGeometry@` in the templates would be replaced by the values corresponding to the current run number.
### Example Usage with a Batch File:
Example command line usage:
......@@ -136,14 +136,7 @@ Example command line usage:
./jobsub.py -c /path/to/example.conf -v DEBUG --batch /path/to/example.sub --subdir <run_number>
```
The batch file needs to look like `example.sub`:
```
output = corryvreckan.$(ClusterId).$(ProcId).out
error = corryvreckan.$(ClusterId).$(ProcId).err
log = corryvreckan.$(ClusterId).log
getenv = True
queue
```
An example batch file is provided in the repository as `htcondor.sub`.
Complicated and error-prone `transfer_output_files` commands can be avoided. It is much simpler to set an absolute path like
```
output_directory = "/eos/user/y/yourname/whateveryouwant/run@RunNumber@"
......
......@@ -9,7 +9,7 @@ using namespace std;
EventLoaderEUDAQ::EventLoaderEUDAQ(Configuration config, std::vector<std::shared_ptr<Detector>> detectors)
: Module(std::move(config), std::move(detectors)), m_longID(true) {
m_filename = m_config.get<std::string>("file_name");
m_filename = m_config.getPath("file_name", true);
m_longID = m_config.get<bool>("long_detector_id", true);
}
......@@ -21,9 +21,6 @@ void EventLoaderEUDAQ::initialise() {
} catch(...) {
throw ModuleError("Unable to read input file \"" + m_filename + "\"");
}
// Initialise member variables
m_eventNumber = 0;
}
StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
......@@ -32,6 +29,13 @@ StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
const eudaq::DetectorEvent& evt = reader->Event();
LOG(TRACE) << evt;
// Convert timestamp to nanoseconds, using
// TLU frequency: 48.001e6 Hz
// TLU frequency multiplier: 8
// FIXME cross-check that this conversion is correct
auto timestamp = Units::get(static_cast<double>(evt.GetTimestamp()) / (48.001e6 * 8), "s");
LOG(DEBUG) << "EUDAQ event " << evt.GetEventNumber() << " at " << Units::display(timestamp, {"ns", "us"});
if(evt.IsBORE()) {
// Process begin-of-run
LOG(DEBUG) << "Found BORE";
......@@ -74,7 +78,9 @@ StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
Pixel* pixel = new Pixel(detectorID, row, col, static_cast<int>(plane.GetPixel(ipix)));
pixel->setCharge(plane.GetPixel(ipix));
pixel->timestamp(m_eventNumber);
// Pixel gets timestamp of trigger assigned:
pixel->timestamp(timestamp);
deviceData->push_back(pixel);
}
......@@ -83,8 +89,12 @@ StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
}
}
// Increment event counter
m_eventNumber++;
// Store event time on clipboard for subsequent modules
// FIXME assumes trigger in center of two Mimosa26 frames:
auto frame_length = Units::get(115.2, "us");
clipboard->put_persistent("eventStart", timestamp - frame_length);
clipboard->put_persistent("eventEnd", timestamp + frame_length);
clipboard->put_persistent("eventLength", 2 * frame_length);
// Advance to next event if possible, otherwise end this run:
if(!reader->NextEvent()) {
......@@ -95,8 +105,3 @@ StatusCode EventLoaderEUDAQ::run(std::shared_ptr<Clipboard> clipboard) {
// Return value telling analysis to keep running
return StatusCode::Success;
}
void EventLoaderEUDAQ::finalise() {
LOG(DEBUG) << "Read " << m_eventNumber << " events";
}
......@@ -21,13 +21,11 @@ namespace corryvreckan {
// Functions
void initialise();
StatusCode run(std::shared_ptr<Clipboard> clipboard);
void finalise();
// EUDAQ file reader instance:
eudaq::FileReader* reader;
// Member variables
int m_eventNumber;
std::string m_filename{};
bool m_longID;
};
......
......@@ -6,7 +6,6 @@ using namespace std;
Prealignment::Prealignment(Configuration config, std::shared_ptr<Detector> detector)
: Module(std::move(config), detector), m_detector(detector) {
LOG(INFO) << "Starting prealignment of detectors";
max_correlation_rms = m_config.get<double>("max_correlation_rms", static_cast<double>(Units::convert(6.0, "mm")));
damping_factor = m_config.get<double>("damping_factor", 1.0);
timingCut = m_config.get<double>("timing_cut", static_cast<double>(Units::convert(100, "ns")));
......@@ -97,7 +96,8 @@ void Prealignment::finalise() {
<< " , RMS Y = " << Units::display(rmsY, {"mm", "um"});
}
if(m_detector->isReference()) {
// Move all but the reference:
if(!m_detector->isReference()) {
double mean_X = correlationX->GetMean();
double mean_Y = correlationY->GetMean();
LOG(INFO) << "Detector " << m_detector->name() << ": x = " << Units::display(mean_X, {"mm", "um"})
......
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