Skip to content

Commit f367309

Browse files
Merge branch 'develop' into feature/aantonak_corsika_showerarea
2 parents 5d00748 + 027febc commit f367309

167 files changed

Lines changed: 7115 additions & 737 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

18-
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.09.00)
18+
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 10.10.03.02)
1919
find_package(cetmodules REQUIRED)
2020
project(sbndcode LANGUAGES CXX)
2121

sbndcode/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ add_subdirectory(OpDetSim)
1616
add_subdirectory(OpDetReco)
1717
add_subdirectory(OpDetAnalyzer)
1818
add_subdirectory(OpT0Finder)
19+
add_subdirectory(OpPathTool)
1920
#add_subdirectory(PDS)
2021
#add_subdirectory(CosmicId)
2122
add_subdirectory(ShowerAna)
@@ -49,3 +50,4 @@ add_subdirectory(SBNDCVN)
4950
add_subdirectory(TPCPMTBarycenterMatching)
5051

5152
add_subdirectory(BlipRecoSBND)
53+
add_subdirectory(LightPropagationCorrection)

sbndcode/CRT/CRTAna/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
art_make(
22
MODULE_LIBRARIES
33
ROOT::Tree
4+
art_root_io::TFileService_service
45
larsim::Utils
6+
lardata::DetectorClocksService
57
sbnobj::SBND_CRT
68
sbnobj::SBND_Timing
7-
sbndcode_GeoWrappers
89
sbndcode_CRT_CRTBackTracker
910
)
1011

sbndcode/CRT/CRTAna/CRTAnalysis_module.cc

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "sbnobj/SBND/CRT/CRTTrack.hh"
3636
#include "sbnobj/SBND/Timing/DAQTimestamp.hh"
3737

38-
#include "sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h"
38+
#include "sbndcode/Geometry/GeometryWrappers/CRTGeoService.h"
3939
#include "sbndcode/Geometry/GeometryWrappers/TPCGeoAlg.h"
4040
#include "sbndcode/ChannelMaps/CRT/CRTChannelMapService.h"
4141
#include "sbndcode/CRT/CRTBackTracker/CRTBackTrackerAlg.h"
@@ -95,7 +95,7 @@ class sbnd::crt::CRTAnalysis : public art::EDAnalyzer {
9595

9696
private:
9797

98-
CRTGeoAlg fCRTGeoAlg;
98+
art::ServiceHandle<CRTGeoService> fCRTGeoService;
9999
TPCGeoAlg fTPCGeoAlg;
100100
CRTBackTrackerAlg fCRTBackTrackerAlg;
101101

@@ -351,7 +351,6 @@ class sbnd::crt::CRTAnalysis : public art::EDAnalyzer {
351351

352352
sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p)
353353
: EDAnalyzer{p}
354-
, fCRTGeoAlg(p.get<fhicl::ParameterSet>("CRTGeoAlg"))
355354
, fCRTBackTrackerAlg(p.get<fhicl::ParameterSet>("CRTBackTrackerAlg", fhicl::ParameterSet()))
356355
{
357356
fMCParticleModuleLabel = p.get<std::string>("MCParticleModuleLabel", "largeant");
@@ -644,7 +643,7 @@ sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p)
644643

645644
if(fDebug)
646645
{
647-
for(auto const &[name, tagger] : fCRTGeoAlg.GetTaggers())
646+
for(auto const &[name, tagger] : fCRTGeoService->GetTaggers())
648647
{
649648
std::cout << "Tagger: " << tagger.name << '\n'
650649
<< "X - Min: " << tagger.minX << " Max: " << tagger.maxX << '\n'
@@ -654,7 +653,7 @@ sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p)
654653

655654
std::cout << std::endl;
656655

657-
for(auto const &[name, module] : fCRTGeoAlg.GetModules())
656+
for(auto const &[name, module] : fCRTGeoService->GetModules())
658657
{
659658
std::cout << "Module: " << module.name << " (" << module.taggerName << ")" << '\n';
660659
if(module.minos)
@@ -667,7 +666,7 @@ sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p)
667666

668667
std::cout << std::endl;
669668

670-
for(auto const &[name, sipm] : fCRTGeoAlg.GetSiPMs())
669+
for(auto const &[name, sipm] : fCRTGeoService->GetSiPMs())
671670
{
672671
std::cout << "SiPM: " << sipm.channel << " (" << sipm.channel/32 << " - " << sipm.channel%32 << ")" << '\n'
673672
<< "x: " << sipm.x << " y: " << sipm.y << " z: " << sipm.z << std::endl;
@@ -1127,7 +1126,7 @@ void sbnd::crt::CRTAnalysis::AnalyseFEBDatas(std::vector<art::Ptr<FEBData>> &FEB
11271126
const auto data = FEBDataVec[i];
11281127

11291128
_feb_mac5[i] = data->Mac5();
1130-
_feb_tagger[i] = fCRTGeoAlg.AuxDetIndexToTaggerEnum(data->Mac5());
1129+
_feb_tagger[i] = fCRTGeoService->AuxDetIndexToTaggerEnum(data->Mac5());
11311130
_feb_flags[i] = data->Flags();
11321131
_feb_ts0[i] = data->Ts0();
11331132
_feb_ts1[i] = data->Ts1();
@@ -1166,7 +1165,7 @@ void sbnd::crt::CRTAnalysis::AnalyseCRTStripHits(const art::Event &e, const std:
11661165
const auto hit = CRTStripHitVec[i];
11671166

11681167
_sh_channel[i] = hit->Channel();
1169-
_sh_tagger[i] = fCRTGeoAlg.ChannelToTaggerEnum(hit->Channel());
1168+
_sh_tagger[i] = fCRTGeoService->ChannelToTaggerEnum(hit->Channel());
11701169
_sh_ts0[i] = hit->Ts0();
11711170
_sh_ts1[i] = hit->Ts1();
11721171
_sh_unixs[i] = hit->UnixS();
@@ -1180,8 +1179,8 @@ void sbnd::crt::CRTAnalysis::AnalyseCRTStripHits(const art::Event &e, const std:
11801179
if(!fDataMode && fTruthMatch)
11811180
{
11821181
const CRTBackTrackerAlg::TruthMatchMetrics truthMatch = fCRTBackTrackerAlg.TruthMatching(e, hit);
1183-
const std::vector<double> localpos = fCRTGeoAlg.StripWorldToLocalPos(hit->Channel(), truthMatch.deposit.x, truthMatch.deposit.y, truthMatch.deposit.z);
1184-
const double width = fCRTGeoAlg.GetStrip(hit->Channel()).width;
1182+
const std::vector<double> localpos = fCRTGeoService->StripWorldToLocalPos(hit->Channel(), truthMatch.deposit.x, truthMatch.deposit.y, truthMatch.deposit.z);
1183+
const double width = fCRTGeoService->GetStrip(hit->Channel()).width;
11851184

11861185
_sh_truth_trackid[i] = truthMatch.trackid;
11871186
_sh_truth_completeness[i] = truthMatch.completeness;
@@ -1293,11 +1292,11 @@ void sbnd::crt::CRTAnalysis::AnalyseCRTClusters(const art::Event &e, const std::
12931292
*/
12941293
if(spacepoints.size() == 1)
12951294
{
1296-
double pe0 = fCRTGeoAlg.GetSiPM( striphit->Channel() ).gain * striphit->ADC1();
1297-
double pe1 = fCRTGeoAlg.GetSiPM( striphit->Channel() + 1 ).gain * striphit->ADC2();
1295+
double pe0 = fCRTGeoService->GetSiPM( striphit->Channel() ).gain * striphit->ADC1();
1296+
double pe1 = fCRTGeoService->GetSiPM( striphit->Channel() + 1 ).gain * striphit->ADC2();
12981297
double pe = pe0 + pe1;
12991298

1300-
double dist = fCRTGeoAlg.DistanceDownStrip( spacepoints[0]->Pos(), striphit->Channel() );
1299+
double dist = fCRTGeoService->DistanceDownStrip( spacepoints[0]->Pos(), striphit->Channel() );
13011300

13021301
double corr = std::pow( dist - fPEAttenuation, 2.0 ) / std::pow( fPEAttenuation, 2.0 );
13031302
double tw_pe = pe * corr;

sbndcode/CRT/CRTAna/crtana_sbnd.fcl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
#include "crtgeoalg_sbnd.fcl"
21
#include "crtbacktrackeralg_sbnd.fcl"
32
#include "crtsimmodules_sbnd.fcl"
43

54
BEGIN_PROLOG
65

76
crtana_sbnd:
87
{
9-
CRTGeoAlg: @local::crtgeoalg_sbnd
108
CRTBackTrackerAlg: @local::crtbacktrackeralg_sbnd
119
PEAttenuation: @local::sbnd_crtsim.DetSimParams.NpeScaleShift
1210
PropDelay: @local::sbnd_crtsim.DetSimParams.PropDelay

sbndcode/CRT/CRTAna/run_crtana.fcl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include "crtgeoservice_sbnd.fcl"
12
#include "crtana_sbnd.fcl"
23
#include "simulationservices_sbnd.fcl"
34

@@ -12,6 +13,7 @@ services:
1213
DetectorClocksService: @local::sbnd_detectorclocks
1314
LArPropertiesService: @local::sbnd_properties
1415
DetectorPropertiesService: @local::sbnd_detproperties
16+
CRTGeoService: @local::crtgeoservice_sbnd
1517
}
1618

1719
source:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "sbnd_trackcalo_skimmer.fcl"
2+
#include "run_crtana.fcl"
3+
4+
services.SpaceCharge: @local::sbnd_spacecharge
5+
6+
physics.analyzers.caloskim: @local::caloskim_nodigits_goldentracks
7+
8+
physics.ana: [ crtana, caloskim ]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#include "crt_channel_map_service.fcl"
2+
#include "crt_calib_service.fcl"
3+
#include "run_crtana_calibntuples.fcl"
4+
5+
services.ParticleInventoryService: @erase
6+
services.BackTrackerService: @erase
7+
8+
services.CRTChannelMapService: @local::crt_channel_map_standard
9+
services.CRTCalibService: @local::crt_calib_service
10+
services.CRTGeoService: @local::crtgeoservice_data_sbnd
11+
12+
physics.analyzers.caloskim.G4producer: ""
13+
physics.analyzers.caloskim.SimChannelproducer: ""
14+
15+
physics.analyzers.crtana: @local::crtana_data_sbnd

sbndcode/CRT/CRTAna/run_crtana_data.fcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ services.BackTrackerService: @erase
77

88
services.CRTChannelMapService: @local::crt_channel_map_standard
99
services.CRTCalibService: @local::crt_calib_service
10+
services.CRTGeoService: @local::crtgeoservice_data_sbnd
1011

1112
physics.analyzers.crtana: @local::crtana_data_sbnd

sbndcode/CRT/CRTBackTracker/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ art_make_library(
22
SOURCE CRTBackTrackerAlg.cc
33
LIBRARIES
44
sbnobj::SBND_CRT
5-
sbndcode::GeoWrappers
5+
sbndcode::TPCGeoAlg
6+
sbndcode_Geometry_GeometryWrappers_CRTGeoService_service
67
larsim::MCCheater_ParticleInventoryService_service
78
)
89

0 commit comments

Comments
 (0)