Commit 925d83f4 authored by Lennart Huth's avatar Lennart Huth
Browse files

jens review part II

parent 15ffd7ba
......@@ -25,12 +25,17 @@ EventLoaderMuPixTelescope::EventLoaderMuPixTelescope(Configuration& config, std:
config_.setDefault<double>("time_offset", 0.0);
inputDirectory_ = config_.getPath("input_directory");
runNumber_ = config_.get<int>("Run");
runNumber_ = config_.get<int>("run");
buffer_depth_ = config.get<unsigned>("buffer_depth");
isSorted_ = config_.get<bool>("is_sorted");
timeOffset_ = config_.get<double>("time_offset");
if(config_.has("input_file"))
if(config.count({"run", "input_file"}) > 1) {
throw InvalidCombinationError(config, {"run", "input_file"}, "run and input_file are mutually exclusive.");
} else if(config_.has("input_file")) {
input_file_ = config_.get<string>("input_file");
} else {
runNumber_ = config_.get<int>("run");
}
}
void EventLoaderMuPixTelescope::initialize() {
......@@ -132,8 +137,8 @@ StatusCode EventLoaderMuPixTelescope::read_sorted(const std::shared_ptr<Clipboar
RawHit h = tf_.get_hit(i, type_);
if(((h.tag() & uint(~0x3)) == tag_))
continue;
// move ts to ns - i'd like to do this already on the mupix8_DAQ side, but have not found the time yet, assuming
// 10bit ts
// Convert time stamp to ns - i'd like to do this already on the mupix8_DAQ side, but have not found the time yet,
// assuming 10bit ts
double px_timestamp = 8 * static_cast<double>(((tf_.timestamp() >> 2) & 0xFFFFFFFFFFC00) + h.timestamp_raw());
// setting tot and charge to zero here - needs to be improved
pixels_.push_back(std::make_shared<Pixel>(detector_->getName(), h.column(), h.row(), 0, 0, px_timestamp));
......@@ -208,8 +213,8 @@ void EventLoaderMuPixTelescope::fillBuffer() {
// all hits in one frame are from the same sensor. Copy them
for(uint i = 0; i < tf_.num_hits(); ++i) {
h = tf_.get_hit(i, type_);
// move ts to ns - i'd like to do this already on the mupix8_DAQ side, but have not found the time yet,
// assuming 10bit ts
// convert timestamp to ns - i'd like to do this already on the mupix8_DAQ side, but have not found the time
// yet, assuming 10bit ts
double px_timestamp =
8 * static_cast<double>(((tf_.timestamp() >> 2) & 0xFFFFFFFFFFC00) + h.timestamp_raw()) - timeOffset_;
LOG(TRACE) << "Pixel timestamp " << px_timestamp;
......
......@@ -13,8 +13,7 @@ The `EventLoaderMuPixTelescope` supports a list of sensors:
* all Run2020 sensor
* (additional/ older sensors can be added on request)
The detector name in the geometry file is used to determine the tag, that is
used to identify the sensor in the datastream:
The detector name in the geometry file is used to determine the tag which identifies the sensor in the datastream:
[mydetetcor_TAG]
......@@ -22,7 +21,7 @@ Everything behind the first `_` is used as tag, if none found the tag is assumed
The correct type is given by the `type` in the geometry.
It is assumed that the timestamp has 10bit and runs at a frequency of 125 MHz (8ns bins)
### Eventdefinition for the `EventLoaderMuPixTelescope`:
### Eventdefinition:
* Sorted telescope data: The loader can define its own events as the full
information of all systems is stored in an telescope event.
......@@ -35,16 +34,16 @@ any other event definition (`EventLoaderEUDAQ2` `EventDefinitionM26`) can be use
This module requires a installation of the mupix8_daq package that is used by the Mu3e pixel group to read out the sensors. This library is non-public. Authorized users can download it via https://bitbucket.org/mu3e/mupix8_daq.git
### Parameters
* `input_directory`: Defines the input file. No default
* `Run`: 6 digit Run number, with leading zeros being automatically added, to open the data file with the standard format `telescope_run_RUN.blck`
* `is_sorted`: Defines if data recorded is on FPGA timestamp sorted. Defaults to `false`
* `input_directory`: Defines the input file. No default.
* `run`: 6 digit run number, with leading zeros being automatically added, to open the data file with the standard format `telescope_run_RUN.blck`.
* `is_sorted`: Defines if data recorded is on FPGA timestamp sorted. Defaults to `false`.
* `time_offset`: Subtract an offset to correct for the expected delay between
issuing the synchronous reset and receiving it. Only used if
`is_sorted=false`. Defaults to `0`
`is_sorted=false`. Defaults to `0`.
* `input_file`: Overwrite the input filename if the filename is not in the
standard format `telescope_run_RUN.blck`. Inactive if not given.
* `buffer_depth`: Depth of the pixel buffer that is used to sort the hits with
respect to time. Defaults to `1000`
respect to time. Defaults to `1000`.
### Plots produced
For all detectors, the following plots are produced:
......@@ -52,7 +51,7 @@ For all detectors, the following plots are produced:
* 2D histogram of pixel hit positions
* 2D histogram of pixel read in but not added to an event
* 1D histogram of the pixel timestamps
* 1D histogram of the pixel ToT - currently not filled
* 1D histogram of the pixel ToT
* 1D histogram of number of pixels per event
* 1D histogram with the number of pixels averaged over 1k events as function of event number
......
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