Commit 15ffd7ba authored by Lennart Huth's avatar Lennart Huth
Browse files

jens review

parent 9b7af4c6
......@@ -102,7 +102,7 @@ void EventLoaderMuPixTelescope::finalize(const std::shared_ptr<ReadonlyClipboard
LOG(INFO) << "Number of hits put to clipboard: " << stored_
<< " and number of removed (not fitting in an event) hits: " << removed_;
if(!isSorted_)
LOG(INFO) << "Increasing the buffer depth mirght reduce this number.";
LOG(INFO) << "Increasing the buffer depth might reduce this number.";
}
StatusCode EventLoaderMuPixTelescope::run(const std::shared_ptr<Clipboard>& clipboard) {
......@@ -140,7 +140,7 @@ StatusCode EventLoaderMuPixTelescope::read_sorted(const std::shared_ptr<Clipboar
}
// If no event is defined create one
if(clipboard->getEvent() == nullptr) {
// frames have a length of 128 ts, each 8ns, int division cuts of lowest bits
// The readout FPGA creates frames with a length of 128 time stamps, each 8ns. The int division cuts of lowest bits
int begin = int(pixels_.front()->timestamp()) / 1024;
clipboard->putEvent(std::make_shared<Event>(double(begin * 1024), double((begin + 1) * 1024)));
}
......@@ -157,9 +157,9 @@ StatusCode EventLoaderMuPixTelescope::read_unsorted(const std::shared_ptr<Clipbo
if((pixel->timestamp() < clipboard->getEvent()->start())) {
LOG(DEBUG) << " Old hit found: " << Units::convert(pixel->timestamp(), "us") << " vs prev end (" << eventNo_ - 1
<< ")\t" << Units::convert(prev_event_end_, "us") << " and current start \t"
<< Units::convert(clipboard->getEvent()->start(), "us")
<< Units::display(clipboard->getEvent()->start(), "us")
<< " and duration: " << clipboard->getEvent()->duration()
<< "and num triggers: " << clipboard->getEvent()->triggerList().size();
<< "and number of triggers: " << clipboard->getEvent()->triggerList().size();
removed_++;
hdiscardedHitmap->Fill(pixel->column(), pixel->row());
pixelbuffer_.pop(); // remove top element
......@@ -169,12 +169,12 @@ StatusCode EventLoaderMuPixTelescope::read_unsorted(const std::shared_ptr<Clipbo
(pixel->timestamp() > clipboard->getEvent()->start())) {
LOG(DEBUG) << " Adding pixel hit: " << Units::convert(pixel->timestamp(), "us") << " vs prev end ("
<< eventNo_ - 1 << ")\t" << Units::convert(prev_event_end_, "us") << " and current start \t"
<< Units::convert(clipboard->getEvent()->start(), "us")
<< " and duration: " << clipboard->getEvent()->duration();
<< Units::display(clipboard->getEvent()->start(), "us")
<< " and duration: " << Units::display(clipboard->getEvent()->duration(), "us");
pixels_.push_back(pixel);
hHitMap->Fill(pixel.get()->column(), pixel.get()->row());
hPixelToT->Fill(pixel.get()->raw());
// igitt
// display the 10 bit timestamp distribution
hTimeStamp->Fill(fmod((pixel.get()->timestamp() / 8.), pow(2, 10)));
pixelbuffer_.pop();
} else {
......
......@@ -8,7 +8,6 @@
* Intergovernmental Organization or submit itself to any jurisdiction.
*/
//#include <TCanvas.h>
#include <TH1F.h>
#include <TH2F.h>
#include <iostream>
......
......@@ -13,15 +13,17 @@ 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:
The detector name in the geometry file is used to determine the tag, that is
used to identify the sensor in the datastream:
[mydetetcor_TAG]
Everything behin the first `_` is used as tag, if none found the tag is assumed to be the detector name.
Everything behind the first `_` is used as tag, if none found the tag is assumed to be the detector name.
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 for the `EventLoaderMuPixTelescope`:
* Sorted telescope data: The loader can define its own events as the full
information of all systems is stored in an telescope event.
* Unsorted telescope data: External event definition is required. This has to
......@@ -35,14 +37,14 @@ This module requires a installation of the mupix8_daq package that is used by th
### 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`
* `input_file`: Overwrite the default file created based on the `Run`. No default.
* `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 synchronoues reset and receiving it. Only used if
`is_sorted==false`. Defaults to `0`
* `input_file`: Overwrite the input filename if the filename has a non-default
structure. Inactive if not given.
issuing the synchronous reset and receiving it. Only used if
`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`
### Plots produced
For all detectors, the following plots are produced:
......@@ -52,7 +54,7 @@ For all detectors, the following plots are produced:
* 1D histogram of the pixel timestamps
* 1D histogram of the pixel ToT - currently not filled
* 1D histogram of number of pixels per event
* 1D histogram with the number of pixels aeveraged over 1k events as function of event number
* 1D histogram with the number of pixels averaged over 1k events as function of event number
### Usage
```toml
......
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