Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hallc_replay
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
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
jlab
hallc
exp
polhe3
hallc_replay
Commits
0abb4fa6
Commit
0abb4fa6
authored
7 years ago
by
Yero1990
Committed by
Eric Pooser
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
-added a few lines of code to produce a weighted tzero data file (#133)
per wire basis, where the weight is by groups (ribbon cables)
parent
ac4b30fc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CALIBRATION/shms_dc_calib/scripts/get_tzero_param.C
+15
-5
15 additions, 5 deletions
CALIBRATION/shms_dc_calib/scripts/get_tzero_param.C
with
15 additions
and
5 deletions
CALIBRATION/shms_dc_calib/scripts/get_tzero_param.C
+
15
−
5
View file @
0abb4fa6
...
...
@@ -92,7 +92,7 @@ for (ip=0; ip<NPLANES; ip++){
dc_group_max
[
ip
]
=
new
Int_t
[
group_size
[
ip
]];
}
//Fill the 2d array with
1
st sensewire corresponding to each group in a given plane
//Fill the 2d array with
la
st sensewire corresponding to each group in a given plane
for
(
ip
=
0
;
ip
<
NPLANES
;
ip
++
)
{
...
...
@@ -234,8 +234,12 @@ for (ip=0; ip<NPLANES; ip++){
}
//end loop over planes
//create output file stream to write tzero values to a data file
ofstream
out
;
TString
tzero_file
=
"../data_files/"
+
run
+
"/tzero_group.dat"
;
out
.
open
(
tzero_file
);
//Create an output file to store tzero values
values
//Create an output
parameter
file to store tzero values
ofstream
ofs
;
TString
wire_tzero
=
Form
(
"./pdc_tzero_per_wire_run%d.param"
,
run_NUM
);
ofs
.
open
(
wire_tzero
);
...
...
@@ -245,17 +249,18 @@ for (ip=0; ip<NPLANES; ip++){
{
//write plane headers
ofs
<<
"ptzero"
+
planes
[
ip
]
<<
"="
<<
endl
;
out
<<
"#PLANE: "
<<
planes
[
ip
]
<<
endl
;
//loop over group
for
(
group
=
0
;
group
<
group_size
[
ip
];
group
++
)
{
out
<<
"#GROUP: "
<<
group
+
1
<<
endl
;
//loop over sensewires
for
(
sw
=
1
;
sw
<=
fNWires
[
ip
];
sw
++
)
{
if
(
sw
>=
dc_group_min
[
ip
][
group
]
&&
sw
<=
dc_group_max
[
ip
][
group
])
{
out
<<
setprecision
(
7
)
<<
weighted_avg
[
ip
][
group
]
<<
endl
;
if
(
sw
<
fNWires
[
ip
])
{
ofs
<<
setprecision
(
7
)
<<
weighted_avg
[
ip
][
group
]
<<
((
sw
+
1
)
%
16
?
", "
:
"
\n
"
)
<<
fixed
;
...
...
@@ -271,6 +276,11 @@ for (ip=0; ip<NPLANES; ip++){
}
// end loop over groups
}
//end loop over planes
//close files
ofs
.
close
();
out
.
close
();
}
...
...
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