Skip to content

Commit a06aaa7

Browse files
committed
Added a CRT Veto Producer module. Stores boolean values based on CRT hit information
1 parent 3ee3e9d commit a06aaa7

7 files changed

Lines changed: 58 additions & 22 deletions

File tree

sbndcode/CRT/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ add_subdirectory(CRTAna)
22
add_subdirectory(CRTBackTracker)
33
add_subdirectory(CRTEventDisplay)
44
add_subdirectory(CRTReco)
5+
add_subdirectory(CRTVeto)
56
add_subdirectory(CRTSimulation)
67
add_subdirectory(CRTTPCMatching)
78
add_subdirectory(CRTUtils)

sbndcode/CRT/CRTReco/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,5 @@ simple_plugin(
3434
Eigen3::Eigen
3535
)
3636

37-
simple_plugin(
38-
CRTVetoProducer module
39-
sbnobj::SBND_CRT
40-
sbndcode_CRTUtils
41-
sbndcode_GeoWrappers
42-
)
4337

4438
install_fhicl()

sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,4 @@ crttrackproducer_data_sbnd.CRTGeoAlg: @local::crtgeoalg_data_sbnd
8383
crttrackproducer_data_sbnd.UseTs0: true
8484
crttrackproducer_data_sbnd.MaskedTaggers: [ ]
8585

86-
crtvetoproducer_sbnd:
87-
{
88-
CRTGeoAlg: @local::crtgeoalg_sbnd
89-
CRTSpacePointModuleLabel: "crtspacepoints"
90-
WindowStart: 0.4
91-
WindowEnd: 2.0
92-
module_type: "CRTVetoProducer"
93-
}
94-
95-
crtvetoproducer_data_sbnd: @local::crtvetoproducer_sbnd
96-
crtvetoproducer_data_sbnd.CRTGeoAlg: @local::crtgeoalg_data_sbnd
97-
98-
9986
END_PROLOG
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
art_make_library(
2+
LIBRARIES
3+
sbnobj::SBND_CRT
4+
sbndcode_GeoWrappers
5+
)
6+
7+
simple_plugin(
8+
CRTVetoProducer module
9+
sbnobj::SBND_CRT
10+
sbndcode_CRTUtils
11+
sbndcode_GeoWrappers
12+
)
13+
14+
install_fhicl()

sbndcode/CRT/CRTReco/CRTVetoProducer_module.cc renamed to sbndcode/CRT/CRTVeto/CRTVetoProducer_module.cc

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,21 @@ void sbnd::crt::CRTVetoProducer::produce(art::Event& e)
108108
double x = CRTSpacePointVec[i]->X();
109109
double y = CRTSpacePointVec[i]->Y();
110110
double z = CRTSpacePointVec[i]->Z();
111-
double t = CRTSpacePointVec[i]->Ts0();
111+
double t = CRTSpacePointVec[i]->Ts0()/1000; // Convert to us
112+
113+
// Debugging statement
114+
115+
/*
116+
if ( (t <= 2) && (t >= 0.4) ) {
117+
std::cout << std::endl;
118+
std::cout << std::endl;
119+
std::cout << "Found a CRT Hit within the South Wall Top Hat Window!" << std::endl;
120+
std::cout << std::endl;
121+
std::cout << std::endl;
122+
123+
}
124+
*/
125+
112126
// check if in the beam window --> Make configureable
113127
if ((t > fWindowEnd) || (t < fWindowStart)) {
114128
continue;
@@ -148,6 +162,7 @@ void sbnd::crt::CRTVetoProducer::produce(art::Event& e)
148162
bool v1 = false;
149163
bool v2 = false;
150164
bool v3 = false;
165+
bool v4 = false;
151166

152167
// V0
153168
if ((Nwalls_all + Ntop) > 0) {
@@ -165,9 +180,12 @@ void sbnd::crt::CRTVetoProducer::produce(art::Event& e)
165180
if ( (Nwalls_noNorth > 0) || ((TL > 0) && (TH > 0)) ) {
166181
v3 = true;
167182
}
183+
if (S > 0) {
184+
v4 = true;
185+
}
168186

169187
//crtveto = CRTVeto(v0, v1, v2, v3);
170-
auto crtveto = std::make_unique<CRTVeto>(v0, v1, v2, v3);
188+
auto crtveto = std::make_unique<CRTVeto>(v0, v1, v2, v3, v4);
171189

172190
e.put(std::move(crtveto));
173191
//e.put(std::move(vetoSpacePointAssn));
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include "crtgeoalg_sbnd.fcl"
2+
#include "crtsimmodules_sbnd.fcl"
3+
4+
BEGIN_PROLOG
5+
6+
7+
crtvetoproducer_sbnd:
8+
{
9+
CRTGeoAlg: @local::crtgeoalg_sbnd
10+
CRTSpacePointModuleLabel: "crtspacepoints"
11+
WindowStart: 0.4
12+
WindowEnd: 2.0
13+
module_type: "CRTVetoProducer"
14+
}
15+
16+
crtvetoproducer_data_sbnd: @local::crtvetoproducer_sbnd
17+
crtvetoproducer_data_sbnd.CRTGeoAlg: @local::crtgeoalg_data_sbnd
18+
19+
20+
END_PROLOG
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "services_sbnd.fcl"
22
#include "rootoutput_sbnd.fcl"
3-
#include "crtrecoproducers_sbnd.fcl"
3+
#include "crtvetoproducer_sbnd.fcl"
44

55
process_name: CRTVeto
66

@@ -9,6 +9,8 @@ services:
99
@table::sbnd_services
1010
}
1111

12+
services.DetectorClocksService.InheritClockConfig: false
13+
1214
source:
1315
{
1416
module_type: RootInput

0 commit comments

Comments
 (0)