Skip to content

Commit 12847cf

Browse files
Merge branch 'develop' into revert-897-feature/pandora_electron_merge
2 parents 9fe38d5 + a601863 commit 12847cf

8 files changed

Lines changed: 53 additions & 23 deletions

File tree

sbndcode/Calibration/TPCCalorimetry/NormalizeYZ_tool.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Author : Shweta Yadav (sxy1439@mavs.uta.edu)
2+
// University of Texas at Arlington
13

24
// Framework Includes
35
#include "art/Framework/Core/EDProducer.h"

sbndcode/Calibration/TPCCalorimetry/normtools_sbnd.fcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ driftnorm_sql: {
1111

1212
yznorm_hist_data: {
1313
tool_type: NormalizeYZ
14-
FileName: "YZmaps/yz_correction_map_data1e20.root"
14+
FileName: "YZmaps/yz_data2025_v10_14_02.root"
1515
Verbose: false
1616
}
1717

1818
yznorm_hist_mc: {
1919
tool_type: NormalizeYZ
20-
FileName: "YZmaps/yz_correction_map_mcp2025b5e18.root"
20+
FileName: "YZmaps/yz_mc2025_v10_14_02.root"
2121
Verbose: false
2222
}
2323

sbndcode/Calibration/configurations/calibration_database_GlobalTags_sbnd.fcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
BEGIN_PROLOG
55

66
SBND_Calibration_GlobalTags: {
7-
@table::TPC_CalibrationTags_Nov2025
7+
@table::TPC_CalibrationTags_Jan2026
88
@table::PDS_CalibrationTags_Nov2025
99
}
1010

sbndcode/Calibration/configurations/calibration_database_TPC_TagSets_sbnd.fcl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ BEGIN_PROLOG
77
## r1: SBND Full Run 1 with light trigger, run number 18250-18618
88

99
## First one for 2025 Fall, only with etau tag
10+
TPC_CalibrationTags_Jan2026: {
11+
12+
tpc_elifetime_data: "v4r1"
13+
14+
}
15+
1016
TPC_CalibrationTags_Nov2025: {
1117

1218
tpc_elifetime_data: "v2r1"

sbndcode/LArSoftConfigurations/gen/genie_sbnd.fcl

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,29 +232,29 @@ sbnd_flux_bnb_nu_Lv1_test1: {
232232
#
233233
# Booster Neutrino Beam, FHC mode, g4bnb 1.1.0, A
234234
#
235-
sbnd_flux_g4bnb_1_0_0_fhc: {
235+
sbnd_flux_g4bnb_1_1_1_fhc: {
236236
FluxType: "dk2nu"
237237
DetectorLocation: "SBND"
238238
FluxCopyMethod: "DIRECT"
239239
FluxSearchPaths: "/cvmfs/sbnd.osgstorage.org/pnfs/fnal.gov/usr/sbnd/persistent/stash/fluxFiles/bnb/G4BNB/v1.1.1/fhc/a/"
240240
FluxFiles: [ "NuBeam_production_BooNE_50m_I174000A_*.dk2nu.root" ]
241241
}
242242

243-
sbnd_flux_g4bnb_1_0_0_fhc_test1: {
244-
@table::sbnd_flux_g4bnb_1_0_0_fhc
243+
sbnd_flux_g4bnb_1_1_1_fhc_test1: {
244+
@table::sbnd_flux_g4bnb_1_1_1_fhc
245245
FluxFiles: [ "NuBeam_production_BooNE_50m_I174000A_9998.dk2nu.root" ]
246246
}
247247

248248
#
249249
# Booster Neutrino Beam, FHC mode, DIRT, g4bnb 1.1.0, A
250250
#
251-
sbnd_flux_g4bnb_1_0_0_fhc_dirt: {
252-
@table::sbnd_flux_g4bnb_1_0_0_fhc
251+
sbnd_flux_g4bnb_1_1_1_fhc_dirt: {
252+
@table::sbnd_flux_g4bnb_1_1_1_fhc
253253
DetectorLocation: "SBND-Dirt"
254254
}
255255

256-
sbnd_flux_g4bnb_1_0_0_fhc_dirt_test1: {
257-
@table::sbnd_flux_g4bnb_1_0_0_fhc_dirt
256+
sbnd_flux_g4bnb_1_1_1_fhc_dirt_test1: {
257+
@table::sbnd_flux_g4bnb_1_1_1_fhc_dirt
258258
FluxFiles: [ "NuBeam_production_BooNE_50m_I174000A_9998.dk2nu.root" ]
259259
}
260260

@@ -283,19 +283,32 @@ sbnd_flux_g4bnb_1_0_0_beamdump: {
283283
}
284284

285285

286+
#
287+
# Booster Neutrino Beam, beam-dump mode, G4BNB v1.1.1, A
288+
#
289+
sbnd_flux_g4bnb_1_1_1_beamdump: {
290+
FluxType: "dk2nu"
291+
DetectorLocation: "SBND"
292+
FluxCopyMethod: "DIRECT"
293+
FluxSearchPaths: "/cvmfs/sbnd.osgstorage.org/pnfs/fnal.gov/usr/sbnd/persistent/stash/fluxFiles/bnb/G4BNB/v1.1.1/beamdump/a/"
294+
FluxFiles: [ "NuBeam_production_offTarg_BooNE_50m_offtarg_wires_al2O3_srbbs_I174000A_*.dk2nu.root" ]
295+
}
296+
297+
298+
286299

287300
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
288301
#
289302
# Booster Neutrino Beam, neutrino mode, "default" configuration
290303
#
291-
sbnd_flux_bnb_nu: @local::sbnd_flux_g4bnb_1_0_0_fhc
292-
sbnd_flux_bnb_nu_test1: @local::sbnd_flux_g4bnb_1_0_0_fhc_test1
304+
sbnd_flux_bnb_nu: @local::sbnd_flux_g4bnb_1_1_1_fhc
305+
sbnd_flux_bnb_nu_test1: @local::sbnd_flux_g4bnb_1_1_1_fhc_test1
293306

294307
#
295308
# Booster Neutrino Beam, interaction from dirt
296309
#
297-
sbnd_flux_bnb_dirt: @local::sbnd_flux_g4bnb_1_0_0_fhc_dirt
298-
sbnd_flux_bnb_dirt_test1: @local::sbnd_flux_g4bnb_1_0_0_fhc_dirt_test1
310+
sbnd_flux_bnb_dirt: @local::sbnd_flux_g4bnb_1_1_1_fhc_dirt
311+
sbnd_flux_bnb_dirt_test1: @local::sbnd_flux_g4bnb_1_1_1_fhc_dirt_test1
299312

300313
#
301314
# Booster Neutrino Beam, RHC mode, "default" configuration
@@ -305,7 +318,7 @@ sbnd_flux_bnb_nu_rhc: @local::sbnd_flux_g4bnb_1_0_0_rhc
305318
#
306319
# Booster Neutrino Beam, beam-dump mode, "default" configuration
307320
#
308-
sbnd_flux_bnb_nu_beamdump: @local::sbnd_flux_g4bnb_1_0_0_beamdump
321+
sbnd_flux_bnb_nu_beamdump: @local::sbnd_flux_g4bnb_1_1_1_beamdump
309322

310323

311324
#

sbndcode/LightPropagationCorrection/LightPropagationCorrection_module.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,16 +442,16 @@ void sbnd::LightPropagationCorrection::GetPropagationTimeCorrectionPerChannel()
442442
double dy = fSpacePointY[sp] - _opDetY;
443443
double dz = fSpacePointZ[sp] - _opDetZ;
444444
double distanceToOpDet = std::sqrt(dx*dx + dy*dy + dz*dz);
445-
//double spToCathode = abs(fSpacePointX[sp]); // Distance from space point to cathode in mm
446-
//double cathodeToOpDet = std::sqrt(_opDetX*_opDetX + dy*dy + dz*dz); // Distance from cathode to OpDet in mm
447-
//float lightPropTimeVIS = spToCathode/fVGroupVUV + cathodeToOpDet/fVGroupVIS; // Speed
448-
449445
double cathodeToOpDet = std::sqrt(_opDetX*_opDetX + (dy/2)*(dy/2) + (dz/2)*(dz/2)); // Distance from cathode to OpDet in mm
450446
double spToCathode = std::sqrt( fSpacePointX[sp]*fSpacePointX[sp] + (dy/2)*(dy/2) + (dz/2)*(dz/2)); // Distance from space point to cathode in mm
451447

452448
float lightPropTimeVIS = spToCathode/fVGroupVUV + cathodeToOpDet/fVGroupVIS; // Speed
453449
float lightPropTimeVUV = distanceToOpDet / fVGroupVUV; // Speed of light in mm/ns for VUV
454-
float lightPropTime = std::min(lightPropTimeVIS, lightPropTimeVUV);
450+
float lightPropTime = 0;
451+
if(fPDSMap.pdType(opdet)=="pmt_coated" || fPDSMap.pdType(opdet)=="xarapuca_vuv")
452+
lightPropTime = std::min(lightPropTimeVIS, lightPropTimeVUV);
453+
else if(fPDSMap.pdType(opdet)=="pmt_uncoated" || fPDSMap.pdType(opdet)=="xarapuca_vis")
454+
lightPropTime = lightPropTimeVIS;
455455
float partPropTime = std::sqrt((fSpacePointX[sp]-fRecoVx)*(fSpacePointX[sp]-fRecoVx) + (fSpacePointY[sp]-fRecoVy)*(fSpacePointY[sp]-fRecoVy) + (fSpacePointZ[sp]-fRecoVz)*(fSpacePointZ[sp]-fRecoVz))/fSpeedOfLight;
456456
float PropTime = lightPropTime + partPropTime;
457457
if(PropTime < minPropTime) minPropTime = PropTime;

sbndcode/LightPropagationCorrection/LightPropagationCorrection_module.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private:
145145

146146

147147
geo::WireReadoutGeom const& fWireReadout = art::ServiceHandle<geo::WireReadout>()->Get();
148-
148+
opdet::sbndPDMapAlg fPDSMap;
149149
//Flash finder manager
150150
::lightana::FlashFinderManager _mgr;
151151
::lightana::FlashFinderManager _mgr_tpc0;

sbndcode/TPCPMTBarycenterMatching/TPCPMTBarycenterMatching_module.cc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
#include "lardataobj/RecoBase/PFParticleMetadata.h"
6060
#include "sbnobj/Common/Reco/TPCPMTBarycenterMatch.h"
6161

62+
// Calibration database includes
63+
#include "sbndcode/Calibration/PDSDatabaseInterface/PMTCalibrationDatabase.h"
64+
#include "sbndcode/Calibration/PDSDatabaseInterface/IPMTCalibrationDatabaseService.h"
65+
6266
//ROOT includes
6367
#include <Eigen/Dense>
6468
#include <vector>
@@ -231,7 +235,6 @@ class TPCPMTBarycenterMatchProducer : public art::EDProducer {
231235
bool fCollectionOnly; ///< Only use TPC spacepoints from the collection plane
232236
double fDistanceCandidateFlashes; ///< Maximum distance between candidate flashes to be considered for matching (cm)
233237
std::vector<double> fCalAreaConst; /// Calibration area constants for wire plane
234-
std::vector<int> fSkipChannelList;
235238
double fOpDetCoVUVEff; // Efficiencies for PMT detection (Coated PMT VUV)
236239
double fOpDetCoVISEff; // Efficiencies for PMT detection (Coated PMT VIS)
237240
double fOpDetUncoVISEff; // Efficiencies for PMT detection (Uncoated PMT VIS)
@@ -294,6 +297,9 @@ class TPCPMTBarycenterMatchProducer : public art::EDProducer {
294297
fhicl::ParameterSet _vis_params;
295298
std::shared_ptr<phot::OpticalPath> _optical_path_tool;
296299

300+
sbndDB::PMTCalibrationDatabase const* fPMTCalibrationDatabaseService;
301+
302+
297303
};
298304

299305

@@ -391,6 +397,9 @@ TPCPMTBarycenterMatchProducer::TPCPMTBarycenterMatchProducer(fhicl::ParameterSet
391397
_vis_params = p.get<fhicl::ParameterSet>("VIVHits");
392398
_optical_path_tool = std::shared_ptr<phot::OpticalPath>(art::make_tool<phot::OpticalPath>(p.get<fhicl::ParameterSet>("OpticalPathTool")));
393399
_semi_model = std::make_unique<phot::SemiAnalyticalModel>(_vuv_params, _vis_params, _optical_path_tool, true, false);
400+
401+
//Load PMT Calibration Database
402+
fPMTCalibrationDatabaseService = lar::providerFrom<sbndDB::IPMTCalibrationDatabaseService const>();
394403
}
395404

396405
void TPCPMTBarycenterMatchProducer::produce(art::Event& e)
@@ -892,7 +901,7 @@ double TPCPMTBarycenterMatchProducer::GetFlashLight(double flash_pe, std::vector
892901
double tot_visibility=0;
893902

894903
for(size_t ch=0; ch<dir_visibility.size(); ch++){
895-
if (std::find(fSkipChannelList.begin(), fSkipChannelList.end(), ch) != fSkipChannelList.end()) continue;
904+
if(!fPMTCalibrationDatabaseService->getReconstructChannel(ch)) continue; // Skip channels not reconstructed
896905
if(fOpDetType[ch]==0) tot_visibility += fOpDetCoVUVEff*dir_visibility[ch] + fOpDetCoVISEff*ref_visibility[ch];
897906
else if(fOpDetType[ch]==1) tot_visibility += fOpDetUncoVISEff*ref_visibility[ch];
898907
else continue; // skip other types

0 commit comments

Comments
 (0)