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
2d355b5a
Commit
2d355b5a
authored
6 years ago
by
Riccardo Longo
Browse files
Options
Downloads
Patches
Plain Diff
Included preliminary SetBranches function in detector class
parent
267ff071
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Analysis/include/Containers.h
+2
-1
2 additions, 1 deletion
Analysis/include/Containers.h
Analysis/include/Detector.h
+3
-0
3 additions, 0 deletions
Analysis/include/Detector.h
Analysis/src/Detector.cpp
+13
-0
13 additions, 0 deletions
Analysis/src/Detector.cpp
with
18 additions
and
1 deletion
Analysis/include/Containers.h
+
2
−
1
View file @
2d355b5a
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include
"Containers.h"
#include
"Containers.h"
#include
<iostream>
#include
<iostream>
#include
<vector>
class
Channel
{
class
Channel
{
...
@@ -44,7 +45,7 @@ class Channel {
...
@@ -44,7 +45,7 @@ class Channel {
/** Operating voltage of the channel**/
/** Operating voltage of the channel**/
int
Vop
;
int
Vop
;
/** Raw waveform for a particular event **/
/** Raw waveform for a particular event **/
//
std::vector <
Channel
> WF;
std
::
vector
<
float
>
WF
;
};
};
...
...
This diff is collapsed.
Click to expand it.
Analysis/include/Detector.h
+
3
−
0
View file @
2d355b5a
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include
<string>
#include
<string>
#include
"Containers.h"
#include
"Containers.h"
#include
"TTree.h"
class
Detector
{
class
Detector
{
...
@@ -33,6 +34,8 @@ class Detector{
...
@@ -33,6 +34,8 @@ class Detector{
virtual
void
SetElement
(
Channel
*
_entry
)
{
m_Element
.
push_back
(
_entry
);
}
virtual
void
SetElement
(
Channel
*
_entry
)
{
m_Element
.
push_back
(
_entry
);
}
virtual
void
SetPosition
(
double
x
,
double
y
,
double
z
)
{
m_Position
[
0
]
=
x
;
m_Position
[
1
]
=
y
;
m_Position
[
2
]
=
z
;
}
virtual
void
SetPosition
(
double
x
,
double
y
,
double
z
)
{
m_Position
[
0
]
=
x
;
m_Position
[
1
]
=
y
;
m_Position
[
2
]
=
z
;
}
virtual
void
SetAngle
(
double
_cosx
=
0
,
double
_cosy
=
0
,
double
_cosz
=
0
)
{
m_Angle
[
0
]
=
_cosx
;
m_Angle
[
1
]
=
_cosy
;
m_Angle
[
2
]
=
_cosz
;
}
virtual
void
SetAngle
(
double
_cosx
=
0
,
double
_cosy
=
0
,
double
_cosz
=
0
)
{
m_Angle
[
0
]
=
_cosx
;
m_Angle
[
1
]
=
_cosy
;
m_Angle
[
2
]
=
_cosz
;
}
virtual
void
SetBranches
(
TTree
*
_dataTree
);
virtual
void
PrintMap
(
)
=
0
;
virtual
void
PrintMap
(
)
=
0
;
private
:
private
:
...
...
This diff is collapsed.
Click to expand it.
Analysis/src/Detector.cpp
+
13
−
0
View file @
2d355b5a
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
#include
"Detector.h"
#include
"Detector.h"
#include
"Containers.h"
#include
"Containers.h"
#include
<vector>
/** @brief Default Constructor for Detector.
/** @brief Default Constructor for Detector.
...
@@ -61,6 +62,18 @@ Channel* Detector::GetElement(std::string _name){
...
@@ -61,6 +62,18 @@ Channel* Detector::GetElement(std::string _name){
}
}
void
Detector
::
SetBranches
(
TTree
*
_dataTree
){
std
::
vector
<
std
::
vector
<
float
>*
>
pvWF
;
pvWF
.
resize
(
m_Element
.
size
());
for
(
uint
ch
=
0
;
ch
<
m_Element
.
size
();
ch
++
){
pvWF
[
ch
]
=
&
m_Element
[
ch
]
->
WF
;
_dataTree
->
SetBranchAddress
(
(
"Raw"
+
m_Element
.
at
(
ch
)
->
name
).
c_str
(),
&
pvWF
[
ch
]
);
}
}
...
...
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