Skip to content

Commit 1a5e851

Browse files
committed
fix some elifetime bugs
1 parent d6b3270 commit 1a5e851

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

sbndcode/Calorimetry/LightCaloProducer_module.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ class sbnd::LightCaloProducer : public art::EDProducer {
172172
double fxarapucavuv_viseff;
173173
double fxarapucavis_eff;
174174

175-
// Electron lifetime database parameters
176175
bool fuse_elifetime_db;
177176
std::string felifetime_db_file;
178177
std::string felifetime_db_tag;
@@ -508,7 +507,6 @@ void sbnd::LightCaloProducer::CalculateCalorimetry(art::Event& e,
508507
for (size_t i=0; i < slice_hits_v.size(); i++){
509508
auto hit = slice_hits_v[i];
510509
auto drift_time = clock_data.TPCTick2TrigTime(hit->PeakTime());
511-
// Use TPC-specific electron lifetime
512510
double elifetime = (hit->WireID().TPC == 0) ? elifetime_tpc0 : elifetime_tpc1;
513511
double atten_correction = std::exp(drift_time/elifetime); // exp(us/us)
514512
auto hit_plane = hit->View();
@@ -536,7 +534,6 @@ void sbnd::LightCaloProducer::CalculateCalorimetry(art::Event& e,
536534
if (hit->View() !=bestHits) continue;
537535
const auto &position(sp->XYZ());
538536
geo::Point_t xyz(position[0],position[1],position[2]);
539-
// correct for e- attenuation using TPC-specific lifetime
540537
auto drift_time = clock_data.TPCTick2TrigTime(hit->PeakTime());
541538
double elifetime = (hit->WireID().TPC == 0) ? elifetime_tpc0 : elifetime_tpc1;
542539
double atten_correction = std::exp(drift_time/elifetime); // exp(us/us)
@@ -836,9 +833,8 @@ sbnd::LightCaloProducer::ELifetimeInfo sbnd::LightCaloProducer::GetELifetimeFrom
836833
felifetime_db->GetNamedChannelData(0, "etau_sce_spatial_east", tau_E);
837834
felifetime_db->GetNamedChannelData(0, "etau_sce_spatial_west", tau_W);
838835

839-
// TPC0 is East, TPC1 is West
840-
info.tau_tpc0 = tau_E;
841-
info.tau_tpc1 = tau_W;
836+
info.tau_tpc0 = tau_E*1e3; // the db value is in ms, convert to us
837+
info.tau_tpc1 = tau_W*1e3; // the db value is in ms, convert to us
842838

843839
if (fverbose) {
844840
std::cout << "[LightCaloProducer] : Electron lifetime from DB for run " << run << std::endl;

sbndcode/Calorimetry/lightcalo_sbnd_data.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sbnd_lightcalo_data.OpFlashMin: -0.8 # assumption is light-triggered data
88
sbnd_lightcalo_data.OpFlashMax: 2.0 # assumption is light-triggered data
99

1010
sbnd_lightcalo_data.UseELifetimeDB: true
11-
sbnd_lightcalo_data.ELifetimeDBFile: tpc_elifetime
11+
sbnd_lightcalo_data.ELifetimeDBFile: "tpc_elifetime"
1212
sbnd_lightcalo_data.ELifetimeDBTag: @local::SBND_Calibration_GlobalTags.tpc_elifetime_data
1313

1414
sbnd_lightcalo_data_sce: @local::sbnd_lightcalo_data

0 commit comments

Comments
 (0)