Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nptool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
np
nptool
Commits
263f3c30
Commit
263f3c30
authored
2 years ago
by
Cyril Lenain
Browse files
Options
Downloads
Patches
Plain Diff
Added saturated and echo signal processing
parent
de2091e2
No related branches found
No related tags found
No related merge requests found
Pipeline
#191289
passed
2 years ago
Stage: build-NPLib
Stage: build-NPSimulation
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NPLib/Detectors/Vendeta/TVendetaPhysics.cxx
+40
-22
40 additions, 22 deletions
NPLib/Detectors/Vendeta/TVendetaPhysics.cxx
with
40 additions
and
22 deletions
NPLib/Detectors/Vendeta/TVendetaPhysics.cxx
+
40
−
22
View file @
263f3c30
...
...
@@ -93,12 +93,15 @@ void TVendetaPhysics::BuildPhysicalEvent() {
unsigned
int
mysizeLGE
=
m_PreTreatedData
->
GetLGMultEnergy
();
unsigned
int
mysizeHGE
=
m_PreTreatedData
->
GetHGMultEnergy
();
for
(
UShort_t
e
=
0
;
e
<
mysizeLGE
;
e
++
)
{
LG_DetectorNumber
.
push_back
(
m_PreTreatedData
->
GetLGDetectorNbr
(
e
));
LG_Q1
.
push_back
(
m_PreTreatedData
->
GetLGQ1
(
e
));
LG_Q2
.
push_back
(
m_PreTreatedData
->
GetLGQ2
(
e
));
LG_Time
.
push_back
(
m_PreTreatedData
->
GetLGTime
(
e
));
LG_Qmax
.
push_back
(
m_PreTreatedData
->
GetLGQmax
(
e
));
}
for
(
UShort_t
e
=
0
;
e
<
mysizeHGE
;
e
++
)
{
...
...
@@ -109,6 +112,7 @@ void TVendetaPhysics::BuildPhysicalEvent() {
HG_Qmax
.
push_back
(
m_PreTreatedData
->
GetHGQmax
(
e
));
}
/* m_AnodeNumber=-1; */
}
...
...
@@ -119,49 +123,63 @@ void TVendetaPhysics::PreTreat() {
// clear pre-treated object
ClearPreTreatedData
();
// instantiate CalibrationManager
static
CalibrationManager
*
Cal
=
CalibrationManager
::
getInstance
();
unsigned
int
mysizeLG
=
m_EventData
->
GetLGMultEnergy
();
unsigned
int
mysizeHG
=
m_EventData
->
GetHGMultEnergy
();
// LG pretreat
// LG pretreat
static
double
LG_Limits
[
4
]
=
{
16172
,
16804
,
16810
,
16341
};
int
ID_Saturation
=
-
1
;
int
ID_Echoes
=-
1
;
for
(
UShort_t
i
=
0
;
i
<
mysizeLG
;
++
i
){
int
det
=
m_EventData
->
GetLGDetectorNbr
(
i
);
double
Qmax
=
m_EventData
->
GetLGQmax
(
i
);
double
TimeOffset
=
0
;
TimeOffset
=
Cal
->
GetValue
(
"Vendeta/DET"
+
NPL
::
itoa
(
det
)
+
"_LG_ANODE"
+
NPL
::
itoa
(
m_AnodeNumber
)
+
"_TIMEOFFSET"
,
0
);
double
Time
=
m_EventData
->
GetLGTime
(
i
)
+
TimeOffset
;
m_PreTreatedData
->
SetLGDetectorNbr
(
det
);
m_PreTreatedData
->
SetLGQ1
(
m_EventData
->
GetLGQ1
(
i
));
m_PreTreatedData
->
SetLGQ2
(
m_EventData
->
GetLGQ2
(
i
));
m_PreTreatedData
->
SetLGTime
(
Time
);
m_PreTreatedData
->
SetLGQmax
(
Qmax
);
// Remove saturated detector and echoes (signals after a specific amplitude)
if
(
Qmax
<
LG_Limits
[
det
-
1
]
&&
det
!=
ID_Saturation
&&
det
!=
ID_Echoes
){
m_PreTreatedData
->
SetLGDetectorNbr
(
det
);
m_PreTreatedData
->
SetLGQ1
(
m_EventData
->
GetLGQ1
(
i
));
m_PreTreatedData
->
SetLGQ2
(
m_EventData
->
GetLGQ2
(
i
));
m_PreTreatedData
->
SetLGTime
(
Time
);
m_PreTreatedData
->
SetLGQmax
(
Qmax
);
if
(
Qmax
>
17000
){
ID_Echoes
=
det
;
}
}
else
if
(
Qmax
>
LG_Limits
[
det
-
1
]){
ID_Saturation
=
det
;
}
}
// HG pretreat
static
double
HG_Limits
[
4
]
=
{
16292
,
16314
,
16604
,
16399
};
ID_Saturation
=
-
1
;
ID_Echoes
=-
1
;
for
(
UShort_t
i
=
0
;
i
<
mysizeHG
;
++
i
){
int
det
=
m_EventData
->
GetHGDetectorNbr
(
i
);
double
Qmax
=
m_EventData
->
GetHGQmax
(
i
);
double
TimeOffset
=
0
;
TimeOffset
=
Cal
->
GetValue
(
"Vendeta/DET"
+
NPL
::
itoa
(
det
)
+
"_HG_ANODE"
+
NPL
::
itoa
(
m_AnodeNumber
)
+
"_TIMEOFFSET"
,
0
);
double
Time
=
m_EventData
->
GetHGTime
(
i
)
+
TimeOffset
;
m_PreTreatedData
->
SetHGDetectorNbr
(
det
);
m_PreTreatedData
->
SetHGQ1
(
m_EventData
->
GetHGQ1
(
i
));
m_PreTreatedData
->
SetHGQ2
(
m_EventData
->
GetHGQ2
(
i
));
m_PreTreatedData
->
SetHGTime
(
Time
);
m_PreTreatedData
->
SetHGQmax
(
Qmax
);
if
(
Qmax
<
HG_Limits
[
det
-
1
]
&&
det
!=
ID_Saturation
&&
det
!=
ID_Echoes
){
m_PreTreatedData
->
SetHGDetectorNbr
(
det
);
m_PreTreatedData
->
SetHGQ1
(
m_EventData
->
GetHGQ1
(
i
));
m_PreTreatedData
->
SetHGQ2
(
m_EventData
->
GetHGQ2
(
i
));
m_PreTreatedData
->
SetHGTime
(
Time
);
m_PreTreatedData
->
SetHGQmax
(
Qmax
);
if
(
Qmax
>
17000
){
ID_Echoes
=
det
;
}
}
else
if
(
Qmax
>
HG_Limits
[
det
-
1
]){
ID_Saturation
=
det
;
}
}
}
...
...
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