Commit 75e77fb9 authored by Lennart Huth's avatar Lennart Huth
Browse files

rescaling histos

parent 42e4ee9d
......@@ -278,7 +278,10 @@ void AnalysisEfficiency::initialize() {
prev_hit_ts.assign(nCols, v_row); // use vector v_row to construct matrix
// pivot study:
pivot_vs_delta_t = new TH2D("pivot_vs_delta_t", "piv vs time in event: pivot; delta_t", 577, 0, 577, 350, 0, 350);
pivot_vs_delta_t_frame =
new TH2D("pivot_vs_delta_t_frame", "piv vs time in event: pivot; delta_t", 577, 0, 577, 350, 0, 350);
pivot_vs_delta_t_trig =
new TH2D("pivot_vs_delta_t_trige", "piv vs time in event: pivot; delta_t", 577, 0, 577, 700, -350, 350);
TDirectory* directory = getROOTDirectory();
TDirectory* local_directory = directory->mkdir("pivot_study");
local_directory->cd();
......@@ -467,8 +470,12 @@ StatusCode AnalysisEfficiency::run(const std::shared_ptr<Clipboard>& clipboard)
auto start = clipboard->getEvent()->start();
if(has_associated_cluster) {
pivot_tpx3_event.at(piv)->Fill(Units::convert(associated_clusters.front()->timestamp() - start, "us"));
pivot_vs_delta_t->Fill(track.get()->getClusters().front()->getSeedPixel()->raw(),
Units::convert(associated_clusters.front()->timestamp() - start, "us"));
pivot_vs_delta_t_frame->Fill(track.get()->getClusters().front()->getSeedPixel()->raw(),
Units::convert(associated_clusters.front()->timestamp() - start, "us"));
for(auto t : event->triggerList()) {
pivot_vs_delta_t_trig->Fill(track.get()->getClusters().front()->getSeedPixel()->raw(),
Units::convert(t.second - associated_clusters.front()->timestamp(), "us"));
}
}
pivot_eTotalEfficiency.at(piv)->Fill(has_associated_cluster, 0); // use 0th bin for total efficiency
pivot_efficiencyColumns.at(piv)->Fill(has_associated_cluster, m_detector->getColumn(localIntercept));
......
......@@ -74,7 +74,8 @@ namespace corryvreckan {
std::map<int, TEfficiency*> pivot_efficiencyRows;
std::map<int, TEfficiency*> pivot_efficiencyVsTime;
std::map<int, TH1D*> pivot_tpx3_event;
TH2D* pivot_vs_delta_t;
TH2D* pivot_vs_delta_t_trig;
TH2D* pivot_vs_delta_t_frame;
TH1D* hDistanceCluster;
TH1D* hTimeDiffPrevTrack_assocCluster;
......
......@@ -167,11 +167,12 @@ unsigned EventDefinitionM26::get_next_event_with_det(const eudaq::FileReaderUP&
_pivotCurrent = piv;
pivotPixel_->Fill(piv);
// begin = Units::get((576 - piv) * (115.2 / 576), "us") + timeshift_;
begin = /*Units::get(229,"us");//*/ Units::get(piv * (115.2 / 576), "us") + timeshift_ + add_begin_;
begin = /*Units::get(229,"us");//*/
/* Units::get(piv * (115.2 / 576), "us") + timeshift_ + add_begin_ +*/ Units::get(115.2, "us");
// never shift more than a full frame
if(begin > Units::get(115.2, "us"))
begin -= Units::get(115.2, "us");
// if(begin > Units::get(115.2, "us"))
// begin -= Units::get(115.2, "us");
// end should be after second frame, sharp (variable durationn, not variable end)
end = Units::get(230.4, "us") - begin + add_begin_ + add_end_;
......@@ -198,7 +199,6 @@ unsigned EventDefinitionM26::get_next_event_with_det(const eudaq::FileReaderUP&
}
StatusCode EventDefinitionM26::run(const std::shared_ptr<Clipboard>& clipboard) {
// Loop over all detectors
if(clipboard->isEventDefined()) {
throw ModuleError("Event already defined - cannot create a new event. This module needs to be placed before the "
"first EventLoader");
......@@ -241,7 +241,7 @@ StatusCode EventDefinitionM26::run(const std::shared_ptr<Clipboard>& clipboard)
if(time_trig - time_prev_ > 0) {
// M26 frames need to have a distance of at least one frame length!
if(time_trig - time_prev_ < 115000) {
if(time_trig - time_prev_ < 115200) {
LOG(ERROR) << "M26 triggers too close together to fit M26 frame, dt = " +
Units::display(time_trig - time_prev_, "us")
<< std::endl
......
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