Skip to content

Commit ca13a28

Browse files
authored
Merge branch 'develop' into feature/aantonak_crtveto
2 parents 7c0707e + 3916a93 commit ca13a28

394 files changed

Lines changed: 90978 additions & 5705 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515

1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

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

2222
# for CI:
23-
# project(sbndcode VERSION 10.04.03)
23+
# project(sbndcode VERSION 10.04.07)
2424

2525
message(STATUS "\n")
2626
message(STATUS "================================= ${PROJECT_NAME} =================================")

sbndcode/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ add_subdirectory(ChannelMaps)
4545

4646
# for CVN
4747
add_subdirectory(SBNDCVN)
48+
49+
add_subdirectory(TPCPMTBarycenterMatching)

sbndcode/CRT/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ art_make_library(
2828
cetlib::cetlib
2929
)
3030

31-
cet_build_plugin( CRTAuxDetInitializer art::tool
31+
cet_build_plugin( CRTAuxDetInitializerSBND art::tool
32+
SOURCE
33+
CRTAuxDetInitializerSBND_tool.cc
34+
CRTAuxDetInitializerSBND.cxx
3235
LIBRARIES REG
3336
larcorealg::Geometry
3437
sbndcode_CRTData

sbndcode/CRT/CRTAna/CRTAnalysis_module.cc

Lines changed: 337 additions & 139 deletions
Large diffs are not rendered by default.

sbndcode/CRT/CRTAna/CRTCalibAna_module.cc

Lines changed: 0 additions & 1331 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include "crtgeoalg_sbnd.fcl"
2+
#include "crtbacktrackeralg_sbnd.fcl"
3+
#include "crtsimmodules_sbnd.fcl"
4+
5+
BEGIN_PROLOG
6+
7+
crtana_sbnd:
8+
{
9+
CRTGeoAlg: @local::crtgeoalg_sbnd
10+
CRTBackTrackerAlg: @local::crtbacktrackeralg_sbnd
11+
PEAttenuation: @local::sbnd_crtsim.DetSimParams.NpeScaleShift
12+
PropDelay: @local::sbnd_crtsim.DetSimParams.PropDelay
13+
TimeWalkNorm: @local::sbnd_crtsim.DetSimParams.TDelayNorm
14+
TimeWalkScale: @local::sbnd_crtsim.DetSimParams.TDelayScale
15+
TruthMatch: false
16+
module_type: "CRTAnalysis"
17+
}
18+
19+
crtana_data_sbnd: @local::crtana_sbnd
20+
crtana_data_sbnd.FEBDataModuleLabel: "crtdecoder"
21+
crtana_data_sbnd.DataMode: true
22+
crtana_data_sbnd.NoTPC: true
23+
crtana_data_sbnd.HasPTB: true
24+
crtana_data_sbnd.HasTDC: true
25+
26+
END_PROLOG

sbndcode/CRT/CRTAna/run_crtana.fcl

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#include "crtgeoalg_sbnd.fcl"
2-
#include "crtbacktrackeralg_sbnd.fcl"
3-
#include "crtrecoproducers_sbnd.fcl"
1+
#include "crtana_sbnd.fcl"
42
#include "simulationservices_sbnd.fcl"
53

64
process_name: CRTAnalyzer
@@ -9,9 +7,11 @@ services:
97
{
108
TFileService: { fileName: "crtana_sbnd.root" }
119
@table::sbnd_basic_services
12-
ParticleInventoryService: @local::sbnd_particleinventoryservice
13-
BackTrackerService: @local::sbnd_backtrackerservice
14-
DetectorClocksService: @local::sbnd_detectorclocks
10+
ParticleInventoryService: @local::sbnd_particleinventoryservice
11+
BackTrackerService: @local::sbnd_backtrackerservice
12+
DetectorClocksService: @local::sbnd_detectorclocks
13+
LArPropertiesService: @local::sbnd_properties
14+
DetectorPropertiesService: @local::sbnd_detproperties
1515
}
1616

1717
source:
@@ -23,16 +23,7 @@ physics:
2323
{
2424
analyzers:
2525
{
26-
crtana:
27-
{
28-
module_type: "CRTAnalysis"
29-
CRTGeoAlg: @local::crtgeoalg_sbnd
30-
CRTBackTrackerAlg: @local::crtbacktrackeralg_sbnd
31-
PEAttenuation: @local::sbnd_crtsim.DetSimParams.NpeScaleShift
32-
PropDelay: @local::sbnd_crtsim.DetSimParams.PropDelay
33-
TimeWalkNorm: @local::sbnd_crtsim.DetSimParams.TDelayNorm
34-
TimeWalkScale: @local::sbnd_crtsim.DetSimParams.TDelayScale
35-
}
26+
crtana: @local::crtana_sbnd
3627
}
3728

3829
ana: [ crtana ]

sbndcode/CRT/CRTAna/run_crtana_data.fcl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,4 @@ services.BackTrackerService: @erase
88
services.CRTChannelMapService: @local::crt_channel_map_standard
99
services.CRTCalibService: @local::crt_calib_service
1010

11-
physics.analyzers.crtana.FEBDataModuleLabel: "crtdecoder"
12-
physics.analyzers.crtana.DataMode: true
13-
physics.analyzers.crtana.NoTPC: true
14-
physics.analyzers.crtana.HasPTB: true
15-
physics.analyzers.crtana.HasTDC: true
11+
physics.analyzers.crtana: @local::crtana_data_sbnd
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include "run_crtana_data.fcl"
2+
3+
physics.analyzers.crtana.NoTPC: false
4+
physics.analyzers.crtana.TPCTrackModuleLabel: "pandoraTrack"
5+
physics.analyzers.crtana.CRTSpacePointMatchingModuleLabel: "crtspacepointmatching"
6+
physics.analyzers.crtana.CRTTrackMatchingModuleLabel: "crttrackmatching"
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#include "CRTAuxDetInitializerSBND.h"
2+
3+
namespace sbnd::crt {
4+
5+
CRTAuxDetInitializerSBND::CRTAuxDetInitializerSBND(fhicl::ParameterSet const&) {}
6+
7+
geo::AuxDetReadoutInitializers
8+
CRTAuxDetInitializerSBND::initialize(std::vector<geo::AuxDetGeo> const& adgeo) const {
9+
geo::AuxDetReadoutInitializers result;
10+
// Map the AuxDetGeo names to their position in the sorted vector
11+
//
12+
// Each tagger is composed of scintillator modules, composed of 16 strips.
13+
// In the geometry, CRTStripArrays are AuxDets and CRTStrips are the
14+
// AuxDetSensitives. Each strip has two SiPM channels, one per optical
15+
// fiber (not in the geometry).
16+
//
17+
18+
for (size_t a=0; a<adgeo.size(); a++){
19+
std::string volName(adgeo[a].TotalVolume()->GetName());
20+
21+
long unsigned int number_scintillating_strips = 0;
22+
23+
if (strncmp(((adgeo[a].TotalVolume())->GetShape())->GetName(), "CRTstripMINOSArray", 18) == 0) {
24+
number_scintillating_strips = 20; //To account for the MINOS modules.
25+
}
26+
else {number_scintillating_strips = 16;}
27+
28+
size_t nsv = adgeo[a].NSensitiveVolume();
29+
if (nsv != number_scintillating_strips) {
30+
throw cet::exception("CRTChannelMap")
31+
<< "Wrong number of sensitive volumes for CRT volume "
32+
<< volName << " (got " << nsv << ", expected 16)" << std::endl;
33+
}
34+
35+
result.ADGeoToName[a] = volName;
36+
result.NameToADGeo[volName] = a;
37+
38+
if (volName.find("CRTStripArray") != std::string::npos) {
39+
for (size_t svID=0; svID<number_scintillating_strips; svID++) {
40+
for (size_t ich=0; ich<2; ich++) {
41+
size_t chID = 2 * svID + ich;
42+
result.ADGeoToChannelAndSV[a].push_back(std::make_pair(chID, svID));
43+
}
44+
}
45+
}
46+
}
47+
return result;
48+
}
49+
50+
} // namespace sbnd::crt

0 commit comments

Comments
 (0)