Skip to content

Commit d5bce5e

Browse files
Merge branch 'develop' into feature/sungbino_timedep_etau
2 parents 125eb8a + b841d99 commit d5bce5e

29 files changed

Lines changed: 1240 additions & 26 deletions

sbndcode/Calibration/PDSDatabaseInterface/PMTCalibrationDatabase.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ namespace sbndDB {
2525
virtual int getBreakoutBox(unsigned int channelID) const = 0;
2626
virtual int getCAENDigitizer(unsigned int channelID) const = 0;
2727
virtual int getCAENDigitizerChannel(unsigned int channelID) const = 0;
28+
virtual bool getOnPMT(unsigned int channelID) const = 0;
2829
virtual bool getReconstructChannel(unsigned int channelID) const = 0;
2930
virtual double getTotalTransitTime(unsigned int channelID) const = 0;
3031
virtual double getCosmicTimeCorrection(unsigned int channelID) const = 0;
3132
virtual double getSPEAmplitude(unsigned int channelID) const = 0;
3233
virtual double getSPEAmplitudeStd(unsigned int channelID) const = 0;
3334
virtual double getGaussFilterPower(unsigned int channelID) const = 0;
3435
virtual double getGaussFilterWC(unsigned int channelID) const = 0;
36+
virtual double getNonLineatiryPESat(unsigned int channelID) const = 0;
37+
virtual double getNonLineatiryAlpha(unsigned int channelID) const = 0;
3538
virtual std::vector<double> getSER(unsigned int channelID) const = 0;
3639
}; // end class
3740

sbndcode/Calibration/PDSDatabaseInterface/PMTCalibrationDatabaseProvider.cxx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ void sbndDB::PMTCalibrationDatabaseProvider::ReadPMTCalibration(uint32_t run)
114114
<< "Encountered error (code " << error
115115
<< ") while trying to access 'caen_digitizer_channel' on table " << dbname << "\n";
116116
fPMTCalibrationData[channel].caenDigitizerChannel = static_cast<int>(_caen_digitizer_channel);
117+
// Read on PMT
118+
bool _on_pmt = false;
119+
error = db.GetNamedChannelData(channel, "on_pmt", _on_pmt);
120+
if (error)
121+
throw cet::exception("PMTTimingCorrectionsProvider")
122+
<< "Encountered error (code " << error
123+
<< ") while trying to access 'on_pmt' on table " << dbname << "\n";
124+
fPMTCalibrationData[channel].onPMT = _on_pmt;
117125

118126
// Read reconstruct channel
119127
bool _reconstruct_channel = false;
@@ -178,6 +186,21 @@ void sbndDB::PMTCalibrationDatabaseProvider::ReadPMTCalibration(uint32_t run)
178186
<< dbname << "\n";
179187
fPMTCalibrationData[channel].gauss_wc = _gauss_wc;
180188

189+
double _nonlinearity_pesat = 0.;
190+
error = db.GetNamedChannelData(channel, "nonlinearity_pesat", _nonlinearity_pesat);
191+
if (error)
192+
throw cet::exception("PMTTimingCorrectionsProvider")
193+
<< "Encountered error (code " << error
194+
<< ") while trying to access 'nonlinearity_pesat' on table " << dbname << "\n";
195+
fPMTCalibrationData[channel].nonlinearity_pesat = _nonlinearity_pesat;
196+
double _nonlinearity_alpha = 0.;
197+
error = db.GetNamedChannelData(channel, "nonlinearity_alpha", _nonlinearity_alpha);
198+
if (error)
199+
throw cet::exception("PMTTimingCorrectionsProvider")
200+
<< "Encountered error (code " << error
201+
<< ") while trying to access 'nonlinearity_alpha' on table " << dbname << "\n";
202+
fPMTCalibrationData[channel].nonlinearity_alpha = _nonlinearity_alpha;
203+
181204
// Read SER
182205
std::vector<double> _ser;
183206
std::string name_base = "ser_vec_";

sbndcode/Calibration/PDSDatabaseInterface/PMTCalibrationDatabaseProvider.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ class sbndDB::PMTCalibrationDatabaseProvider : public PMTCalibrationDatabase {
5050
int getCAENDigitizerChannel( unsigned int channelID ) const override {
5151
return getChannelCorrOrDefault(channelID).caenDigitizerChannel;
5252
};
53+
bool getOnPMT(unsigned int channelID) const override {
54+
return getChannelCorrOrDefault(channelID).onPMT;
55+
};
5356
bool getReconstructChannel(unsigned int channelID) const override {
5457
return getChannelCorrOrDefault(channelID).reconstructChannel;
5558
};
@@ -71,6 +74,12 @@ class sbndDB::PMTCalibrationDatabaseProvider : public PMTCalibrationDatabase {
7174
double getGaussFilterWC( unsigned int channelID ) const override {
7275
return getChannelCorrOrDefault(channelID).gauss_wc;
7376
};
77+
double getNonLineatiryPESat( unsigned int channelID ) const override {
78+
return getChannelCorrOrDefault(channelID).nonlinearity_pesat;
79+
};
80+
double getNonLineatiryAlpha( unsigned int channelID ) const override {
81+
return getChannelCorrOrDefault(channelID).nonlinearity_alpha;
82+
};
7483
std::vector<double> getSER( unsigned int channelID ) const override {
7584
return getChannelCorrOrDefault(channelID).ser;
7685
};
@@ -89,18 +98,20 @@ class sbndDB::PMTCalibrationDatabaseProvider : public PMTCalibrationDatabase {
8998
size_t breakoutBox=0;
9099
size_t caenDigitizer=0;
91100
size_t caenDigitizerChannel=0;
101+
bool onPMT=true;
92102
bool reconstructChannel=false;
93103
double totalTransitTime=0.;
94104
double cosmicTimeCorrection=0.;
95105
double spe_amplitude=0.;
96106
double spe_amplitude_std=0.;
97107
double gauss_wc_power=0.;
98108
double gauss_wc=0.;
109+
double nonlinearity_pesat=0.;
110+
double nonlinearity_alpha=0.;
99111
std::vector<double> ser={};
100112
};
101113

102-
const PMTCalibrationDB CorrectionDefaults = {0, 0, 0, 0, 0.0, 0.0, 0.0, {}};
103-
114+
const PMTCalibrationDB CorrectionDefaults = {0, 0, 0, true, false, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}};
104115
/// Map of corrections by channel
105116
std::map<unsigned int, PMTCalibrationDB> fPMTCalibrationData;
106117

sbndcode/Calibration/configurations/calibration_database_PDS_TagSets_sbnd.fcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ BEGIN_PROLOG
1010

1111
# For SBND 2025 Fall production
1212
PDS_CalibrationTags_Nov2025: {
13-
PMTCalibrationDatabaseTag: "v1r1"
14-
DatabaseTimeStamp: 1757601071000000000
13+
PMTCalibrationDatabaseTag: "v2r1"
14+
DatabaseTimeStamp: 1763157679000000000
1515
}
1616

1717
END_PROLOG

sbndcode/JobConfigurations/standard/caf/cafmakerjob_sbnd.fcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ physics.producers.cafmaker.FlashMatchSCECryoSuffixes: [""]
155155
# Include 3D barycenter flahs matching
156156
physics.producers.cafmaker.TPCPMTBarycenterMatchLabel: "tpcpmtbarycentermatching"
157157

158+
# Include MC version of PMT Software Trigger
159+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricmc"
160+
158161
# Overwrite weight_functions label:
159162
physics.producers.fluxweight.weight_functions: @local::physics.producers.fluxweight.weight_functions_flux
160163
physics.producers.geant4weight.weight_functions: @local::physics.producers.geant4weight.weight_functions_reint
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#include "cafmakerjob_sbnd_data_base.fcl"
22

33
physics.producers.cafmaker.BNBPOTDataLabel: "bnbinfo"
4+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricbnblight"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#include "cafmakerjob_sbnd_data_base.fcl"
22

33
physics.producers.cafmaker.BNBPOTDataLabel: "sbndbnbzerobiasinfo"
4+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricbnbzero"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#include "cafmakerjob_sbnd_data_base.fcl"
22

33
physics.producers.cafmaker.OffbeamBNBCountDataLabel: "bnbextinfo"
4+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricoffbeamlight"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#include "cafmakerjob_sbnd_data_sce.fcl"
22

33
physics.producers.cafmaker.BNBPOTDataLabel: "bnbinfo"
4+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricbnblight"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#include "cafmakerjob_sbnd_data_sce.fcl"
22

33
physics.producers.cafmaker.BNBPOTDataLabel: "sbndbnbzerobiasinfo"
4+
physics.producers.cafmaker.SBNDSoftwareTriggerLabel: "pmtmetricbnbzero"

0 commit comments

Comments
 (0)