Skip to content

Commit fcfc8d9

Browse files
Merge pull request #701 from SBNSoftware/feature/acastill_pmt_eff
Feature/acastill pmt eff
2 parents 8b49baa + 6baefb2 commit fcfc8d9

File tree

5 files changed

+87
-45
lines changed

5 files changed

+87
-45
lines changed

sbndcode/LArSoftConfigurations/opticalproperties_sbnd.fcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ sbnd_opticalproperties: {
2828
ScintByParticleType: true
2929

3030
# ScintPreScale MUST be equal/larger than the largest detection efficiency applied at DetSim stage
31-
# This corresponds to the uncoated PMTs detection efficiency (15.2%)
31+
# This corresponds to the coated PMTs detection efficiency (3.9% see docdb-40444)
3232
# See sbndcode/OpDetSim/digi_pmt_sbnd.fcl
33-
ScintPreScale: 0.152
33+
ScintPreScale: 0.039
3434

3535
EnableCerenkovLight: false # Cerenkov light OFF by default
3636

sbndcode/OpDetReco/OpHit/job/ophit_finder_sbnd.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sbnd_ophit_finder:
88
GenModule: "generator"
99
InputModule: "opdaq"
1010
InputLabels: [""]
11-
ChannelMasks: [] # Will ignore channels in this list
11+
ChannelMasks: [ 39, 66, 67, 71, 85, 86, 87, 92, 115, 138, 141, 170, 197, 217, 218, 221, 222, 223, 226, 245, 248, 249, 302 ] #Channels that are not being run for data reconstruction
1212
PD: ["pmt_coated", "pmt_uncoated"] # Will only use PDS in this list
1313
Electronics: "CAEN" #Will only use PDS with CAEN/Daphne readouts (500/62.5MHz sampling frec)
1414
DaphneFreq: 62.5 # Frequency of Daphne(XArapucas) readouts (in MHz)

sbndcode/OpDetSim/DigiPMTSBNDAlg.cc

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ namespace opdet {
1010
DigiPMTSBNDAlg::DigiPMTSBNDAlg(ConfigurationParameters_t const& config)
1111
: fParams(config)
1212
, fSampling(fParams.frequency)
13-
, fPMTCoatedVUVEff(fParams.PMTCoatedVUVEff / fParams.larProp->ScintPreScale())
14-
, fPMTCoatedVISEff(fParams.PMTCoatedVISEff / fParams.larProp->ScintPreScale())
15-
, fPMTUncoatedEff(fParams.PMTUncoatedEff/ fParams.larProp->ScintPreScale())
13+
, fPMTCoatedVUVEff_tpc0(fParams.PMTCoatedVUVEff_tpc0 / fParams.larProp->ScintPreScale())
14+
, fPMTCoatedVISEff_tpc0(fParams.PMTCoatedVISEff_tpc0 / fParams.larProp->ScintPreScale())
15+
, fPMTUncoatedEff_tpc0(fParams.PMTUncoatedEff_tpc0/ fParams.larProp->ScintPreScale())
16+
, fPMTCoatedVUVEff_tpc1(fParams.PMTCoatedVUVEff_tpc1 / fParams.larProp->ScintPreScale())
17+
, fPMTCoatedVISEff_tpc1(fParams.PMTCoatedVISEff_tpc1 / fParams.larProp->ScintPreScale())
18+
, fPMTUncoatedEff_tpc1(fParams.PMTUncoatedEff_tpc1/ fParams.larProp->ScintPreScale())
1619
// , fSinglePEmodel(fParams.SinglePEmodel)
1720
, fEngine(fParams.engine)
1821
, fFlatGen(*fEngine)
@@ -21,15 +24,20 @@ namespace opdet {
2124
, fExponentialGen(*fEngine)
2225
{
2326

24-
mf::LogInfo("DigiPMTSBNDAlg") << "PMT corrected efficiencies = "
25-
<< fPMTCoatedVUVEff << " " << fPMTCoatedVISEff << " " << fPMTUncoatedEff <<"\n";
27+
mf::LogInfo("DigiPMTSBNDAlg") << "PMT corrected efficiencies TPC0 = "
28+
<< fPMTCoatedVUVEff_tpc0 << " " << fPMTCoatedVISEff_tpc0 << " " << fPMTUncoatedEff_tpc0
29+
<< "PMT corrected efficiencies TPC1 = "
30+
<< fPMTCoatedVUVEff_tpc1 << " " << fPMTCoatedVISEff_tpc1 << " " << fPMTUncoatedEff_tpc1 <<"\n";
2631

27-
if(fPMTCoatedVUVEff > 1.0001 || fPMTCoatedVISEff > 1.0001 || fPMTUncoatedEff > 1.0001)
32+
if(fPMTCoatedVUVEff_tpc0 > 1.0001 || fPMTCoatedVISEff_tpc0 > 1.0001 || fPMTUncoatedEff_tpc0 > 1.0001 || fPMTCoatedVUVEff_tpc1 > 1.0001 || fPMTCoatedVISEff_tpc1 > 1.0001 || fPMTUncoatedEff_tpc1 > 1.0001)
2833
mf::LogWarning("DigiPMTSBNDAlg")
2934
<< "Detection efficiencies set in fhicl file seem to be too large!\n"
30-
<< "PMTCoatedVUVEff: " << fParams.PMTCoatedVUVEff << "\n"
31-
<< "PMTCoatedVISEff: " << fParams.PMTCoatedVISEff << "\n"
32-
<< "PMTUncoatedEff: " << fParams.PMTUncoatedEff << "\n"
35+
<< "PMTCoatedVUVEff TPC0: " << fParams.PMTCoatedVUVEff_tpc0 << "\n"
36+
<< "PMTCoatedVISEff TPC0: " << fParams.PMTCoatedVISEff_tpc0 << "\n"
37+
<< "PMTUncoatedEff TPC0: " << fParams.PMTUncoatedEff_tpc0 << "\n"
38+
<< "PMTCoatedVUVEff TPC1: " << fParams.PMTCoatedVUVEff_tpc1 << "\n"
39+
<< "PMTCoatedVISEff TPC1: " << fParams.PMTCoatedVISEff_tpc1 << "\n"
40+
<< "PMTUncoatedEff TPC1: " << fParams.PMTUncoatedEff_tpc1 << "\n"
3341
<< "Final efficiency must be equal or smaller than the scintillation "
3442
<< "pre scale applied at simulation time.\n"
3543
<< "Please check this number (ScintPreScale): "
@@ -164,14 +172,14 @@ namespace opdet {
164172
double ttsTime = 0;
165173
double tphoton;
166174
double ttpb=0;
167-
175+
double _PMTUncoatedEff;
168176
// we want to keep the 1 ns SimPhotonLite resolution
169177
// digitizer sampling period is 2 ns
170178
// create a PE accumulator vector with size x2 the waveform size
171179
std::vector<unsigned int> nPE_v( (size_t) fSamplingPeriod*wave.size(), 0);
172-
180+
_PMTUncoatedEff = (ch % 2 == 0) ? fPMTUncoatedEff_tpc0 : fPMTUncoatedEff_tpc1;
173181
for(size_t i = 0; i < simphotons.size(); i++) { //simphotons is here reflected light. To be added for all PMTs
174-
if(fFlatGen.fire(1.0) < fPMTUncoatedEff) {
182+
if(fFlatGen.fire(1.0) < _PMTUncoatedEff) {
175183
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS);
176184
ttpb = fTimeTPB->fire(); //for including TPB emission time
177185

@@ -211,6 +219,8 @@ namespace opdet {
211219
double ttsTime = 0;
212220
double tphoton;
213221
double ttpb=0;
222+
double _PMTCoatedVUVEff;
223+
double _PMTCoatedVISEff;
214224
sim::SimPhotons auxphotons;
215225

216226
// we want to keep the 1 ns SimPhotonLite resolution
@@ -219,10 +229,11 @@ namespace opdet {
219229
std::vector<unsigned int> nPE_v( (size_t) fSamplingPeriod*wave.size(), 0);
220230

221231
//direct light
232+
_PMTCoatedVUVEff = (ch % 2 == 0) ? fPMTCoatedVUVEff_tpc0 : fPMTCoatedVUVEff_tpc1;
222233
if(auto it{ DirectPhotonsMap.find(ch) }; it != std::end(DirectPhotonsMap) )
223234
{auxphotons = it->second;}
224235
for(size_t j = 0; j < auxphotons.size(); j++) { //auxphotons is direct light
225-
if(fFlatGen.fire(1.0) < fPMTCoatedVUVEff) {
236+
if(fFlatGen.fire(1.0) < _PMTCoatedVUVEff) {
226237
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS); //implementing transit time spread
227238
ttpb = fTimeTPB->fire(); //for including TPB emission time
228239

@@ -235,10 +246,11 @@ namespace opdet {
235246
}
236247

237248
// reflected light
249+
_PMTCoatedVISEff = (ch % 2 == 0) ? fPMTCoatedVISEff_tpc0 : fPMTCoatedVISEff_tpc1;
238250
if(auto it{ ReflectedPhotonsMap.find(ch) }; it != std::end(ReflectedPhotonsMap) )
239251
{auxphotons = it->second;}
240252
for(size_t j = 0; j < auxphotons.size(); j++) { //auxphotons is now reflected light
241-
if(fFlatGen.fire(1.0) < fPMTCoatedVISEff) {
253+
if(fFlatGen.fire(1.0) < _PMTCoatedVISEff) {
242254
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS); //implementing transit time spread
243255
ttpb = fTimeTPB->fire(); //for including TPB emission time
244256

@@ -280,18 +292,18 @@ namespace opdet {
280292
double ttsTime = 0;
281293
double tphoton;
282294
double ttpb=0;
283-
295+
double _PMTUncoatedEff;
284296
// we want to keep the 1 ns SimPhotonLite resolution
285297
// digitizer sampling period is 2 ns
286298
// create a PE accumulator vector with size x2 the waveform size
287299
std::vector<unsigned int> nPE_v( (size_t) fSamplingPeriod*wave.size(), 0);
288-
289300
// here litesimphotons corresponds only to reflected light
301+
_PMTUncoatedEff = (ch % 2 == 0) ? fPMTUncoatedEff_tpc0 : fPMTUncoatedEff_tpc1;
290302
std::map<int, int> const& photonMap = litesimphotons.DetectedPhotons;
291303
for (auto const& reflectedPhotons : photonMap) {
292304
// TODO: check that this new approach of not using the last
293305
// (1-accepted_photons) doesn't introduce some bias. ~icaza
294-
mean_photons = reflectedPhotons.second*fPMTUncoatedEff;
306+
mean_photons = reflectedPhotons.second*_PMTUncoatedEff;
295307
accepted_photons = fPoissonQGen.fire(mean_photons);
296308
for(size_t i = 0; i < accepted_photons; i++) {
297309
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS); //implementing transit time spread
@@ -335,18 +347,19 @@ namespace opdet {
335347
double ttsTime = 0;
336348
double tphoton;
337349
double ttpb;
338-
350+
double _PMTCoatedVUVEff;
351+
double _PMTCoatedVISEff;
339352
// we want to keep the 1 ns SimPhotonLite resolution
340353
// digitizer sampling period is 2 ns
341354
// create a PE accumulator vector with size x2 the waveform size
342355
std::vector<unsigned int> nPE_v( (size_t) fSamplingPeriod*wave.size(), 0);
343-
344356
// direct light
357+
_PMTCoatedVUVEff = (ch % 2 == 0) ? fPMTCoatedVUVEff_tpc0 : fPMTCoatedVUVEff_tpc1;
345358
if ( auto it{ DirectPhotonsMap.find(ch) }; it != std::end(DirectPhotonsMap) ){
346359
for (auto& directPhotons : (it->second).DetectedPhotons) {
347360
// TODO: check that this new approach of not using the last
348361
// (1-accepted_photons) doesn't introduce some bias. ~icaza
349-
mean_photons = directPhotons.second*fPMTCoatedVUVEff;
362+
mean_photons = directPhotons.second*_PMTCoatedVUVEff;
350363
accepted_photons = fPoissonQGen.fire(mean_photons);
351364
for(size_t i = 0; i < accepted_photons; i++) {
352365
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS); //implementing transit time spread
@@ -362,11 +375,12 @@ namespace opdet {
362375
}
363376

364377
// reflected light
378+
_PMTCoatedVISEff = (ch % 2 == 0) ? fPMTCoatedVISEff_tpc0 : fPMTCoatedVISEff_tpc1;
365379
if ( auto it{ ReflectedPhotonsMap.find(ch) }; it != std::end(ReflectedPhotonsMap) ){
366380
for (auto& reflectedPhotons : (it->second).DetectedPhotons) {
367381
// TODO: check that this new approach of not using the last
368382
// (1-accepted_photons) doesn't introduce some bias. ~icaza
369-
mean_photons = reflectedPhotons.second*fPMTCoatedVISEff;
383+
mean_photons = reflectedPhotons.second*_PMTCoatedVISEff;
370384
accepted_photons = fPoissonQGen.fire(mean_photons);
371385
for(size_t i = 0; i < accepted_photons; i++) {
372386
if(fParams.TTS > 0.0) ttsTime = Transittimespread(fParams.TTS); //implementing transit time spread
@@ -575,9 +589,12 @@ namespace opdet {
575589
fBaseConfig.PMTChargeToADC = config.pmtchargeToADC();
576590
fBaseConfig.PMTBaseline = config.pmtbaseline();
577591
fBaseConfig.PMTADCDynamicRange = config.pmtADCDynamicRange();
578-
fBaseConfig.PMTCoatedVUVEff = config.pmtcoatedVUVEff();
579-
fBaseConfig.PMTCoatedVISEff = config.pmtcoatedVISEff();
580-
fBaseConfig.PMTUncoatedEff = config.pmtuncoatedEff();
592+
fBaseConfig.PMTCoatedVUVEff_tpc0 = config.pmtcoatedVUVEff_tpc0();
593+
fBaseConfig.PMTCoatedVISEff_tpc0 = config.pmtcoatedVISEff_tpc0();
594+
fBaseConfig.PMTUncoatedEff_tpc0 = config.pmtuncoatedEff_tpc0();
595+
fBaseConfig.PMTCoatedVUVEff_tpc1 = config.pmtcoatedVUVEff_tpc1();
596+
fBaseConfig.PMTCoatedVISEff_tpc1 = config.pmtcoatedVISEff_tpc1();
597+
fBaseConfig.PMTUncoatedEff_tpc1 = config.pmtuncoatedEff_tpc1();
581598
fBaseConfig.PMTSinglePEmodel = config.PMTsinglePEmodel();
582599
fBaseConfig.PMTRiseTime = config.pmtriseTime();
583600
fBaseConfig.PMTFallTime = config.pmtfallTime();

sbndcode/OpDetSim/DigiPMTSBNDAlg.hh

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ namespace opdet {
6262
double PMTBaselineRMS; //Pedestal RMS in ADC counts
6363
double PMTDarkNoiseRate; //in Hz
6464
double PMTADCDynamicRange; //ADC dynbamic range
65-
double PMTCoatedVUVEff; //PMT (coated) efficiency for direct (VUV) light
66-
double PMTCoatedVISEff; //PMT (coated) efficiency for reflected (VIS) light
67-
double PMTUncoatedEff; //PMT (uncoated) efficiency
65+
double PMTCoatedVUVEff_tpc0; //PMT (coated) efficiency for direct (VUV) light (TPC0)
66+
double PMTCoatedVISEff_tpc0; //PMT (coated) efficiency for reflected (VIS) light (TPC0)
67+
double PMTUncoatedEff_tpc0; //PMT (uncoated) efficiency (TPC0)
68+
double PMTCoatedVUVEff_tpc1; //PMT (coated) efficiency for direct (VUV) light (TPC1)
69+
double PMTCoatedVISEff_tpc1; //PMT (coated) efficiency for reflected (VIS) light (TPC1)
70+
double PMTUncoatedEff_tpc1; //PMT (uncoated) efficiency (TPC1)
6871
std::string PMTDataFile; //File containing timing emission structure for TPB, and single PE profile from data
6972
bool PMTSinglePEmodel; //Model for single pe response, false for ideal, true for test bench meas
7073
bool MakeGainFluctuations; //Fluctuate PMT gain
@@ -127,9 +130,12 @@ namespace opdet {
127130
// Declare member data here.
128131
double fSampling; //wave sampling frequency (GHz)
129132
double fSamplingPeriod; //wave sampling period (ns)
130-
double fPMTCoatedVUVEff;
131-
double fPMTCoatedVISEff;
132-
double fPMTUncoatedEff;
133+
double fPMTCoatedVUVEff_tpc0;
134+
double fPMTCoatedVISEff_tpc0;
135+
double fPMTUncoatedEff_tpc0;
136+
double fPMTCoatedVUVEff_tpc1;
137+
double fPMTCoatedVISEff_tpc1;
138+
double fPMTUncoatedEff_tpc1;
133139
bool fPositivePolarity;
134140
int fADCSaturation;
135141

@@ -263,19 +269,34 @@ namespace opdet {
263269
Comment("Saturation in number of ADCs")
264270
};
265271

266-
fhicl::Atom<double> pmtcoatedVUVEff {
267-
Name("PMTCoatedVUVEff"),
268-
Comment("PMT (coated) detection efficiency for direct (VUV) light")
272+
fhicl::Atom<double> pmtcoatedVUVEff_tpc0 {
273+
Name("PMTCoatedVUVEff_tpc0"),
274+
Comment("PMT (coated) detection efficiency for direct (VUV) light (TPC0)")
269275
};
270276

271-
fhicl::Atom<double> pmtcoatedVISEff {
272-
Name("PMTCoatedVISEff"),
273-
Comment("PMT (coated) detection efficiency for reflected (VIS) light")
277+
fhicl::Atom<double> pmtcoatedVISEff_tpc0 {
278+
Name("PMTCoatedVISEff_tpc0"),
279+
Comment("PMT (coated) detection efficiency for reflected (VIS) light (TPC0)")
274280
};
275281

276-
fhicl::Atom<double> pmtuncoatedEff {
277-
Name("PMTUncoatedEff"),
278-
Comment("PMT (uncoated) detection efficiency")
282+
fhicl::Atom<double> pmtuncoatedEff_tpc0 {
283+
Name("PMTUncoatedEff_tpc0"),
284+
Comment("PMT (uncoated) detection efficiency (TPC0)")
285+
};
286+
287+
fhicl::Atom<double> pmtcoatedVUVEff_tpc1 {
288+
Name("PMTCoatedVUVEff_tpc1"),
289+
Comment("PMT (coated) detection efficiency for direct (VUV) light (TPC1)")
290+
};
291+
292+
fhicl::Atom<double> pmtcoatedVISEff_tpc1 {
293+
Name("PMTCoatedVISEff_tpc1"),
294+
Comment("PMT (coated) detection efficiency for reflected (VIS) light (TPC1)")
295+
};
296+
297+
fhicl::Atom<double> pmtuncoatedEff_tpc1 {
298+
Name("PMTUncoatedEff_tpc1"),
299+
Comment("PMT (uncoated) detection efficiency (TPC1)")
279300
};
280301

281302
fhicl::Atom<bool> PMTsinglePEmodel {

sbndcode/OpDetSim/digi_pmt_sbnd.fcl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ sbnd_digipmt_alg:
3131
PMTDarkNoiseRate: 1000.0 #in Hz
3232

3333
# Detection efficiencies
34-
PMTCoatedVUVEff: 0.096 #PMT coated detection efficiency for direct (VUV) light
35-
PMTCoatedVISEff: 0.104 #PMT coated detection efficiency for reflected (VIS) light
36-
PMTUncoatedEff: 0.152 #PMT uncoated detection efficiency
34+
PMTCoatedVUVEff_tpc0: 0.035 #PMT coated detection efficiency for direct (VUV) light
35+
PMTCoatedVISEff_tpc0: 0.03882 #PMT coated detection efficiency for reflected (VIS) light
36+
PMTUncoatedEff_tpc0: 0.03758 #PMT uncoated detection efficiency
37+
38+
PMTCoatedVUVEff_tpc1: 0.03 #PMT coated detection efficiency for direct (VUV) light
39+
PMTCoatedVISEff_tpc1: 0.03882 #PMT coated detection efficiency for reflected (VIS) light
40+
PMTUncoatedEff_tpc1: 0.03758 #PMT uncoated detection efficiency
3741

3842
# Simulate gain fluctuations
3943
# (comment-out to skip gain fluctuations simulation)

0 commit comments

Comments
 (0)