Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions duneopdet/OpticalDetector/OpDetDigitizerProtoDUNEVD_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,10 @@ void OpDetDigitizerProtoDUNEVD::produce(art::Event &evt) {
art::fill_ptr_vector(mybtr_vec[mybtr_vec.size() - 1], btr_handles[hh]);
for (auto const &btr : mybtr_vec[mybtr_vec.size() - 1]) {
if (std::find(fInputModulesAr.begin(),fInputModulesAr.end(),
btr_handles[hh].provenance()->moduleLabel())==fInputModulesAr.end())
btr_handles[hh].provenance()->moduleLabel())!=fInputModulesAr.end())
ODBMap[btr.get()->OpDetNum()].first.push_back(&btr); // Ar modules
else if (std::find(fInputModulesXe.begin(),fInputModulesXe.end(),
btr_handles[hh].provenance()->moduleLabel())==fInputModulesXe.end())
btr_handles[hh].provenance()->moduleLabel())!=fInputModulesXe.end())
ODBMap[btr.get()->OpDetNum()].second.push_back(&btr); // Xe modules
else
throw art::Exception(art::errors::LogicError)
Expand Down Expand Up @@ -943,10 +943,32 @@ void OpDetDigitizerProtoDUNEVD::CheckFHiCLParameters() const {
<< "TimeBegin should be less than TimeEnd!\n";
}
double OpDetDigitizerProtoDUNEVD::getPDE_Ar(int OpDet) const {
return fPDMapTool->ArgonEfficiency(OpDet);
// Correct out the prescaling applied during simulation
auto const *LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
double QE = fPDMapTool->ArgonEfficiency(OpDet);
QE = QE / LarProp->ScintPreScale();
if (QE > 1.0001 ) {
mf::LogError("OpDetDigitizerProtoDUNEVD") << "Channel PDE set as OpDetDigitizerProtoDUNEVD.QE, " << QE
<< " is too large. It is larger than the prescaling applied during simulation, "
<< LarProp->ScintPreScale()
<< ". Final PDE must be equal to or smaller than the PreScale applied at simulation time.";
std::abort();
}
return QE;
}
double OpDetDigitizerProtoDUNEVD::getPDE_Xe(int OpDet) const {
return fPDMapTool->XenonEfficiency(OpDet);
// Correct out the prescaling applied during simulation
auto const *LarProp = lar::providerFrom<detinfo::LArPropertiesService>();
double QE = fPDMapTool->XenonEfficiency(OpDet);
QE = QE / LarProp->ScintPreScale();
if (QE > 1.0001 ) {
mf::LogError("OpDetDigitizerProtoDUNEVD") << "Channel PDE set as OpDetDigitizerProtoDUNEVD.QE, " << QE
<< " is too large. It is larger than the prescaling applied during simulation, "
<< LarProp->ScintPreScale()
<< ". Final PDE must be equal to or smaller than the PreScale applied at simulation time.";
std::abort();
}
return QE;
}
double OpDetDigitizerProtoDUNEVD::getDarkCountRate(int OpDet) const {
return fDarkCountRateMap.second.at(
Expand Down