Skip to content

Commit 749e031

Browse files
Merge pull request #505 from SBNSoftware/develop
Updates from develop
2 parents de192fe + 9399278 commit 749e031

File tree

8 files changed

+40
-33
lines changed

8 files changed

+40
-33
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
1717

1818
find_package(cetmodules 3.20.00 REQUIRED)
19-
project(sbncode VERSION 10.01.03 LANGUAGES CXX)
19+
project(sbncode VERSION 10.03.01 LANGUAGES CXX)
2020

2121
message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================")
2222

sbncode/CAFMaker/CAFMaker_module.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,12 +1559,8 @@ void CAFMaker::produce(art::Event& evt) noexcept {
15591559
if(crtpmtmatch_handle.isValid()){
15601560
const std::vector<sbn::crt::CRTPMTMatching> &crtpmtmatches = *crtpmtmatch_handle;
15611561
for (unsigned i = 0; i < crtpmtmatches.size(); i++) {
1562-
int topen = 0, topex = 0, sideen = 0, sideex = 0; // bottomen = 0, bottomex = 0;
15631562
srcrtpmtmatches.emplace_back();
1564-
FillCRTPMTMatch(crtpmtmatches[i],
1565-
topen, topex, sideen, sideex,
1566-
//bottomen, bottomex,
1567-
srcrtpmtmatches.back());
1563+
FillCRTPMTMatch(crtpmtmatches[i], srcrtpmtmatches.back());
15681564
}
15691565
}
15701566

sbncode/CAFMaker/FillReco.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ namespace caf
141141
}
142142

143143
void FillCRTPMTMatch(const sbn::crt::CRTPMTMatching &match,
144-
int &topen, int &topex, int &sideen, int &sideex,
145-
//int &bottomen, int &bottomex,
146144
caf::SRCRTPMTMatch &srmatch,
147145
bool allowEmpty){
148146
// allowEmpty does not (yet) matter here
@@ -159,6 +157,7 @@ namespace caf
159157
srmatch.flashPosition = SRVector3D (match.flashPosition.X(), match.flashPosition.Y(), match.flashPosition.Z());
160158
srmatch.flashYWidth = match.flashYWidth;
161159
srmatch.flashZWidth = match.flashZWidth;
160+
unsigned int topen = 0, topex = 0, sideen = 0, sideex = 0;
162161
for(const auto& matchedCRTHit : match.matchedCRTHits){
163162
caf::SRMatchedCRT matchedCRT;
164163
matchedCRT.PMTTimeDiff = matchedCRTHit.PMTTimeDiff;

sbncode/CAFMaker/FillReco.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ namespace caf
222222
caf::SROpFlash &srflash,
223223
bool allowEmpty = false);
224224
void FillCRTPMTMatch(const sbn::crt::CRTPMTMatching &match,
225-
int &topen, int &topex, int &sideen, int &sidex,
226-
//int &bottomen, int &bottomex,
227225
caf::SRCRTPMTMatch &srmatch,
228226
bool allowEmpty = false);
229227

sbncode/Cluster3D/SnippetHit3DBuilderSBN_tool.cc

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
// LArSoft includes
2626
#include "larcore/Geometry/Geometry.h"
2727
#include "larcore/Geometry/WireReadout.h"
28+
#include "larcorealg/Geometry/WireReadoutGeom.h"
2829
#include "lardata/ArtDataHelper/HitCreator.h"
2930
#include "lardata/DetectorInfoServices/DetectorClocksService.h"
3031
#include "lardata/DetectorInfoServices/DetectorPropertiesService.h"
@@ -369,6 +370,7 @@ void SnippetHit3DBuilderSBN::configure(fhicl::ParameterSet const &pset)
369370
m_outputHistograms = pset.get<bool >("OutputHistograms", false);
370371
m_makeAssociations = pset.get<bool >("MakeAssociations", false);
371372

373+
m_geometry = art::ServiceHandle<geo::Geometry const>{}.get();
372374
m_wireReadout = &art::ServiceHandle<geo::WireReadout const>{}->Get();
373375

374376
// Returns the wire pitch per plane assuming they will be the same for all TPCs
@@ -1822,27 +1824,28 @@ void SnippetHit3DBuilderSBN::CollectArtHits(const art::Event& evt) const
18221824
std::map<geo::PlaneID,double> planeIDToPositionMap;
18231825

18241826
// Initialize the plane to hit vector map
1825-
for(auto const& tpcID : m_geometry->Iterate<geo::TPCID>())
1827+
for(auto const& tpcGeo : m_geometry->Iterate<geo::TPCGeo>())
18261828
{
1827-
m_planeToSnippetHitMap[geo::PlaneID(tpcID,0)] = SnippetHitMap();
1828-
m_planeToSnippetHitMap[geo::PlaneID(tpcID,1)] = SnippetHitMap();
1829-
m_planeToSnippetHitMap[geo::PlaneID(tpcID,2)] = SnippetHitMap();
1829+
m_planeToSnippetHitMap[geo::PlaneID(tpcGeo.ID(),0)] = SnippetHitMap();
1830+
m_planeToSnippetHitMap[geo::PlaneID(tpcGeo.ID(),1)] = SnippetHitMap();
1831+
m_planeToSnippetHitMap[geo::PlaneID(tpcGeo.ID(),2)] = SnippetHitMap();
18301832

1831-
// Should we provide output?
1832-
if (!m_weHaveAllBeenHereBefore)
1833-
{
1834-
std::ostringstream outputString;
1833+
// Should we provide output?
1834+
if (!m_weHaveAllBeenHereBefore)
1835+
{
1836+
std::ostringstream outputString;
18351837

1836-
outputString << "***> plane 0 offset: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcID,0))->second
1837-
<< ", plane 1: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcID,1))->second
1838-
<< ", plane 2: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcID,2))->second << "\n";
1839-
outputString << " Det prop plane 0: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcID,0)) << ", plane 1: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcID,1)) << ", plane 2: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcID,2)) << ", Trig: " << trigger_offset(clock_data) << "\n";
1840-
debugMessage += outputString.str() + "\n";
1841-
}
1838+
outputString << "***> plane 0 offset: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcGeo.ID(),0))->second
1839+
<< ", plane 1: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcGeo.ID(),1))->second
1840+
<< ", plane 2: " << m_PlaneToT0OffsetMap.find(geo::PlaneID(tpcGeo.ID(),2))->second << "\n";
1841+
outputString << " Det prop plane 0: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcGeo.ID(),0)) << ", plane 1: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcGeo.ID(),1)) << ", plane 2: " << det_prop.GetXTicksOffset(geo::PlaneID(tpcGeo.ID(),2)) << ", Trig: " << trigger_offset(clock_data) << "\n";
1842+
1843+
debugMessage += outputString.str() + "\n";
1844+
}
18421845

1843-
geo::PlaneID const planeID2{tpcID, 2};
1844-
double xPosition(det_prop.ConvertTicksToX(0., planeID2));
1845-
planeIDToPositionMap[planeID2] = xPosition;
1846+
geo::PlaneID const planeID2{tpcGeo.ID(), 2};
1847+
double xPosition(det_prop.ConvertTicksToX(0., planeID2));
1848+
planeIDToPositionMap[planeID2] = xPosition;
18461849
}
18471850

18481851
if (!m_weHaveAllBeenHereBefore)

sbncode/DetSim/FilterSimEnergyDeposits_module.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
#include "fhiclcpp/ParameterSet.h"
1212
#include "messagefacility/MessageLogger/MessageLogger.h"
1313
#include "larcore/Geometry/Geometry.h"
14+
#include "larcore/Geometry/WireReadout.h"
1415
#include "larcorealg/Geometry/GeometryCore.h"
16+
#include "larcorealg/Geometry/WireReadoutGeom.h"
1517
#include "larcore/CoreUtils/ServiceUtil.h"
1618
#include "larcorealg/Geometry/BoxBoundedGeo.h"
1719

@@ -99,9 +101,13 @@ void FilterSimEnergyDeposits::produce(art::Event& e)
99101
const double syratio = sedep.ScintYieldRatio();
100102
const double energy = sedep.Energy();
101103
geo::Point_t start = sedep.Start();
102-
if (TPC) TPC->DriftPoint(start, ShiftX(std::abs(sedep.Start().Z())));
103104
geo::Point_t end = sedep.End();
104-
if (TPC) TPC->DriftPoint(end, ShiftX(std::abs(sedep.End().Z())));
105+
if (TPC) {
106+
auto const& wireReadout = art::ServiceHandle<geo::WireReadout const>()->Get();
107+
auto const& referencePlane = wireReadout.FirstPlane(TPC->ID());
108+
referencePlane.DriftPoint(start, ShiftX(std::abs(sedep.Start().Z())));
109+
referencePlane.DriftPoint(end, ShiftX(std::abs(sedep.End().Z())));
110+
}
105111
const double startT = sedep.StartT();
106112
const double endT = sedep.EndT();
107113
const int thisID = sedep.TrackID();

sbncode/EventGenerator/MeVPrtl/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,9 @@ generators for the Higgs Portal and a HNL decaying to a mu+pi final
33
state.
44

55
Documentation on the event generators for SBN is here:
6+
67
https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=22100
8+
9+
and here:
10+
11+
https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=32019.

ups/product_deps

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,13 @@ libdir fq_dir lib
254254
product version qual flags <table_format=2>
255255
genie_xsec v3_04_00 -
256256
larcv2 v2_2_6 -
257-
larsoft v10_01_03 -
257+
larsoft v10_03_01 -
258258
sbnanaobj v09_23_02_01 -
259-
sbndaq_artdaq_core v1_10_03 -
259+
sbndaq_artdaq_core v1_10_04 -
260260
sbndata v01_07 -
261-
sbnobj v10_00_00 -
261+
sbnobj v10_00_02 -
262262
systematicstools v01_04_04 -
263-
nusystematics v1_05_03 -
263+
nusystematics v1_05_04 -
264264
cetmodules v3_24_01 - only_for_build
265265
end_product_list
266266
####################################

0 commit comments

Comments
 (0)