Skip to content

Commit 18de931

Browse files
authored
Merge pull request #459 from SBNSoftware/release/SBN2024A
SBN2024A to develop
2 parents 9b4d9d6 + fa6cc43 commit 18de931

16 files changed

Lines changed: 223 additions & 278 deletions

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.88.00.02)
18+
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 09.88.00.03)
1919
find_package(cetmodules REQUIRED)
2020
project(sbndcode LANGUAGES CXX)
2121

2222
# for CI:
23-
# project(sbndcode VERSION 09.88.00.02)
23+
# project(sbndcode VERSION 09.88.00.03)
2424

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

sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ namespace sbnd::crt {
1010
, fPEAttenuation(pset.get<double>("PEAttenuation"))
1111
, fPropDelay(pset.get<double>("PropDelay"))
1212
, fTimeWalkNorm(pset.get<double>("TimeWalkNorm"))
13-
, fTimeWalkShift(pset.get<double>("TimeWalkShift"))
14-
, fTimeWalkSigma(pset.get<double>("TimeWalkSigma"))
15-
, fTimeWalkOffset(pset.get<double>("TimeWalkOffset"))
13+
, fTimeWalkScale(pset.get<double>("TimeWalkScale"))
1614
{
1715
}
1816

@@ -221,7 +219,10 @@ namespace sbnd::crt {
221219

222220
double CRTClusterCharacterisationAlg::TimingCorrectionOffset(const double &dist, const double &pe)
223221
{
224-
return dist * fPropDelay + fTimeWalkNorm * std::exp(-0.5 * std::pow((pe - fTimeWalkShift) / fTimeWalkSigma, 2)) + fTimeWalkOffset;
222+
223+
double t_TimeWalk = fTimeWalkNorm * std::exp(- fTimeWalkScale * pe);
224+
double t_PropDelay = fPropDelay * dist;
225+
return t_PropDelay + t_TimeWalk;
225226
}
226227

227228
void CRTClusterCharacterisationAlg::AggregatePositions(const std::vector<CRTSpacePoint> &complete_spacepoints, geo::Point_t &pos, geo::Point_t &err)

sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ namespace sbnd::crt {
8383
double fPEAttenuation;
8484
double fPropDelay;
8585
double fTimeWalkNorm;
86-
double fTimeWalkShift;
87-
double fTimeWalkSigma;
88-
double fTimeWalkOffset;
86+
double fTimeWalkScale;
8987
};
9088
}
9189

sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ crtclustercharacterisationalg_sbnd:
2626
PEAttenuation: @local::sbnd_crtsim.DetSimParams.NpeScaleShift
2727
PropDelay: @local::sbnd_crtsim.DetSimParams.PropDelay
2828
TimeWalkNorm: @local::sbnd_crtsim.DetSimParams.TDelayNorm
29-
TimeWalkShift: @local::sbnd_crtsim.DetSimParams.TDelayShift
30-
TimeWalkSigma: @local::sbnd_crtsim.DetSimParams.TDelaySigma
31-
TimeWalkOffset: @local::sbnd_crtsim.DetSimParams.TDelayOffset
29+
TimeWalkScale: @local::sbnd_crtsim.DetSimParams.TDelayScale
3230
}
3331

3432
crtspacepointproducer_sbnd:

sbndcode/CRT/CRTSimulation/CRTDetSimAlg.cxx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -561,20 +561,18 @@ namespace crt {
561561
{
562562
// Hit timing, with smearing and NPE dependence
563563
double tDelayMean =
564-
fParams.TDelayNorm() *
565-
exp(-0.5 * pow((npeMean - fParams.TDelayShift()) / fParams.TDelaySigma(), 2)) +
566-
fParams.TDelayOffset();
564+
fParams.TDelayNorm() * exp(-fParams.TDelayScale()*npeMean);
567565

568566
double tDelayRMS =
569-
fParams.TDelayRMSGausNorm() *
567+
fParams.TDelayRMSGausNorm() *
570568
exp(-pow(npeMean - fParams.TDelayRMSGausShift(), 2) / fParams.TDelayRMSGausSigma()) +
571-
fParams.TDelayRMSExpNorm() *
572-
exp(-(npeMean - fParams.TDelayRMSExpShift()) / fParams.TDelayRMSExpScale());
569+
exp(-(npeMean - fParams.TDelayRMSExpShift()) / fParams.TDelayRMSExpScale()) + fParams.TDelayRMSOffSetSlope()*r+ fParams.TDelayRMSOffSet();
573570

574571
double tDelay = CLHEP::RandGauss::shoot(&fEngine, tDelayMean, tDelayRMS);
575572

576573
// Time resolution of the interpolator
577-
tDelay += CLHEP::RandGauss::shoot(&fEngine, 0, fParams.TResInterpolator());
574+
// comments: we should have a simulation for interpolator, but definitely not further smearing our timing resolution
575+
// tDelay += CLHEP::RandGauss::shoot(&fEngine, 0, fParams.TResInterpolator());
578576

579577
// Propagation time
580578
double tProp = CLHEP::RandGauss::shoot(fParams.PropDelay(), fParams.PropDelayError()) * r;

sbndcode/CRT/CRTSimulation/CRTDetSimParams.h

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,11 @@ namespace crt
3434
};
3535
fhicl::Atom<double> TDelayNorm {
3636
fhicl::Name("TDelayNorm"),
37-
fhicl::Comment("Time delay fit: Gaussian normalization"),
37+
fhicl::Comment("Time delay fit: Exponential normalization"),
3838
};
39-
fhicl::Atom<double> TDelayShift {
40-
fhicl::Name("TDelayShift"),
41-
fhicl::Comment("Time delay fit: Gaussian x shift"),
42-
};
43-
fhicl::Atom<double> TDelaySigma {
44-
fhicl::Name("TDelaySigma"),
45-
fhicl::Comment("Time delay fit: Gaussian width"),
46-
};
47-
fhicl::Atom<double> TDelayOffset {
48-
fhicl::Name("TDelayOffset"),
49-
fhicl::Comment("Time delay fit: Gaussian baseline offset"),
39+
fhicl::Atom<double> TDelayScale {
40+
fhicl::Name("TDelayScale"),
41+
fhicl::Comment("Time delay fit: Exponential x scale"),
5042
};
5143
fhicl::Atom<double> TDelayRMSGausNorm {
5244
fhicl::Name("TDelayRMSGausNorm"),
@@ -60,10 +52,6 @@ namespace crt
6052
fhicl::Name("TDelayRMSGausSigma"),
6153
fhicl::Comment("Time delay fit: Gaussian width"),
6254
};
63-
fhicl::Atom<double> TDelayRMSExpNorm {
64-
fhicl::Name("TDelayRMSExpNorm"),
65-
fhicl::Comment("Time delay RMS fit: Exponential normalization"),
66-
};
6755
fhicl::Atom<double> TDelayRMSExpShift {
6856
fhicl::Name("TDelayRMSExpShift"),
6957
fhicl::Comment("Time delay RMS fit: Exponential x shift"),
@@ -72,6 +60,14 @@ namespace crt
7260
fhicl::Name("TDelayRMSExpScale"),
7361
fhicl::Comment("Time delay RMS fit: Exponential scale"),
7462
};
63+
fhicl::Atom<double> TDelayRMSOffSetSlope {
64+
fhicl::Name("TDelayRMSOffSetSlope"),
65+
fhicl::Comment("Time delay RMS fit: Offset slope"),
66+
};
67+
fhicl::Atom<double> TDelayRMSOffSet {
68+
fhicl::Name("TDelayRMSOffSet"),
69+
fhicl::Comment("Time delay RMS fit: Offset"),
70+
};
7571
fhicl::Atom<uint32_t> TriggerDelay {
7672
fhicl::Name("TriggerDelay"),
7773
fhicl::Comment("Time between signal starts and waveform goes above threshold"),

sbndcode/CRT/CRTSimulation/crtsimmodules_sbnd.fcl

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,17 @@ standard_sbnd_crtsimparams: {
77
UseG4RefTimeOffset: true
88

99
# Shape parameters for mean time delay vs. Npe
10-
TDelayNorm: 4125.74
11-
TDelayShift: -300.31
12-
TDelaySigma: 90.392
13-
TDelayOffset: -1.525
10+
TDelayNorm: 15.455
11+
TDelayScale: 0.055
1412

1513
# Shape parameters for time delay RMS vs. Npe
16-
TDelayRMSGausNorm: 2.09138
17-
TDelayRMSGausShift: 7.23993
18-
TDelayRMSGausSigma: 170.027
19-
TDelayRMSExpNorm: 1.6544
20-
TDelayRMSExpShift: 75.6183
21-
TDelayRMSExpScale: 79.3543
14+
TDelayRMSGausNorm: 2.01522
15+
TDelayRMSGausShift: 10.3433
16+
TDelayRMSGausSigma: 68.8702
17+
TDelayRMSExpShift: 1137.51
18+
TDelayRMSExpScale: 416.158
19+
TDelayRMSOffSetSlope: 1.37e-3
20+
TDelayRMSOffSet: -11.7338
2221

2322
TriggerDelay: 10 # ns
2423

@@ -39,7 +38,7 @@ standard_sbnd_crtsimparams: {
3938

4039
# Mean deposited charge for mips [GeV]
4140
UseEdep: true
42-
Q0: 1.75e-3
41+
Q0: 1.53e-3
4342

4443
# ADC model: Pedestal offset [ADC], slope [ADC/photon], RMS [ADC]
4544
QPed: 0.0 #63.6

sbndcode/Decoders/PMT/PMT_to_Digitizers.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PMT Simulation ID PMT Installation ID Breakout Board # (1=Curly, 2=Larry, 3=Moe) Slot (0-47) DIGITIZER (1-8) CHANNEL (0-14) Warm Cable Transit (ns) PMT to BB Delay (ns) PMT to BB Transit (ns) BB to Digitizer Delay (ns) BB to Digitizer Transit (ns) Total Transit (ns)
1+
PMT Simulation ID PMT Installation ID Breakout Board Slot (0-47) DIGITIZER (1-8) CHANNEL (0-14) Warm Cable Transit (ns) PMT to BB Delay (ns) PMT to BB Transit (ns) BB to Digitizer Delay (ns) BB to Digitizer Transit (ns) Total Transit (ns)]
22
17 A13 1 5 1 0 112.5 3.4 144.4 -0.08 7.32 151.7
33
71 A11 1 17 1 1 108.9 -0.4 140.6 -0.1 7.3 147.9
44
41 A22 1 29 1 2 111.1 1.8 142.8 -0.06 7.34 150.1
@@ -26,7 +26,7 @@ PMT Simulation ID PMT Installation ID Breakout Board # (1=Curly, 2=Larry, 3=Moe)
2626
10 W31 2 20 2 9 111.7 2.35 143.35 -0.1 7.3 150.7
2727
8 X11 2 32 2 10 109.1 10.3 151.3 -0.08 7.32 158.6
2828
62 X13 2 44 2 11 109.7 4.05 145.05 0.0 7.4 152.5
29-
46 X22 3 8 2 12 104.1 -0.35 140.65 -0.1 7.3 148.0
29+
36 X22 3 8 2 12 104.1 -0.35 140.65 -0.1 7.3 148.0
3030
6 X31 3 20 2 13 107.1 3.05 144.05 -0.06 7.34 151.4
3131
60 X33 3 32 2 14 105.1 3.85 144.85 0.0 7.4 152.3
3232
95 D13 1 9 3 0 110.7 1.0 142.0 0.0 7.4 149.4
@@ -77,7 +77,7 @@ PMT Simulation ID PMT Installation ID Breakout Board # (1=Curly, 2=Larry, 3=Moe)
7777
195 H22 1 2 6 0 105.9 -3.9 137.1 -0.14 7.26 144.4
7878
167 H33 1 14 6 1 108.7 -0.95 140.05 -0.12 7.28 147.3
7979
165 I13 1 26 6 2 107.9 -1.9 139.1 -0.1 7.3 146.4
80-
19 I11 1 38 6 3 110.7 1.25 142.25 0.0 7.4 149.7
80+
219 I11 1 38 6 3 110.7 1.25 142.25 0.0 7.4 149.7
8181
193 I22 2 1 6 4 111.5 1.7 142.7 0.0 7.4 150.1
8282
163 I33 2 13 6 5 107.7 -1.3 139.7 -0.1 7.3 147.0
8383
217 I31 2 25 6 6 107.9 -1.15 139.85 -0.12 7.28 147.1
@@ -102,7 +102,7 @@ PMT Simulation ID PMT Installation ID Breakout Board # (1=Curly, 2=Larry, 3=Moe)
102102
274 M22 2 27 7 10 105.7 -4.0 137.0 -0.1 7.3 144.3
103103
248 M31 2 39 7 11 109.5 -0.25 140.75 0.0 7.4 148.2
104104
302 M33 3 3 7 12 104.7 -5.4 135.6 -0.14 7.26 142.9
105-
247 N11 3 15 7 13 106.5 -3.1 137.9 -0.08 7.32 145.2
105+
246 N11 3 15 7 13 106.5 -3.1 137.9 -0.08 7.32 145.2
106106
300 N13 3 27 7 14 106.1 -3.55 137.45 -0.08 7.32 144.8
107107
273 K22 1 6 8 0 110.1 0.35 141.35 -0.14 7.26 148.6
108108
245 K33 1 18 8 1 107.9 -1.55 139.45 -0.2 7.2 146.7
@@ -116,6 +116,6 @@ PMT Simulation ID PMT Installation ID Breakout Board # (1=Curly, 2=Larry, 3=Moe)
116116
244 N31 2 19 8 9 106.9 -3.1 137.9 -0.12 7.28 145.2
117117
242 O11 2 31 8 10 105.9 -3.7 137.3 -0.1 7.3 144.6
118118
296 O13 2 43 8 11 109.7 0.0 141.0 0.0 7.4 148.4
119-
70 O22 3 6 8 12 109.3 -0.6 140.4 -0.16 7.24 147.6
119+
270 O22 3 6 8 12 109.3 -0.6 140.4 -0.16 7.24 147.6
120120
240 O31 3 18 8 13 107.9 -1.8 139.2 0.0 7.4 146.6
121121
294 O33 3 30 8 14 109.5 0.0 141.0 -0.1 7.3 148.3

0 commit comments

Comments
 (0)