Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
75e77fb9
Commit
75e77fb9
authored
Jul 05, 2021
by
Lennart Huth
Browse files
rescaling histos
parent
42e4ee9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/modules/AnalysisEfficiency/AnalysisEfficiency.cpp
View file @
75e77fb9
...
...
@@ -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
));
...
...
src/modules/AnalysisEfficiency/AnalysisEfficiency.h
View file @
75e77fb9
...
...
@@ -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
;
...
...
src/modules/EventDefinitionM26/EventDefinitionM26.cpp
View file @
75e77fb9
...
...
@@ -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_
<
115
0
00
)
{
if
(
time_trig
-
time_prev_
<
115
2
00
)
{
LOG
(
ERROR
)
<<
"M26 triggers too close together to fit M26 frame, dt = "
+
Units
::
display
(
time_trig
-
time_prev_
,
"us"
)
<<
std
::
endl
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment