Skip to content

Commit 1807045

Browse files
author
Brinden Carlson
committed
Merge branch 'release/v09_90_00'
2 parents cc0e4d2 + 42bd9bc commit 1807045

55 files changed

Lines changed: 2596 additions & 357 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 7 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.90.00)
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.90.00)
2424

2525
message(STATUS "\n")
2626
message(STATUS "================================= ${PROJECT_NAME} =================================")
@@ -88,6 +88,11 @@ find_package( Geant4 REQUIRED )
8888
find_package( Boost COMPONENTS system REQUIRED )
8989
find_package( ROOT REQUIRED )
9090

91+
if(DEFINED ENV{HEP_HPC_DIR} )
92+
find_ups_product( hdf5 )
93+
find_ups_product( hep_hpc )
94+
endif()
95+
9196
# macros for dictionary and simple_plugin
9297
include(ArtDictionary)
9398
include(ArtMake)

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/ChannelMaps/TPC/TPCChannelMapService_service.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ SBND::TPCChannelMapService::TPCChannelMapService(fhicl::ParameterSet const& pset
7575
if (planestr == "Y") c.plane = 2;
7676
if (c.plane == 10) c.valid = false;
7777
c.WIBQFSP = atoi(qfspstr.substr(3,1).c_str());
78+
c.asicchan = c.FEMBCh % 16;
7879

7980
fChanInfoFromFEMInfo[c.FEMCrate][c.FEM][c.FEMCh] = c;
8081
fChanInfoFromOfflChan[c.offlchan] = c;

sbndcode/Commissioning/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ set(
3939
sbndcode_RecoUtils
4040
sbndcode_OpDetSim
4141
sbndcode_GeoWrappers
42+
sbndcode_ChannelMaps_TPC_TPCChannelMapService_service
43+
hep_hpc_hdf5
44+
${HDF5_LIBRARIES}
4245
)
4346

4447

0 commit comments

Comments
 (0)