Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
JZCaPA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Riccardo Longo
JZCaPA
Commits
13c389db
Commit
13c389db
authored
6 years ago
by
Chad Lantz
Browse files
Options
Downloads
Patches
Plain Diff
Added new Channel class members to be initialized and reset in DeclareHistograms and FillHistograms
parent
56da322e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Analysis/src/Detector.cpp
+4
-0
4 additions, 0 deletions
Analysis/src/Detector.cpp
with
4 additions
and
0 deletions
Analysis/src/Detector.cpp
+
4
−
0
View file @
13c389db
...
...
@@ -81,6 +81,7 @@ void Detector::DeclareHistograms(){
for
(
uint
ch
=
0
;
ch
<
m_Element
.
size
();
ch
++
){
m_Element
.
at
(
ch
)
->
WF_histo
=
new
TH1D
(
m_Element
.
at
(
ch
)
->
name
.
c_str
(),
(
m_Element
.
at
(
ch
)
->
name
+
", "
+
m_Element
.
at
(
ch
)
->
detector
).
c_str
(),
m_nSamp
,
0
,
m_nSamp
);
m_Element
.
at
(
ch
)
->
FirstDerivative
=
new
TH1D
((
m_Element
.
at
(
ch
)
->
name
+
" Derivative"
).
c_str
(),
(
m_Element
.
at
(
ch
)
->
name
+
", "
+
m_Element
.
at
(
ch
)
->
detector
+
" Derivative"
).
c_str
(),
m_nSamp
,
0
,
m_nSamp
);
}
}
...
...
@@ -91,6 +92,9 @@ void Detector::DeclareHistograms(){
void
Detector
::
FillHistograms
(){
for
(
uint
ch
=
0
;
ch
<
m_Element
.
size
();
ch
++
){
m_Element
.
at
(
ch
)
->
WF_histo
->
Reset
();
m_Element
.
at
(
ch
)
->
FirstDerivative
->
Reset
();
m_Element
.
at
(
ch
)
->
FirstDerivativeRMS
=
0
;
m_Element
.
at
(
ch
)
->
CrossZeroPoints
.
clear
();
// Loop over samples in each channel
for
(
uint
samp
=
0
;
samp
<
m_nSamp
;
samp
++
){
m_Element
.
at
(
ch
)
->
WF_histo
->
SetBinContent
(
samp
+
1
,
m_Element
.
at
(
ch
)
->
WF
[
samp
]
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment