Skip to content

Commit 053304f

Browse files
authored
Merge branch 'develop' into feature/ebelchio12_wirecell_nfsp_calo
2 parents 10a7ec8 + 4f193d6 commit 053304f

92 files changed

Lines changed: 85402 additions & 547 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: SBND Issue
3+
about: Fillable form for sbndcode issues
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## I'm submitting a ...
11+
12+
- [ ] bug report
13+
- [ ] feature request
14+
15+
## Checklist
16+
- [ ] I've added at least 1 label under `Labels`
17+
- [ ] Assigned a reviewer under `Assignees`
18+
19+
## Expected Behavior
20+
21+
22+
## Current Behavior
23+
24+
25+
## Possible Solution (optional)
26+
27+
28+
## How to reproduce

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Description
2+
Please provide a detailed description of the changes this pull request introduces.
3+
4+
## Checklist
5+
- [ ] Added at least 1 label from [available labels](https://github.com/SBNSoftware/sbndcode/issues/labels?sort=name-asc).
6+
- [ ] Assigned at least 1 reviewer under `Reviewers`,
7+
- [ ] Assigned all contributers including yourself under `Assignees`
8+
- [ ] Linked any relevant issues under `Developement`
9+
- [ ] Does this PR affect CAF data format? If so, please assign a CAF maintainer as additional reviewer.
10+
- [ ] Does this affect the standard workflow?
11+
12+
### Relevant PR links (optional)
13+
Does this PR require merging another PR in a different repository (such as sbnanobj/sbnobj etc.)?
14+
15+
### Link(s) to docdb describing changes (optional)
16+
Is there a docdb describing the issue this solves or the feature added?

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

18-
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 09.90.00)
18+
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 09.91.02)
1919
find_package(cetmodules REQUIRED)
2020
project(sbndcode LANGUAGES CXX)
2121

2222
# for CI:
23-
# project(sbndcode VERSION 09.90.00)
23+
# project(sbndcode VERSION 09.91.02)
2424

2525
message(STATUS "\n")
2626
message(STATUS "================================= ${PROJECT_NAME} =================================")

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Contributing
2+
For most recent contributing guidelines, see [docDB 37211 slides 7-10](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=37211).
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
40 173 1
2+
41 172 1
3+
42 168 1
4+
43 170 1
5+
44 176 1
6+
45 59 1
7+
46 171 1
8+
47 61 1
9+
48 166 1
10+
49 169 1
11+
50 56 1
12+
51 60 1
13+
52 34 1
14+
53 33 1
15+
54 57 1
16+
55 24 1
17+
56 159 1
18+
57 153 1
19+
58 156 1
20+
59 152 1
21+
60 182 1
22+
61 158 1
23+
62 157 1
24+
63 136 0
25+
64 150 0
26+
65 151 0
27+
66 134 0
28+
67 135 0
29+
68 149 0
30+
69 58 0
31+
70 238 0
32+
71 155 0
33+
72 222 1
34+
73 220 1
35+
74 81 1
36+
75 85 1
37+
76 79 1
38+
77 206 1
39+
78 204 1
40+
79 200 1
41+
80 18 1
42+
81 132 1
43+
82 133 1
44+
83 162 1
45+
84 143 1
46+
85 131 1
47+
86 146 1
48+
87 147 1
49+
88 44 1
50+
89 160 1
51+
90 19 1
52+
91 202 1
53+
92 199 1
54+
93 197 1
55+
94 207 1
56+
95 203 1
57+
96 45 1
58+
97 198 1
59+
98 174 1
60+
99 148 1
61+
100 163 1
62+
101 164 1
63+
102 165 1
64+
103 80 1
65+
104 193 0
66+
105 42 0
67+
106 138 0
68+
107 130 1
69+
108 77 0
70+
109 78 0
71+
110 98 1
72+
111 97 1
73+
112 87 1
74+
113 95 1
75+
114 94 1
76+
115 93 1
77+
116 86 0
78+
117 83 0
79+
118 84 0
80+
119 104 1
81+
120 103 1
82+
121 102 1
83+
122 101 1
84+
123 100 1
85+
124 99 1
86+
125 90 0
87+
126 91 0
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
40 173 1
2+
41 172 1
3+
42 168 1
4+
43 170 1
5+
44 176 1
6+
45 59 1
7+
46 171 1
8+
47 61 1
9+
48 166 1
10+
49 169 1
11+
50 56 1
12+
51 60 1
13+
52 34 1
14+
53 33 1
15+
54 57 1
16+
55 24 1
17+
56 159 1
18+
57 153 1
19+
58 156 1
20+
59 152 1
21+
60 182 1
22+
61 158 1
23+
62 157 1
24+
63 136 0
25+
64 150 0
26+
65 151 0
27+
66 134 0
28+
67 135 0
29+
68 149 0
30+
69 58 0
31+
70 238 0
32+
71 155 0
33+
72 222 1
34+
73 220 1
35+
74 81 1
36+
75 85 1
37+
76 79 1
38+
77 206 1
39+
78 204 1
40+
79 200 1
41+
80 18 0
42+
81 132 0
43+
82 133 0
44+
83 162 0
45+
84 143 0
46+
85 131 0
47+
86 146 0
48+
87 147 0
49+
88 44 0
50+
89 160 0
51+
90 19 1
52+
91 202 1
53+
92 199 1
54+
93 197 1
55+
94 207 1
56+
95 203 1
57+
96 45 1
58+
97 198 1
59+
98 174 1
60+
99 148 1
61+
100 163 1
62+
101 164 1
63+
102 165 1
64+
103 80 1
65+
104 193 0
66+
105 42 0
67+
106 138 0
68+
107 130 1
69+
108 77 0
70+
109 78 0
71+
110 98 1
72+
111 97 1
73+
112 87 1
74+
113 95 1
75+
114 94 1
76+
115 93 1
77+
116 86 0
78+
117 83 0
79+
118 84 0
80+
119 104 1
81+
120 103 1
82+
121 102 1
83+
122 101 1
84+
123 100 1
85+
124 99 1
86+
125 90 0
87+
126 91 0
88+
133 82 0

sbndcode/ChannelMaps/CRT/crt_channel_map_service.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BEGIN_PROLOG
22

33
crt_channel_map_standard:
44
{
5-
FileName: "SBNDCRTChannelMap_v4.txt"
5+
FileName: "SBNDCRTChannelMap_v6.txt"
66
}
77

88
END_PROLOG

sbndcode/Commissioning/fcls/reco1_sce_comm.fcl renamed to sbndcode/Commissioning/fcls/reco1_comm.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "hitdumpermodule.fcl"
2-
#include "reco1_sce.fcl"
2+
#include "reco1_selectivedrops.fcl"
33

44
process_name: Reco1Comm
55

sbndcode/Decoders/CRT/CRTDecoder_module.cc

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,6 @@ std::vector<sbnd::crt::FEBData> CRTDecoder::FragToFEB(const artdaq::Fragment &fr
117117

118118
for(unsigned i = 0; i < bern_frag_meta->hits_in_fragment(); ++i)
119119
{
120-
const sbndaq::BernCRTHitV2 *bern_hit = bern_frag.eventdata(i);
121-
122-
std::array<uint16_t, 32> adc_array;
123-
unsigned ii = 0;
124-
for(auto const &adc : bern_hit->adc)
125-
{
126-
adc_array[ii] = adc;
127-
++ii;
128-
}
129-
130120
SBND::CRTChannelMapService::ModuleInfo_t module = fCRTChannelMapService->GetModuleInfoFromFEBMAC5(bern_frag_meta->MAC5());
131121

132122
if(!module.valid)
@@ -142,13 +132,40 @@ std::vector<sbnd::crt::FEBData> CRTDecoder::FragToFEB(const artdaq::Fragment &fr
142132
continue;
143133
}
144134

135+
const sbndaq::BernCRTHitV2 *bern_hit = bern_frag.eventdata(i);
136+
// Fill ADC Array. If channel order is swapped in the GDML
137+
// compared to reality then we fill the array in reverse.
138+
std::array<uint16_t, 32> adc_array;
139+
unsigned ii = module.channel_order_swapped ? 31 : 0;
140+
for(auto const &adc : bern_hit->adc)
141+
{
142+
adc_array[ii] = adc;
143+
144+
if(module.channel_order_swapped)
145+
--ii;
146+
else
147+
++ii;
148+
}
149+
150+
// Timestamp field stores the T0 time corrected by the cable length
151+
// stored in the original fcl. We use it to get the cable delay for
152+
// the module and store it in the unused coinc slot.
153+
const int64_t whole_second_ns = static_cast<int64_t>(1e9);
154+
int cable_length = bern_hit->timestamp % whole_second_ns - bern_hit->ts0;
155+
156+
if(cable_length < 0)
157+
cable_length += whole_second_ns;
158+
159+
if(cable_length > 1000 || cable_length < 0)
160+
throw std::runtime_error("Why is the cable length: " + std::to_string(cable_length) + "?");
161+
145162
feb_datas.emplace_back(module.offline_module_id,
146163
bern_hit->flags,
147164
bern_hit->ts0,
148165
bern_hit->ts1,
149166
bern_hit->timestamp / 1e9,
150167
adc_array,
151-
bern_hit->coinc);
168+
cable_length);
152169

153170
std::string adc_string = "";
154171

sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt)
376376
for(unsigned int n = 0; n < combined_wvfm.size(); n++)
377377
wvfmHist->SetBinContent(n + 1, (double)combined_wvfm[n]);
378378
}
379-
int time_diff = int(iwvfm_start) - int(event_trigger_time);
379+
double time_diff = (int(iwvfm_start) - int(event_trigger_time))*1e-3; // us
380380
uint ch;
381381
if (i == 15){
382382
ch = fragid;

0 commit comments

Comments
 (0)