diff --git a/CMakeLists.txt b/CMakeLists.txt index 02f4250a3..a4254fd08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,7 @@ find_package( larcore REQUIRED ) find_package( larcorealg REQUIRED ) find_package( larcoreobj REQUIRED ) find_package( larreco REQUIRED ) +find_package( larrecodnn REQUIRED ) find_package( larana REQUIRED ) find_package( PostgreSQL REQUIRED ) find_package( hep_concurrency REQUIRED ) diff --git a/sbndcode/CMakeLists.txt b/sbndcode/CMakeLists.txt index 60d203e74..0e3d5e560 100644 --- a/sbndcode/CMakeLists.txt +++ b/sbndcode/CMakeLists.txt @@ -22,6 +22,7 @@ add_subdirectory(ShowerAna) add_subdirectory(Commissioning) add_subdirectory(Trigger) add_subdirectory(PTBAna) +add_subdirectory(Timing) # subdirectory for gallery stuff add_subdirectory(gallery) @@ -41,3 +42,6 @@ add_subdirectory(WireCell) add_subdirectory(Decoders) add_subdirectory(ChannelMaps) + +# for CVN +add_subdirectory(SBNDCVN) diff --git a/sbndcode/CRT/CRTAna/CRTAnalysis_module.cc b/sbndcode/CRT/CRTAna/CRTAnalysis_module.cc index 2e2db0684..31a5c8662 100644 --- a/sbndcode/CRT/CRTAna/CRTAnalysis_module.cc +++ b/sbndcode/CRT/CRTAna/CRTAnalysis_module.cc @@ -39,6 +39,7 @@ #include "sbndcode/CRT/CRTBackTracker/CRTBackTrackerAlg.h" #include "sbndcode/CRT/CRTUtils/CRTCommonUtils.h" #include "sbndcode/Decoders/PTB/sbndptb.h" +#include "sbndcode/Timing/SBNDRawTimingObj.h" namespace sbnd::crt { class CRTAnalysis; @@ -94,7 +95,7 @@ class sbnd::crt::CRTAnalysis : public art::EDAnalyzer { std::string fMCParticleModuleLabel, fSimDepositModuleLabel, fFEBDataModuleLabel, fCRTStripHitModuleLabel, fCRTClusterModuleLabel, fCRTSpacePointModuleLabel, fCRTTrackModuleLabel, fTPCTrackModuleLabel, fCRTSpacePointMatchingModuleLabel, fCRTTrackMatchingModuleLabel, fPFPModuleLabel, fPTBModuleLabel, - fTDCModuleLabel; + fTDCModuleLabel, fTimingReferenceModuleLabel; bool fDebug, fDataMode, fNoTPC, fHasPTB, fHasTDC; TTree* fTree; @@ -104,6 +105,8 @@ class sbnd::crt::CRTAnalysis : public art::EDAnalyzer { int _run; int _subrun; int _event; + int _crt_timing_reference_type; + int _crt_timing_reference_channel; //mc truth std::vector _mc_trackid; @@ -331,6 +334,7 @@ sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p) fPFPModuleLabel = p.get("PFPModuleLabel", "pandora"); fPTBModuleLabel = p.get("PTBModuleLabel", "ptbdecoder"); fTDCModuleLabel = p.get("TDCModuleLabel", "tdcdecoder"); + fTimingReferenceModuleLabel = p.get("TimingReferenceModuleLabel", "crtstrips"); fDebug = p.get("Debug", false); fDataMode = p.get("DataMode", false); fNoTPC = p.get("NoTPC", false); @@ -346,6 +350,8 @@ sbnd::crt::CRTAnalysis::CRTAnalysis(fhicl::ParameterSet const& p) fTree->Branch("run", &_run); fTree->Branch("subrun", &_subrun); fTree->Branch("event", &_event); + fTree->Branch("crt_timing_reference_type", &_crt_timing_reference_type); + fTree->Branch("crt_timing_reference_channel", &_crt_timing_reference_channel); if(!fDataMode) { @@ -621,6 +627,17 @@ void sbnd::crt::CRTAnalysis::analyze(art::Event const& e) if(fDebug) std::cout << "This is event " << _run << "-" << _subrun << "-" << _event << std::endl; + _crt_timing_reference_type = -1; + _crt_timing_reference_channel = -1; + + art::Handle TimingReferenceHandle; + e.getByLabel(fTimingReferenceModuleLabel, TimingReferenceHandle); + if(TimingReferenceHandle.isValid()) + { + _crt_timing_reference_type = TimingReferenceHandle->timingType; + _crt_timing_reference_channel = TimingReferenceHandle->timingChannel; + } + if(fHasPTB) { // Get PTBs diff --git a/sbndcode/CRT/CRTReco/CMakeLists.txt b/sbndcode/CRT/CRTReco/CMakeLists.txt index 0e4c8e547..7c79d61c3 100644 --- a/sbndcode/CRT/CRTReco/CMakeLists.txt +++ b/sbndcode/CRT/CRTReco/CMakeLists.txt @@ -7,6 +7,7 @@ art_make_library( simple_plugin( CRTStripHitProducer module + artdaq_core::artdaq-core_Data sbnobj::SBND_CRT sbnobj::SBND_Timing sbndcode_GeoWrappers diff --git a/sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.h b/sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.h index ecac4e3dc..e9e4111a2 100644 --- a/sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.h +++ b/sbndcode/CRT/CRTReco/CRTClusterCharacterisationAlg.h @@ -75,7 +75,6 @@ namespace sbnd::crt { CRTGeoAlg fCRTGeoAlg; - bool fUseT1; double fTimeOffset; double fOverlapBuffer; double fPEAttenuation; diff --git a/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc b/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc index 590713126..99fa2a373 100644 --- a/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc +++ b/sbndcode/CRT/CRTReco/CRTStripHitProducer_module.cc @@ -17,6 +17,8 @@ #include "fhiclcpp/ParameterSet.h" #include "messagefacility/MessageLogger/MessageLogger.h" +#include "artdaq-core/Data/RawEvent.hh" + #include "lardata/Utilities/AssociationUtil.h" #include "sbnobj/SBND/CRT/FEBData.hh" @@ -24,8 +26,11 @@ #include "sbnobj/SBND/Timing/DAQTimestamp.hh" #include "sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h" +#include "sbndcode/Decoders/PTB/sbndptb.h" +#include "sbndcode/Timing/SBNDRawTimingObj.h" #include +#include namespace sbnd::crt { class CRTStripHitProducer; @@ -43,24 +48,33 @@ class sbnd::crt::CRTStripHitProducer : public art::EDProducer { void produce(art::Event& e) override; - std::vector CreateStripHits(art::Ptr &data, const uint32_t ref_unix, - const uint64_t etrig_time); + std::vector CreateStripHits(art::Ptr &data, const uint32_t ref_time_s, + const uint32_t ref_time_ns); std::set UnixSet(const std::vector> &datas); + bool SPECTDCReference(art::Event& e, const uint64_t &raw_ts, uint64_t &ref_time); + bool PTBHLTReference(art::Event& e, const uint64_t &raw_ts, uint64_t &ref_time, uint32_t &hlt_code); private: - CRTGeoAlg fCRTGeoAlg; - std::string fFEBDataModuleLabel; - uint16_t fADCThreshold; - std::vector fErrorCoeff; - bool fAllowFlag1; - bool fApplyTs1Window; - int64_t fTs1Min; - int64_t fTs1Max; - bool fCorrectForDifferentSecond; - bool fReferenceTs0ToETrig; - std::string fSPECTDCModuleLabel; - uint32_t fSPECTDCETrigChannel; + CRTGeoAlg fCRTGeoAlg; + std::string fFEBDataModuleLabel; + uint16_t fADCThreshold; + std::vector fErrorCoeff; + bool fAllowFlag1; + bool fApplyTs1Window; + int64_t fTs1Min; + int64_t fTs1Max; + bool fCorrectForDifferentSecond; + bool fReferenceTs0; + int fTimingType; + std::string fDAQHeaderModuleLabel; + std::string fDAQHeaderInstanceLabel; + uint32_t fRawTSCorrection; + uint32_t fMaxAllowedRefTimeDiff; + std::string fSPECTDCModuleLabel; + uint32_t fSPECTDCETrigChannel; + std::string fPTBModuleLabel; + std::vector fAllowedPTBHLTs; }; @@ -75,70 +89,96 @@ sbnd::crt::CRTStripHitProducer::CRTStripHitProducer(fhicl::ParameterSet const& p , fTs1Min(p.get("Ts1Min", 0)) , fTs1Max(p.get("Ts1Max", std::numeric_limits::max())) , fCorrectForDifferentSecond(p.get("CorrectForDifferentSecond")) - , fReferenceTs0ToETrig(p.get("ReferenceTs0ToETrig")) + , fReferenceTs0(p.get("ReferenceTs0")) + , fTimingType(p.get("TimingType", 0)) + , fDAQHeaderModuleLabel(p.get("DAQHeaderModuleLabel", "")) + , fDAQHeaderInstanceLabel(p.get("DAQHeaderInstanceLabel", "")) + , fRawTSCorrection(p.get("RawTSCorrection", 0)) + , fMaxAllowedRefTimeDiff(p.get("MaxAllowedRefTimeDiff", 0)) , fSPECTDCModuleLabel(p.get("SPECTDCModuleLabel", "")) , fSPECTDCETrigChannel(p.get("SPECTDCETrigChannel", 4)) + , fPTBModuleLabel(p.get("PTBModuleLabel", "")) + , fAllowedPTBHLTs(p.get>("AllowedPTBHLTs", {})) { produces>(); produces>(); + + if(fReferenceTs0) + produces(); } void sbnd::crt::CRTStripHitProducer::produce(art::Event& e) { - auto stripHitVec = std::make_unique>(); - auto stripHitDataAssn = std::make_unique>(); - + auto stripHitVec = std::make_unique>(); + auto stripHitDataAssn = std::make_unique>(); + auto timingReferenceInfo = std::make_unique(); + art::Handle> FEBDataHandle; e.getByLabel(fFEBDataModuleLabel, FEBDataHandle); std::vector> FEBDataVec; art::fill_ptr_vector(FEBDataVec, FEBDataHandle); - // We get a set of the unix times of all the FEBDatas. In data they should only ever take up to 2 values. - // This comes if the PPS reset arrives mid-event. In the strip hit creation method we correct for this. - // These lines define our prescription for doing so. We take the later unix time as the reference point. - // The actual correction should always be turned off for simulation (by setting CorrectForDifferentSecond to false). - std::set unix_set = UnixSet(FEBDataVec); - const uint32_t ref_unix = unix_set.size() ? *unix_set.rbegin() : 0; - - uint64_t etrig_time = 0; + uint64_t raw_ts = 0, ref_time = 0; + uint32_t ref_time_s = 0, ref_time_ns = 0; - if(fReferenceTs0ToETrig) + if(fReferenceTs0) { - art::Handle> TDCHandle; - e.getByLabel(fSPECTDCModuleLabel, TDCHandle); + art::Handle DAQHeaderHandle; + e.getByLabel(fDAQHeaderModuleLabel, fDAQHeaderInstanceLabel, DAQHeaderHandle); - if(TDCHandle.isValid() && TDCHandle->size() != 0) + if(DAQHeaderHandle.isValid()) { - std::vector> TDCVec; - art::fill_ptr_vector(TDCVec, TDCHandle); + artdaq::RawEvent rawHeaderEvent = artdaq::RawEvent(*DAQHeaderHandle); + raw_ts = rawHeaderEvent.timestamp() - fRawTSCorrection; + } - for(auto ts : TDCVec) - { - if(ts->Channel() == fSPECTDCETrigChannel) - { - etrig_time = ts->Timestamp() % static_cast(1e9); + int timingType = fTimingType; + int timingCh = 0; - if(fCorrectForDifferentSecond) - { - const uint64_t etrig_unix = ts->Timestamp() / static_cast(1e9); - const int64_t unix_diff = ref_unix - etrig_unix; - if(unix_diff != 0 && unix_diff != 1) - throw std::runtime_error("Unix timestamps differ by more than 1" + unix_diff); + if(timingType == 0) + { + uint64_t spec_tdc_ref_time = 0; - const bool previous_second = unix_diff == 1; + if(SPECTDCReference(e, raw_ts, spec_tdc_ref_time)) + { + ref_time = spec_tdc_ref_time; + timingCh = fSPECTDCETrigChannel; + } + else + ++timingType; + } - if(previous_second) - etrig_time -= static_cast(1e9); - } - } + if(timingType == 1) + { + uint64_t ptb_hlt_ref_time = 0; + uint32_t hlt_code = 0; + + if(PTBHLTReference(e, raw_ts, ptb_hlt_ref_time, hlt_code)) + { + ref_time = ptb_hlt_ref_time; + timingCh = hlt_code; } + else + ++timingType; } + + if(timingType == 2) + { + std::set unix_set = UnixSet(FEBDataVec); + ref_time = unix_set.size() ? *unix_set.rbegin() * static_cast(1e9) : 0; + } + + ref_time_s = ref_time / static_cast(1e9); + ref_time_ns = ref_time % static_cast(1e9); + + timingReferenceInfo->timingType = timingType; + timingReferenceInfo->timingChannel = timingCh; } for(auto data : FEBDataVec) { - std::vector newStripHits = CreateStripHits(data, ref_unix, etrig_time); + std::vector newStripHits = CreateStripHits(data, ref_time_s, ref_time_ns); for(auto hit : newStripHits) { @@ -149,10 +189,13 @@ void sbnd::crt::CRTStripHitProducer::produce(art::Event& e) e.put(std::move(stripHitVec)); e.put(std::move(stripHitDataAssn)); + + if(fReferenceTs0) + e.put(std::move(timingReferenceInfo)); } -std::vector sbnd::crt::CRTStripHitProducer::CreateStripHits(art::Ptr &data, const uint32_t ref_unix, - const uint64_t etrig_time) +std::vector sbnd::crt::CRTStripHitProducer::CreateStripHits(art::Ptr &data, const uint32_t ref_time_s, + const uint32_t ref_time_ns) { std::vector stripHits; @@ -175,21 +218,27 @@ std::vector sbnd::crt::CRTStripHitProducer::CreateStripH // For data events we correct the t0 time used for clustering if the // events fell either side of the PPS reset. - const int64_t unix_diff = ref_unix - unixs; - if(unix_diff != 0 && unix_diff != 1) - throw std::runtime_error("Unix timestamps differ by more than 1" + unix_diff); + const int64_t unix_diff = static_cast(ref_time_s) - static_cast(unixs); - const bool previous_second = unix_diff == 1; + if(unix_diff < -1 || unix_diff > 1) + { + throw std::runtime_error(Form("Unix timestamps differ by more than 1 (%li)", unix_diff)); + } - if(previous_second) + if(unix_diff == 1) { t0 -= static_cast(1e9); unixs += 1; } + else if(unix_diff == -1) + { + t0 += static_cast(1e9); + unixs -= 1; + } } - if(fReferenceTs0ToETrig) - t0 -= etrig_time; + if(fReferenceTs0) + t0 -= ref_time_ns; if(fApplyTs1Window && (t1 < fTs1Min || t1 > fTs1Max)) return stripHits; @@ -226,7 +275,7 @@ std::vector sbnd::crt::CRTStripHitProducer::CreateStripH if(pos - err < 0) err = pos; - stripHits.emplace_back(channel, t0, t1, ref_unix, pos, err, adc1, adc2); + stripHits.emplace_back(channel, t0, t1, ref_time_s, pos, err, adc1, adc2); } } @@ -245,4 +294,92 @@ std::set sbnd::crt::CRTStripHitProducer::UnixSet(const std::vector> TDCHandle; + e.getByLabel(fSPECTDCModuleLabel, TDCHandle); + + if(!TDCHandle.isValid() || TDCHandle->size() == 0) + return found; + + std::vector> TDCVec; + art::fill_ptr_vector(TDCVec, TDCHandle); + + uint64_t min_diff = std::numeric_limits::max(); + uint64_t min_diff_ts = 0; + + for(auto ts : TDCVec) + { + if(ts->Channel() == fSPECTDCETrigChannel) + { + uint64_t diff = raw_ts > ts->Timestamp() ? raw_ts - ts->Timestamp() : ts->Timestamp() - raw_ts; + + if(diff < min_diff) + { + min_diff = diff; + min_diff_ts = ts->Timestamp(); + found = true; + } + } + } + + if(min_diff > fMaxAllowedRefTimeDiff) + return false; + + ref_time = min_diff_ts; + + return found; +} + +bool sbnd::crt::CRTStripHitProducer::PTBHLTReference(art::Event& e, const uint64_t &raw_ts, uint64_t &ref_time, uint32_t &hlt_code) +{ + bool found = false; + + art::Handle> PTBHandle; + e.getByLabel(fPTBModuleLabel, PTBHandle); + + if(!PTBHandle.isValid() || PTBHandle->size() == 0) + return found; + + std::vector> PTBVec; + art::fill_ptr_vector(PTBVec, PTBHandle); + + uint64_t min_diff = std::numeric_limits::max(); + uint64_t min_diff_ts = 0; + + for(auto ptb : PTBVec) + { + for(auto hlt : ptb->GetHLTriggers()) + { + uint64_t hlt_timestamp = (hlt.timestamp * 20); + std::bitset<32> hlt_word_bitset = std::bitset<32>(hlt.trigger_word); + + for(uint32_t allowed_hlt : fAllowedPTBHLTs) + { + if(hlt_word_bitset[allowed_hlt]) + { + uint64_t diff = raw_ts > hlt_timestamp ? raw_ts - hlt_timestamp : hlt_timestamp - raw_ts; + + if(diff < min_diff) + { + min_diff = diff; + min_diff_ts = hlt_timestamp; + hlt_code = allowed_hlt; + found = true; + } + } + } + } + } + + if(min_diff > fMaxAllowedRefTimeDiff) + return false; + + ref_time = min_diff_ts; + + return found; +} + DEFINE_ART_MODULE(sbnd::crt::CRTStripHitProducer) diff --git a/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl b/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl index 40a1fadd6..2162d3afb 100644 --- a/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl +++ b/sbndcode/CRT/CRTReco/crtrecoproducers_sbnd.fcl @@ -12,7 +12,7 @@ crtstriphitproducer_sbnd: AllowFlag1: false ApplyTs1Window: false CorrectForDifferentSecond: false - ReferenceTs0ToETrig: false + ReferenceTs0: false module_type: "CRTStripHitProducer" } @@ -21,8 +21,15 @@ crtstriphitproducer_data_sbnd.CRTGeoAlg: @local::crtgeoalg_data_ crtstriphitproducer_data_sbnd.FEBDataModuleLabel: "crtdecoder" crtstriphitproducer_data_sbnd.AllowFlag1: true crtstriphitproducer_data_sbnd.CorrectForDifferentSecond: true -crtstriphitproducer_data_sbnd.ReferenceTs0ToETrig: true +crtstriphitproducer_data_sbnd.ReferenceTs0: true +crtstriphitproducer_data_sbnd.TimingType: 0 +crtstriphitproducer_data_sbnd.DAQHeaderModuleLabel: "daq" +crtstriphitproducer_data_sbnd.DAQHeaderInstanceLabel: "RawEventHeader" +crtstriphitproducer_data_sbnd.RawTSCorrection: 367000 +crtstriphitproducer_data_sbnd.MaxAllowedRefTimeDiff: 3000000 crtstriphitproducer_data_sbnd.SPECTDCModuleLabel: "tdcdecoder" +crtstriphitproducer_data_sbnd.PTBModuleLabel: "ptbdecoder" +crtstriphitproducer_data_sbnd.AllowedPTBHLTs: [ 1, 2, 3, 4, 5 ] crtclusterproducer_sbnd: { diff --git a/sbndcode/Calibration/CRT/CalibService/SBNDCRTPedestals_v1.txt b/sbndcode/Calibration/CRT/CalibService/SBNDCRTPedestals_v1.txt index 17f12ceb9..e6e217252 100644 --- a/sbndcode/Calibration/CRT/CalibService/SBNDCRTPedestals_v1.txt +++ b/sbndcode/Calibration/CRT/CalibService/SBNDCRTPedestals_v1.txt @@ -62,6 +62,38 @@ 44 29 126.86 44 30 119.297 44 31 118.183 +181 0 173.847 +181 1 179.204 +181 2 191.832 +181 3 173.471 +181 4 180.259 +181 5 174.381 +181 6 188.323 +181 7 177.152 +181 8 164.707 +181 9 157.734 +181 10 170.256 +181 11 178.376 +181 12 176.281 +181 13 160.1 +181 14 169.254 +181 15 169.226 +181 16 164.256 +181 17 173.89 +181 18 170.075 +181 19 151.207 +181 20 153.927 +181 21 170.751 +181 22 159.134 +181 23 169.792 +181 24 155.709 +181 25 168.615 +181 26 154.786 +181 27 161.876 +181 28 149.047 +181 29 163.182 +181 30 168.799 +181 31 171.914 58 0 173.847 58 1 179.204 58 2 191.832 @@ -1918,6 +1950,38 @@ 80 29 143.741 80 30 166.002 80 31 159.756 +55 0 143.749 +55 1 178.559 +55 2 186.1 +55 3 175.428 +55 4 166.752 +55 5 180.315 +55 6 175.231 +55 7 162.247 +55 8 207.417 +55 9 165.192 +55 10 171.896 +55 11 174.583 +55 12 171.878 +55 13 180.444 +55 14 157.317 +55 15 157.236 +55 16 179.967 +55 17 165.307 +55 18 159.23 +55 19 174.482 +55 20 165.146 +55 21 166.885 +55 22 161.751 +55 23 157.721 +55 24 153.303 +55 25 150.406 +55 26 148.245 +55 27 165.344 +55 28 158.524 +55 29 143.741 +55 30 166.002 +55 31 159.756 130 0 215.812 130 1 213.638 130 2 221.4 @@ -2174,6 +2238,38 @@ 193 29 201.079 193 30 193.233 193 31 204.466 +120 0 202.367 +120 1 206.944 +120 2 225.91 +120 3 207.169 +120 4 198.869 +120 5 214.701 +120 6 210.699 +120 7 227.481 +120 8 203.689 +120 9 205.622 +120 10 185.796 +120 11 215.448 +120 12 205.615 +120 13 205.248 +120 14 196.672 +120 15 183.73 +120 16 196.996 +120 17 205.113 +120 18 196.317 +120 19 207.034 +120 20 197.954 +120 21 211.431 +120 22 216.845 +120 23 204.088 +120 24 198.068 +120 25 194.903 +120 26 218.585 +120 27 215.036 +120 28 216.105 +120 29 201.079 +120 30 193.233 +120 31 204.466 197 0 130.982 197 1 158.2 197 2 154.114 @@ -2878,3 +2974,1635 @@ 176 29 141.499 176 30 140.695 176 31 142.363 +16 0 183.7 +16 1 197.532 +16 2 204.811 +16 3 208.079 +16 4 204.691 +16 5 210.997 +16 6 218.186 +16 7 200.336 +16 8 228.521 +16 9 199.894 +16 10 198.538 +16 11 214.099 +16 12 206.875 +16 13 212.15 +16 14 213.147 +16 15 212.698 +16 16 197.718 +16 17 193.488 +16 18 203.658 +16 19 182.326 +16 20 203.208 +16 21 206.31 +16 22 182.637 +16 23 179.496 +16 24 215.174 +16 25 200.331 +16 26 201.099 +16 27 199.384 +16 28 196.058 +16 29 197.711 +16 30 197.511 +16 31 200.656 +35 0 115.307 +35 1 118.463 +35 2 115.197 +35 3 130.634 +35 4 127.193 +35 5 101.662 +35 6 134.502 +35 7 114.155 +35 8 125.471 +35 9 104.827 +35 10 125.812 +35 11 138.715 +35 12 118.224 +35 13 113.466 +35 14 99.4929 +35 15 132.483 +35 16 100.963 +35 17 116.217 +35 18 126.443 +35 19 117.885 +35 20 121.386 +35 21 113.994 +35 22 125.37 +35 23 130.342 +35 24 116.412 +35 25 118.941 +35 26 111.352 +35 27 109.578 +35 28 100.906 +35 29 104.955 +35 30 128.784 +35 31 121.026 +36 0 228.046 +36 1 231.055 +36 2 225.201 +36 3 224.252 +36 4 225.581 +36 5 250.899 +36 6 217.691 +36 7 228.9 +36 8 229.246 +36 9 229.584 +36 10 219.429 +36 11 227.334 +36 12 227.628 +36 13 228.458 +36 14 220.957 +36 15 225.396 +36 16 220.855 +36 17 226.029 +36 18 247.953 +36 19 234.068 +36 20 216.768 +36 21 232.15 +36 22 222.33 +36 23 208.552 +36 24 229.793 +36 25 225.578 +36 26 209.391 +36 27 221.08 +36 28 214.301 +36 29 217.634 +36 30 210.437 +36 31 214.436 +39 0 160.57 +39 1 166.373 +39 2 156.218 +39 3 156.101 +39 4 163.418 +39 5 152.045 +39 6 161.425 +39 7 162.669 +39 8 159.108 +39 9 148.062 +39 10 161.228 +39 11 153.102 +39 12 183.259 +39 13 140.935 +39 14 155.981 +39 15 150.95 +39 16 164.775 +39 17 148.983 +39 18 148.015 +39 19 164.779 +39 20 146.958 +39 21 143.313 +39 22 163.407 +39 23 151.442 +39 24 152.287 +39 25 154.027 +39 26 154.223 +39 27 160.234 +39 28 138.928 +39 29 126.321 +39 30 151.46 +39 31 154.435 +40 0 187.09 +40 1 180.554 +40 2 188.603 +40 3 196.679 +40 4 196.731 +40 5 180.466 +40 6 203.821 +40 7 181.11 +40 8 191.086 +40 9 191.061 +40 10 193.77 +40 11 182.424 +40 12 178.667 +40 13 191.179 +40 14 203.751 +40 15 175.908 +40 16 177.794 +40 17 170.833 +40 18 189.127 +40 19 188.303 +40 20 182.32 +40 21 189.412 +40 22 186.999 +40 23 193.21 +40 24 196.727 +40 25 179.19 +40 26 195.606 +40 27 176.088 +40 28 175.739 +40 29 178.345 +40 30 177.087 +40 31 177.499 +47 0 86.8599 +47 1 101.238 +47 2 95.6004 +47 3 93.2291 +47 4 113.91 +47 5 102.282 +47 6 111.439 +47 7 120.522 +47 8 104.554 +47 9 80.5356 +47 10 98.3973 +47 11 89.1682 +47 12 100.284 +47 13 99.4617 +47 14 107.796 +47 15 92.8857 +47 16 92.1176 +47 17 106.905 +47 18 84.5707 +47 19 108.433 +47 20 96.0513 +47 21 95.5317 +47 22 101.82 +47 23 103.467 +47 24 102.232 +47 25 96.6659 +47 26 93.6861 +47 27 100.865 +47 28 95.5011 +47 29 88.7746 +47 30 114.796 +47 31 93.8086 +48 0 167.811 +48 1 180.206 +48 2 192.387 +48 3 170.788 +48 4 176.992 +48 5 157.958 +48 6 167.839 +48 7 184.537 +48 8 174.856 +48 9 170.434 +48 10 181.864 +48 11 175.02 +48 12 187.71 +48 13 171.243 +48 14 163.236 +48 15 180.951 +48 16 163.719 +48 17 170.766 +48 18 176.326 +48 19 177.599 +48 20 167.066 +48 21 167.242 +48 22 175.407 +48 23 165.832 +48 24 173.446 +48 25 167.075 +48 26 169.075 +48 27 182.566 +48 28 162.672 +48 29 180.814 +48 30 163.623 +48 31 175.952 +49 0 217.115 +49 1 238.326 +49 2 232.552 +49 3 239.448 +49 4 242.837 +49 5 233.923 +49 6 208.65 +49 7 232.734 +49 8 237.418 +49 9 228.456 +49 10 230.303 +49 11 224.709 +49 12 229.037 +49 13 217.348 +49 14 206.221 +49 15 229.355 +49 16 224.522 +49 17 229.723 +49 18 236.069 +49 19 234.487 +49 20 215.05 +49 21 236.772 +49 22 206.182 +49 23 220.585 +49 24 228.825 +49 25 215.594 +49 26 210.848 +49 27 215.944 +49 28 212.767 +49 29 239.353 +49 30 234.11 +49 31 213.537 +50 0 194.755 +50 1 207.223 +50 2 207.168 +50 3 189.88 +50 4 193.479 +50 5 211.526 +50 6 198.599 +50 7 195.502 +50 8 193.559 +50 9 202.876 +50 10 191.319 +50 11 203.806 +50 12 193.819 +50 13 194.235 +50 14 191.792 +50 15 187.949 +50 16 192.027 +50 17 192.915 +50 18 196.023 +50 19 200.259 +50 20 184.246 +50 21 208.137 +50 22 189.571 +50 23 191.388 +50 24 175.152 +50 25 183.599 +50 26 196.267 +50 27 188.095 +50 28 180.715 +50 29 202.244 +50 30 193.16 +50 31 207.178 +51 0 124.934 +51 1 141.762 +51 2 154.446 +51 3 135.561 +51 4 150.969 +51 5 144.196 +51 6 145.28 +51 7 136.976 +51 8 144.534 +51 9 147.57 +51 10 154.838 +51 11 132.858 +51 12 125.079 +51 13 136.602 +51 14 144.958 +51 15 142.288 +51 16 132.388 +51 17 123.156 +51 18 131.288 +51 19 112.091 +51 20 140.632 +51 21 137.708 +51 22 137.152 +51 23 145.824 +51 24 142.947 +51 25 128.764 +51 26 118.421 +51 27 133.821 +51 28 139.017 +51 29 144.597 +51 30 150.326 +51 31 134.969 +71 0 182.298 +71 1 189.555 +71 2 202.271 +71 3 186.596 +71 4 209.975 +71 5 193.754 +71 6 201.953 +71 7 203.66 +71 8 210.41 +71 9 187.786 +71 10 207.589 +71 11 189.21 +71 12 204.071 +71 13 189.559 +71 14 185.88 +71 15 181.127 +71 16 189.63 +71 17 199.397 +71 18 185.754 +71 19 200.578 +71 20 194.856 +71 21 177.352 +71 22 178.185 +71 23 186.748 +71 24 195.557 +71 25 189.345 +71 26 188.275 +71 27 204.473 +71 28 192.268 +71 29 197.253 +71 30 182.617 +71 31 183.108 +72 0 151.915 +72 1 152.117 +72 2 160.082 +72 3 145.525 +72 4 161.631 +72 5 162.133 +72 6 164.077 +72 7 157.139 +72 8 177.116 +72 9 136.911 +72 10 157.626 +72 11 158.078 +72 12 161.218 +72 13 162.232 +72 14 156.14 +72 15 151.157 +72 16 137.013 +72 17 153.857 +72 18 147.29 +72 19 161.438 +72 20 144.618 +72 21 146.091 +72 22 154.411 +72 23 145.153 +72 24 148.125 +72 25 156.513 +72 26 144.906 +72 27 146.072 +72 28 156.803 +72 29 151.148 +72 30 145.983 +72 31 151.216 +75 0 219.919 +75 1 221.414 +75 2 218.288 +75 3 218.941 +75 4 232.382 +75 5 230.027 +75 6 229.443 +75 7 238.697 +75 8 231.707 +75 9 222.462 +75 10 208.167 +75 11 228.298 +75 12 211.117 +75 13 217.777 +75 14 226.924 +75 15 218.372 +75 16 212.153 +75 17 213.65 +75 18 204.899 +75 19 234.244 +75 20 216.651 +75 21 200.158 +75 22 208.737 +75 23 219.923 +75 24 216.087 +75 25 198.143 +75 26 211.788 +75 27 203.965 +75 28 224.485 +75 29 216.656 +75 30 210.353 +75 31 210.679 +105 0 190.343 +105 1 201.634 +105 2 202.5 +105 3 205.301 +105 4 207.694 +105 5 214.836 +105 6 195.406 +105 7 206.746 +105 8 203.337 +105 9 197.343 +105 10 192.529 +105 11 197.865 +105 12 207.276 +105 13 201.712 +105 14 206.865 +105 15 184.275 +105 16 206.136 +105 17 183.394 +105 18 194.468 +105 19 200.692 +105 20 217.614 +105 21 195.715 +105 22 206.359 +105 23 195.101 +105 24 190.809 +105 25 206.691 +105 26 194.64 +105 27 198.356 +105 28 218.557 +105 29 202.483 +105 30 193.878 +105 31 196.749 +106 0 148.247 +106 1 152.148 +106 2 149.792 +106 3 164.154 +106 4 145.494 +106 5 140.123 +106 6 154.557 +106 7 143.282 +106 8 145.872 +106 9 159.468 +106 10 143.794 +106 11 147.419 +106 12 155.784 +106 13 148.115 +106 14 151.593 +106 15 139.294 +106 16 161.824 +106 17 167.661 +106 18 149.108 +106 19 150.118 +106 20 146.174 +106 21 146.298 +106 22 142.791 +106 23 150.298 +106 24 140.589 +106 25 129.796 +106 26 142.3 +106 27 140.505 +106 28 126.293 +106 29 136.904 +106 30 126.258 +106 31 147.953 +107 0 167.108 +107 1 171.555 +107 2 180.325 +107 3 179.572 +107 4 168.289 +107 5 159.479 +107 6 148.323 +107 7 179.878 +107 8 164.596 +107 9 156.23 +107 10 166.801 +107 11 154.458 +107 12 155.942 +107 13 150.414 +107 14 166.384 +107 15 137.881 +107 16 156.423 +107 17 159.864 +107 18 170.813 +107 19 146.126 +107 20 162.833 +107 21 148.796 +107 22 159.049 +107 23 166.461 +107 24 175.409 +107 25 151.618 +107 26 139.382 +107 27 168.222 +107 28 160.766 +107 29 153.246 +107 30 151.688 +107 31 151.418 +108 0 159.16 +108 1 186.803 +108 2 163.406 +108 3 174.04 +108 4 182.526 +108 5 168.184 +108 6 181.111 +108 7 171.736 +108 8 184.932 +108 9 182.654 +108 10 189.15 +108 11 175.929 +108 12 193.73 +108 13 183.965 +108 14 175.292 +108 15 165.689 +108 16 181.664 +108 17 164.8 +108 18 168.224 +108 19 158.343 +108 20 169.991 +108 21 171.033 +108 22 162.658 +108 23 172.143 +108 24 192.638 +108 25 162.319 +108 26 158.831 +108 27 187.505 +108 28 163.908 +108 29 166.613 +108 30 161.371 +108 31 183.978 +145 0 159.16 +145 1 186.803 +145 2 163.406 +145 3 174.04 +145 4 182.526 +145 5 168.184 +145 6 181.111 +145 7 171.736 +145 8 184.932 +145 9 182.654 +145 10 189.15 +145 11 175.929 +145 12 193.73 +145 13 183.965 +145 14 175.292 +145 15 165.689 +145 16 181.664 +145 17 164.8 +145 18 168.224 +145 19 158.343 +145 20 169.991 +145 21 171.033 +145 22 162.658 +145 23 172.143 +145 24 192.638 +145 25 162.319 +145 26 158.831 +145 27 187.505 +145 28 163.908 +145 29 166.613 +145 30 161.371 +145 31 183.978 +109 0 281.465 +109 1 284.212 +109 2 271.316 +109 3 294.819 +109 4 292.136 +109 5 273.581 +109 6 286.611 +109 7 287.842 +109 8 287.81 +109 9 270.215 +109 10 269.648 +109 11 281.135 +109 12 289.23 +109 13 284.281 +109 14 278.192 +109 15 271.202 +109 16 275.062 +109 17 276.037 +109 18 270.738 +109 19 272.769 +109 20 276.553 +109 21 281.496 +109 22 280.001 +109 23 276.728 +109 24 279.007 +109 25 264.895 +109 26 268.672 +109 27 279.977 +109 28 282.605 +109 29 293.155 +109 30 270.196 +109 31 272.353 +111 0 194.831 +111 1 192.658 +111 2 194.349 +111 3 175.568 +111 4 193.742 +111 5 186.04 +111 6 187.691 +111 7 182.499 +111 8 173.831 +111 9 192.34 +111 10 167.472 +111 11 187.869 +111 12 181.041 +111 13 166.319 +111 14 182.43 +111 15 168.08 +111 16 180.181 +111 17 171.714 +111 18 174.781 +111 19 171.005 +111 20 180.942 +111 21 184.33 +111 22 159.963 +111 23 164.009 +111 24 169.53 +111 25 175.704 +111 26 173.577 +111 27 184.452 +111 28 163.192 +111 29 170.065 +111 30 185.37 +111 31 180.185 +114 0 123.884 +114 1 153.384 +114 2 150.296 +114 3 149.115 +114 4 162.138 +114 5 136.675 +114 6 142.772 +114 7 156.679 +114 8 118.459 +114 9 149.98 +114 10 144.53 +114 11 161.564 +114 12 137.943 +114 13 155.898 +114 14 136.232 +114 15 131.473 +114 16 145.147 +114 17 133.365 +114 18 133.318 +114 19 145.316 +114 20 146.365 +114 21 141.42 +114 22 141.877 +114 23 139.022 +114 24 139.637 +114 25 143.882 +114 26 145.625 +114 27 131.376 +114 28 155.766 +114 29 146.224 +114 30 120.012 +114 31 158.223 +115 0 131.375 +115 1 152.596 +115 2 145.663 +115 3 159.608 +115 4 134.9 +115 5 164.848 +115 6 136.752 +115 7 148.561 +115 8 158.933 +115 9 169.315 +115 10 144.784 +115 11 149.196 +115 12 151.451 +115 13 150.183 +115 14 140.813 +115 15 148.778 +115 16 160.509 +115 17 145.475 +115 18 141.679 +115 19 152.146 +115 20 144.444 +115 21 146.34 +115 22 150.747 +115 23 141.225 +115 24 149.554 +115 25 145.772 +115 26 152.249 +115 27 129.122 +115 28 156.556 +115 29 150.706 +115 30 146.723 +115 31 130.798 +116 0 220.536 +116 1 227.029 +116 2 231.167 +116 3 235.279 +116 4 234.054 +116 5 227.848 +116 6 234.794 +116 7 230.413 +116 8 230.174 +116 9 226.614 +116 10 234.627 +116 11 216.849 +116 12 245.767 +116 13 239.005 +116 14 219.609 +116 15 225.669 +116 16 225.288 +116 17 239.753 +116 18 234.947 +116 19 233.484 +116 20 223.873 +116 21 230.62 +116 22 233.918 +116 23 244.968 +116 24 231.048 +116 25 215.041 +116 26 233.44 +116 27 242.849 +116 28 231.471 +116 29 235.472 +116 30 227.191 +116 31 217.59 +117 0 61.3644 +117 1 102.82 +117 2 78.6279 +117 3 93.5595 +117 4 61.2016 +117 5 86.4754 +117 6 83.5917 +117 7 81.8887 +117 8 66.1369 +117 9 94.7836 +117 10 91.917 +117 11 92.2889 +117 12 94.5594 +117 13 88.5296 +117 14 82.0727 +117 15 77.0537 +117 16 81.6763 +117 17 59.8219 +117 18 77.6103 +117 19 86.9239 +117 20 85.1543 +117 21 87.2792 +117 22 65.7629 +117 23 70.9781 +117 24 74.3737 +117 25 87.0457 +117 26 83.0723 +117 27 86.929 +117 28 84.6454 +117 29 85.975 +117 30 88.6186 +117 31 68.4323 +118 0 124.232 +118 1 123.744 +118 2 142.357 +118 3 140.986 +118 4 104.862 +118 5 138.111 +118 6 129.522 +118 7 142.564 +118 8 141.227 +118 9 129.438 +118 10 125.93 +118 11 139.994 +118 12 142.203 +118 13 128.717 +118 14 133.697 +118 15 133.794 +118 16 125.029 +118 17 118.27 +118 18 138.676 +118 19 135.536 +118 20 124.178 +118 21 120.546 +118 22 133.535 +118 23 130.83 +118 24 130.399 +118 25 130.5 +118 26 120.967 +118 27 123.432 +118 28 119.6 +118 29 138.261 +118 30 132.719 +118 31 121.312 +119 0 135.112 +119 1 162.328 +119 2 154.302 +119 3 173.459 +119 4 166.203 +119 5 163.496 +119 6 169.167 +119 7 167.903 +119 8 174.92 +119 9 172.951 +119 10 159.174 +119 11 181.094 +119 12 172.002 +119 13 159.855 +119 14 157.616 +119 15 160.943 +119 16 171.321 +119 17 163.284 +119 18 163.441 +119 19 158.536 +119 20 163.923 +119 21 143.403 +119 22 165.642 +119 23 165.66 +119 24 156.327 +119 25 158.862 +119 26 154.412 +119 27 176.47 +119 28 146.826 +119 29 164.233 +119 30 172.134 +119 31 164.748 +121 0 191.148 +121 1 201.563 +121 2 204.137 +121 3 180.276 +121 4 181.223 +121 5 187.659 +121 6 207.957 +121 7 209.753 +121 8 209.358 +121 9 174.453 +121 10 199.276 +121 11 190.837 +121 12 211.068 +121 13 182.644 +121 14 215.931 +121 15 174.086 +121 16 179.078 +121 17 185.758 +121 18 190.056 +121 19 192.694 +121 20 189.215 +121 21 200.169 +121 22 190.557 +121 23 193.18 +121 24 192.457 +121 25 215.955 +121 26 193.315 +121 27 184.888 +121 28 196.089 +121 29 171.889 +121 30 198.425 +121 31 183.214 +123 0 188.235 +123 1 208.635 +123 2 202.021 +123 3 194.419 +123 4 188.154 +123 5 196.36 +123 6 205.319 +123 7 195.306 +123 8 215.134 +123 9 200.951 +123 10 199.56 +123 11 199.853 +123 12 192.329 +123 13 192.863 +123 14 213.975 +123 15 210.882 +123 16 194.705 +123 17 186.74 +123 18 182.268 +123 19 193.768 +123 20 200.291 +123 21 197.135 +123 22 191.94 +123 23 196.051 +123 24 186.754 +123 25 209.345 +123 26 187.583 +123 27 204.152 +123 28 190.725 +123 29 197.655 +123 30 184.585 +123 31 202.108 +125 0 183.253 +125 1 195.93 +125 2 199.07 +125 3 203.721 +125 4 203.107 +125 5 179.704 +125 6 195.632 +125 7 182.658 +125 8 185.613 +125 9 190.016 +125 10 191.429 +125 11 189.939 +125 12 200.83 +125 13 208.406 +125 14 194.877 +125 15 189.82 +125 16 187.716 +125 17 186.173 +125 18 193.45 +125 19 191.177 +125 20 187.454 +125 21 193.956 +125 22 179.618 +125 23 185.058 +125 24 195.219 +125 25 196.644 +125 26 176.323 +125 27 181.755 +125 28 179.244 +125 29 193.531 +125 30 181.567 +125 31 200.776 +126 0 127.885 +126 1 130.568 +126 2 125.591 +126 3 118.94 +126 4 127.39 +126 5 114.556 +126 6 121.306 +126 7 131.068 +126 8 123.738 +126 9 134.584 +126 10 115.428 +126 11 112.972 +126 12 121.419 +126 13 108.895 +126 14 121.323 +126 15 122.021 +126 16 129.998 +126 17 105.333 +126 18 121.68 +126 19 121.038 +126 20 120.848 +126 21 115.369 +126 22 135.428 +126 23 112.933 +126 24 116.876 +126 25 116.845 +126 26 114.086 +126 27 105.572 +126 28 125.683 +126 29 121.653 +126 30 114.15 +126 31 133.695 +127 0 140.347 +127 1 132.375 +127 2 141.094 +127 3 136.919 +127 4 140.149 +127 5 131.276 +127 6 131.21 +127 7 148.419 +127 8 142.082 +127 9 143.586 +127 10 129.979 +127 11 142.519 +127 12 136.1 +127 13 129.803 +127 14 127.752 +127 15 128.485 +127 16 126.984 +127 17 126.427 +127 18 142.561 +127 19 125.456 +127 20 128.712 +127 21 155.563 +127 22 126.77 +127 23 130.621 +127 24 122.214 +127 25 132.826 +127 26 103.835 +127 27 121.45 +127 28 143.495 +127 29 129.59 +127 30 118.862 +127 31 131.395 +128 0 285.413 +128 1 292.32 +128 2 319.256 +128 3 301.342 +128 4 305.815 +128 5 297.383 +128 6 297.507 +128 7 302.769 +128 8 297.571 +128 9 295.688 +128 10 296.281 +128 11 297.338 +128 12 283.643 +128 13 295.765 +128 14 285.436 +128 15 286.167 +128 16 287.604 +128 17 312.198 +128 18 297.186 +128 19 285.154 +128 20 297.018 +128 21 295.494 +128 22 299.226 +128 23 307.452 +128 24 293.951 +128 25 287.635 +128 26 298.041 +128 27 290.402 +128 28 296.897 +128 29 293.361 +128 30 287.303 +128 31 280.259 +129 0 218.85 +129 1 239.001 +129 2 239.305 +129 3 240.751 +129 4 246.598 +129 5 210.768 +129 6 235.653 +129 7 220.166 +129 8 233.533 +129 9 234.278 +129 10 235.682 +129 11 233.589 +129 12 203.77 +129 13 223.724 +129 14 224.643 +129 15 235.599 +129 16 236.004 +129 17 247.113 +129 18 229.912 +129 19 231.247 +129 20 234.963 +129 21 231.666 +129 22 235.048 +129 23 218.569 +129 24 238.371 +129 25 213.654 +129 26 227.125 +129 27 233.419 +129 28 223.902 +129 29 229.389 +129 30 220.593 +129 31 215.252 +141 0 204.999 +141 1 204.069 +141 2 226.556 +141 3 220.699 +141 4 218.947 +141 5 223.121 +141 6 214.152 +141 7 209.117 +141 8 224.959 +141 9 239.229 +141 10 216.415 +141 11 200.742 +141 12 221.051 +141 13 217.104 +141 14 207.329 +141 15 207.479 +141 16 206.002 +141 17 215.341 +141 18 210.775 +141 19 226.304 +141 20 224.936 +141 21 200.307 +141 22 213.556 +141 23 215.13 +141 24 207.232 +141 25 221.108 +141 26 207.793 +141 27 211.389 +141 28 211.995 +141 29 224.03 +141 30 206.092 +141 31 201.852 +144 0 77.0744 +144 1 64.7295 +144 2 92.1085 +144 3 93.8455 +144 4 88.9466 +144 5 90.2293 +144 6 103.199 +144 7 89.8263 +144 8 86.7095 +144 9 89.5757 +144 10 71.3484 +144 11 78.9116 +144 12 84.7634 +144 13 64.5589 +144 14 87.682 +144 15 85.6761 +144 16 79.3923 +144 17 66.2099 +144 18 73.1254 +144 19 89.1163 +144 20 90.0447 +144 21 82.3737 +144 22 86.4299 +144 23 71.9298 +144 24 71.3746 +144 25 79.4503 +144 26 75.3971 +144 27 78.6387 +144 28 87.7377 +144 29 82.983 +144 30 79.9751 +144 31 83.054 +178 0 184.469 +178 1 215.181 +178 2 192.789 +178 3 205.532 +178 4 203.935 +178 5 189.897 +178 6 199.057 +178 7 201.081 +178 8 197.257 +178 9 205.527 +178 10 204.071 +178 11 206.139 +178 12 206.681 +178 13 189.374 +178 14 180.686 +178 15 195.79 +178 16 209.766 +178 17 202.827 +178 18 191.36 +178 19 190.056 +178 20 198.513 +178 21 204.93 +178 22 198.399 +178 23 202.566 +178 24 204.203 +178 25 196.304 +178 26 201.238 +178 27 203.502 +178 28 199.906 +178 29 189.554 +178 30 195.016 +178 31 190.559 +179 0 235.705 +179 1 217.669 +179 2 219.082 +179 3 207.054 +179 4 225.95 +179 5 219.488 +179 6 225.057 +179 7 213.9 +179 8 213.662 +179 9 216.243 +179 10 201.399 +179 11 220.87 +179 12 214.355 +179 13 197.785 +179 14 210.644 +179 15 213.03 +179 16 221.639 +179 17 228.407 +179 18 218.331 +179 19 213.674 +179 20 203.662 +179 21 208.969 +179 22 218.25 +179 23 220.424 +179 24 219.443 +179 25 223.15 +179 26 226.016 +179 27 210.181 +179 28 196.346 +179 29 220.097 +179 30 207.518 +179 31 203.31 +180 0 139.634 +180 1 152.963 +180 2 150.691 +180 3 151.92 +180 4 146.296 +180 5 156.846 +180 6 132.798 +180 7 153.99 +180 8 161.553 +180 9 155.771 +180 10 133.292 +180 11 141.092 +180 12 146.616 +180 13 144.826 +180 14 137.241 +180 15 136.829 +180 16 131.341 +180 17 122.406 +180 18 141.402 +180 19 154.767 +180 20 137.23 +180 21 153.9 +180 22 142.412 +180 23 161.229 +180 24 136.98 +180 25 146.955 +180 26 151.915 +180 27 139.994 +180 28 124.382 +180 29 137.899 +180 30 142.17 +180 31 155.074 +183 0 189.657 +183 1 171.192 +183 2 188.63 +183 3 178.313 +183 4 191.358 +183 5 178.367 +183 6 180.032 +183 7 186.876 +183 8 172.05 +183 9 173.801 +183 10 175.637 +183 11 196.762 +183 12 177.999 +183 13 168.743 +183 14 178.684 +183 15 162.958 +183 16 180.605 +183 17 188.291 +183 18 174.153 +183 19 185.134 +183 20 184.494 +183 21 165.336 +183 22 173.042 +183 23 162.293 +183 24 167.807 +183 25 167.959 +183 26 193.642 +183 27 165.989 +183 28 183.391 +183 29 174.632 +183 30 168.868 +183 31 151.795 +184 0 167.18 +184 1 180.982 +184 2 173.27 +184 3 166.54 +184 4 188.693 +184 5 181.633 +184 6 178.406 +184 7 167.853 +184 8 173.131 +184 9 182.108 +184 10 160.953 +184 11 173.918 +184 12 175.457 +184 13 178.486 +184 14 177.832 +184 15 169.261 +184 16 175.888 +184 17 168.318 +184 18 155.616 +184 19 170.639 +184 20 163.685 +184 21 162.437 +184 22 155.568 +184 23 165.18 +184 24 159.318 +184 25 156.695 +184 26 167.983 +184 27 159.008 +184 28 158.772 +184 29 180.913 +184 30 175.995 +184 31 163.454 +185 0 181.597 +185 1 204.494 +185 2 188.04 +185 3 190.924 +185 4 185.251 +185 5 184.634 +185 6 191.124 +185 7 189.066 +185 8 182.367 +185 9 197.588 +185 10 194.624 +185 11 186.922 +185 12 181.736 +185 13 174.276 +185 14 182.341 +185 15 195.8 +185 16 160.333 +185 17 185.49 +185 18 178.529 +185 19 183.271 +185 20 179.217 +185 21 177.687 +185 22 197.262 +185 23 184.344 +185 24 176.709 +185 25 181.073 +185 26 182.569 +185 27 180.894 +185 28 179.858 +185 29 171.783 +185 30 177.886 +185 31 178.613 +187 0 168.46 +187 1 169.405 +187 2 173.083 +187 3 166.526 +187 4 174.291 +187 5 166.778 +187 6 178.781 +187 7 174.278 +187 8 158.217 +187 9 164.347 +187 10 162.144 +187 11 162.91 +187 12 169.315 +187 13 159.799 +187 14 160.853 +187 15 165.548 +187 16 163.152 +187 17 157.388 +187 18 152.278 +187 19 172.853 +187 20 179.818 +187 21 171.901 +187 22 158.03 +187 23 160.614 +187 24 151.603 +187 25 167.524 +187 26 170.717 +187 27 146.782 +187 28 165.616 +187 29 163.608 +187 30 165.735 +187 31 158.457 +205 0 226.025 +205 1 217.568 +205 2 230.784 +205 3 230.937 +205 4 214.625 +205 5 233.828 +205 6 228.908 +205 7 220.24 +205 8 222.737 +205 9 232.703 +205 10 215.195 +205 11 225.16 +205 12 222.015 +205 13 233.058 +205 14 220.904 +205 15 236.261 +205 16 215.325 +205 17 223.074 +205 18 219.883 +205 19 230.793 +205 20 215.222 +205 21 225.353 +205 22 218.505 +205 23 213.505 +205 24 226.591 +205 25 225.701 +205 26 222.307 +205 27 215.44 +205 28 223.591 +205 29 218.973 +205 30 216.317 +205 31 232.894 +209 0 98.3857 +209 1 138.331 +209 2 127.031 +209 3 135.029 +209 4 107.815 +209 5 119.331 +209 6 136.642 +209 7 125.108 +209 8 118.775 +209 9 119.775 +209 10 123.176 +209 11 107.728 +209 12 123.087 +209 13 126.278 +209 14 105.368 +209 15 117.643 +209 16 111.342 +209 17 127.736 +209 18 117.555 +209 19 123.481 +209 20 109.697 +209 21 121.583 +209 22 119.459 +209 23 119.659 +209 24 108.603 +209 25 108.815 +209 26 115.985 +209 27 92.1592 +209 28 109.219 +209 29 109.172 +209 30 111.185 +209 31 109.007 +210 0 147.494 +210 1 155.873 +210 2 146.209 +210 3 168.242 +210 4 141.071 +210 5 163.001 +210 6 158.16 +210 7 139.736 +210 8 148.919 +210 9 150.54 +210 10 160.55 +210 11 146.425 +210 12 151.507 +210 13 159.456 +210 14 153.605 +210 15 133.925 +210 16 159.769 +210 17 144.162 +210 18 133.143 +210 19 126.328 +210 20 141.001 +210 21 140.212 +210 22 145.855 +210 23 151.197 +210 24 156.514 +210 25 145.702 +210 26 145.039 +210 27 141.519 +210 28 143.218 +210 29 155.905 +210 30 143.905 +210 31 129.974 +211 0 114.888 +211 1 114.892 +211 2 141.496 +211 3 132.799 +211 4 128.121 +211 5 121.954 +211 6 127.828 +211 7 136.182 +211 8 118.103 +211 9 132.363 +211 10 130.945 +211 11 124.814 +211 12 154.125 +211 13 129.164 +211 14 105.119 +211 15 131.174 +211 16 112.9 +211 17 129.015 +211 18 131.946 +211 19 120.392 +211 20 123.609 +211 21 129.846 +211 22 115.95 +211 23 119.737 +211 24 117.515 +211 25 111.802 +211 26 120.546 +211 27 115.267 +211 28 112.36 +211 29 127.62 +211 30 106.273 +211 31 127.294 +212 0 99.0796 +212 1 89.8996 +212 2 108.694 +212 3 82.5615 +212 4 100.421 +212 5 97.3104 +212 6 83.5953 +212 7 111.278 +212 8 110.176 +212 9 94.4362 +212 10 104.58 +212 11 84.5272 +212 12 88.4654 +212 13 95.6861 +212 14 97.4005 +212 15 95.8202 +212 16 93.9116 +212 17 84.544 +212 18 101.301 +212 19 88.4907 +212 20 101.49 +212 21 95.1366 +212 22 98.3328 +212 23 83.165 +212 24 84.5942 +212 25 103.156 +212 26 86.2872 +212 27 84.5747 +212 28 87.3206 +212 29 85.8957 +212 30 101.14 +212 31 100.079 +213 0 177.216 +213 1 175.316 +213 2 170.289 +213 3 188.892 +213 4 209.688 +213 5 182.875 +213 6 182.494 +213 7 187.824 +213 8 197.348 +213 9 171.767 +213 10 184.888 +213 11 196.882 +213 12 162.773 +213 13 174.435 +213 14 175.133 +213 15 173.445 +213 16 187.935 +213 17 199.27 +213 18 193.755 +213 19 169.338 +213 20 170.888 +213 21 193.056 +213 22 178.504 +213 23 188.421 +213 24 186.197 +213 25 187.594 +213 26 183.21 +213 27 195.796 +213 28 175.876 +213 29 199.502 +213 30 181.289 +213 31 166.839 +216 0 173.118 +216 1 164.209 +216 2 177.872 +216 3 175.915 +216 4 180.994 +216 5 167.159 +216 6 178.288 +216 7 157.851 +216 8 180.543 +216 9 191.948 +216 10 179.554 +216 11 180.389 +216 12 180.347 +216 13 175.92 +216 14 166.827 +216 15 174.221 +216 16 168.486 +216 17 179.263 +216 18 165.186 +216 19 146.848 +216 20 165.576 +216 21 167.182 +216 22 180.642 +216 23 177.247 +216 24 181.463 +216 25 166.844 +216 26 170.996 +216 27 158.303 +216 28 170.431 +216 29 168.075 +216 30 159.724 +216 31 176.144 +223 0 118.663 +223 1 119.506 +223 2 125.262 +223 3 115.566 +223 4 118.992 +223 5 117.586 +223 6 112.203 +223 7 106.927 +223 8 121.17 +223 9 118.117 +223 10 126.785 +223 11 114.929 +223 12 108.306 +223 13 113.59 +223 14 124.038 +223 15 110.654 +223 16 128.677 +223 17 113.78 +223 18 105.848 +223 19 128.64 +223 20 113.646 +223 21 111.738 +223 22 116.834 +223 23 104.811 +223 24 111.347 +223 25 127.495 +223 26 118.4 +223 27 113.624 +223 28 110.627 +223 29 114.561 +223 30 103.86 +223 31 107.692 +228 0 236.393 +228 1 250.847 +228 2 267.957 +228 3 275.994 +228 4 269.563 +228 5 237.135 +228 6 268.176 +228 7 264.179 +228 8 259.568 +228 9 245.899 +228 10 253.655 +228 11 258.163 +228 12 258.463 +228 13 264.14 +228 14 269.485 +228 15 252.658 +228 16 259.474 +228 17 252.797 +228 18 252.604 +228 19 262.66 +228 20 258.535 +228 21 253.634 +228 22 268.445 +228 23 255.475 +228 24 252.49 +228 25 262.263 +228 26 252.875 +228 27 262.579 +228 28 241.387 +228 29 243.543 +228 30 269.635 +228 31 239.731 diff --git a/sbndcode/Calibration/CRT/CalibService/SBNDCRTTimingOffsets_v1.txt b/sbndcode/Calibration/CRT/CalibService/SBNDCRTTimingOffsets_v1.txt index e3f77b003..a0e2fb4cb 100644 --- a/sbndcode/Calibration/CRT/CalibService/SBNDCRTTimingOffsets_v1.txt +++ b/sbndcode/Calibration/CRT/CalibService/SBNDCRTTimingOffsets_v1.txt @@ -1,90 +1,144 @@ -18 575 -19 511 -24 463 -33 447 -34 463 -42 463 -44 447 -45 495 -56 559 -57 447 -58 485 -59 495 -60 543 -61 527 -73 501 -77 549 -78 565 -79 511 -80 447 -81 495 -82 453 -83 533 -84 517 -85 511 -86 469 -87 501 -88 469 -90 501 -91 517 -93 453 -94 469 -95 485 -97 517 -98 533 -99 530 -100 546 -101 453 -102 469 -103 485 -104 501 -130 495 -131 495 -132 575 -133 559 -134 527 -135 511 -136 495 -138 479 -143 527 -146 479 -147 463 -148 543 -149 507 -150 511 -151 527 -152 495 -153 463 -155 447 -156 479 -157 479 -158 463 -159 447 -160 447 -162 543 -163 559 -164 575 -165 575 -166 543 -168 511 -169 559 -170 527 -171 511 -172 495 -173 479 -174 527 -176 479 -182 447 -193 447 -197 559 -198 511 -199 543 -200 559 -202 527 -203 479 -204 543 -206 527 -207 463 -220 479 -222 463 -238 463 +16 485 +18 575 +19 511 +24 463 +33 447 +34 463 +35 549 +36 447 +39 447 +40 507 +42 463 +44 447 +45 495 +47 447 +48 447 +49 458 +50 501 +51 479 +55 447 +56 559 +57 447 +58 485 +59 495 +60 543 +61 527 +71 511 +72 469 +73 501 +75 485 +77 549 +78 565 +79 511 +80 447 +81 495 +82 453 +83 533 +84 517 +85 511 +86 469 +87 501 +88 469 +90 501 +91 517 +93 453 +94 469 +95 485 +97 517 +98 533 +99 530 +100 546 +101 453 +102 469 +103 485 +104 501 +105 469 +106 447 +107 570 +108 458 +109 458 +111 559 +114 458 +115 458 +116 447 +117 469 +118 447 +119 469 +120 447 +121 496 +123 490 +125 512 +126 544 +127 469 +128 458 +129 533 +130 495 +131 495 +132 575 +133 559 +134 527 +135 511 +136 495 +138 479 +141 523 +143 527 +144 501 +145 458 +146 479 +147 463 +148 543 +149 507 +150 511 +151 527 +152 495 +153 463 +155 447 +156 479 +157 479 +158 463 +159 447 +160 447 +162 543 +163 559 +164 575 +165 575 +166 543 +168 511 +169 559 +170 527 +171 511 +172 495 +173 479 +174 527 +176 479 +178 490 +179 512 +180 512 +181 485 +182 447 +183 458 +184 447 +185 474 +187 543 +193 447 +197 559 +198 511 +199 543 +200 559 +202 527 +203 479 +204 543 +205 517 +206 527 +207 463 +209 485 +210 496 +211 507 +212 496 +213 485 +216 480 +220 479 +222 463 +223 474 +228 517 +238 463 diff --git a/sbndcode/Calibration/CRT/crtskim_sbnd.fcl b/sbndcode/Calibration/CRT/crtskim_sbnd.fcl index abd4e592e..4040bf6ce 100644 --- a/sbndcode/Calibration/CRT/crtskim_sbnd.fcl +++ b/sbndcode/Calibration/CRT/crtskim_sbnd.fcl @@ -2,9 +2,17 @@ #include "crtbacktrackeralg_sbnd.fcl" BEGIN_PROLOG -crtskim_sbnd: { - module_type: "CRTCalibAna" - CRTBackTrackerAlg: @local::crtbacktrackeralg_sbnd - CRTGeoAlg: @local::crtgeoalg_sbnd + +crtskim_sbnd: +{ + module_type: "CRTCalibAna" + CRTBackTrackerAlg: @local::crtbacktrackeralg_sbnd + CRTGeoAlg: @local::crtgeoalg_sbnd } + +crtskim_no_sce_sbnd: @local::crtskim_sbnd +crtskim_no_sce_sbnd.TPCTrackModuleLabel: "pandoraTrack" +crtskim_no_sce_sbnd.CRTSpacePointMatchingModuleLabel: "crtspacepointmatching" +crtskim_no_sce_sbnd.CRTTrackMatchingModuleLabel: "crttrackmatching" + END_PROLOG diff --git a/sbndcode/ChannelMaps/CRT/README.md b/sbndcode/ChannelMaps/CRT/README.md new file mode 100644 index 000000000..e2f4d5641 --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/README.md @@ -0,0 +1,37 @@ +# SBND CRT Channel Maps + +The SBND CRT channel maps are stored in text files that contain 3 numbers: + +GDML ID | FEB MAC5 | Inversion + +These numbers are: +- _GDML ID_ the number used to describe the active scintillator area in the simulated geometry +- _FEB MAC5_ the hardware address of the readout board (reported in every data packet) +- _Inversion_ a boolean describing whether the 32 channels are ordered in the same direction reality and simulation (0) or opposite (1) + +*** + +During commissioning a number of boards have been replaced for a variety of reasons. This means the channel map has changed in a time/run dependent fashion. The channel maps here each represent a distinct period in this history. + +- v1 before run 13511 (28th May 2024 - swapped FEB181 for FEB58, North Wall) +- v2 before run 15947 (9th August 2024 - swapped FEB80 for FEB55, West Wall) +- v3 before run 16955 (26th September 2024 - swapped FEB193 for FEB120, West Wall) +- v4 before run 17192 (11th October 2024 - swapped FEB108 for FEB145, Top Low Wall) +- v5 Current - run 17192 onwards + +*** + +Useful links to understand more detail of the SBND CRT Hardware-Simulation mapping. + +- [CRT Master Database](https://docs.google.com/spreadsheets/d/1ReXP3Q2DuU-mO_vaQXZWj1h8NVdt6r13sBigYDvihXo/edit?usp=sharing) - a database containing the various numbering schemes and timing delays associated with the CRT hardware. +- [SBN DocDB 36401](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=36401) - maps of the original hardware installations - before any FEB swaps. +- [SBN DocDB 34844](https://sbn-docdb.fnal.gov/cgi-bin/sso/ShowDocument?docid=34844) - visualisations showing the locations of each of the simulated modules by their GDML ID. + + +*** + +All of these channel maps use the number scheme associated with `sbnd_v02_03.gdml`. If using `sbnd_v02_02.gdml` or earlier these will not work. + +*** + +- Henry Lay (h.lay@sheffield.ac.uk) - October 2024 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v1.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v1.txt new file mode 100644 index 000000000..db06a891b --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v1.txt @@ -0,0 +1,140 @@ +0 179 0 +1 141 0 +2 180 0 +3 144 0 +4 178 0 +5 127 0 +6 128 0 +7 39 0 +8 40 0 +9 121 0 +10 117 1 +11 49 1 +12 47 1 +13 116 1 +14 109 1 +15 213 0 +16 212 0 +17 211 0 +18 210 0 +19 209 0 +20 185 1 +21 184 1 +22 183 1 +23 72 1 +24 216 1 +25 75 0 +26 228 0 +27 35 0 +28 205 0 +29 16 0 +30 187 1 +31 71 1 +32 51 1 +33 36 1 +34 223 1 +35 114 0 +36 118 0 +37 48 0 +38 108 0 +39 119 0 +40 111 1 +41 107 1 +42 106 1 +43 115 1 +44 105 1 +45 123 1 +46 50 1 +47 125 1 +48 126 1 +49 129 1 +50 173 1 +51 172 1 +52 168 1 +53 170 1 +54 176 1 +55 59 1 +56 171 1 +57 61 1 +58 166 0 +59 169 0 +60 56 0 +61 60 0 +62 34 1 +63 33 1 +64 57 1 +65 24 1 +66 159 1 +67 153 1 +68 156 1 +69 152 1 +70 182 1 +71 158 1 +72 157 1 +73 136 0 +74 150 0 +75 151 0 +76 134 0 +77 135 0 +78 149 0 +79 181 0 +80 238 0 +81 155 0 +82 88 1 +83 73 1 +84 222 1 +85 220 1 +86 81 1 +87 85 1 +88 79 1 +89 206 1 +90 204 1 +91 200 1 +92 18 0 +93 132 0 +94 133 0 +95 162 0 +96 143 0 +97 131 0 +98 146 0 +99 147 0 +100 44 0 +101 160 0 +102 19 1 +103 202 1 +104 199 1 +105 197 1 +106 207 1 +107 203 1 +108 45 1 +109 198 1 +110 174 1 +111 148 1 +112 163 1 +113 164 1 +114 165 1 +115 80 1 +116 193 0 +117 42 0 +118 138 0 +119 130 1 +120 77 0 +121 78 0 +122 98 1 +123 97 1 +124 87 1 +125 95 1 +126 94 1 +127 93 1 +128 86 0 +129 83 0 +130 84 0 +131 104 1 +132 103 1 +133 102 1 +134 101 1 +135 100 1 +136 99 1 +137 90 0 +138 91 0 +139 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v2.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v2.txt new file mode 100644 index 000000000..1cfd9e6d3 --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v2.txt @@ -0,0 +1,140 @@ +0 179 0 +1 141 0 +2 180 0 +3 144 0 +4 178 0 +5 127 0 +6 128 0 +7 39 0 +8 40 0 +9 121 0 +10 117 1 +11 49 1 +12 47 1 +13 116 1 +14 109 1 +15 213 0 +16 212 0 +17 211 0 +18 210 0 +19 209 0 +20 185 1 +21 184 1 +22 183 1 +23 72 1 +24 216 1 +25 75 0 +26 228 0 +27 35 0 +28 205 0 +29 16 0 +30 187 1 +31 71 1 +32 51 1 +33 36 1 +34 223 1 +35 114 0 +36 118 0 +37 48 0 +38 108 0 +39 119 0 +40 111 1 +41 107 1 +42 106 1 +43 115 1 +44 105 1 +45 123 1 +46 50 1 +47 125 1 +48 126 1 +49 129 1 +50 173 1 +51 172 1 +52 168 1 +53 170 1 +54 176 1 +55 59 1 +56 171 1 +57 61 1 +58 166 0 +59 169 0 +60 56 0 +61 60 0 +62 34 1 +63 33 1 +64 57 1 +65 24 1 +66 159 1 +67 153 1 +68 156 1 +69 152 1 +70 182 1 +71 158 1 +72 157 1 +73 136 0 +74 150 0 +75 151 0 +76 134 0 +77 135 0 +78 149 0 +79 58 0 +80 238 0 +81 155 0 +82 88 1 +83 73 1 +84 222 1 +85 220 1 +86 81 1 +87 85 1 +88 79 1 +89 206 1 +90 204 1 +91 200 1 +92 18 0 +93 132 0 +94 133 0 +95 162 0 +96 143 0 +97 131 0 +98 146 0 +99 147 0 +100 44 0 +101 160 0 +102 19 1 +103 202 1 +104 199 1 +105 197 1 +106 207 1 +107 203 1 +108 45 1 +109 198 1 +110 174 1 +111 148 1 +112 163 1 +113 164 1 +114 165 1 +115 80 1 +116 193 0 +117 42 0 +118 138 0 +119 130 1 +120 77 0 +121 78 0 +122 98 1 +123 97 1 +124 87 1 +125 95 1 +126 94 1 +127 93 1 +128 86 0 +129 83 0 +130 84 0 +131 104 1 +132 103 1 +133 102 1 +134 101 1 +135 100 1 +136 99 1 +137 90 0 +138 91 0 +139 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v3.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v3.txt new file mode 100644 index 000000000..542b57f8a --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v3.txt @@ -0,0 +1,140 @@ +0 179 0 +1 141 0 +2 180 0 +3 144 0 +4 178 0 +5 127 0 +6 128 0 +7 39 0 +8 40 0 +9 121 0 +10 117 1 +11 49 1 +12 47 1 +13 116 1 +14 109 1 +15 213 0 +16 212 0 +17 211 0 +18 210 0 +19 209 0 +20 185 1 +21 184 1 +22 183 1 +23 72 1 +24 216 1 +25 75 0 +26 228 0 +27 35 0 +28 205 0 +29 16 0 +30 187 1 +31 71 1 +32 51 1 +33 36 1 +34 223 1 +35 114 0 +36 118 0 +37 48 0 +38 108 0 +39 119 0 +40 111 1 +41 107 1 +42 106 1 +43 115 1 +44 105 1 +45 123 1 +46 50 1 +47 125 1 +48 126 1 +49 129 1 +50 173 1 +51 172 1 +52 168 1 +53 170 1 +54 176 1 +55 59 1 +56 171 1 +57 61 1 +58 166 0 +59 169 0 +60 56 0 +61 60 0 +62 34 1 +63 33 1 +64 57 1 +65 24 1 +66 159 1 +67 153 1 +68 156 1 +69 152 1 +70 182 1 +71 158 1 +72 157 1 +73 136 0 +74 150 0 +75 151 0 +76 134 0 +77 135 0 +78 149 0 +79 58 0 +80 238 0 +81 155 0 +82 88 1 +83 73 1 +84 222 1 +85 220 1 +86 81 1 +87 85 1 +88 79 1 +89 206 1 +90 204 1 +91 200 1 +92 18 0 +93 132 0 +94 133 0 +95 162 0 +96 143 0 +97 131 0 +98 146 0 +99 147 0 +100 44 0 +101 160 0 +102 19 1 +103 202 1 +104 199 1 +105 197 1 +106 207 1 +107 203 1 +108 45 1 +109 198 1 +110 174 1 +111 148 1 +112 163 1 +113 164 1 +114 165 1 +115 55 1 +116 193 0 +117 42 0 +118 138 0 +119 130 1 +120 77 0 +121 78 0 +122 98 1 +123 97 1 +124 87 1 +125 95 1 +126 94 1 +127 93 1 +128 86 0 +129 83 0 +130 84 0 +131 104 1 +132 103 1 +133 102 1 +134 101 1 +135 100 1 +136 99 1 +137 90 0 +138 91 0 +139 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v4.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v4.txt new file mode 100644 index 000000000..76e25245f --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v4.txt @@ -0,0 +1,140 @@ +0 179 0 +1 141 0 +2 180 0 +3 144 0 +4 178 0 +5 127 0 +6 128 0 +7 39 0 +8 40 0 +9 121 0 +10 117 1 +11 49 1 +12 47 1 +13 116 1 +14 109 1 +15 213 0 +16 212 0 +17 211 0 +18 210 0 +19 209 0 +20 185 1 +21 184 1 +22 183 1 +23 72 1 +24 216 1 +25 75 0 +26 228 0 +27 35 0 +28 205 0 +29 16 0 +30 187 1 +31 71 1 +32 51 1 +33 36 1 +34 223 1 +35 114 0 +36 118 0 +37 48 0 +38 108 0 +39 119 0 +40 111 1 +41 107 1 +42 106 1 +43 115 1 +44 105 1 +45 123 1 +46 50 1 +47 125 1 +48 126 1 +49 129 1 +50 173 1 +51 172 1 +52 168 1 +53 170 1 +54 176 1 +55 59 1 +56 171 1 +57 61 1 +58 166 0 +59 169 0 +60 56 0 +61 60 0 +62 34 1 +63 33 1 +64 57 1 +65 24 1 +66 159 1 +67 153 1 +68 156 1 +69 152 1 +70 182 1 +71 158 1 +72 157 1 +73 136 0 +74 150 0 +75 151 0 +76 134 0 +77 135 0 +78 149 0 +79 58 0 +80 238 0 +81 155 0 +82 88 1 +83 73 1 +84 222 1 +85 220 1 +86 81 1 +87 85 1 +88 79 1 +89 206 1 +90 204 1 +91 200 1 +92 18 0 +93 132 0 +94 133 0 +95 162 0 +96 143 0 +97 131 0 +98 146 0 +99 147 0 +100 44 0 +101 160 0 +102 19 1 +103 202 1 +104 199 1 +105 197 1 +106 207 1 +107 203 1 +108 45 1 +109 198 1 +110 174 1 +111 148 1 +112 163 1 +113 164 1 +114 165 1 +115 55 1 +116 120 0 +117 42 0 +118 138 0 +119 130 1 +120 77 0 +121 78 0 +122 98 1 +123 97 1 +124 87 1 +125 95 1 +126 94 1 +127 93 1 +128 86 0 +129 83 0 +130 84 0 +131 104 1 +132 103 1 +133 102 1 +134 101 1 +135 100 1 +136 99 1 +137 90 0 +138 91 0 +139 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v5.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v5.txt new file mode 100644 index 000000000..beec1bff7 --- /dev/null +++ b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_Commissioning_v5.txt @@ -0,0 +1,140 @@ +0 179 0 +1 141 0 +2 180 0 +3 144 0 +4 178 0 +5 127 0 +6 128 0 +7 39 0 +8 40 0 +9 121 0 +10 117 1 +11 49 1 +12 47 1 +13 116 1 +14 109 1 +15 213 0 +16 212 0 +17 211 0 +18 210 0 +19 209 0 +20 185 1 +21 184 1 +22 183 1 +23 72 1 +24 216 1 +25 75 0 +26 228 0 +27 35 0 +28 205 0 +29 16 0 +30 187 1 +31 71 1 +32 51 1 +33 36 1 +34 223 1 +35 114 0 +36 118 0 +37 48 0 +38 145 0 +39 119 0 +40 111 1 +41 107 1 +42 106 1 +43 115 1 +44 105 1 +45 123 1 +46 50 1 +47 125 1 +48 126 1 +49 129 1 +50 173 1 +51 172 1 +52 168 1 +53 170 1 +54 176 1 +55 59 1 +56 171 1 +57 61 1 +58 166 0 +59 169 0 +60 56 0 +61 60 0 +62 34 1 +63 33 1 +64 57 1 +65 24 1 +66 159 1 +67 153 1 +68 156 1 +69 152 1 +70 182 1 +71 158 1 +72 157 1 +73 136 0 +74 150 0 +75 151 0 +76 134 0 +77 135 0 +78 149 0 +79 58 0 +80 238 0 +81 155 0 +82 88 1 +83 73 1 +84 222 1 +85 220 1 +86 81 1 +87 85 1 +88 79 1 +89 206 1 +90 204 1 +91 200 1 +92 18 0 +93 132 0 +94 133 0 +95 162 0 +96 143 0 +97 131 0 +98 146 0 +99 147 0 +100 44 0 +101 160 0 +102 19 1 +103 202 1 +104 199 1 +105 197 1 +106 207 1 +107 203 1 +108 45 1 +109 198 1 +110 174 1 +111 148 1 +112 163 1 +113 164 1 +114 165 1 +115 55 1 +116 120 0 +117 42 0 +118 138 0 +119 130 1 +120 77 0 +121 78 0 +122 98 1 +123 97 1 +124 87 1 +125 95 1 +126 94 1 +127 93 1 +128 86 0 +129 83 0 +130 84 0 +131 104 1 +132 103 1 +133 102 1 +134 101 1 +135 100 1 +136 99 1 +137 90 0 +138 91 0 +139 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v1.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v1.txt deleted file mode 100644 index 18b4ffe7c..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v1.txt +++ /dev/null @@ -1,53 +0,0 @@ -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 181 0 -70 238 0 -71 155 0 -72 79 1 -73 206 1 -74 204 1 -75 200 1 -76 222 1 -77 220 1 -78 81 1 -79 85 1 -80 143 1 -81 162 1 -82 133 1 -83 132 1 -84 18 1 -85 160 1 -86 44 1 -87 147 1 -88 146 1 -89 131 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v2.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v2.txt deleted file mode 100644 index 5b5187449..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v2.txt +++ /dev/null @@ -1,71 +0,0 @@ -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 181 0 -70 238 0 -71 155 0 -72 79 1 -73 206 1 -74 204 1 -75 200 1 -76 222 1 -77 220 1 -78 81 1 -79 85 1 -80 143 1 -81 162 1 -82 133 1 -83 132 1 -84 18 1 -85 44 1 -86 160 1 -87 147 1 -88 146 1 -89 131 1 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v3.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v3.txt deleted file mode 100644 index 8ba49a8ba..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v3.txt +++ /dev/null @@ -1,71 +0,0 @@ -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 58 0 -70 238 0 -71 155 0 -72 79 1 -73 206 1 -74 204 1 -75 200 1 -76 222 1 -77 220 1 -78 81 1 -79 85 1 -80 143 1 -81 162 1 -82 133 1 -83 132 1 -84 18 1 -85 44 1 -86 160 1 -87 147 1 -88 146 1 -89 131 1 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v4.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v4.txt deleted file mode 100644 index c4449200b..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v4.txt +++ /dev/null @@ -1,87 +0,0 @@ -40 173 1 -41 172 1 -42 168 1 -43 170 1 -44 176 1 -45 59 1 -46 171 1 -47 61 1 -48 166 1 -49 169 1 -50 56 1 -51 60 1 -52 34 1 -53 33 1 -54 57 1 -55 24 1 -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 58 0 -70 238 0 -71 155 0 -72 79 1 -73 206 1 -74 204 1 -75 200 1 -76 222 1 -77 220 1 -78 81 1 -79 85 1 -80 143 1 -81 162 1 -82 133 1 -83 132 1 -84 18 1 -85 44 1 -86 160 1 -87 147 1 -88 146 1 -89 131 1 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v5.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v5.txt deleted file mode 100644 index dce311cd9..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v5.txt +++ /dev/null @@ -1,87 +0,0 @@ -40 173 1 -41 172 1 -42 168 1 -43 170 1 -44 176 1 -45 59 1 -46 171 1 -47 61 1 -48 166 1 -49 169 1 -50 56 1 -51 60 1 -52 34 1 -53 33 1 -54 57 1 -55 24 1 -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 58 0 -70 238 0 -71 155 0 -72 222 1 -73 220 1 -74 81 1 -75 85 1 -76 79 1 -77 206 1 -78 204 1 -79 200 1 -80 18 1 -81 132 1 -82 133 1 -83 162 1 -84 143 1 -85 131 1 -86 146 1 -87 147 1 -88 44 1 -89 160 1 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v6.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v6.txt deleted file mode 100644 index f13ae9438..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v6.txt +++ /dev/null @@ -1,88 +0,0 @@ -40 173 1 -41 172 1 -42 168 1 -43 170 1 -44 176 1 -45 59 1 -46 171 1 -47 61 1 -48 166 1 -49 169 1 -50 56 1 -51 60 1 -52 34 1 -53 33 1 -54 57 1 -55 24 1 -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 58 0 -70 238 0 -71 155 0 -72 222 1 -73 220 1 -74 81 1 -75 85 1 -76 79 1 -77 206 1 -78 204 1 -79 200 1 -80 18 0 -81 132 0 -82 133 0 -83 162 0 -84 143 0 -85 131 0 -86 146 0 -87 147 0 -88 44 0 -89 160 0 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 -133 82 0 diff --git a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v7.txt b/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v7.txt deleted file mode 100644 index f3e1a551f..000000000 --- a/sbndcode/ChannelMaps/CRT/SBNDCRTChannelMap_v7.txt +++ /dev/null @@ -1,88 +0,0 @@ -40 173 1 -41 172 1 -42 168 1 -43 170 1 -44 176 1 -45 59 1 -46 171 1 -47 61 1 -48 166 0 -49 169 0 -50 56 0 -51 60 0 -52 34 1 -53 33 1 -54 57 1 -55 24 1 -56 159 1 -57 153 1 -58 156 1 -59 152 1 -60 182 1 -61 158 1 -62 157 1 -63 136 0 -64 150 0 -65 151 0 -66 134 0 -67 135 0 -68 149 0 -69 58 0 -70 238 0 -71 155 0 -72 222 1 -73 220 1 -74 81 1 -75 85 1 -76 79 1 -77 206 1 -78 204 1 -79 200 1 -80 18 0 -81 132 0 -82 133 0 -83 162 0 -84 143 0 -85 131 0 -86 146 0 -87 147 0 -88 44 0 -89 160 0 -90 19 1 -91 202 1 -92 199 1 -93 197 1 -94 207 1 -95 203 1 -96 45 1 -97 198 1 -98 174 1 -99 148 1 -100 163 1 -101 164 1 -102 165 1 -103 80 1 -104 193 0 -105 42 0 -106 138 0 -107 130 1 -108 77 0 -109 78 0 -110 98 1 -111 97 1 -112 87 1 -113 95 1 -114 94 1 -115 93 1 -116 86 0 -117 83 0 -118 84 0 -119 104 1 -120 103 1 -121 102 1 -122 101 1 -123 100 1 -124 99 1 -125 90 0 -126 91 0 -133 82 0 diff --git a/sbndcode/ChannelMaps/CRT/crt_channel_map_service.fcl b/sbndcode/ChannelMaps/CRT/crt_channel_map_service.fcl index 9fee88b75..d2db2c3ad 100644 --- a/sbndcode/ChannelMaps/CRT/crt_channel_map_service.fcl +++ b/sbndcode/ChannelMaps/CRT/crt_channel_map_service.fcl @@ -2,7 +2,7 @@ BEGIN_PROLOG crt_channel_map_standard: { - FileName: "SBNDCRTChannelMap_v7.txt" + FileName: "SBNDCRTChannelMap_Commissioning_v5.txt" } END_PROLOG diff --git a/sbndcode/Commissioning/fcls/hitdumpermodule.fcl b/sbndcode/Commissioning/fcls/hitdumpermodule.fcl index 6c534dfbb..ba0bbe21e 100644 --- a/sbndcode/Commissioning/fcls/hitdumpermodule.fcl +++ b/sbndcode/Commissioning/fcls/hitdumpermodule.fcl @@ -29,8 +29,8 @@ hitdumper: MCShowerModuleLabel: "mcreco" KeepCRTStripHits: true - KeepCRTSpacePoints: false - KeepCRTTracks: false + KeepCRTSpacePoints: true + KeepCRTTracks: true readOpHits: true readpmtTrigger: true readpmtSoftTrigger: true diff --git a/sbndcode/Decoders/PMT/CMakeLists.txt b/sbndcode/Decoders/PMT/CMakeLists.txt index 053b8d526..5897e0e87 100644 --- a/sbndcode/Decoders/PMT/CMakeLists.txt +++ b/sbndcode/Decoders/PMT/CMakeLists.txt @@ -1,17 +1,20 @@ -art_make( - MODULE_LIBRARIES +cet_build_plugin( SBNDPMTDecoder art::module + SOURCE SBNDPMTDecoder_module.cc + LIBRARIES sbndaq_artdaq_core::sbndaq-artdaq-core_Overlays_SBND sbnobj::SBND_Timing - + lardata::Utilities + canvas::canvas lardataobj::RecoBase - + lardataobj::RawData + lardataobj::headers art_root_io::TFileService_service art_root_io::tfile_support artdaq_core::artdaq-core_Data - ROOT::Core ROOT::Tree - ) install_fhicl() +install_headers() +install_source() diff --git a/sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc b/sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc index c62f4afcd..a6b996a20 100644 --- a/sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc +++ b/sbndcode/Decoders/PMT/SBNDPMTDecoder_module.cc @@ -15,17 +15,23 @@ #include "art/Framework/Principal/Run.h" #include "art/Framework/Principal/SubRun.h" #include "canvas/Utilities/InputTag.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "canvas/Persistency/Common/PtrVector.h" +#include "canvas/Persistency/Common/Assns.h" +#include "art/Persistency/Common/PtrMaker.h" #include "fhiclcpp/ParameterSet.h" #include "messagefacility/MessageLogger/MessageLogger.h" -#include "sbndaq-artdaq-core/Overlays/Common/CAENV1730Fragment.hh" #include "artdaq-core/Data/Fragment.hh" -#include "sbndaq-artdaq-core/Overlays/FragmentType.hh" #include "artdaq-core/Data/ContainerFragment.hh" -#include "sbnobj/SBND/Timing/DAQTimestamp.hh" +#include "artdaq-core/Data/RawEvent.hh" +#include "sbndaq-artdaq-core/Overlays/Common/CAENV1730Fragment.hh" #include "sbndaq-artdaq-core/Overlays/SBND/PTBFragment.hh" +#include "sbndaq-artdaq-core/Overlays/FragmentType.hh" +#include "sbnobj/SBND/Timing/DAQTimestamp.hh" #include "sbndcode/Decoders/PTB/sbndptb.h" +#include "sbndcode/Timing/SBNDRawTimingObj.h" #include "art_root_io/TFileService.h" #include "TH1D.h" @@ -68,8 +74,7 @@ class sbndaq::SBNDPMTDecoder : public art::EDProducer { uint32_t get_length(artdaq::Fragment & frag); uint32_t get_ttt(artdaq::Fragment & frag); uint32_t get_boardid(artdaq::Fragment & frag); - void get_timing(artdaq::Fragment & frag, uint32_t & ttt, uint32_t & len, int & tick); - + void get_timing(artdaq::Fragment & frag, uint16_t & postpercent, uint32_t & ttt, uint32_t & len, int & tick); private: uint fdebug; @@ -81,21 +86,36 @@ class sbndaq::SBNDPMTDecoder : public art::EDProducer { std::vector fignore_fragid; uint32_t fnominal_length; + uint32_t fraw_ts_correction; + std::string fspectdc_product_name; uint32_t fspectdc_ftrig_ch; uint32_t fspectdc_etrig_ch; std::string fptb_product_name; - ULong64_t fptb_etrig_trigword; + uint fptb_etrig_trigword_min; + uint fptb_etrig_trigword_max; uint32_t fptb_etrig_wordtype; + uint fptb_raw_diff_max; + + uint fallowed_time_diff; + + std::string fpmt_instance_name; + std::string fflt_instance_name; + std::string ftim_instance_name; + + std::string fpmt_timing_instance_name; + std::string fflt_timing_instance_name; + std::string ftim_timing_instance_name; - std::string fch_instance_name; - std::string ftr_instance_name; bool foutput_ftrig_wvfm; + bool foutput_timing_wvfm; + std::vector fignore_timing_ch; int fn_maxflashes; uint fn_caenboards; uint16_t fthreshold_ftrig; + uint16_t fdefault_postpercent; // should be a number between 0 and 100 uint ffragid_offset; uint fhist_evt; @@ -103,7 +123,6 @@ class sbndaq::SBNDPMTDecoder : public art::EDProducer { std::vector fset_fragid_map; bool fuse_set_map; - std::vector fch_map; // histogram info @@ -125,22 +144,35 @@ sbndaq::SBNDPMTDecoder::SBNDPMTDecoder(fhicl::ParameterSet const& p) fnominal_length = p.get("nominal_length",5000); ftiming_type = p.get("timing_type",0); + + fraw_ts_correction = p.get("raw_ts_correction",367000); // ns fspectdc_product_name = p.get("spectdc_product_name","tdcdecoder"); fspectdc_ftrig_ch = p.get("spectdc_ftrig_ch",3); fspectdc_etrig_ch = p.get("spectdc_etrig_ch",4); fptb_product_name = p.get("ptb_product_name","ptbdecoder"); - fptb_etrig_trigword = p.get("ptb_etrig_trigword",0x0000000000000000); + fptb_etrig_trigword_min = p.get("ptb_etrig_trigword_min",1); + fptb_etrig_trigword_max = p.get("ptb_etrig_trigword_max",10000); fptb_etrig_wordtype = p.get("ptb_etrig_wordtype",2); + fptb_raw_diff_max = p.get("ptb_raw_diff_max",3000000); // ns + + fallowed_time_diff = p.get("allowed_time_diff",3000); // us!!! + fpmt_instance_name = p.get("pmtInstanceName","PMTChannels"); + fflt_instance_name = p.get("ftrigInstanceName","FTrigChannels"); + ftim_instance_name = p.get("timingInstanceName","TimingChannels"); + fpmt_timing_instance_name = p.get("pmtTimingInstanceName","PMTTiming"); + fflt_timing_instance_name = p.get("ftrigTimingInstanceName","FTrigTiming"); + ftim_timing_instance_name = p.get("timingTimingInstanceName","TimingTiming"); - fch_instance_name = p.get("pmtInstanceName","PMTChannels"); - ftr_instance_name = p.get("ftrigInstanceName","FTrigChannels"); foutput_ftrig_wvfm = p.get("output_ftrig_wvfm",true); + foutput_timing_wvfm = p.get("output_timing_wvfm",true); + fignore_timing_ch = p.get>("ignore_timing_ch",{}); fn_maxflashes = p.get("n_maxflashes",30); fn_caenboards = p.get("n_caenboards",8); fthreshold_ftrig = p.get("threshold_ftrig",16350); + fdefault_postpercent = p.get("default_postpercent",80); ffragid_offset = p.get("fragid_offset",40960); fhist_evt = p.get("hist_evt",1); @@ -149,20 +181,42 @@ sbndaq::SBNDPMTDecoder::SBNDPMTDecoder(fhicl::ParameterSet const& p) fch_map = p.get>("ch_map",{}); - produces< std::vector< raw::OpDetWaveform > >(fch_instance_name); - produces< std::vector< raw::OpDetWaveform > >(ftr_instance_name); + produces< std::vector< raw::OpDetWaveform > >(fpmt_instance_name); + produces< std::vector< raw::OpDetWaveform > >(fflt_instance_name); + produces< std::vector< raw::OpDetWaveform > >(ftim_instance_name); + + produces< raw::TimingReferenceInfo >(); + produces< std::vector< raw::pmt::BoardTimingInfo > >(); + produces< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform > >(fpmt_timing_instance_name); + produces< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform > >(fflt_timing_instance_name); + produces< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform > >(ftim_timing_instance_name); } void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) { - std::unique_ptr< std::vector< raw::OpDetWaveform > > wvfmVec(std::make_unique< std::vector< raw::OpDetWaveform > > ()); - std::unique_ptr< std::vector< raw::OpDetWaveform > > twvfmVec(std::make_unique< std::vector< raw::OpDetWaveform > > ()); + // output data products + std::unique_ptr< std::vector< raw::OpDetWaveform > > pmtwvfmVec (new std::vector< raw::OpDetWaveform >); + std::unique_ptr< std::vector< raw::OpDetWaveform > > fltwvfmVec (new std::vector< raw::OpDetWaveform >); + std::unique_ptr< std::vector< raw::OpDetWaveform > > timwvfmVec (new std::vector< raw::OpDetWaveform >); + + std::unique_ptr< raw::TimingReferenceInfo > evtTimingInfo (new raw::TimingReferenceInfo()); + std::unique_ptr< std::vector< raw::pmt::BoardTimingInfo > > brdTimingInfoVec (new std::vector< raw::pmt::BoardTimingInfo >); + + // creating PtrMakers for the associations + art::PtrMaker make_pmtbrd_ptr{evt}; + + art::PtrMaker make_pmtwvfm_ptr{evt,fpmt_instance_name}; + art::PtrMaker make_fltwvfm_ptr{evt,fflt_instance_name}; + art::PtrMaker make_timwvfm_ptr{evt,ftim_instance_name}; + + // making the associations + std::unique_ptr< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform> > pmtTimingAssns (new art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform >); + std::unique_ptr< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform> > fltTimingAssns (new art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform >); + std::unique_ptr< art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform> > timTimingAssns (new art::Assns< raw::pmt::BoardTimingInfo, raw::OpDetWaveform >); evt_counter++; std::vector> board_frag_v(fn_caenboards); - uint64_t event_trigger_time = 0; - uint ncont = 0; // counter for number of containers bool found_caen = false; @@ -204,18 +258,43 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) if (found_caen==false){ if (fdebug>0) std::cout << "No CAEN V1730 fragments of any type found, pushing empty waveforms." << std::endl; - evt.put(std::move(wvfmVec),fch_instance_name); - evt.put(std::move(twvfmVec),ftr_instance_name); + evt.put(std::move(pmtwvfmVec),fpmt_instance_name); + evt.put(std::move(fltwvfmVec),fflt_instance_name); + evt.put(std::move(timwvfmVec),ftim_instance_name); + + evt.put(std::move(evtTimingInfo)); + evt.put(std::move(brdTimingInfoVec)); + + evt.put(std::move(pmtTimingAssns),fpmt_timing_instance_name); + evt.put(std::move(fltTimingAssns),fflt_timing_instance_name); + evt.put(std::move(timTimingAssns),ftim_timing_instance_name); return; } // create a timing type per event so the default doesn't get overwritten + uint64_t event_trigger_time = 0; // in ns auto timing_type = ftiming_type; - + int timing_ch = -1; + + // get the raw event header timestamp + art::Handle header_handle; + uint64_t raw_timestamp = 0; + evt.getByLabel("daq", "RawEventHeader", header_handle); + if ((header_handle.isValid())){ + auto rawheader = artdaq::RawEvent(*header_handle); + raw_timestamp = rawheader.timestamp() - fraw_ts_correction; // includes sec + ns portion + if (fdebug>1) + std::cout << "Raw timestamp (w/ correction) -> " << "ts (ns): " << raw_timestamp % uint64_t(1e9) << ", sec (s): " << raw_timestamp / uint64_t(1e9) << std::endl; + } + // get spec tdc product if (timing_type==0){ art::Handle> tdcHandle; evt.getByLabel(fspectdc_product_name,tdcHandle); + bool found_ett = false; + std::vector tdc_etrig_v; + uint64_t min_raw_tdc_diff = uint64_t(1e12); + if (!tdcHandle.isValid() || tdcHandle->size() == 0){ if (fdebug>0) std::cout << "No SPECTDC products found." << std::endl; timing_type++; @@ -239,10 +318,34 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) << ", offset: " << offset << std::endl; } - if (ch==fspectdc_etrig_ch) - event_trigger_time = ts%uint64_t(1e9); + if (ch==fspectdc_etrig_ch){ + found_ett = true; + tdc_etrig_v.push_back(ts); + timing_ch = fspectdc_etrig_ch; + } } - } + if (found_ett==false) + timing_type++; + else{ + if (tdc_etrig_v.size()==1){ + event_trigger_time = tdc_etrig_v.front()%uint64_t(1e9); + } + else{ // finding the closest ETRIG to the raw timestamp + for (size_t i=0; i < tdc_etrig_v.size(); i++){ + auto tdc_etrig = tdc_etrig_v[i]; + uint64_t diff; + if (tdc_etrig < (raw_timestamp)) + diff = raw_timestamp - tdc_etrig; + else + diff = tdc_etrig - raw_timestamp; + if (diff < min_raw_tdc_diff){ + event_trigger_time = tdc_etrig%uint64_t(1e9); + min_raw_tdc_diff = diff; + } + } + } + } + } // end else statement for finding tdc } if (timing_type==1){ // get ptb product @@ -254,6 +357,9 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) } else{ const std::vector ptb_v(*ptbHandle); + std::vector hlt_words; + std::vector hlt_timestamps; + for (size_t i=0; i1) std::cout << "PTB (decoded) HLTs found: " << std::endl; for (size_t j=0; j < hltrigs.size(); j++){ raw::ptb::Trigger trig = hltrigs.at(j); + uint ptb_word; + uint64_t ptb_timestamp = (trig.timestamp * 20)%(uint(1e9)); + std::stringstream ss; ss << std::hex << trig.trigger_word << std::dec; ss >> ptb_word; if (fdebug>1){ std::cout << " PTB HLT " << j << "-> " - << "ts (ns): " << (trig.timestamp * 20)%(uint(1e9)) - << ", trigger word: " << std::hex << trig.trigger_word << std::dec + << "ts (ns): " << ptb_timestamp + << ", trigger word: " << ptb_word << ", word type: " << trig.word_type - << std::endl; + << std::endl; } - if (trig.trigger_word == fptb_etrig_trigword && trig.word_type == fptb_etrig_wordtype){ - event_trigger_time = (trig.timestamp * 20)%(uint64_t(1e9)); - break; + // don't account for rollover... PTB second part is not trustworthly anyhow + if (std::abs(int(raw_timestamp%uint(1e9)) - int(ptb_timestamp)) > fptb_raw_diff_max) + continue; + if ((trig.word_type==fptb_etrig_wordtype) & (ptb_word >= fptb_etrig_trigword_min) & (ptb_word <= fptb_etrig_trigword_max)){ + hlt_words.push_back(ptb_word); + hlt_timestamps.push_back(ptb_timestamp); } } } // end hlt check - else timing_type++; } // end of loop over ptb products + if (hlt_words.empty()) + timing_type++; + else{ + uint smallest_word = fptb_etrig_trigword_max; + size_t smallest_idx = 0; + for (size_t i=0; i < hlt_words.size(); i++){ + if (hlt_words.at(i) < smallest_word){ + smallest_idx = i; + smallest_word = hlt_words.at(i); + } + } + if (smallest_word==fptb_etrig_trigword_max){ + std::cout << "No valid PTB HLTs found." << std::endl; + timing_type++; + } + else{ + timing_ch = smallest_word; + event_trigger_time = hlt_timestamps.at(smallest_idx); + } + } } // end handle validity check } // end of timing type 1 if (timing_type==2){ @@ -284,7 +415,21 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) // if neither PTB or SPEC products are found, the timestamp will be equal to // the start of the waveform (according to CAEN TTT and wvfm length) event_trigger_time = 0; + timing_ch=16; + } + + if (fdebug>1){ + std::cout << "Using " ; + if (timing_type==0) + std::cout << "SPECTDC for event reference time, "; + else if (timing_type==1) + std::cout << "PTB for event reference time, "; + else if (timing_type==2) + std::cout << "CAEN-only for event reference time, "; + std::cout << "channel/word " << timing_ch << ", event trigger time: " << event_trigger_time << " ns" << std::endl; } + evtTimingInfo->timingType = timing_type; + evtTimingInfo->timingChannel = timing_ch; bool extended_flag = false; @@ -302,9 +447,7 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) } if (std::find(fignore_fragid.begin(), fignore_fragid.end(), iboard) != fignore_fragid.end()) continue; - if (fdebug>1) std::cout << "Board " << iboard << " has " << board_frag_v.at(iboard).size() << " trigger(s) || " ; } - if (fdebug>1) std::cout << std::endl; // store the waveform itself // store the waveform start time (for OpDetWaveform timestamp) @@ -315,27 +458,44 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) continue; if (frag_v.empty()) continue; auto fragid = iboard; + // trigger number bookkeeping auto trig_counter = 0; + auto full_found = 0; + auto extensions_found = 0; + auto extensions_used = 0; for (size_t itrig=0; itrig < frag_v.size(); itrig++){ + raw::pmt::BoardTimingInfo board_info; + std::vector board_ttt_v; std::vector> iwvfm_v; auto ifrag = frag_v.at(itrig); - uint32_t ittt = 0; + uint16_t ipostpercent = 0; // nanosecond portion of the timestamp (at flash trigger) + uint32_t ittt = 0; // trigger time tag in ns (at end of the waveform) uint32_t ilen = 0; int itick = 0; - get_timing(ifrag, ittt, ilen, itick); + get_timing(ifrag, ipostpercent, ittt, ilen, itick); // if this waveform is short, skip it - if (ilen < fnominal_length) continue; + if (ilen < fnominal_length){ + extensions_found++; + continue; + } + full_found++; + board_info.postPercent = ipostpercent; + board_ttt_v.push_back(ittt); get_waveforms(ifrag, iwvfm_v); - auto iwvfm_start = ittt - 2*ilen; + uint iwvfm_start = 0; auto iwvfm_end = ittt; - if (fdebug>1){ - std::cout << " Frag ID: " << fragid + // need to check if there is rollover between ttt and start + if (ittt < ilen*2) + iwvfm_start = 1e9 - (ilen*2 - ittt); + else iwvfm_start = ittt - ilen*2; + + if (fdebug>2){ + std::cout << " Board: " << fragid << ", ttt: " << ittt - << ", tick: " << itick << ", frag ts: " << ifrag.timestamp()%uint(1e9) << ", length: " << ilen << std::endl; @@ -345,29 +505,60 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) auto jfrag = frag_v.at(jtrig); auto jlen = get_length(jfrag); auto jttt = get_ttt(jfrag); - // if the next trigger is more than 10 us away than the end of the wvfm or is equal to the nominal length, stop looking - if (((signed)(jttt - iwvfm_end) > (signed)(fnominal_length*2)) || (jlen >= fnominal_length)) break; - else if (((jttt - iwvfm_end) < 1e4) && (jlen < fnominal_length)){ + // to be an extended trigger, need to fulfill both conditions: + // 1. the length of the extension will be less than the nominal length + // 2. the time between the first ttt and the extended ttt will be less than the nominal length*2 (2 ns tick) + bool length_check = (jlen < fnominal_length); + bool ttt_check=false; + if (iwvfm_end < uint(1e9-fnominal_length*2)){ + if ((jttt-iwvfm_end) < fnominal_length*2) + ttt_check = true; + } + // if the end of wvfm is less than 10 us away from end of the second, may be second rollover + else if ((iwvfm_end > uint(1e9-fnominal_length*2)) && (jttt < fnominal_length*2)) { + if ((jttt + 1e9 - iwvfm_end) < fnominal_length*2){ + ttt_check = true; + } + } + if (length_check && ttt_check){ + if (fdebug>3){ + std::cout << " Board: " << fragid + << ", ttt: " << jttt + << ", frag ts: " << jfrag.timestamp()%uint(1e9) + << ", length: " << jlen + << std::endl; + } + extensions_used++; + board_ttt_v.push_back(jttt); std::vector> jwvfm_v; get_waveforms(jfrag, jwvfm_v); for (size_t ich=0; ich < iwvfm_v.size(); ich++){ std::vector& orig_wvfm = iwvfm_v.at(ich); std::vector extd_wvfm = jwvfm_v.at(ich); // extended waveform orig_wvfm.insert( orig_wvfm.end(), extd_wvfm.begin(), extd_wvfm.end()); - } // end ch loop + } // end ch loop + } // end if extension condition + else break; // if the immediate next trigger is not an extension, break iwvfm_end = jttt; } // end jtrig loop if (fdebug>2){ - std::cout << " Frag ID: " << fragid + std::cout << " Board: " << fragid << " -> start time: " << int(iwvfm_start) - int(event_trigger_time) - << " , wvfm length: " << iwvfm_v.at(0).size() - << std::endl; + << " , extended wvfm length: " << iwvfm_v.at(0).size() + << std::endl; } - } // end extended flag + } // end extended flag + board_info.triggerTimeTag = board_ttt_v; + brdTimingInfoVec->push_back(board_info); + art::Ptr brdTimingInfoPtr = make_pmtbrd_ptr(brdTimingInfoVec->size()-1); + for (size_t i = 0; i < iwvfm_v.size(); i++){ auto combined_wvfm = iwvfm_v[i]; - if (evt_counter==fhist_evt){ // histo: save waveforms section for combined waveforms + if (evt_counter==fhist_evt){ + // histo: save waveforms section for combined waveforms + if ((fragid==8) && (std::find(fignore_timing_ch.begin(), fignore_timing_ch.end(), i) != fignore_timing_ch.end())) + continue; histname.str(std::string()); histname << "evt" << evt.event() << "_trig" << trig_counter << "_frag" << fragid << "_ch" << i << "_combined_wvfm"; @@ -377,28 +568,72 @@ void sbndaq::SBNDPMTDecoder::produce(art::Event& evt) wvfmHist->SetBinContent(n + 1, (double)combined_wvfm[n]); } double time_diff = (int(iwvfm_start) - int(event_trigger_time))*1e-3; // us + if ((std::abs(time_diff) > fallowed_time_diff) && (timing_type<2)){ + // second rollover between reference time and waveform start + if (std::abs(time_diff + 1e6) < fallowed_time_diff) + time_diff += 1e6; // us + // second rollover between waveform start and reference time + else if (std::abs(time_diff - 1e6) < fallowed_time_diff) + time_diff -= 1e6; // us + else if (fdebug>1) + std::cout << "WARNING: TIME DIFFERENCE IS GREATER THAN " << fallowed_time_diff << " us. Event timestamp: " << event_trigger_time << ", waveform timestamp: " << iwvfm_start << std::endl; + } uint ch; - if (i == 15){ + if (i == 15) ch = fragid; - } else ch = fch_map.at(fragid*15 + i); raw::OpDetWaveform waveform(time_diff, ch, combined_wvfm); - - if (i == 15){ - if (foutput_ftrig_wvfm) twvfmVec->push_back(waveform); + if ((i == 15) && (foutput_ftrig_wvfm)){ + fltwvfmVec->push_back(waveform); + art::Ptr wvfmPtr = make_fltwvfm_ptr(fltwvfmVec->size()-1); + fltTimingAssns->addSingle(brdTimingInfoPtr, wvfmPtr); + } + else if ((fragid == 8)){ // fyi: this hardcodes the timing caen board index + if ((foutput_timing_wvfm) && (std::find(fignore_timing_ch.begin(), fignore_timing_ch.end(), i) == fignore_timing_ch.end())){ + timwvfmVec->push_back(waveform); + art::Ptr wvfmPtr = make_timwvfm_ptr(timwvfmVec->size()-1); + timTimingAssns->addSingle(brdTimingInfoPtr, wvfmPtr); + } + } + else{ + pmtwvfmVec->push_back(waveform); + art::Ptr wvfmPtr = make_pmtwvfm_ptr(pmtwvfmVec->size()-1); + pmtTimingAssns->addSingle(brdTimingInfoPtr, wvfmPtr); } - else - wvfmVec->push_back(waveform); } - trig_counter++; - - } // end itrig loop + trig_counter++; + } // end itrig loop + + if (fdebug>1){ + bool trigger_bookkeeping = (full_found + extensions_used) == int(frag_v.size()); + bool found_used = (extensions_used == extensions_found); + std::cout << " Board: " << fragid + << ", passed trigger bookkeeping: " << (trigger_bookkeeping && found_used) + << std::endl; + if (fdebug>2){ + // print number of triggers, number of extensions found, and number of extensions used + std::cout << " Board: " << fragid + << " -> # of triggers: " << frag_v.size() + << ", full found: " << full_found + << ", extensions found: " << extensions_found + << ", extensions used: " << extensions_used + << std::endl; + } + } } // end board loop board_frag_v.clear(); - evt.put(std::move(wvfmVec),fch_instance_name); - evt.put(std::move(twvfmVec),ftr_instance_name); + evt.put(std::move(pmtwvfmVec),fpmt_instance_name); + evt.put(std::move(fltwvfmVec),fflt_instance_name); + evt.put(std::move(timwvfmVec),ftim_instance_name); + + evt.put(std::move(evtTimingInfo)); + evt.put(std::move(brdTimingInfoVec)); + + evt.put(std::move(pmtTimingAssns),fpmt_timing_instance_name); + evt.put(std::move(fltTimingAssns),fflt_timing_instance_name); + evt.put(std::move(timTimingAssns),ftim_timing_instance_name); } void sbndaq::SBNDPMTDecoder::get_fragments(artdaq::Fragment & frag, std::vector> & board_frag_v){ @@ -410,15 +645,16 @@ void sbndaq::SBNDPMTDecoder::get_fragments(artdaq::Fragment & frag, std::vector< fragid = idx; } } - // ignore boards that are not in the list of boards to ignore + // ignore boards that are in the list of boards to ignore if (std::find(fignore_fragid.begin(), fignore_fragid.end(), fragid) != fignore_fragid.end()) return; - // check our fragid, is it reasonable? - if (fragid<0 || fragid >= fn_caenboards){ + else if ((fragid>=0) && (fragid < fn_caenboards )){ + board_frag_v.at(fragid).push_back(frag); + } + // if fragid is out of range + else{ std::cout << "Fragment ID " << fragid << " is out of range. FragID offset/FragID map may be misconfigured, or this FragID is not attributed to a PMT Digitizer. Skipping this fragment..." << std::endl; - return; } - board_frag_v.at(fragid).push_back(frag); } void sbndaq::SBNDPMTDecoder::get_waveforms(artdaq::Fragment & frag, std::vector> & wvfm_v){ @@ -452,8 +688,8 @@ void sbndaq::SBNDPMTDecoder::get_waveforms(artdaq::Fragment & frag, std::vector< } } - -void sbndaq::SBNDPMTDecoder::get_timing(artdaq::Fragment & frag, +void sbndaq::SBNDPMTDecoder::get_timing(artdaq::Fragment & frag, + uint16_t & frag_postpercent, uint32_t & frag_ttt, uint32_t & frag_len, int & frag_tick){ @@ -474,9 +710,29 @@ void sbndaq::SBNDPMTDecoder::get_timing(artdaq::Fragment & frag, uint32_t data_size_double_bytes = 2*(ev_size_quad_bytes - evt_header_size_quad_bytes); uint32_t wvfm_length = data_size_double_bytes/nch; + auto frag_ts = frag.timestamp()%uint(1e9); frag_ttt = header.triggerTimeTag*8; frag_len = wvfm_length; + if (wvfm_length < fnominal_length){ // if an extension + frag_postpercent = fdefault_postpercent; + } + else{ + if (frag_ts!=frag_ttt){ + // this assumes that if timestamp != ttt... then the time tag shift is enabled in the caen configuration + if (frag_ttt>frag_ts) + frag_postpercent = round((100.0*(frag_ttt-frag_ts)/(frag_len*2.0))); + else // second rollover between ts and ttt + frag_postpercent = round((100.0*(1e9+frag_ttt-frag_ts)/(frag_len*2.0))); + if (frag_postpercent > 100){ + std::cout << "WARNING: Postpercent is not correctly configured!! Saving default postpercent." << std::endl; + frag_postpercent = fdefault_postpercent; + } + } + else + frag_postpercent = fdefault_postpercent; + } + const uint16_t* data_begin = reinterpret_cast(frag.dataBeginBytes() + sizeof(CAENV1730EventHeader)); const uint16_t* value_ptr = data_begin; diff --git a/sbndcode/Decoders/PMT/pmtdecoder.fcl b/sbndcode/Decoders/PMT/pmtdecoder.fcl index 07e7a5ee6..436d299df 100644 --- a/sbndcode/Decoders/PMT/pmtdecoder.fcl +++ b/sbndcode/Decoders/PMT/pmtdecoder.fcl @@ -13,36 +13,46 @@ pmtdecoder: # configure CAEN inputs caen_fragment_name: [ "CAENV1730", "ContainerCAENV1730" ] - ignore_fragid: [8] # boards to ignore for testing purposes, fragid==8 is the timing board, this is 0-indexed! + ignore_fragid: [] # boards to ignore for testing purposes, fragid==8 is the timing board, this is 0-indexed! nominal_length: 5000 # expected waveform length + raw_ts_correction: 367000 # ns, correction to the rawheader timestamp # configure SPEC TDC inputs spectdc_product_name: "tdcdecoder" # used if the tdc decoder has been run - spectdc_ftrig_ch: 3 # this should be the channel number of the spec tdc that stores the flash trigger - spectdc_etrig_ch: 4 # this should be the channel number of the spec tdc that stores the event trigger + spectdc_ftrig_ch: 3 # channel number of the spec tdc that stores the flash trigger + spectdc_etrig_ch: 4 # channel number of the spec tdc that stores the event trigger - # configure PTB inputs + # configure PTB inputs; the HLT with the smallest trigger word will be used (within some range to the rawheader timestamp) ptb_product_name: "ptbdecoder" - ptb_etrig_trigword: 0x0000000000000000 + ptb_etrig_trigword_min: 1 # minimum trigger word (in decimal) + ptb_etrig_trigword_max: 100000 # maximum trigger word (in decimal) ptb_etrig_wordtype: 2 + ptb_trig_raw_diff_max: 3000000 # the maximum allowed time difference in ns # configure output options + # use time difference between reference + CAEN used to determine rollover and/or weirdness + allowed_time_diff: 3000 # us!! not nanoseconds # configure the output data product instance names pmtInstanceName: "PMTChannels" ftrigInstanceName: "FTrigChannels" + timingInstanceName: "TimingChannels" output_ftrig_wvfm: true # whether or not to output the ftrig as an opdetwaveform (artroot data product) + output_timing_wvfm: true # whether or not to output the timing caen wvfms as an opdetwaveform (artroot data product) + ignore_timing_ch: [4,5,6,7,8,9,10,11,12,13,14] # only ch0=BES, ch1=RWM, ch2=ETRIG, ch3=MSUM, ch15=FTRIG # more detailed configurables n_maxflashes: 30 # maximum number of flashes anticipated, this is used for memory allocation - n_caenboards: 8 # number of caen boards; this is used for memory allocation + n_caenboards: 9 # number of caen boards; this is used for memory allocation + # 1-8 = PMT caens, 9th = timing caen threshold_ftrig: 16350 # the threshold for the flash trigger channel fragid_offset: 40960 # the offset to subtract to get single digit fragids; if use_set_map is true, should set this to 0 hist_evt: 1 # the # of the event used to generate the histograms, 1st event by default - # for when the fragIDs are mapped to the old configuration... - set_fragid_map: [3,7,5,9,11,13,15,17,19] # digitizers 0-8 are mapped to these fragids + # for when the fragIDs are mapped to the old configuration or you need to hardcode fragids... + ## to use this, must set `fragid_offset` to 0!!! use_set_map: false + set_fragid_map: [3,7,5,9,11,13,15,17,19] # use if `use_set_map` is true: digitizers 0-8 are mapped to these fragids # ordered in sets of 15 by increasing fragID # the PMT_to_Digitizers.txt file in the same directory is the reference for this @@ -54,7 +64,8 @@ pmtdecoder: 173,172,227,226,197,196,171,170,225,224,169,168,223,222,167, # digitizer 4 195,194,221,220,165,164,219,218,193,192,163,162,217,216,166, # digitizer 5 251,250,305,304,275,274,249,248,303,302,247,246,301,300,245, # digitizer 6 - 273,272,299,298,243,242,297,296,271,270,241,240,295,294,244] # digitizer 7 + 273,272,299,298,243,242,297,296,271,270,241,240,295,294,244, # digitizer 7 + 900,901,902,903,904,905,906,907,908,909,910,911,912,913,914] # digitizer 8 (TIMING CAEN) } END_PROLOG \ No newline at end of file diff --git a/sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h b/sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h index 4db9e294a..859778196 100644 --- a/sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h +++ b/sbndcode/Geometry/GeometryWrappers/CRTGeoAlg.h @@ -166,17 +166,16 @@ namespace sbnd::crt { double modulePosMother[3]; moduleNode->LocalToMaster(origin, modulePosMother); - if(_minos) + if(_minos || _adID == 70 || _adID == 139) orientation = (modulePosMother[2] < 0); else orientation = (modulePosMother[2] > 0); // Location of SiPMs - if(CRTCommonUtils::GetTaggerEnum(taggerName) == kBottomTagger || CRTCommonUtils::GetTaggerEnum(taggerName) == kNorthTagger - || CRTCommonUtils::GetTaggerEnum(taggerName) == kWestTagger || CRTCommonUtils::GetTaggerEnum(taggerName) == kEastTagger) - top = (orientation == 1) ? (modulePosMother[1] < 0) : (modulePosMother[0] > 0); - else + if(CRTCommonUtils::GetTaggerEnum(taggerName) == kSouthTagger || _adID == 82) top = (orientation == 0) ? (modulePosMother[1] < 0) : (modulePosMother[0] > 0); + else + top = (orientation == 1) ? (modulePosMother[1] < 0) : (modulePosMother[0] > 0); // Fill edges minX = std::min(limitsWorld.X(), limitsWorld2.X()); diff --git a/sbndcode/Geometry/gdml/sbnd_v02_03.gdml b/sbndcode/Geometry/gdml/sbnd_v02_03.gdml new file mode 100644 index 000000000..61e221207 --- /dev/null +++ b/sbndcode/Geometry/gdml/sbnd_v02_03.gdml @@ -0,0 +1,63117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sbndcode/Geometry/gdml/sbnd_v02_03_base.gdml b/sbndcode/Geometry/gdml/sbnd_v02_03_base.gdml new file mode 100644 index 000000000..8cb24a4e4 --- /dev/null +++ b/sbndcode/Geometry/gdml/sbnd_v02_03_base.gdml @@ -0,0 +1,7012 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sbndcode/Geometry/gdml/sbnd_v02_03_nowires.gdml b/sbndcode/Geometry/gdml/sbnd_v02_03_nowires.gdml new file mode 100644 index 000000000..0e6298984 --- /dev/null +++ b/sbndcode/Geometry/gdml/sbnd_v02_03_nowires.gdml @@ -0,0 +1,17391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sbndcode/Geometry/geometry_sbnd.fcl b/sbndcode/Geometry/geometry_sbnd.fcl index 20ed17689..d932523e1 100644 --- a/sbndcode/Geometry/geometry_sbnd.fcl +++ b/sbndcode/Geometry/geometry_sbnd.fcl @@ -53,8 +53,8 @@ BEGIN_PROLOG -sbnd_geometry_file: "sbnd_v02_02.gdml" -sbnd_geometry_file_nowires: "sbnd_v02_02_nowires.gdml" +sbnd_geometry_file: "sbnd_v02_03.gdml" +sbnd_geometry_file_nowires: "sbnd_v02_03_nowires.gdml" # diff --git a/sbndcode/JobConfigurations/base/evd_sbnd_data.fcl b/sbndcode/JobConfigurations/base/evd_sbnd_data.fcl index 0e614aeb2..26711263c 100644 --- a/sbndcode/JobConfigurations/base/evd_sbnd_data.fcl +++ b/sbndcode/JobConfigurations/base/evd_sbnd_data.fcl @@ -8,5 +8,5 @@ services: { services.RawDrawingOptions.SeeBadChannels: true services.RawDrawingOptions.MinimumSignal: 0 services.RawDrawingOptions.PedestalOption: 1 -Services.RawDrawingOptions.TotalTicks: 3415 +services.RawDrawingOptions.TotalTicks: 3427 services.ColorDrawingOptions.ColorOrGrayScale: 0 diff --git a/sbndcode/JobConfigurations/base/reco_drops.fcl b/sbndcode/JobConfigurations/base/reco_drops.fcl index 99ba8ded0..2a0bb0323 100644 --- a/sbndcode/JobConfigurations/base/reco_drops.fcl +++ b/sbndcode/JobConfigurations/base/reco_drops.fcl @@ -20,9 +20,9 @@ BEGIN_PROLOG reco_drops: [ @sequence::detsim_drops, "drop raw::RawDigits_*_*_*", "drop raw::OpDetWaveforms_*_*_*", - "drop *_sedlite_*_*" #drop all mlreco output - #"drop *_cluster3d_*_*", #drop cluster3d output - #"drop *_simplemerge_*_*" #drop all mlreco output + "drop *_sedlite_*_*", #drop all mlreco output + "drop *_cluster3d_*_*", #drop cluster3d output + "drop *_simplemerge_*_*" #drop all mlreco output ] END_PROLOG diff --git a/sbndcode/JobConfigurations/base/reco_sbnd.fcl b/sbndcode/JobConfigurations/base/reco_sbnd.fcl deleted file mode 100644 index 46fb216f3..000000000 --- a/sbndcode/JobConfigurations/base/reco_sbnd.fcl +++ /dev/null @@ -1,420 +0,0 @@ -# -# File: reco_sbnd.fcl -# Purpose: Defines a reconstruction configuration file for SBND. The official workflows should derive from this -# Version: 1.0 -# -# Changes: -# 20200923 (d.brailsford@lancster.ac.uk) [v1.0] -# Initial definition -# -# service configuration -# - -#include "mctrutht0matching.fcl" -#include "services_sbnd.fcl" -#include "simulationservices_sbnd.fcl" -#include "messages_sbnd.fcl" -#include "sam_sbnd.fcl" -#include "larfft_sbnd.fcl" -#include "signalservices_sbnd.fcl" - -# -# module configuration -# - -#include "caldata_sbnd.fcl" -#include "hitfindermodules_sbnd.fcl" -#include "trackfindermodules_sbnd.fcl" -#include "calorimetry_sbnd.fcl" -#include "showerfindermodules_sbnd.fcl" -#include "databaseutil_sbnd.fcl" -##include "opticaldetectormodules_sbnd.fcl" -#include "opdeconvolution_sbnd.fcl" -#include "sbnd_ophitfinder_deco.fcl" -#include "sbnd_flashfinder_deco.fcl" -#include "vertexfindermodules.fcl" -#include "pandoramodules_sbnd.fcl" -##include "triggeralgo_service.fcl" -##include "photpropservices_sbnd.fcl" -#include "particleid_sbnd.fcl" -#include "rootoutput_sbnd.fcl" - -#include "crtrecoproducers_sbnd.fcl" -#include "crttpcmatchingproducers_sbnd.fcl" - -#include "opt0finder_sbnd.fcl" - -#include "scecorrections.fcl" -#include "flashmatch_sbnd.fcl" - -#include "sbnd_trackcalo_skimmer.fcl" -#include "crtskim_sbnd.fcl" -#include "pmtskim_sbnd.fcl" - -#include "mlreco_sbnd.fcl" -#include "cluster_sbnd.fcl" - - -process_name: Reco - -services: -{ - # Load the service that manages root files for histograms. - TFileService: { fileName: @local::sbnd_tfileoutput.fileName } - message: @local::sbnd_message_services_prod # from messages_sbnd.fcl - FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl - @table::sbnd_services # from services_sbnd.fcl - @table::sbnd_random_services # from services_sbnd.fcl; required by fuzzyCluster - @table::sbnd_g4_services # from simulationservices_sbnd.fcl; required by opt0finder - LArFFT: @local::sbnd_larfft - SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl - BackTrackerService: @local::sbnd_backtrackerservice - ParticleInventoryService: @local::sbnd_particleinventoryservice - DetectorClocksService: @local::sbnd_detectorclocks -} - -#source is now a root file -source: -{ - module_type: RootInput - maxEvents: -1 # Number of events to create -} - -# Define and configure some modules to do work on each event. -# First modules are defined; they are scheduled later. -# Modules are grouped by type. -physics: -{ - - producers: - { - ### random number saver - rns: { module_type: RandomNumberSaver } - - ### optical deconvolution - opdecopmt: @local::SBNDOpDeconvolutionPMT - opdecoxarapuca: @local::SBNDOpDeconvolutionXARAPUCA - - ### optical hit finders - # ophit: @local::sbnd_hit_finder - ophitpmt: @local::SBNDDecoOpHitFinderPMT - ophitxarapuca: @local::SBNDDecoOpHitFinderXArapuca - - ### flash finders - # opflash: @local::sbnd_opflash - opflashtpc0: @local::SBNDDecoSimpleFlashTPC0 - opflashtpc1: @local::SBNDDecoSimpleFlashTPC1 - - # opflash(arapucas): @local::sbnd_opflash - opflashtpc0xarapuca: @local::SBNDDecoSimpleFlashTPC0Arapuca - opflashtpc1xarapuca: @local::SBNDDecoSimpleFlashTPC1Arapuca - - ### calwire producers - caldata: @local::sbnd_calwire - - ### hit-finder producers - gaushit: @local::sbnd_gaushitfinder - fasthit: @local::sbnd_fasthitfinder -# rffhit: @local::sbnd_rffhitfinder - - ### Truth-matich for hits - gaushitTruthMatch: @local::standard_mcparticlehitmatching - - ### corner-finder - #corner: @local::standard_cornerfinder - - ### cluster-finder producers - #fuzzycluster: @local::sbnd_fuzzycluster - #linecluster: @local::sbnd_linecluster - #cccluster: @local::sbnd_clustercrawler - #spacepts: @local::sbnd_spacepts - #blurredcluster: @local::sbnd_blurredcluster - - ### pandora - pandora: @local::sbnd_pandora - pandoraTrack: @local::sbnd_pandoraTrackCreation - pandoraShowerLegacy: @local::sbnd_pandoraShowerCreation - pandoraShower: @local::sbnd_incremental_pandoraModularShowerCreation - pandoraShowerSBN: @local::sbnd_sbn_pandoraModularShowerCreation - pandoraCalo: @local::sbnd_gnewcalomc - pandoraPid: @local::sbnd_chi2pid - - pandoraSCECalo: @local::sbnd_gnewcalomc - pandoraSCEPid: @local::sbnd_chi2pid - - pandoraCaloData: @local::sbnd_gnewcalodata - pandoraPidData: @local::sbnd_chi2pid - - ### SCE-aware pandora: - pandoraSCE: @local::scecorrection - pandoraSCETrack: @local::sbnd_pandoraTrackCreation - pandoraSCEShower: @local::sbnd_sce_incremental_pandoraModularShowerCreation - pandoraSCEShowerSBN: @local::sbnd_sce_sbn_pandoraModularShowerCreation - - ### track-finder producers - #trackkalmanhit: @local::sbnd_track3Dkalmanhit - #spacepointfinder: @local::sbnd_spacepoint_finder - #trackkalsps: @local::sbnd_kalman - - pmalgtrackmaker: @local::sbnd_pmalgtrackmaker - - ### shower-finder producers - emshower: @local::sbnd_emshower - - - ### vertex-finder producers - - ### calorimetry producers - #trackkalmanhitcalo: @local::sbnd_calomc - pmatrackcalo: @local::sbnd_calomc - pmatrackpid: @local::sbnd_chi2pid - - ### CRT reconstruction - crtstrips: @local::crtstriphitproducer_sbnd - crtclustering: @local::crtclusterproducer_sbnd - crtspacepoints: @local::crtspacepointproducer_sbnd - crttracks: @local::crttrackproducer_sbnd - - ### CRT-TPC matching - crtspacepointmatching: @local::crtspacepointmatchproducer_sbnd - crttrackmatching: @local::crttrackmatchproducer_sbnd - crtspacepointmatchingSCE: @local::crtspacepointmatchproducer_sbnd - crttrackmatchingSCE: @local::crttrackmatchproducer_sbnd - - ### flash-matching - fmatch: @local::sbnd_simple_flashmatch - fmatchSCE: @local::sbnd_simple_flashmatch_sce - fmatchop: @local::sbnd_simple_flashmatch_op - fmatchopSCE: @local::sbnd_simple_flashmatch_op_sce - fmatchara: @local::sbnd_simple_flashmatch_ara - fmatcharaSCE: @local::sbnd_simple_flashmatch_ara_sce - fmatchopara: @local::sbnd_simple_flashmatch_opara - fmatchoparaSCE: @local::sbnd_simple_flashmatch_opara_sce - opt0finder: @local::sbnd_opt0_finder_one_to_many - opt0finderSCE: @local::sbnd_opt0_finder_one_to_many - - ### Uncalibrated calorimetry producer for calibration caloskimmer - caloskimCalorimetry: @local::caloskim_calorimetry - - #ML Reco - cluster3d: @local::sbnd_cluster3d - - } - - #define the producer and filter modules for this path, order matters, - #filters reject all following items. see lines starting physics.producers below - reco1: [ rns - , opdecopmt - , opdecoxarapuca - , ophitpmt - , ophitxarapuca - , opflashtpc0 - , opflashtpc1 - , opflashtpc0xarapuca - , opflashtpc1xarapuca - # , caldata - , gaushit - # , fasthit - # , linecluster - , gaushitTruthMatch - # , rffhit - # , corner - # , fuzzycluster - , crtstrips - , cluster3d - ] - - reco2_no_opt0finder: [ - rns -# , linecluster - # , cccluster - # , spacepts, - # , blurredcluster - , pandora, pandoraTrack, pandoraShower, pandoraShowerSBN - # , pandoraShowerLegacy - , pandoraCalo, pandoraPid - # , trackkalmanhit, spacepointfinder, trackkalsps, - # , pmalgtrackmaker - # , trackkalmanhitcalo, - # , pmatrackcalo - # , pmatrackpid - # , emshower - , crtclustering - , crtspacepoints - , crttracks - , crtspacepointmatching - , crttrackmatching - , fmatch - , fmatchop - , fmatchara - , fmatchopara - , caloskimCalorimetry -] - - - # Run caloskimmer to produce ntuples for calibration as part of reco2 chain - - analyzers:{ - caloskim: @local::caloskim_nodigits_goldentracks - crtskim: @local::crtskim_sbnd - pmtskim: @local::pmtskim_sbnd - supera: @local::sbnd_supera - superampvmpr: @local::sbnd_supera_mpvmpr - } - - caloskimana: [ caloskim, crtskim, pmtskim ] - superaana: [ supera ] #outputs larcv.root for use in mlreco - - #define the output stream, there could be more than one if using filters - stream1: [ out1 ] - - #trigger_paths is a keyword and contains the paths that modify the art::event, - #trigger_paths is defined outside of the physics scope (below) as we want to merge sequences together - - #end_paths is a keyword and contains the paths that do not modify the art::Event, - #ie analyzers and output streams. these all run simultaneously - end_paths: [stream1] -} - -#block to define where the output goes. if you defined a filter in the physics -#block and put it in the trigger_paths then you need to put a SelectEvents: {SelectEvents: [XXX]} -#entry in the output stream you want those to go to, where XXX is the label of the filter module(s) -outputs: -{ - out1: - { - @table::sbnd_rootoutput - dataTier: "reconstructed" - outputCommands: [ - "keep *_*_*_*", - "drop raw::OpDetWaveforms_*_*_*", - "drop *raw::RawDigits*_*_*_*", - #"drop sim::SimChannels_*_*_*", - "drop sim::OpDetBacktrackerRecords_*_*_*", - #"drop *_linecluster_*_*", - "drop *_fasthit_*_*", - "drop *_cluster3d_*_*" #drop all mlreco output - #"drop *_simplemerge_*_*" #drop all mlreco output - ] - - - } -} - -physics.reco2: [ @sequence::physics.reco2_no_opt0finder, opt0finder ] - -#Here we tell ART that we want to run both sequences of paths. This has to be done here as ART is not able to find the sequences while still wrapped in physics{ } -physics.fullreco: [ @sequence::physics.reco1, - @sequence::physics.reco2 - ] -physics.fullreco_no_opt0finder: [ @sequence::physics.reco1, - @sequence::physics.reco2_no_opt0finder] - -physics.trigger_paths: [ fullreco ] - - - -### Here, we overwrite ALL module labels with the ones defined above. - -#physics.producers.opflash.InputModule: "optreadout" -#physics.producers.opflash.GenModule: "generator" - -# physics.producers.caldata.DigitModuleLabel: "daq" - -# physics.producers.gaushit.CalDataModuleLabel: "caldata" -physics.producers.gaushit.CalDataModuleLabel: "simtpc2d:gauss" -physics.producers.fasthit.DigitModuleLabel: "simtpc2d:daq" -#physics.producers.rffhit.CalDataModuleLabel: "caldata" - -#physics.producers.corner.CornerAlgParamSet.RawDataModuleLabel: "daq" -#physics.producers.corner.CornerAlgParamSet.CalDataModuleLabel: "caldata" -# -#physics.producers.linecluster.HitFinderModuleLabel: "gaushit" - -#physics.producers.fuzzycluster.HitsModuleLabel: "gaushit" -#physics.producers.fuzzycluster.CalDataModuleLabel: "caldata" - -#physics.producers.cccluster.CalDataModuleLabel: "caldata" -#physics.producers.cccluster.CCHitFinderAlg.CalDataModuleLabel: "caldata" - -### Added for Rhiannon's analysis work -physics.producers.pandoraCalo.TrackModuleLabel: "pandoraTrack" -physics.producers.pandoraCalo.FieldDistortion: false -physics.producers.pandoraCalo.FieldDistortionEfield: false -physics.producers.pandoraCalo.TrackIsFieldDistortionCorrected: false -physics.producers.pandoraPid.TrackModuleLabel: "pandoraTrack" -physics.producers.pandoraPid.CalorimetryModuleLabel: "pandoraCalo" - -physics.producers.pandoraSCECalo.TrackModuleLabel: "pandoraSCETrack" -physics.producers.pandoraSCECalo.FieldDistortion: true -physics.producers.pandoraSCECalo.FieldDistortionEfield: true -physics.producers.pandoraSCECalo.TrackIsFieldDistortionCorrected:true -physics.producers.pandoraSCEPid.TrackModuleLabel: "pandoraSCETrack" -physics.producers.pandoraSCEPid.CalorimetryModuleLabel: "pandoraSCECalo" - -physics.producers.pandoraCaloData.TrackModuleLabel: "pandoraTrack" -physics.producers.pandoraCaloData.FieldDistortion: false -physics.producers.pandoraCaloData.FieldDistortionEfield: false -physics.producers.pandoraCaloData.TrackIsFieldDistortionCorrected: false -physics.producers.pandoraPidData.TrackModuleLabel: "pandoraTrack" -physics.producers.pandoraPidData.CalorimetryModuleLabel: "pandoraCaloData" - -physics.analyzers.caloskim.SimChannelproducer: "simtpc2d:simpleSC" - -physics.producers.opt0finderSCE.SliceProducer: "pandoraSCE" -physics.producers.opt0finderSCE.TrackProducer: "pandoraSCETrack" -physics.producers.opt0finderSCE.ShowerProducer: "pandoraSCEShowerSBN" -physics.producers.opt0finderSCE.CaloProducer: "pandoraSCECalo" - -#physics.producers.trackkalmanhit.HitModuleLabel: "gaushit" -#physics.producers.trackkalmanhit.ClusterModuleLabel: "fuzzycluster" -#physics.producers.trackkalmanhit.ClusterModuleLabel: "cccluster" - -physics.producers.pmalgtrackmaker.HitModuleLabel: "linecluster" -physics.producers.pmalgtrackmaker.ClusterModuleLabel: "linecluster" -physics.producers.pmalgtrackmaker.EmClusterModuleLabel: "" # do not exculde any cluster - - -#physics.producers.spacepointfinder.ClusterModuleLabel: "fuzzycluster" -#physics.producers.spacepointfinder.ClusterModuleLabel: "cccluster" - -#physics.producers.trackkalmanhitcalo.TrackModuleLabel: "trackkalmanhit" -#physics.producers.trackkalmanhitcalo.SpacePointModuleLabel: "trackkalmanhit" - -physics.producers.pmatrackcalo.TrackModuleLabel: "pmalgtrackmaker" -physics.producers.pmatrackcalo.SpacePointModuleLabel: "pmalgtrackmaker" -physics.producers.pmatrackpid.TrackModuleLabel: "pmalgtrackmaker" -physics.producers.pmatrackpid.CalorimetryModuleLabel: "pmatrackcalo" - - -physics.producers.blurredcluster.HitsModuleLabel: "linecluster" -physics.producers.blurredcluster.TrackModuleLabel: "pmalgtrackmaker" -physics.producers.blurredcluster.VertexModuleLabel: "linecluster" - -#To use Blurred Cluster the ClusterModuleLabel to blurredcluster and comment out the PFParticle module label, add blurred cluster to the reco chain. -physics.producers.emshower.ClusterModuleLabel: "pandora" -physics.producers.emshower.HitsModuleLabel: "gaushit" -physics.producers.emshower.PFParticleModuleLabel: "pandora" -physics.producers.emshower.TrackModuleLabel: "pmalgtrackmaker" - -# Configure the SCE corrections -# For now: always assume t = 0 -physics.producers.pandoraSCE.T0Labels: [] -physics.producers.pandoraSCE.T0LabelsCorrectT0: [] -physics.producers.pandoraSCE.CorrectNoT0Tag: true -# point track/shower creation to the SCE pandora -physics.producers.pandoraSCETrack.PFParticleLabel: "pandoraSCE" -physics.producers.pandoraSCEShower.PFParticleLabel: "pandoraSCE" -physics.producers.pandoraSCEShowerSBN.PFParticleLabel: "pandoraSCE" - -#physics.producers.gaushitTruthMatch.HitParticleAssociations: @local::DirectHitParticleAssnsTool -physics.producers.gaushitTruthMatch.HitParticleAssociations.HitModuleLabel: "gaushit" -#physics.producers.gaushitTruthMatch.HitParticleAssociations.MCParticleModuleLabelVec: ["largeant"] - -physics.producers.crtspacepointmatchingSCE.TPCTrackModuleLabel: "pandoraSCETrack" -physics.producers.crtspacepointmatchingSCE.PFPModuleLabel: "pandoraSCE" -physics.producers.crtspacepointmatchingSCE.MatchingAlg.TPCTrackLabel: "pandoraSCETrack" - -physics.producers.crttrackmatchingSCE.TPCTrackModuleLabel: "pandoraSCETrack" -physics.producers.crttrackmatchingSCE.PFPModuleLabel: "pandoraSCE" -physics.producers.crttrackmatchingSCE.MatchingAlg.TPCTrackLabel: "pandoraSCETrack" diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/CMakeLists.txt b/sbndcode/JobConfigurations/standard/g4/recomb_variations/CMakeLists.txt index 13355789a..243ac9b99 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/CMakeLists.txt +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/CMakeLists.txt @@ -1 +1,6 @@ install_fhicl() + +FILE(GLOB fcl_files *.fcl) +install_source(EXTRAS ${fcl_files} ) + +add_subdirectory(modbox_variations) diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R-1.fcl new file mode 100644 index 000000000..aa0c8e16e --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R0.fcl new file mode 100644 index 000000000..2d3c933f7 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R1.fcl new file mode 100644 index 000000000..43ebe165f --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B-1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R-1.fcl new file mode 100644 index 000000000..eef8fb6a9 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R0.fcl new file mode 100644 index 000000000..acb8b95cf --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R1.fcl new file mode 100644 index 000000000..d1158f1ba --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B0_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R-1.fcl new file mode 100644 index 000000000..e5f92d8f5 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R0.fcl new file mode 100644 index 000000000..3b9d44c52 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R1.fcl new file mode 100644 index 000000000..474651a22 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-1_B1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .896 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R-3.fcl new file mode 100644 index 000000000..9cfdba887 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R0.fcl new file mode 100644 index 000000000..05855e809 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R3.fcl new file mode 100644 index 000000000..2ed92276f --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B-3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R-3.fcl new file mode 100644 index 000000000..24061b3f4 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R0.fcl new file mode 100644 index 000000000..60dfda708 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R3.fcl new file mode 100644 index 000000000..6e19473cd --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B0_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R-3.fcl new file mode 100644 index 000000000..6d57a4684 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R0.fcl new file mode 100644 index 000000000..e82158683 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R3.fcl new file mode 100644 index 000000000..c15dfb67c --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A-3_B3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .880 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R-1.fcl new file mode 100644 index 000000000..6ff2a9add --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R0.fcl new file mode 100644 index 000000000..b015b1e0b --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R1.fcl new file mode 100644 index 000000000..9f62b332f --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R-3.fcl new file mode 100644 index 000000000..3b86e733f --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R0.fcl new file mode 100644 index 000000000..4f587df0a --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R3.fcl new file mode 100644 index 000000000..a082873a3 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B-3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-1.fcl new file mode 100644 index 000000000..a0f80083a --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-3.fcl new file mode 100644 index 000000000..70a910224 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R1.fcl new file mode 100644 index 000000000..ca66d59a0 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R3.fcl new file mode 100644 index 000000000..791b94525 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B0_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R-1.fcl new file mode 100644 index 000000000..148f0a35c --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R0.fcl new file mode 100644 index 000000000..0c8b62735 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R1.fcl new file mode 100644 index 000000000..56fd55ab8 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R-3.fcl new file mode 100644 index 000000000..481509ed7 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R0.fcl new file mode 100644 index 000000000..e98392dd0 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R3.fcl new file mode 100644 index 000000000..62664ae0e --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A0_B3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .904 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R-1.fcl new file mode 100644 index 000000000..d667a96ab --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R0.fcl new file mode 100644 index 000000000..384c4e39a --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R1.fcl new file mode 100644 index 000000000..0eaa62393 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B-1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .196 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R-1.fcl new file mode 100644 index 000000000..67214e4bd --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R0.fcl new file mode 100644 index 000000000..f75703ba9 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R1.fcl new file mode 100644 index 000000000..750f8f5af --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B0_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R-1.fcl new file mode 100644 index 000000000..3a599b2dd --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R-1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.23 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R0.fcl new file mode 100644 index 000000000..0d21215e9 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R1.fcl new file mode 100644 index 000000000..54a10e4f3 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A1_B1_R1.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .912 +services.LArG4Parameters.EllipsModBoxB: .212 +services.LArG4Parameters.EllipsModBoxR: 1.27 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R-3.fcl new file mode 100644 index 000000000..cb8cad0e2 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R0.fcl new file mode 100644 index 000000000..8485e1178 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R3.fcl new file mode 100644 index 000000000..cb32f996a --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B-3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .180 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R-3.fcl new file mode 100644 index 000000000..bd015ef44 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R0.fcl new file mode 100644 index 000000000..eebba7082 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R3.fcl new file mode 100644 index 000000000..e69fafbce --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B0_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .204 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R-3.fcl new file mode 100644 index 000000000..ff172af92 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R-3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.19 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R0.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R0.fcl new file mode 100644 index 000000000..4e8953220 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R0.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.25 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R3.fcl new file mode 100644 index 000000000..9f6088fa4 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_A3_B3_R3.fcl @@ -0,0 +1,5 @@ +#include "g4_sce_dirt_filter_lite.fcl" +process_name: G4Var +services.LArG4Parameters.EllipsModBoxA: .928 +services.LArG4Parameters.EllipsModBoxB: .228 +services.LArG4Parameters.EllipsModBoxR: 1.31 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_ellips.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_ellips.fcl deleted file mode 100644 index c346a3818..000000000 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb_ellips.fcl +++ /dev/null @@ -1,6 +0,0 @@ -#include "g4_sce_dirt_filter_lite.fcl" - -process_name: G4Var - -services.LArG4Parameters.UseModBoxRecomb: false -services.LArG4Parameters.UseEllipsModBoxRecomb: true diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/CMakeLists.txt b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/CMakeLists.txt new file mode 100644 index 000000000..13355789a --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/CMakeLists.txt @@ -0,0 +1 @@ +install_fhicl() diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl similarity index 57% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl index a236c8f79..6acea4cd6 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-1-1.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.91 services.LArG4Parameters.ModBoxB: 0.21 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-10.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-10.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-10.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-10.fcl index b9f6a5a95..54fa3fd3a 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-10.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-10.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.91 services.LArG4Parameters.ModBoxB: 0.212 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-11.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-11.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-11.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-11.fcl index 7f37dbade..c39960757 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-11.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-11.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.91 services.LArG4Parameters.ModBoxB: 0.214 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl index d4eba9ea1..182d10a79 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-3-3.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.87 services.LArG4Parameters.ModBoxB: 0.205 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-30.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-30.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-30.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-30.fcl index d44269c65..3e4184d67 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-30.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-30.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.87 services.LArG4Parameters.ModBoxB: 0.212 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-33.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-33.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-33.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-33.fcl index 75b99de9f..2e046a5e7 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb-33.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb-33.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.86 services.LArG4Parameters.ModBoxB: 0.218 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl similarity index 57% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl index ea188ec59..52f8133a4 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-1.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.93 services.LArG4Parameters.ModBoxB: 0.21 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl index d36425aee..110b4a737 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb0-3.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.93 services.LArG4Parameters.ModBoxB: 0.206 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb01.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb01.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb01.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb01.fcl index b93bdb9b9..cd0c23657 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb01.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb01.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.93 services.LArG4Parameters.ModBoxB: 0.214 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb03.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb03.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb03.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb03.fcl index 23c2c7d77..f3ebfec29 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb03.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb03.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.93 services.LArG4Parameters.ModBoxB: 0.218 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl similarity index 57% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl index c3d3bddd0..25ea2d5be 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb1-1.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.95 services.LArG4Parameters.ModBoxB: 0.21 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb10.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb10.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb10.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb10.fcl index cbad1612e..5d73c89a8 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb10.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb10.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.95 services.LArG4Parameters.ModBoxB: 0.212 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb11.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb11.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb11.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb11.fcl index 4d4e43133..91c848edb 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb11.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb11.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.95 services.LArG4Parameters.ModBoxB: 0.214 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl index d50cd0830..092619a83 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb3-3.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.999 services.LArG4Parameters.ModBoxB: 0.206 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb30.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb30.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb30.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb30.fcl index 7d8d8f966..64efc5cbd 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb30.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb30.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.999 services.LArG4Parameters.ModBoxB: 0.212 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb33.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb33.fcl similarity index 58% rename from sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb33.fcl rename to sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb33.fcl index 2d5f0c1c9..b96340ed8 100644 --- a/sbndcode/JobConfigurations/standard/g4/recomb_variations/g4_sce_dirt_filter_lite_recomb33.fcl +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb33.fcl @@ -2,5 +2,7 @@ process_name: G4Var +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false services.LArG4Parameters.ModBoxA: 0.999 services.LArG4Parameters.ModBoxB: 0.222 diff --git a/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb_modbox.fcl b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb_modbox.fcl new file mode 100644 index 000000000..96be181a4 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/g4/recomb_variations/modbox_variations/g4_sce_dirt_filter_lite_recomb_modbox.fcl @@ -0,0 +1,6 @@ +#include "g4_sce_dirt_filter_lite.fcl" + +process_name: G4Var + +services.LArG4Parameters.UseModBoxRecomb: true +services.LArG4Parameters.UseEllipsModBoxRecomb: false diff --git a/sbndcode/JobConfigurations/standard/reco/config/drops_reco1.fcl b/sbndcode/JobConfigurations/standard/reco/config/drops_reco1.fcl index 0aabe4dab..8541a3450 100644 --- a/sbndcode/JobConfigurations/standard/reco/config/drops_reco1.fcl +++ b/sbndcode/JobConfigurations/standard/reco/config/drops_reco1.fcl @@ -33,4 +33,14 @@ sbnd_reco1_drops_selective: [ #Needed to maintain earlier workflows where some , "drop *_cluster3d_*_*" #drop all mlreco output ] +sbnd_reco1_drops_data: [ #data specific drops to conserve space where needed + "keep *_*_*_*", + "drop *_cluster3d_*_*" #drop uneeded spine (mlreco) output +] + +sbnd_reco1_drops_keep_rawdigits: [ + @sequence::sbnd_reco1_drops_selective + , "keep raw::RawDigit*_*_*_*" +] + END_PROLOG diff --git a/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl b/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl index 83b9f93a7..7f35fa9f7 100644 --- a/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl +++ b/sbndcode/JobConfigurations/standard/reco/config/workflow_reco2.fcl @@ -16,6 +16,8 @@ #include "crtskim_sbnd.fcl" #include "pmtskim_sbnd.fcl" +#include "SBNDCVNMapper.fcl" + BEGIN_PROLOG sbnd_reco2_producers:{ @@ -67,40 +69,72 @@ sbnd_reco2_producers:{ ### Uncalibrated calorimetry producer for calibration caloskimmer caloskimCalorimetry: @local::caloskim_calorimetry + + ### CVN + cvn: @local::standard_sbndcvnevaluatorslc } -sbnd_reco2_producer_sequence: [ - rns - , pandora +sbnd_reco2_tpc_sequence: [ + pandora , pandoraTrack , pandoraShower , pandoraShowerSBN , pandoraCalo , pandoraPid - , crtclustering +] + +sbnd_reco2_crt_sequence: [ + crtclustering , crtspacepoints , crttracks - , crtspacepointmatching +] + +sbnd_reco2_multi_system_matching_sequence: [ + crtspacepointmatching , crttrackmatching , fmatch , fmatchop , fmatchara , fmatchopara - , caloskimCalorimetry , opt0finder - , pandoraSCE +] + +sbnd_reco2_tpc_sequence_sce: [ + pandoraSCE , pandoraSCETrack , pandoraSCEShower , pandoraSCEShowerSBN , pandoraSCECalo , pandoraSCEPid - , crtspacepointmatchingSCE +] + +sbnd_reco2_multi_system_matching_sequence_sce: [ + crtspacepointmatchingSCE , crttrackmatchingSCE , fmatchSCE , fmatchopSCE , fmatcharaSCE , fmatchoparaSCE , opt0finderSCE + , cvn +] + +sbnd_reco2_producer_sequence_no_sce_corrections: [ + rns + , @sequence::sbnd_reco2_tpc_sequence + , @sequence::sbnd_reco2_crt_sequence + , @sequence::sbnd_reco2_multi_system_matching_sequence + , caloskimCalorimetry +] + +sbnd_reco2_producer_sequence_sce: [ + @sequence::sbnd_reco2_tpc_sequence_sce + , @sequence::sbnd_reco2_multi_system_matching_sequence_sce +] + +sbnd_reco2_producer_sequence: [ + @sequence::sbnd_reco2_producer_sequence_no_sce_corrections + , @sequence::sbnd_reco2_producer_sequence_sce ] #FIXME override the producer labels. This should really happen in the module's config fcl @@ -125,8 +159,6 @@ sbnd_reco2_producers.pandoraCaloData.TrackIsFieldDistortionCorrected: false sbnd_reco2_producers.pandoraPidData.TrackModuleLabel: "pandoraTrack" sbnd_reco2_producers.pandoraPidData.CalorimetryModuleLabel: "pandoraCaloData" -physics.analyzers.caloskim.SimChannelproducer: "simtpc2d:simpleSC" - sbnd_reco2_producers.opt0finderSCE.SliceProducer: "pandoraSCE" sbnd_reco2_producers.opt0finderSCE.TrackProducer: "pandoraSCETrack" sbnd_reco2_producers.opt0finderSCE.ShowerProducer: "pandoraSCEShowerSBN" @@ -151,9 +183,10 @@ sbnd_reco2_producers.crttrackmatchingSCE.PFPModuleLabel: "pandor sbnd_reco2_producers.crttrackmatchingSCE.MatchingAlg.TPCTrackLabel: "pandoraSCETrack" sbnd_reco2_analyzers: { - caloskim: @local::caloskim_nodigits_goldentracks - crtskim: @local::crtskim_sbnd - pmtskim: @local::pmtskim_sbnd + caloskim: @local::caloskim_nodigits_goldentracks + crtskim: @local::crtskim_sbnd + crtskimNoSCE: @local::crtskim_no_sce_sbnd + pmtskim: @local::pmtskim_sbnd } sbnd_reco2_analyzer_sequence: [ @@ -162,6 +195,12 @@ sbnd_reco2_analyzer_sequence: [ , crtskim ] +sbnd_reco2_analyzer_sequence_no_sce_corrections: [ + caloskim + , pmtskim + , crtskimNoSCE +] + #FIXME override the analyzer labels. This should really happen in the module's config fcl sbnd_reco2_analyzers.caloskim.SimChannelproducer: "simtpc2d:simpleSC" diff --git a/sbndcode/JobConfigurations/standard/reco/reco1_data.fcl b/sbndcode/JobConfigurations/standard/reco/reco1_data.fcl index 00031ac77..e1d8a63e0 100644 --- a/sbndcode/JobConfigurations/standard/reco/reco1_data.fcl +++ b/sbndcode/JobConfigurations/standard/reco/reco1_data.fcl @@ -1,4 +1,7 @@ +#include "drops_reco1.fcl" #include "wcsp_data_sbnd.fcl" +#include "opdeconvolution_sbnd_data.fcl" +#include "sbnd_ophitfinder_deco_data.fcl" #include "crt_channel_map_service.fcl" #include "crt_calib_service.fcl" #include "standard_reco1_sbnd.fcl" @@ -16,11 +19,16 @@ physics.producers: @table::physics.producers sptpc2d: @local::sbnd_wcls_sp_data crtstrips: @local::crtstriphitproducer_data_sbnd + opdecopmt: @local::SBNDOpDeconvolutionPMT_data + ophitpmt: @local::SBNDDecoOpHitFinderPMT_data + opflashtpc0: @local::SBNDDecoSimpleFlashTPC0 + opflashtpc1: @local::SBNDDecoSimpleFlashTPC1 } -physics.reco1: [sptpc2d, gaushit, numberofhitsfilter, cluster3d, crtstrips] +physics.reco1: [sptpc2d, gaushit, numberofhitsfilter, cluster3d, crtstrips, opdecopmt, ophitpmt, opflashtpc0, opflashtpc1] physics.ana: [superadata] outputs.out1.SelectEvents: [ "reco1" ] +outputs.out1.outputCommands:[@sequence::sbnd_reco1_drops_data] physics.producers.gaushit.CalDataModuleLabel: "sptpc2d:gauss" diff --git a/sbndcode/JobConfigurations/standard/reco/reco1_rawdigit.fcl b/sbndcode/JobConfigurations/standard/reco/reco1_rawdigit.fcl new file mode 100644 index 000000000..6477fe30f --- /dev/null +++ b/sbndcode/JobConfigurations/standard/reco/reco1_rawdigit.fcl @@ -0,0 +1,9 @@ +#include "reco1_data.fcl" + +#1D/Data Deconvolution +physics.producers.daq.DigitModuleLabel: "daq" + +#2D Deconvolution +#physics.producers.simtpc2d.DigitModuleLabel: "simtpc2d:daq" + +outputs.out1.outputCommands: [@sequence::sbnd_reco1_drops_keep_rawdigits] diff --git a/sbndcode/JobConfigurations/standard/reco/reco2_data.fcl b/sbndcode/JobConfigurations/standard/reco/reco2_data.fcl index 6795acd1a..552b499e8 100644 --- a/sbndcode/JobConfigurations/standard/reco/reco2_data.fcl +++ b/sbndcode/JobConfigurations/standard/reco/reco2_data.fcl @@ -19,9 +19,9 @@ physics.producers: } physics.reco2: [ pandora, pandoraTrack, pandoraShower, pandoraShowerSBN, pandoraCaloData, pandoraPidData, caloskimCalorimetry, - crtclustering, crtspacepoints, crttracks ] + crtclustering, crtspacepoints, crttracks, cvn ] physics.analyzers.caloskim.G4producer: "" physics.analyzers.caloskim.SimChannelproducer: "" physics.caloskimana_tpconly: [ caloskim ] -physics.end_paths: [stream1, caloskimana_tpconly] +physics.end_paths: [stream1, caloskimana_tpconly] \ No newline at end of file diff --git a/sbndcode/JobConfigurations/standard/reco/reco2_no_sce_sbnd.fcl b/sbndcode/JobConfigurations/standard/reco/reco2_no_sce_sbnd.fcl new file mode 100644 index 000000000..5ba2656ea --- /dev/null +++ b/sbndcode/JobConfigurations/standard/reco/reco2_no_sce_sbnd.fcl @@ -0,0 +1,11 @@ +# job configuration +# +#include "standard_reco2_sbnd.fcl" + +physics.reco2: @local::sbnd_reco2_producer_sequence_no_sce_corrections +physics.ana: @local::sbnd_reco2_analyzer_sequence_no_sce_corrections + +services.SpaceCharge.EnableCalSpatialSCE: false +services.SpaceCharge.EnableSimSpatialSCE: false +services.SpaceCharge.EnableSimEfieldSCE: false +services.SpaceCharge.EnableCalEfieldSCE: false diff --git a/sbndcode/JobConfigurations/standard/reco/reco2_rawdigit.fcl b/sbndcode/JobConfigurations/standard/reco/reco2_rawdigit.fcl new file mode 100644 index 000000000..fc1e94205 --- /dev/null +++ b/sbndcode/JobConfigurations/standard/reco/reco2_rawdigit.fcl @@ -0,0 +1,15 @@ +#include "reco2_data.fcl" + +analyzers.caloskim: @local::caloskim_nodigits_goldentracks + +#1D/Data Deconvolution +physics.analyzers.caloskim.RawDigitproducers: ["daq"] + +#2D Deconvolution +#physics.analyzers.caloskim.RawDigitproducers: ["simtpc2d:daq"] + +physics.analyzers.caloskim.SelectionTools: [] +physics.analyzers.caloskim.RequireT0: false +physics.analyzers.caloskim.HitRawDigitsTickCollectWidth: 200 + +outputs.out1.outputCommands: [@sequence::sbnd_reco1_drops_keep_rawdigits] diff --git a/sbndcode/JobConfigurations/standard/standard_reco1reco2_sbnd.fcl b/sbndcode/JobConfigurations/standard/standard_reco1reco2_sbnd.fcl index 55fbcb28a..fcf3b5ef0 100644 --- a/sbndcode/JobConfigurations/standard/standard_reco1reco2_sbnd.fcl +++ b/sbndcode/JobConfigurations/standard/standard_reco1reco2_sbnd.fcl @@ -1,16 +1,50 @@ -# File: standard_reco1reco2_sbnd.fcl -# Purpose: The standard reconstruction workflow for both 'reco1' and 'reco2', starting at deconvolution and includes all high level reconstruction. This fcl is provided for convenience and separating the reco stages is recommended. -# Version: 1.0 -# -# Changes: -# 20200923 (d.brailsford@lancster.ac.uk) [v1.0] -# Initial definition -# # job configuration - -#include "reco_sbnd.fcl" +# +#include "workflow_reco1.fcl" +#include "drops_reco1.fcl" +#include "workflow_reco2.fcl" +#include "drops_reco2.fcl" +#include "simulationservices_sbnd.fcl" +#include "generic_job_sbnd.fcl" process_name: Reco1Reco2 -physics.trigger_paths: [ fullreco ] -physics.end_paths: [stream1, superaana] +#services overrides +services: +{ + @table::services + @table::sbnd_random_services + @table::sbnd_g4_services + # FIXME The following services are temporarily included here to test tht the workflow is unchanged + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice + BackTrackerService: @local::sbnd_backtrackerservice + ParticleInventoryService: @local::sbnd_particleinventoryservice +} + +#producers +physics.producers: +{ + @table::sbnd_reco1_producers + @table::sbnd_reco2_producers +} +physics.reco1: @local::sbnd_reco1_producer_sequence +physics.reco2: @local::sbnd_reco2_producer_sequence +physics.trigger_paths: [ reco1, reco2 ] + +#analysers +physics.analyzers: +{ + @table::sbnd_reco1_analyzers + @table::sbnd_reco2_analyzers +} +physics.ana1: @local::sbnd_reco1_analyzer_sequence +physics.ana2: @local::sbnd_reco2_analyzer_sequence +physics.end_paths: [ @sequence::physics.end_paths, ana1, ana2 ] + +#outputs table overrides +outputs.out1.dataTier: "reconstructed" +outputs.out1.outputCommands: [ @sequence::outputs.out1.outputCommands, @sequence::sbnd_reco1_drops, @sequence::sbnd_reco2_drops ] + +#FIXME permanently enable SCE in a service rather than override specific params in this way... +#include "enable_spacecharge_services_sbnd.fcl" diff --git a/sbndcode/LArSoftConfigurations/mlreco_sbnd.fcl b/sbndcode/LArSoftConfigurations/mlreco_sbnd.fcl index 815398836..7b11fddc7 100644 --- a/sbndcode/LArSoftConfigurations/mlreco_sbnd.fcl +++ b/sbndcode/LArSoftConfigurations/mlreco_sbnd.fcl @@ -17,7 +17,7 @@ sbnd_supera_mpvmpr: { module_type: "LArSoftSuperaDriver" supera_params: "supera_sbnd_mpvmpr.fcl" out_filename: "larcv.root" - unique_filename: false + unique_filename: true stream: "mc" StrictDataLoading: false } @@ -27,7 +27,7 @@ sbnd_supera_data: { module_type: "LArSoftSuperaDriver" supera_params: "supera_sbnd_data.fcl" out_filename: "larcv.root" - unique_filename: false + unique_filename: true stream: "data" StrictDataLoading: false } @@ -37,7 +37,7 @@ sbnd_supera: { module_type: "LArSoftSuperaDriver" supera_params: "supera_sbnd_corsika.fcl" out_filename: "larcv.root" - unique_filename: false + unique_filename: true stream: "mc" StrictDataLoading: false } diff --git a/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data.fcl b/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data.fcl new file mode 100644 index 000000000..1c6d9653d --- /dev/null +++ b/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data.fcl @@ -0,0 +1,19 @@ +#include "run_sbndpds_ana.fcl" + +physics.analyzers.opanatree.SaveRawWaveforms: false +physics.analyzers.opanatree.SaveDeconvolvedWaveforms: false +physics.analyzers.opanatree.SaveMCTruth: "false" +physics.analyzers.opanatree.SaveMCParticles: "false" +physics.analyzers.opanatree.SaveSimPhotons: "false" +physics.analyzers.opanatree.SaveSimPhotonsArrivalTimes: "false" +physics.analyzers.opanatree.SaveOpFlashes: "true" +physics.analyzers.opanatree.MCTruthModuleLabel: [""] +physics.analyzers.opanatree.MCModuleLabel: "" +physics.analyzers.opanatree.SimPhotonsModuleLabel: ["", ""] +physics.analyzers.opanatree.RawWaveformsModuleLabel: "pmtdecoder:PMTChannels" +physics.analyzers.opanatree.OpFlashesModuleLabel: ["opflashtpc0","opflashtpc1"] +physics.analyzers.opanatree.HitsLabel: "" +physics.analyzers.opanatree.Reco2Label: "" +physics.analyzers.opanatree.CosmicIdModuleLabel: "" +physics.analyzers.opanatree.OpT0FinderModuleLabel: "" +physics.analyzers.opanatree.SimpleFlashMatchModuleLabel: "" \ No newline at end of file diff --git a/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data_withWaveforms.fcl b/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data_withWaveforms.fcl new file mode 100644 index 000000000..07c533d9d --- /dev/null +++ b/sbndcode/OpDetAnalyzer/PDSAnalyzer/job/run_sbndpds_ana_data_withWaveforms.fcl @@ -0,0 +1,4 @@ +#include "run_sbndpds_ana_data.fcl" + +physics.analyzers.opanatree.SaveRawWaveforms: "true" +physics.analyzers.opanatree.SaveDeconvolvedWaveforms: "true" \ No newline at end of file diff --git a/sbndcode/OpDetReco/OpDeconvolution/Alg/CMakeLists.txt b/sbndcode/OpDetReco/OpDeconvolution/Alg/CMakeLists.txt index 480a20c7f..cd5c8acd0 100644 --- a/sbndcode/OpDetReco/OpDeconvolution/Alg/CMakeLists.txt +++ b/sbndcode/OpDetReco/OpDeconvolution/Alg/CMakeLists.txt @@ -21,6 +21,8 @@ set( ) cet_build_plugin(OpDeconvolutionAlgWiener art::tool SOURCE OpDeconvolutionAlgWiener_tool.cc LIBRARIES ${TOOL_LIBRARIES}) +cet_build_plugin(OpDeconvolutionAlgWienerData art::tool SOURCE OpDeconvolutionAlgWienerData_tool.cc LIBRARIES ${TOOL_LIBRARIES}) + install_headers() install_fhicl() diff --git a/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc b/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc new file mode 100644 index 000000000..cbd23acef --- /dev/null +++ b/sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlgWienerData_tool.cc @@ -0,0 +1,552 @@ +//////////////////////////////////////////////////////////////////////// +// Specific class tool for OpDeconvolutionAlg +// File: OpDeconvolutionAlgWienerData_tool.hh +// Base class: OpDeconvolutionAlg.hh +//////////////////////////////////////////////////////////////////////// + +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "art_root_io/TFileService.h" +#include "larcore/CoreUtils/ServiceUtil.h" // lar::providerFrom() +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "lardata/DetectorInfoServices/LArPropertiesService.h" +#include "art/Utilities/ToolMacros.h" +#include "art/Utilities/make_tool.h" + +#include + +#include "lardataobj/RawData/OpDetWaveform.h" +#include "lardata/Utilities/LArFFT.h" +#include "TFile.h" + +#include +#include "TCanvas.h" +#include "TH1.h" +#include "TF1.h" +#include "TComplex.h" + +#include "sbndcode/OpDetReco/OpDeconvolution/Alg/OpDeconvolutionAlg.hh" + + +namespace opdet { + class OpDeconvolutionAlgWiener; +} + + +class opdet::OpDeconvolutionAlgWiener : opdet::OpDeconvolutionAlg { +public: + explicit OpDeconvolutionAlgWiener(fhicl::ParameterSet const& p); + + ~OpDeconvolutionAlgWiener() {} + + // Required functions. + std::vector RunDeconvolution(std::vector const& wfHandle) override; + +private: + bool fDebug; + int fMaxFFTSizePow; + std::vector> fSinglePEWaveVector; + std::vector fSinglePEWave; + std::vector fSinglePEChannels; + std::vector fPeakAmplitude; + std::vector fSkipChannelList; + bool fPositivePolarity; + bool fUseSaturated; + int fADCSaturationValue; + bool fApplyExpoAvSmooth; + bool fApplyUnAvSmooth; + float fExpoAvSmoothPar; + short unsigned int fUnAvNeighbours; + double fHypoSignalTimeWindow; + bool fHypoSignalCustom; + std::vector fHypoSignalTimeConsts; + std::vector fHypoSignalWeights; + double fHypoSignalScale; + double fPMTChargeToADC; + double fDecoWaveformPrecision; + short unsigned int fBaselineSample; + std::string fOpDetDataFile; + std::string fFilter; + std::string fElectronics; + bool fScaleHypoSignal; + bool fUseParamFilter; + std::vector fFilterParams; + std::vector> fFilterParamVector; + std::vector fFilterParamChannel; + double fNormUnAvSmooth; + double fSamplingFreq; + double fDaphne_Freq; + size_t MaxBinsFFT; + unsigned int NDecoWf; + + TF1 *fFilterTF1; + std::vector fSignalHypothesis; + std::vector fNoiseHypothesis; + + bool fUseParamFilterInidividualChannel; + bool fCorrectBaselineOscillations; + short unsigned int fBaseSampleBins; + double fBaseVarCut; + + // Declare member functions + void ApplyExpoAvSmoothing(std::vector& wf); + void ApplyUnAvSmoothing(std::vector& wf); + size_t WfSizeFFT(size_t n); + std::vector ScintArrivalTimesShape(size_t n, detinfo::LArProperties const& lar_prop); + void SubtractBaseline(std::vector &wf, double baseline); + void EstimateBaselineStdDev(std::vector &wf, double &_mean, double &_stddev); + void CorrectBaselineOscillations(std::vector &wf); + std::vector DeconvolutionKernel(size_t size, double baseline_stddev, double snr_scaling); + + //Load TFileService serrvice + art::ServiceHandle tfs; + //Load FFT serrvice + art::ServiceHandle fft_service; +}; + + +opdet::OpDeconvolutionAlgWiener::OpDeconvolutionAlgWiener(fhicl::ParameterSet const& p) +{ + //read fhicl paramters + fDebug = p.get< bool >("Debug"); + fMaxFFTSizePow = p.get< int >("MaxFFTSizePow"); + fPositivePolarity = p.get< bool >("PositivePolarity"); + fUseSaturated = p.get< bool >("UseSaturated"); + fADCSaturationValue = p.get< int >("ADCSaturationValue"); + fApplyExpoAvSmooth = p.get< bool >("ApplyExpoAvSmooth"); + fApplyUnAvSmooth = p.get< bool >("ApplyUnAvSmooth"); + fExpoAvSmoothPar = p.get< float >("ExpoAvSmoothPar"); + fUnAvNeighbours = p.get< short unsigned int >("UnAvNeighbours"); + fHypoSignalTimeWindow = p.get< double >("HypoSignalTimeWindow"); + fHypoSignalCustom = p.get< bool >("HypoSignalCustom"); + fHypoSignalTimeConsts = p.get< std::vector >("HypoSignalTimeConsts"); + fHypoSignalWeights = p.get< std::vector >("HypoSignalWeights"); + fHypoSignalScale = p.get< double >("HypoSignalScale"); + fPMTChargeToADC = p.get< double >("PMTChargeToADC"); + fDecoWaveformPrecision = p.get< double >("DecoWaveformPrecision"); + fBaselineSample = p.get< short unsigned int >("BaselineSample"); + fOpDetDataFile = p.get< std::string >("OpDetDataFile"); + fSkipChannelList = p.get< std::vector>("SkipChannelList"); + fFilter = p.get< std::string >("Filter"); + fElectronics = p.get< std::string >("Electronics"); + fDaphne_Freq = p.get< double >("DaphneFreq"); + fScaleHypoSignal = p.get< bool >("ScaleHypoSignal"); + fUseParamFilter = p.get< bool >("UseParamFilter"); + fUseParamFilterInidividualChannel = p.get< bool >("UseParamFilterInidividualChannel"); + fCorrectBaselineOscillations = p.get< bool >("CorrectBaselineOscillations"); + fBaseSampleBins = p.get< short unsigned int >("BaseSampleBins"); + fBaseVarCut = p.get< double >("BaseVarCut"); + fFilterParams = p.get< std::vector >("FilterParams"); + + fNormUnAvSmooth=1./(2*fUnAvNeighbours+1); + NDecoWf=0; + MaxBinsFFT=std::pow(2, fMaxFFTSizePow); + + auto const clockData = art::ServiceHandle()->DataForJob(); + fSamplingFreq=clockData.OpticalClock().Frequency()/1000.;//in GHz + if (fElectronics=="Daphne") fSamplingFreq=fDaphne_Freq/1000.;//in GHz + auto const* lar_prop = lar::providerFrom(); + + //Load SER + std::string fname; + cet::search_path sp("FW_SEARCH_PATH"); + sp.find_file(fOpDetDataFile, fname); + TFile* file = TFile::Open(fname.c_str(), "READ"); + std::vector>* SinglePEVec_p; + std::vector* fSinglePEChannels_p; + std::vector* fPeakAmplitude_p; + std::vector> * fFilterParamVector_p; + + file->GetObject("SERChannels", fSinglePEChannels_p); + file->GetObject("SinglePEVec", SinglePEVec_p); + file->GetObject("PeakAmplitude", fPeakAmplitude_p); + file->GetObject("FilterParams", fFilterParamVector_p); + + if (fElectronics=="Daphne") file->GetObject("SinglePEVec_40ftCable_Daphne", SinglePEVec_p); + fSinglePEWaveVector = *SinglePEVec_p; + fSinglePEChannels = *fSinglePEChannels_p; + fPeakAmplitude = *fPeakAmplitude_p; + fFilterParamVector = *fFilterParamVector_p; + + mf::LogInfo("OpDeconvolutionAlg")<<"Loaded SER from "<SetParameter(k, fFilterParams[k]); + mf::LogInfo("OpDeconvolutionAlg")<<"Creating parametrized filter... TF1:"< opdet::OpDeconvolutionAlgWiener::RunDeconvolution(std::vector const& wfVector) +{ + std::vector wfDeco; + wfDeco.reserve(wfVector.size()); + for(auto const& wf : wfVector) + { + int channelNumber = wf.ChannelNumber(); + auto it = std::find(fSkipChannelList.begin(), fSkipChannelList.end(), channelNumber); + bool AnalyseChannel = false; + if (it == fSkipChannelList.end()) { + //If it's not try to find its SER in the file + for(size_t i=0; iSetParameter(k, fFilterParamChannel[k]); + } + + + mf::LogInfo("OpDeconvolutionAlg")<<"Creating parametrized filter... TF1:"<MaxBinsFFT){ + mf::LogWarning("OpDeconvolutionAlg")<<"Skipping waveform...waveform size is"< fDeconvolutionKernel=DeconvolutionKernel(wfsize, baseline_stddev, wfPeakPE); + + //Deconvolve raw signal (covolve with kernel) + fft_service->ReinitializeFFT(wfsizefft, "", 20); + fft_service->Convolute(wave, fDeconvolutionKernel); + wave.resize(wfsize); + + //Set deconvlved waveform precision and restore baseline before saving + EstimateBaselineStdDev(wave, baseline_mean, baseline_stddev); + SubtractBaseline(wave, baseline_mean); + double fDecoWfScaleFactor=1./fDecoWaveformPrecision; + std::transform(wave.begin(), wave.end(), wave.begin(), [fDecoWfScaleFactor](double &dec){ return fDecoWfScaleFactor*dec; } ); + if(fCorrectBaselineOscillations) CorrectBaselineOscillations(wave); + + //Debbuging and save wf in hist file + if(fDebug){ + std::string name="h_deco"+std::to_string(NDecoWf)+"_"+std::to_string(wf.ChannelNumber())+"_"+std::to_string(wf.TimeStamp()); + TH1F * h_deco = tfs->make< TH1F >(name.c_str(),";Bin;#PE", MaxBinsFFT, 0, MaxBinsFFT); + for(size_t k=0; kFill(k, wave[k]); + } + + name="h_raw"+std::to_string(NDecoWf)+"_"+std::to_string(wf.ChannelNumber())+"_"+std::to_string(wf.TimeStamp()); + TH1F * h_raw = tfs->make< TH1F >(name.c_str(),";Bin;ADC", MaxBinsFFT, 0, MaxBinsFFT); + for(size_t k=0; kFill(k, wf.Waveform()[k]); + } + } + + //raw::OpDetWaveform decowf(wf.TimeStamp(), wf.ChannelNumber(), std::vector (wave.begin(), std::next(wave.begin(), wf.Waveform().size()) ) ); + raw::OpDetWaveform decowf( wf.TimeStamp(), wf.ChannelNumber(), std::vector (wave.begin(), wave.end()) ); + wfDeco.push_back(decowf); + NDecoWf++; + } + + return wfDeco; +} + + +void opdet::OpDeconvolutionAlgWiener::ApplyExpoAvSmoothing(std::vector& wf){ + std::transform (std::next(wf.begin(), 1), wf.end(), wf.begin(), std::next(wf.begin(), 1), + [&](double _x, double _y) { return fExpoAvSmoothPar*_x+ (1. - fExpoAvSmoothPar)*_y; } ); +} + + +void opdet::OpDeconvolutionAlgWiener::ApplyUnAvSmoothing(std::vector& wf){ + std::vector wf_aux(wf.begin(), wf.end()); + for(size_t bin=fUnAvNeighbours; bin0){ + cont++; + n=(n>>1); + } + return 1< opdet::OpDeconvolutionAlgWiener::ScintArrivalTimesShape(size_t n, detinfo::LArProperties const& lar_prop){ + if(fHypoSignalCustom && fHypoSignalWeights.size()!=fHypoSignalTimeConsts.size()){ + mf::LogWarning("OpDeconvolutionAlg")<<"HypoSignalWeights and HypoSignalTimeConsts must have the same size"<< + "...Switching to 2-exponential (default values in LArProperties)"< v(n, 0); + size_t maxbin=fSamplingFreq*fHypoSignalTimeWindow; + if(n &wf, double baseline){ + std::transform (wf.begin(), wf.end(), wf.begin(), [&](double _x) { return _x-baseline; } ); + return; +} + + +void opdet::OpDeconvolutionAlgWiener::EstimateBaselineStdDev(std::vector &wf, double &_mean, double &_stddev){ + double minADC=*min_element(wf.begin(), wf.end()); + double maxADC=*max_element(wf.begin(), wf.end()); + unsigned nbins=25*ceil(maxADC-minADC); + TH1F h_std = TH1F("",";;", nbins, 0, (maxADC-minADC)/2); + TH1F h_mean = TH1F("",";;", nbins, minADC, maxADC); + + for(size_t ix=0; ixGetBinCenter(h_std.GetMaximumBin()); + _mean=h_mean.GetXaxis()->GetBinCenter(h_mean.GetMaximumBin()); + + if(fDebug){ + + std::string name="h_baselinestddev_"+std::to_string(NDecoWf)+std::to_string(_mean); + TH1F * hs_std = tfs->make< TH1F > (name.c_str(),"Baseline StdDev;ADC;# entries", + h_std.GetNbinsX(), h_std.GetXaxis()->GetXmin(), h_std.GetXaxis()->GetXmax()); + for(int k=1; k<=h_std.GetNbinsX(); k++) + hs_std->SetBinContent(k, h_std.GetBinContent(k)); + + name="h_baselinemean_"+std::to_string(NDecoWf)+std::to_string(_mean); + TH1F * hs_mean = tfs->make< TH1F >(name.c_str(),"Baseline Mean;ADC;# entries", + h_mean.GetNbinsX(), h_mean.GetXaxis()->GetXmin(), h_mean.GetXaxis()->GetXmax()); + for(int k=1; k<=h_mean.GetNbinsX(); k++) + hs_mean->SetBinContent(k, h_mean.GetBinContent(k)); + } + + return; +} + + +void opdet::OpDeconvolutionAlgWiener::CorrectBaselineOscillations(std::vector& wave) +{ + // subtract baseline using linear interpolation between regions defined + // by the datasize and baseSampleBins + if(fBaseSampleBins <= 0) return; + // number of points to characterize the baseline + unsigned short nBasePts = wave.size() / fBaseSampleBins; + // the baseline offset vector + std::vector base(nBasePts, 0.); + // find the average value in each region, using values that are + // similar + double fbins = fBaseSampleBins; + unsigned short nfilld = 0; + + for(unsigned short ii = 0; ii < nBasePts; ++ii) { + unsigned short loBin = ii * fBaseSampleBins; + unsigned short hiBin = loBin + fBaseSampleBins; + double ave = 0.; + double sum = 0.; + for(unsigned short bin = loBin; bin < hiBin; ++bin) { + ave += wave[bin]; + sum += wave[bin] * wave[bin]; + } // bin + ave = ave / fbins; + double var = (sum - fbins * ave * ave) / (fbins - 1.); + // Set the baseline for this region if the variance is small + if(var < fBaseVarCut) { + base[ii] = ave; + ++nfilld; + } + } // ii + // interpolate and subtract + // find the first non-zero sample + unsigned short thisRegion = 0; + unsigned short nextRegion = 1; + for(nextRegion = 1; nextRegion < base.size(); ++nextRegion) if(base[nextRegion] != 0) break; + double nBins = (nextRegion - thisRegion) * fBaseSampleBins; + double slp = (base[nextRegion] - base[thisRegion]) / nBins; + for(unsigned short bin = 0; bin < wave.size(); ++bin) { + // determine which region we are in + short region = bin / fBaseSampleBins; + if(region == nextRegion) { + // update the slope for the next region + unsigned short nnr = 0; + for(nnr = nextRegion + 1; nnr < base.size(); ++nnr) if(base[nnr] != 0) break; + if(nnr == base.size()) nnr = base.size() - 1; + unsigned short previousRegion = thisRegion; + thisRegion = nextRegion; + nextRegion = nnr; + if(thisRegion == nextRegion) { + for (unsigned short kk = thisRegion * fBaseSampleBins; kk < thisRegion * fBaseSampleBins + fBaseSampleBins; ++ kk) { + double bs = base[previousRegion] + (double)(kk - previousRegion * fBaseSampleBins) * slp; + wave[kk] -= bs; + } + return; + } + nBins = (nextRegion - thisRegion) * fBaseSampleBins; + slp = (base[nextRegion] - base[thisRegion]) / nBins; + } + double bs = base[thisRegion] + (double)(bin - thisRegion * fBaseSampleBins) * slp; + wave[bin] -= bs; + } // bin + return; +} + + +std::vector opdet::OpDeconvolutionAlgWiener::DeconvolutionKernel(size_t wfsize, double baseline_stddev, double snr_scaling){ + //Initizalize kernel + size_t size=WfSizeFFT(wfsize); + TComplex kerinit(0,0,false); + std::vector kernel(size, kerinit); + fft_service->ReinitializeFFT (size, "", 20); + + //Prepare detector response FFT + std::vector ser( fSinglePEWave.begin(), std::next(fSinglePEWave.begin(), size) ); + std::vector serfft; + serfft.resize(size); + fft_service->DoFFT(ser, serfft); + + if(fUseParamFilter){ + double freq_step=fSamplingFreq/size; + for(size_t k=0; kEval(k*freq_step) / serfft[k] ; + } + } + else{ + //Build Wiener filter kernel: G = Conj(R) / ( |R|^2 + |N|^2/|L|^2) + //R=Detector resopnse FFT + //N=Noise mean spectral power + //L=True signal mean spectral power + + //Prepare L + std::vector hypo( fSignalHypothesis.begin(), std::next(fSignalHypothesis.begin(), size) ); + std::vector hypofft; + hypofft.resize(size); + fft_service->DoFFT(hypo, hypofft); + + //Prepare Noise Spectral Power + double noise_power=wfsize*baseline_stddev*baseline_stddev; + if(fScaleHypoSignal){ + noise_power/=pow(snr_scaling, 2); + } + + for(size_t k=0; kmake< TH1F > + (name.c_str(),"Wiener Filter;Frequency Bin;Magnitude",size/2, 0, size/2); + for(size_t k=0; kSetBinContent(k, TComplex::Abs( kernel[k]*serfft[k] ) ); + } + if(fUseParamFilter && fUseParamFilterInidividualChannel) delete fFilterTF1; + return kernel; +} + +DEFINE_ART_CLASS_TOOL(opdet::OpDeconvolutionAlgWiener) diff --git a/sbndcode/OpDetReco/OpDeconvolution/Alg/opdeconvolution_alg_data.fcl b/sbndcode/OpDetReco/OpDeconvolution/Alg/opdeconvolution_alg_data.fcl new file mode 100644 index 000000000..05c2c5ef6 --- /dev/null +++ b/sbndcode/OpDetReco/OpDeconvolution/Alg/opdeconvolution_alg_data.fcl @@ -0,0 +1,44 @@ +BEGIN_PROLOG + + +OpDeconvolutionAlgData: +{ + tool_type: "OpDeconvolutionAlgWienerData" + Debug: false + MaxFFTSizePow: 16 + OpDetDataFile: "./OpDetSim/digi_pmt_sbnd_data.root" + BaseSampleBins: 30 + BaseVarCut: 50 + SkipChannelList: [] + CorrectBaselineOscillations: true + PositivePolarity: false + UseSaturated: false + ADCSaturationValue: 0 + ApplyExpoAvSmooth: true + ApplyUnAvSmooth: true + ExpoAvSmoothPar: 0.3 + UnAvNeighbours: 1 + BaselineSample: 15 + ####SPE area must be set to 1./DecoWaveformPrecision in OpHit finder + DecoWaveformPrecision: 0.002 #Scale deco waves by factor x500 + HypoSignalTimeWindow: 8000 #ns + HypoSignalCustom: true + HypoSignalTimeConsts: [25., 1500.] #ns + HypoSignalWeights: [0.3, 0.7] #weights must sum 1 + HypoSignalScale: 0.3 + PMTChargeToADC: 25.97 + ScaleHypoSignal: true + #### Filter type. Options are: + #### Wiener: hypothesis is 2,3,4...-exponential shape + #### Wiener1PE: hypothesis is 1PE (delta pulse) + #### Parameter filter + Filter: "Wiener" + UseParamFilter: true + UseParamFilterInidividualChannel: true + #Filter: "(x>0)*exp(-0.5*pow(x/[0],[1]))" + FilterParams: [0.1, 20] + Electronics: "CAEN" # 2 Optical readouts in sbnd: "CAEN" for PMT and Apsaia XArapucas (500MHz/2 ns), "Daphne" for XArapucas with 62.5MHz/16 ns + DaphneFreq: 62.5 # in MHz +} + +END_PROLOG diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd_data.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd_data.fcl new file mode 100644 index 000000000..6db9affb0 --- /dev/null +++ b/sbndcode/OpDetReco/OpDeconvolution/job/opdeconvolution_sbnd_data.fcl @@ -0,0 +1,27 @@ +#include "opdeconvolution_alg_data.fcl" + +BEGIN_PROLOG + +SBNDOpDeconvolution: +{ + module_type: "SBNDOpDeconvolution" + InputLabel: "pmtdecoder:PMTChannels" + PDTypes: [] + Electronics: [] + OpDecoAlg: @local::OpDeconvolutionAlgData +} + +SBNDOpDeconvolutionPMT_data: @local::SBNDOpDeconvolution +SBNDOpDeconvolutionPMT_data.PDTypes: ["pmt_coated", "pmt_uncoated"] +SBNDOpDeconvolutionPMT_data.Electronics: [""] +SBNDOpDeconvolutionPMT_data.OpDecoAlg.OpDetDataFile: "./OpDetSim/digi_pmt_sbnd_data.root" +#SBNDOpDeconvolutionPMT_data.OpDecoAlg.UseParamFilter: true +#SBNDOpDeconvolutionPMT_data.OpDecoAlg.FilterParams: [0.049, 2] #Freq in GHz +SBNDOpDeconvolutionPMT_data.OpDecoAlg.Filter: "(x>0)*exp(-0.5*pow(x/[0],[1]))" #Gauss filter, remove DC component F(0)=0 +SBNDOpDeconvolutionPMT_data.OpDecoAlg.DecoWaveformPrecision: 0.005 +SBNDOpDeconvolutionPMT_data.OpDecoAlg.SkipChannelList: [39, 64, 65, 66, 67, 68, 71, 85, 86, 87, 114, 115, 118, 138, 141, 142, 148, 149, 163, 170, 194, 197, 217, 220, 221, 222, 223, 224, 226, 243, 245, 248, 296, 298, 301, 302] + + + + +END_PROLOG diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/run_decohitfinder_data.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/run_decohitfinder_data.fcl new file mode 100644 index 000000000..13812ef84 --- /dev/null +++ b/sbndcode/OpDetReco/OpDeconvolution/job/run_decohitfinder_data.fcl @@ -0,0 +1,65 @@ +#include "services_sbnd.fcl" +#include "simulationservices_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" + +#include "opdeconvolution_sbnd_data.fcl" +#include "sbnd_flashfinder_deco.fcl" +#include "sbnd_ophitfinder_deco_data.fcl" + +process_name: DecoRecoData + +services: +{ + # Load the service that manages root files for histograms. + TFileService: { fileName: "decoreco_tree.root" } + RandomNumberGenerator: {} + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + @table::sbnd_simulation_services +} + +source: +{ + module_type: RootInput + maxEvents: -1 # Number of events to create +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "%ifb_%p.root" + dataTier: "reconstructed" + compressionLevel: 1 + } +} + +physics: +{ + producers: + { + opdecopmt: @local::SBNDOpDeconvolutionPMT_data + ophitpmt: @local::SBNDDecoOpHitFinderPMT_data + opflashtpc0: @local::SBNDDecoSimpleFlashTPC0 + opflashtpc1: @local::SBNDDecoSimpleFlashTPC1 + } + + reco: [ + opdecopmt, + ophitpmt, + opflashtpc0, + opflashtpc1 + ] + + + stream1: [out1] + trigger_paths: [reco] + + end_paths: [stream1] +} + +#Uncomment to drop deconvolved waveforms +#outputs.out1.outputCommands: [ "keep *_*_*_*", "drop raw::OpDetWaveforms_opdecopmt__DecoReco"] \ No newline at end of file diff --git a/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_ophitfinder_deco_data.fcl b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_ophitfinder_deco_data.fcl new file mode 100644 index 000000000..036e15d47 --- /dev/null +++ b/sbndcode/OpDetReco/OpDeconvolution/job/sbnd_ophitfinder_deco_data.fcl @@ -0,0 +1,34 @@ +#include "ophit_finder_sbnd.fcl" + +BEGIN_PROLOG + +#####OpHit finder for PMT deconvolved waveforms##### +SBNDDecoOpHitFinderPMT_data: @local::sbnd_ophit_finder_pmt +####SPE area must be 1./DecoWaveformPrecision +SBNDDecoOpHitFinderPMT_data.SPEArea: 200 +SBNDDecoOpHitFinderPMT_data.InputModule: "opdecopmt" +SBNDDecoOpHitFinderPMT_data.HitThreshold: 1 +SBNDDecoOpHitFinderPMT_data.RiseTimeCalculator: @local::sbnd_opreco_risetimecalculator + +#HitAlgoPset +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.ADCThreshold: 25 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.NSigmaThreshold: 3.4 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.EndADCThreshold: 8 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.EndNSigmaThreshold: 0.2 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.MinPulseWidth: 4 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.Name: "SlidingWindow" +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.NumPostSample: 6 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.NumPreSample: 3 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.PositivePolarity: true +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.TailADCThreshold: 2 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.TailNSigmaThreshold: 2 +SBNDDecoOpHitFinderPMT_data.HitAlgoPset.Verbosity: false + +#BaselinePset +SBNDDecoOpHitFinderPMT_data.PedAlgoPset.Name:"Edges" +SBNDDecoOpHitFinderPMT_data.PedAlgoPset.NumSampleFront:200 +SBNDDecoOpHitFinderPMT_data.PedAlgoPset.NumSampleTail:200 +SBNDDecoOpHitFinderPMT_data.PedAlgoPset.Method:2 + + +END_PROLOG diff --git a/sbndcode/SBNDCVN/CMakeLists.txt b/sbndcode/SBNDCVN/CMakeLists.txt new file mode 100644 index 000000000..970a41c08 --- /dev/null +++ b/sbndcode/SBNDCVN/CMakeLists.txt @@ -0,0 +1,6 @@ +add_subdirectory(module_helpers) +add_subdirectory(modules) +add_subdirectory(tf) +add_subdirectory(fcls) +install_fhicl() + diff --git a/sbndcode/SBNDCVN/fcls/CMakeLists.txt b/sbndcode/SBNDCVN/fcls/CMakeLists.txt new file mode 100644 index 000000000..fb3c8a297 --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/CMakeLists.txt @@ -0,0 +1,2 @@ +install_fhicl() + diff --git a/sbndcode/SBNDCVN/fcls/SBNDCVNMapper.fcl b/sbndcode/SBNDCVN/fcls/SBNDCVNMapper.fcl new file mode 100644 index 000000000..4db0ecf0a --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/SBNDCVNMapper.fcl @@ -0,0 +1,172 @@ +BEGIN_PROLOG + +# This file defines the configuration for the CVNMapper and CVNMapperProtoDUNE modules +standard_pixelmapproducer: +{ + TdcWidth: 500 # 1000 + WireLength: 1984 #collection plane : 1664, induction plane : 1984 + TimeResolution: 1700 #1600 # 2560 # 3400 + Threshold: 0 + MultipleDrifts: true + verbose: false + ChangeWireNo: true + ReadoutSize: 3400. # in time ticks # 2560 + ShiftT: 420. # 420. + InductionWires: 1984 + FlipInductionView: false + UseT: true +} + +standard_cvnmapper: +{ + module_type: SBNDCVNMapper + HitsModuleLabel: "gaushit" + ClusterPMLabel: "cvnmap" + MinClusterHits: 100 + verbose: false + UseSlice: true + SliceLabel: "pandora" + PFParticleModuleLabel: "pandora" + T0Label: "pandora" + PixelMapProducer: @local::standard_pixelmapproducer + MapVecSize: 100000 + +} + +standard_cvnzlibmaker: +{ + module_type: SBNDCVNZlibMaker + OutputDir: "./NewZlibMakerOutput" + PixelMapInput: "sbndpixelmap" + SetLog: false + ReverseViews: [false,false,false] + PlaneLimit: 500 + TDCLimit: 500 + verbose: false + UseSlice: true + SliceLabel: "pandora" + TopologyHitsCut: 0 + GenieGenModuleLabel: "generator" + Verbose: false + UseBackTrackInfo: true + UseNuContainment: false + CosEfrac: 0.75 + NuEfrac: 0.25 + VolCut: 0. + SaveTree: false + PFParticleModuleLabel: "pandora" + HitModuleLabel: "gaushit" + T0Label: "pandora" +} + +standard_sbndwirecheck: +{ + module_type: SBNDWireCheck + HitModuleLabel: "gaushit" + SpacePointModuleLabel: "pandora" + SliceLabel: "pandora" + GenieGenModuleLabel: "generator" + TrackModuleLabel: "pandoraTrack" + PFPLabel: "pandora" + T0Label: "pandora" # pandora # opt0finder + Run: 1 + SubRun: 13 + Event: 74 + SliceID: 0 +} + +standard_cvnmapper_wire: +{ + module_type: CVNMapperWire + #================== + HitsModuleLabel: "wclsdatanfsp:gauss" + ClusterPMLabel: "cvnmap" + MinClusterHits: 100 + PixelMapProducer: + { + @table::standard_pixelmapproducer + TimeResolution: 1500 + Threshold: 0.6 + } +} + +standard_cvnmapper_sim: +{ + module_type: CVNMapperSim + #================== + HitsModuleLabel: "tpcrawdecoder:simpleSC" + ClusterPMLabel: "cvnmap" + MinClusterHits: 100 + PixelMapProducer: + { + @table::standard_pixelmapproducer + TimeResolution: 1500 + Threshold: 0.6 + } +} + +standard_sbndtfnethandler: +{ + LibPath: "SBND_DATA_DIR" + TFProtoBuf: "CVN" + ChargeLogScale: false + NImageWires: 500 + NImageTDCs : 500 + ReverseViews: [false,false,false] + UseBundle: true + Inputs: ["view0","view1","view2"] + Outputs: ["flavour"] + NInputs: 3 + NOutputs: 7 + verbose: false +} + +standard_sbndcvnevaluatorpm: +{ + module_type: SBNDCVNEvaluator + #================== + PixelMapModuleLabel: "sbndpixelmap" + PixelMapInput: "cvnmap" + SliceLabel: "" + PFParticleModuleLabel: "" + T0Label: "" + CVNType: "Tensorflow" + verbose: false + SBNDTFHandler: { + tool_type: SBNDTFNetHandler + @table::standard_sbndtfnethandler + } + PixelMapProducer: @local::standard_pixelmapproducer +} + +standard_sbndcvnevaluatorslc: +{ + module_type: SBNDCVNEvaluator + #================== + PixelMapModuleLabel: "" + PixelMapInput: "" + SliceLabel: "pandora" + PFParticleModuleLabel: "pandora" + T0Label: "pandora" + CVNType: "Tensorflow" + verbose: false + SBNDTFHandler: { + tool_type: SBNDTFNetHandler + @table::standard_sbndtfnethandler + } + PixelMapProducer: @local::standard_pixelmapproducer +} + +standard_sbndcvntest: +{ + module_type: SBNDCVNTest + #================== + SliceLabel: "pandora" + CVNLabel: "cvn" + GenieLabel: "generator" + HitLabel: "gaushit" + HitMatchLabel: "gaushitTruthMatch" +} + + +END_PROLOG diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaTest.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaTest.fcl new file mode 100644 index 000000000..94a6c2905 --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaTest.fcl @@ -0,0 +1,67 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: SBNDCVNEvaTest + +services: +{ + RandomNumberGenerator: {} # required by fuzzyCluster + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + MetadataSBN: @local::sbnd_file_catalog_sbn # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice + TFileService: { fileName: "cvn.root" } +} +services.FileCatalogMetadataSBN: { + @table::sbnd_file_catalog_extra + FCLName: "" + ProjectName: "" + ProjectStage: "" + ProjectVersion: "" + ProjectSoftware:"" + ProductionName: "" + ProductionType: "" +} # services.FileCatalogMetadataSBND + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + + producers:{ + #sbndpixelmap: @local::standard_cvnmapper + cvn: @local::standard_sbndcvnevaluatorslc + } + + analyzers:{ + cvntest: @local::standard_sbndcvntest + } + + filters: {} + + #reco: [sbndpixelmap, cvn] + reco: [cvn] + + ana: [ cvntest ] + +# stream: [ ] + + trigger_paths: [ reco ] + + end_paths: [ana] +} diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaluator.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaluator.fcl new file mode 100644 index 000000000..f33920a02 --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDCVNEvaluator.fcl @@ -0,0 +1,61 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: SBNDCVNEVALUATOR + +services: +{ + RandomNumberGenerator: {} # required by fuzzyCluster + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice +} + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + producers:{ + cvn: @local::standard_sbndcvnevaluatorslc + } + + filters: {} + + analyzers:{} + + reco: [ cvn ] + + stream: [ out ] + + trigger_paths: [ reco ] + + end_paths: [ stream ] +} + +outputs: +{ + out: + { + module_type: RootOutput + dataTier: "reconstructed" + #SelectEvents: [ reco ] + fastCloning: true + fileName: @local::sbnd_rootoutput.fileName + } +} + diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDCVNMapper.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDCVNMapper.fcl new file mode 100644 index 000000000..af8f1ed9a --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDCVNMapper.fcl @@ -0,0 +1,73 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: SBNDCVNMAPPER + +services: +{ + RandomNumberGenerator: {} # required by fuzzyCluster + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice +} + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + producers:{ + sbndpixelmap: @local::standard_cvnmapper + } + + filters: {} + + analyzers:{} + + reco: [ sbndpixelmap ] + + stream: [ out ] + + trigger_paths: [ reco ] + + end_paths: [ stream ] +} + +outputs: +{ + out: + { + module_type: RootOutput + dataTier: "reconstructed" + SelectEvents: [ reco ] + fileName: @local::sbnd_rootoutput.fileName + } +} + +outputs.out.outputCommands: [ + "keep *_*_*_*", + "drop recob::Showers_*_*_*", + "drop recob::Tracks_*_*_*", + "drop recob::OpHits_*_*_*", + "drop recob::Clusters_*_*_*", + "drop recob::SpacePoints_*_*_*", + "drop anab::Calorimetrys_*_*_*", + "drop anab::anab::ParticleIDs_*_*_*", + "drop recob::OpFlashs_*_*_*" +] + + diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDCVNTest.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDCVNTest.fcl new file mode 100644 index 000000000..f22fb78d5 --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDCVNTest.fcl @@ -0,0 +1,50 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: SBNDCVNTest + +services: +{ + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice + TFileService: { fileName: "cvn.root" } +} + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + + producers:{} + + analyzers:{ + cvntest: @local::standard_sbndcvntest + } + + filters: {} + + + ana: [ cvntest ] + +# stream: [ ] + + trigger_paths: [ ] + + end_paths: [ ana ] +} diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDWireCheck.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDWireCheck.fcl new file mode 100644 index 000000000..81b43f84f --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDWireCheck.fcl @@ -0,0 +1,48 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: SBNDWireCheck + +services: +{ + TFileService: { fileName: "SBNDWireCheck.root" } + RandomNumberGenerator: {} # required by fuzzyCluster + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice + BackTrackerService: @local::standard_backtrackerservice +} + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + producers:{} + + filters: {} + + analyzers:{ + sbndwire:@local::standard_sbndwirecheck + } + + ana: [ sbndwire ] + end_paths: [ ana ] +} + +outputs:{} +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "simdrift" diff --git a/sbndcode/SBNDCVN/fcls/run_SBNDZlibMaker.fcl b/sbndcode/SBNDCVN/fcls/run_SBNDZlibMaker.fcl new file mode 100644 index 000000000..2c512c2d9 --- /dev/null +++ b/sbndcode/SBNDCVN/fcls/run_SBNDZlibMaker.fcl @@ -0,0 +1,48 @@ +#include "SBNDCVNMapper.fcl" +#include "simulationservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" +#include "services_sbnd.fcl" +#include "messages_sbnd.fcl" +#include "sam_sbnd.fcl" +#include "larfft_sbnd.fcl" +#include "signalservices_sbnd.fcl" +#include "rootoutput_sbnd.fcl" + +process_name: ZlibMaker + +services: +{ + TFileService: { fileName: "SBNDZlibMaker.root" } + RandomNumberGenerator: {} # required by fuzzyCluster + message: @local::sbnd_message_services_prod # from messages_sbnd.fcl + FileCatalogMetadata: @local::sbnd_file_catalog_mc # from sam_sbnd.fcl + @table::sbnd_services # from services_sbnd.fcl + LArFFT: @local::sbnd_larfft + SignalShapingServiceSBND: @local::sbnd_signalshapingservice # from signalservices_sbnd.fcl + ParticleInventoryService: @local::standard_particleinventoryservice + BackTrackerService: @local::standard_backtrackerservice +} + +source: +{ + module_type: RootInput + maxEvents: -1 +} + + +physics: +{ + producers:{} + + filters: {} + + analyzers:{ + map:@local::standard_cvnzlibmaker + } + + ana: [ map ] + end_paths: [ ana ] +} + +outputs:{} +services.BackTrackerService.BackTracker.SimChannelModuleLabel: "simdrift" diff --git a/sbndcode/SBNDCVN/module_helpers/CMakeLists.txt b/sbndcode/SBNDCVN/module_helpers/CMakeLists.txt new file mode 100644 index 000000000..de3377791 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/CMakeLists.txt @@ -0,0 +1,43 @@ + +cet_make_library( + SOURCE + SBNDPixelMapProducer.cxx + #SBNDPixelMap.h + SBNDICVNMapper.cxx + SBNDICVNZlibMaker.cxx + SBNDITFNetHandler.h + LIBRARY_NAME + sbndcode_sbndcvn_module_helpers + LIBRARIES + PUBLIC + larrecodnn::CVN_interfaces + larrecodnn::CVN_func + lardataobj::RecoBase + lardataobj::Simulation + art::Framework_Services_Registry + art::Framework_Core + art::Framework_Principal + art_root_io::tfile_support + art_root_io::TFileService_service + canvas::canvas + messagefacility::MF_MessageLogger + fhiclcpp::fhiclcpp + art_plugin_types::module + Boost::filesystem + art_root_io::tfile_support + nusimdata::SimulationBase + ROOT::Hist + lardata::DetectorPropertiesService + larcore::Geometry_Geometry_service + larcorealg::Geometry + larrecodnn::ImagePatternAlgs_Tensorflow_TF + ${ZLIB_LIBRARIES} + PRIVATE + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service +) + +art_dictionary(DICTIONARY_LIBRARIES sbndcode_sbndcvn_module_helpers) + +install_headers() +install_source() diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.cxx b/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.cxx new file mode 100644 index 000000000..fcb827a6c --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.cxx @@ -0,0 +1,141 @@ +#include "sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.h" +#include "lardataobj/RecoBase/Slice.h" + +#include "canvas/Persistency/Common/FindManyP.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/AnalysisBase/T0.h" +#include "lardata/Utilities/AssociationUtil.h" + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/View.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "canvas/Persistency/Common/PtrVector.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art_root_io/TFileService.h" +#include "art_root_io/TFileDirectory.h" +#include "canvas/Persistency/Common/FindMany.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "fhiclcpp/ParameterSet.h" + +#include // std::min_element +#include // std::begin, std::end + +namespace lcvn +{ + template SBNDICVNMapper::SBNDICVNMapper(fhicl::ParameterSet const& pset) + : EDProducer{pset} + , fHitsModuleLabel(pset.get("HitsModuleLabel")) + , fClusterPMLabel(pset.get("ClusterPMLabel")) + , fMinClusterHits(pset.get("MinClusterHits")) + , fProducer(pset.get("PixelMapProducer")) + , fverbose(pset.get("verbose")) + , fUseSlice(pset.get("UseSlice")) + , fSliceLabel(pset.get("SliceLabel")) + , fPFParticleModuleLabel(pset.get("PFParticleModuleLabel")) + , fT0Label(pset.get("T0Label")) + , fMapVecSize(pset.get("MapVecSize")) + { + + produces>(fClusterPMLabel); + produces>(fClusterPMLabel); + } + + //-------------------------------------------------------------------------------------------------------------------------- + +template void SBNDICVNMapper::produce(art::Event& evt) +{ + if(fverbose) std::cout << "============ Calling the function SBNDICVNMapper::produce() ==============\n"; + + if(fUseSlice){ + if(fverbose) std::cout << "============ Calling the function SBNDICVNMapper::produce() is using slices ==============\n"; + art::Handle< std::vector > SliceListHandle; + std::vector< art::Ptr > SliceList; + if( evt.getByLabel(fSliceLabel,SliceListHandle)) + art::fill_ptr_vector(SliceList,SliceListHandle); + + art::Handle< std::vector > PFPListHandle; + std::vector< art::Ptr > PFPList; + if( evt.getByLabel(fPFParticleModuleLabel,PFPListHandle)) + art::fill_ptr_vector(PFPList,PFPListHandle); + + art::FindManyP findManyHits(SliceListHandle, evt, fSliceLabel); + + art::FindManyP findManyPFPs(SliceListHandle, evt, fPFParticleModuleLabel); + art::FindManyP findManyT0s(PFPListHandle, evt, fT0Label); + + std::unique_ptr< std::vector > pmCol(new std::vector); + auto assn = std::make_unique< art::Assns >(); + + auto const detProp = art::ServiceHandle()->DataFor(evt); + + for(auto const& slice : SliceList){ + if (fverbose) std::cout << "********* " << evt.run() << " " << evt.subRun() << " " << evt.id().event() << " " << slice->ID() << " **************\n"; + std::vector pfp_T0_vec; + if(findManyPFPs.isValid()){ + std::vector> slicePFPs = findManyPFPs.at(slice.key()); + if(slicePFPs.size()){ + for(auto const &pfp : slicePFPs){ + if(findManyT0s.isValid()){ + std::vector> T0_vec = findManyT0s.at(pfp.key()); + if(T0_vec.size()){ + for(auto const& T0 : T0_vec){ + pfp_T0_vec.push_back(T0->Time()); + } + } + } + } + } + } + + float min_T0 = 0.; + if(pfp_T0_vec.size()){ + min_T0 = *min_element(pfp_T0_vec.begin(), pfp_T0_vec.end()); + } + + if(findManyHits.isValid()){ + std::vector> slicehits = findManyHits.at(slice.key()); + fProducer.Set_fT0_value(min_T0); + PixelMap pm = fProducer.SBNDCreateMap(detProp, slicehits); + auto nhits = fProducer.NROI(); + pm.SetTotHits(nhits); + //pm.fSliceID = slice->ID(); + + if(nhits > fMinClusterHits && pmCol->size()push_back(pm); + util::CreateAssn(*this, evt, *pmCol, slice, *assn, fClusterPMLabel); + } + + } + } + //std::cout<size()<> hitlist; + auto hitListHandle = evt.getHandle>(fHitsModuleLabel); + if (hitListHandle) art::fill_ptr_vector(hitlist, hitListHandle); + + //Declaring containers for things to be stored in event + std::unique_ptr> pmCol(new std::vector); + + auto const detProp = art::ServiceHandle()->DataFor(evt); + PixelMap pm = fProducer.SBNDCreateMap(detProp, hitlist); + auto nhits = fProducer.NROI(); + pm.SetTotHits(nhits); + + if (nhits > fMinClusterHits) pmCol->push_back(pm); + + evt.put(std::move(pmCol), fClusterPMLabel); + } + } +} diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.h b/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.h new file mode 100644 index 000000000..5ec9e8e31 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.h @@ -0,0 +1,61 @@ +#ifndef LCVN_SBNDICVNMAPPER_H +#define LCVN_SBNDICVNMAPPER_H + +#include +#include +#include +#include +#include + +// Framework includes +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art_root_io/TFileDirectory.h" + +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "canvas/Persistency/Common/Assns.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +// LArSoft includes +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/Wire.h" +#include "lardataobj/Simulation/SimChannel.h" + +#include "larrecodnn/CVN/func/PixelMap.h" +#include "larrecodnn/CVN/interfaces/PixelMapProducer.h" + +namespace lcvn { + + template + class SBNDICVNMapper : public art::EDProducer { + public: + explicit SBNDICVNMapper(fhicl::ParameterSet const& pset); + + void produce(art::Event& evt) override; + + protected: + /// Module lablel for input clusters + std::string fHitsModuleLabel; + + /// Instance lablel for cluster pixelmaps + std::string fClusterPMLabel; + + /// Minimum number of hits for cluster to be converted to pixel map + unsigned short fMinClusterHits; + + /// PixelMapProducer does the work for us + T fProducer; + + bool fverbose; + bool fUseSlice; + std::string fSliceLabel; + std::string fPFParticleModuleLabel; + std::string fT0Label; + unsigned int fMapVecSize; + }; + +} +#endif diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.cxx b/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.cxx new file mode 100644 index 000000000..20dfc4286 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.cxx @@ -0,0 +1,51 @@ +#include "sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.h" +#include "lardataobj/RecoBase/Slice.h" + +#include "canvas/Persistency/Common/FindManyP.h" + +namespace fs = boost::filesystem; + +namespace lcvn { + + SBNDICVNZlibMaker::SBNDICVNZlibMaker(fhicl::ParameterSet const& pset) : EDAnalyzer(pset) + { + this->reconfigure(pset); + } + + //...................................................................... + SBNDICVNZlibMaker::~SBNDICVNZlibMaker() {} + + //...................................................................... + void SBNDICVNZlibMaker::reconfigure(const fhicl::ParameterSet& pset) + { + fOutputDir = pset.get("OutputDir", ""); + fPixelMapInput = pset.get("PixelMapInput"); + fSetLog = pset.get("SetLog"); + fReverseViews = pset.get>("ReverseViews"); + + fPlaneLimit = pset.get("PlaneLimit"); + fTDCLimit = pset.get("TDCLimit"); + fverbose = pset.get("verbose"); + fUseSlice = pset.get("UseSlice"); + fSliceLabel = pset.get("SliceLabel"); + } + + void SBNDICVNZlibMaker::beginJob() + { + fImage = CVNImageUtils(fPlaneLimit, fTDCLimit, 3); + fImage.SetLogScale(fSetLog); + fImage.SetViewReversal(fReverseViews); + + if (fOutputDir != "") + out_dir = fOutputDir; + + else + out_dir = "."; + + // Throw an error if the specified output directory doesn't exist + if (!fs::exists(out_dir)) + throw art::Exception(art::errors::FileOpenError) + << "Output directory " << out_dir << " does not exist!" << std::endl; + } + +} diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.h b/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.h new file mode 100644 index 000000000..5f12d4b18 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.h @@ -0,0 +1,81 @@ +#ifndef LCVN_SBNDICVNZLIBMAKER_H +#define LCVN_SBNDICVNZLIBMAKER_H + +#include +#include +#include +#include +#include +#include + +// C/C++ includes +#include +#include + +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/SubRun.h" +#include "art_root_io/TFileDirectory.h" +#include "boost/filesystem.hpp" + +// Framework includes +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/SubRun.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "canvas/Persistency/Common/PtrVector.h" +#include "canvas/Utilities/Exception.h" + +// Data products +#include "nusimdata/SimulationBase/GTruth.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/MCNeutrino.h" +#include "nusimdata/SimulationBase/MCTruth.h" +// #include "dunereco/FDSensOpt/FDSensOptData/EnergyRecoOutput.h" + +// CVN includes +#include "larrecodnn/CVN/func/AssignLabels.h" +#include "larrecodnn/CVN/func/CVNImageUtils.h" +#include "larrecodnn/CVN/func/InteractionType.h" +#include "larrecodnn/CVN/func/LArTrainingData.h" +#include "larrecodnn/CVN/func/PixelMap.h" + +// Compression +#include "math.h" +#include "zlib.h" + +#include "TH1.h" + +namespace lcvn { + + class SBNDICVNZlibMaker : public art::EDAnalyzer { + public: + explicit SBNDICVNZlibMaker(fhicl::ParameterSet const& pset); + ~SBNDICVNZlibMaker(); + + void beginJob() override; + void analyze(const art::Event& evt) override {} + void reconfigure(const fhicl::ParameterSet& pset); + + protected: + std::string fOutputDir; + std::string fPixelMapInput; + bool fSetLog; + std::vector fReverseViews; + unsigned int fPlaneLimit; + unsigned int fTDCLimit; + bool fverbose; + bool fUseSlice; + std::string fSliceLabel; + + std::string out_dir; + CVNImageUtils fImage; + + template + void write_files(LArTrainingData td, std::string evtid) = delete; + }; +} +#endif diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDITFNetHandler.h b/sbndcode/SBNDCVN/module_helpers/SBNDITFNetHandler.h new file mode 100644 index 000000000..173f6bc15 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDITFNetHandler.h @@ -0,0 +1,28 @@ +///////////////////////////////////////////////////////////////////////////////////////////////// +/// \file SBNDTFNetHandler.h +/// \brief SBNDTFNetHandler for CVN +/// \author Varuna Meddage by looking at the format of larrecodnn/CVN/interfaces/ITFNetHandler.h +//////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef LCVN_SBNDTFNETHANDLER_H +#define LCVN_SBNDTFNETHANDLER_H + +#include +#include + +#include "larrecodnn/CVN/func/InteractionType.h" +#include "larrecodnn/CVN/func/PixelMap.h" + +namespace lcvn { + + /// Wrapper for caffe::Net which handles construction and prediction + class SBNDITFNetHandler { + public: + virtual ~SBNDITFNetHandler() noexcept = default; + /// Return prediction arrays for PixelMap + virtual std::vector> Predict(const PixelMap& pm) const = 0; + }; + +} + +#endif // LCVN_SBNDTFNETHANDLER_H diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.cxx b/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.cxx new file mode 100644 index 000000000..9d5d3b4d0 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.cxx @@ -0,0 +1,294 @@ +#include "sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h" + +namespace lcvn +{ + + template void SBNDPixelMapProducer::ConvertLocaltoGlobal(geo::WireID wireid, unsigned int &globalWire, unsigned int &globalPlane) const + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::ConvertLocaltoGlobal() ==============\n"; + PixelMapProducer::ConvertLocaltoGlobal(wireid, globalWire, globalPlane); + } + + //------------------------------------------------------------------------------------------------------------------------------------------------------------------ + + template Boundary SBNDPixelMapProducer::DefineBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T*>& cluster) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::DefineBoundary() ==============\n"; + + std::vector tmin_0; + std::vector tmin_1; + std::vector tmin_2; + + std::vector wire_0, bwire_0; + std::vector wire_1, bwire_1; + std::vector wire_2, bwire_2; + + std::vector tsum = {0., 0., 0.}; + std::vector tsize = {0., 0., 0.}; + + //std::cout << "===================== SBNDPixelMapProducer::DefineBoundary() Number of hits : " << cluster.size() << "\n"; + + for (size_t iHit = 0; iHit < cluster.size(); ++iHit) { + U wraphit(*(cluster[iHit]), this->fThreshold); + Waveform wf = wraphit.GetWaveform(); + geo::WireID wireid = wraphit.GetID(); + + unsigned int tempWire = wireid.Wire; + unsigned int tempPlane = wireid.Plane; + + if (!this->fMultipleDrifts) ConvertLocaltoGlobal(wireid, tempWire, tempPlane); + + for (auto& pulse : wf) { + double min_tick = (double)INT_MAX; + for (auto& i : pulse) { + double temptdc = i.first; + if (this->fMultipleDrifts) ConvertLocaltoGlobalTDC(wireid, i.first, tempWire, tempPlane, temptdc); + if (temptdc < min_tick) min_tick = temptdc; + tsum[tempPlane] += temptdc; + tsize[tempPlane] += 1.; + } + + if (!(pulse.empty())) { + if (tempPlane == 0) { + tmin_0.push_back(min_tick); + wire_0.push_back(tempWire); + } + if (tempPlane == 1) { + tmin_1.push_back(min_tick); + wire_1.push_back(tempWire); + } + if (tempPlane == 2) { + tmin_2.push_back(min_tick); + wire_2.push_back(tempWire); + } + } + } // end loop over pulses on single wire + } // end loop over struck wires + + //std::cout << "===================== SBNDPixelMapProducer::DefineBoundary() Reached end the hit loop ==================== " << cluster.size() << "\n"; + + double tmean_0 = tsum[0] / tsize[0]; + double tmean_1 = tsum[1] / tsize[1]; + double tmean_2 = tsum[2] / tsize[2]; + + for (int i = 0; i < (int)wire_0.size(); i++) { + if (std::abs(tmin_0[i] - tmean_0) < (double)this->fTRes) bwire_0.push_back(wire_0[i]); + } + for (int i = 0; i < (int)wire_1.size(); i++) { + if (std::abs(tmin_1[i] - tmean_1) < (double)this->fTRes) bwire_1.push_back(wire_1[i]); + } + for (int i = 0; i < (int)wire_2.size(); i++) { + if (std::abs(tmin_2[i] - tmean_2) < (double)this->fTRes) bwire_2.push_back(wire_2[i]); + } + + if (fverbose) std::cout << "Boundary wire vector sizes: " << bwire_0.size() << ", " << bwire_1.size() << ", " << bwire_2.size() << std::endl; + + int minwire_0 = 0; + int minwire_1 = 0; + int minwire_2 = 0; + auto minwireelement_0 = std::min_element(bwire_0.begin(), bwire_0.end()); + auto minwireelement_1 = std::min_element(bwire_1.begin(), bwire_1.end()); + auto minwireelement_2 = std::min_element(bwire_2.begin(), bwire_2.end()); + + if(fChangeWireNo){ + if (bwire_0.size() > 0) { + minwire_0 = *minwireelement_0 - 1; + if (fverbose) std::cout << "minwire 0: " << (*minwireelement_0 - 1) << std::endl; + } + if (bwire_1.size() > 0) { + minwire_1 = *minwireelement_1 - 1; + if (fverbose) std::cout << "minwire 1: " << (*minwireelement_1 - 1) << std::endl; + } + if (bwire_2.size() > 0) { + minwire_2 = *minwireelement_2 - 1; + if (fverbose) std::cout << "minwire 2: " << (*minwireelement_2 - 1) << std::endl; + } + } + + else{ + if (bwire_0.size() > 0) { + minwire_0 = *minwireelement_0; + if (fverbose) std::cout << "minwire 0: " << *minwireelement_0 << std::endl; + } + if (bwire_1.size() > 0) { + minwire_1 = *minwireelement_1; + if (fverbose) std::cout << "minwire 1: " << *minwireelement_1 << std::endl; + } + if (bwire_2.size() > 0) { + minwire_2 = *minwireelement_2; + if (fverbose) std::cout << "minwire 2: " << *minwireelement_2<< std::endl; + } + } + + this->fTotHits = bwire_0.size() + bwire_1.size() + bwire_2.size(); + + Boundary bound(this->fNWire, this->fTRes, minwire_0, minwire_1, minwire_2, tmean_0, tmean_1, tmean_2); + + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::DefineBoundary() ==============\n"; + return bound; + } + + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template void SBNDPixelMapProducer::ConvertLocaltoGlobalTDC(geo::WireID wireid, double localTDC, unsigned int &globalWire, unsigned int &globalPlane, double &globalTDC) const + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::ConvertLocaltoGlobalTDC() ==============\n"; + + float new_shift = 0.; + + if(fUseT){ + if(fT0 < 0.){ + new_shift = float(abs(fT0))/500 + fShiftT; + } + else if(fT0 > 0.){ + if(float(abs(fT0)/500 < fShiftT)) new_shift = fShiftT - float(abs(fT0))/500; + } + + else new_shift = fShiftT; + } + + else{ + new_shift = fShiftT; + } + + //------------------ end of calculating T0 correction ------------------------------- + + if(wireid.TPC == 0){ + globalWire = wireid.Wire; + globalPlane = wireid.Plane; + globalTDC = localTDC + new_shift; + if(fFlipInductionView){ + if(globalPlane == 1)globalWire = fInductionWires-globalWire; + } + } + + else{ + if(wireid.Plane == 2){ + globalWire = wireid.Wire; + globalPlane = wireid.Plane; + globalTDC = fReadoutSize + (fReadoutSize - localTDC) - new_shift; + } + + else if(wireid.Plane == 1){ + globalWire = wireid.Wire; + globalPlane = 0; + globalTDC = fReadoutSize + (fReadoutSize - localTDC) - new_shift; + } + + else{ + globalWire = wireid.Wire; + globalPlane = 1; + globalTDC = fReadoutSize + (fReadoutSize - localTDC) - new_shift; + if(fFlipInductionView){ + globalWire = fInductionWires-globalWire; + } + } + } + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::ConvertLocaltoGlobalTDC() ==============\n"; + } + + //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template PixelMap SBNDPixelMapProducer::SBNDCreateMapGivenBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster, const Boundary& bound) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDCreateMapGivenBoundary() ==============\n"; + PixelMap pm(this->fNWire, this->fNTdc, bound); + + for(size_t iHit = 0; iHit < cluster.size(); ++iHit) + { + + U wraphit(*(cluster[iHit]), this->fThreshold); + Waveform wf = wraphit.GetWaveform(); + geo::WireID wireid = wraphit.GetID(); + + unsigned int tempWire = wireid.Wire; + unsigned int tempPlane = wireid.Plane; + + if(!this->fMultipleDrifts) + ConvertLocaltoGlobal(wireid, tempWire, tempPlane); + + for(auto &pulse: wf){ + // Leigh: Simple modification to unwrap the collection view wire plane + for(auto &i: pulse){ + const double pe = i.second; + double temptdc = i.first; + if(this->fMultipleDrifts) + ConvertLocaltoGlobalTDC(wireid, i.first, tempWire, tempPlane, temptdc); + + const unsigned int wire = tempWire; + const unsigned int wirePlane = tempPlane; + const double tdc = temptdc; + + pm.Add(wire, tdc, wirePlane, pe); + } + } + + } + pm.SetTotHits(this->fTotHits); + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::SBNDCreateMapGivenBoundary() ==============\n"; + return pm; + } + + //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template PixelMap SBNDPixelMapProducer::SBNDCreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector>& cluster) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDCreateMap() [Art::Ptr form] ==============\n"; + std::vector newCluster; + for(const art::Ptr hit : cluster){ + newCluster.push_back(hit.get()); + } + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::SBNDCreateMap() [Art::Ptr form] ==============\n"; + return SBNDCreateMap(detProp, newCluster); + } + + //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template PixelMap SBNDPixelMapProducer::SBNDCreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDCreateMap() [Normal::Ptr form] ==============\n"; + Boundary bound = DefineBoundary(detProp, cluster); + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::SBNDCreateMap() [Normal::Ptr form] ==============\n"; + return SBNDCreateMapGivenBoundary(detProp, cluster, bound); + } + + //---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template void SBNDPixelMapProducer::Set_fT0_value(float value) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::Set_fT0_value() ==============\n"; + fT0 = value; + if(fverbose) std::cout << "============ Reached the end of the function SBNDPixelMapProducer::Set_fT0_value() ==============\n"; + } + + //----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template PixelMap SBNDPixelMapProducer::CreateMapGivenBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster, const Boundary& bound) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::CreateMapGivenBoundary() ==============\n"; + return PixelMapProducer::CreateMapGivenBoundary(detProp, cluster, bound); + } + + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ + + template PixelMap SBNDPixelMapProducer::CreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector>& cluster) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::CreateMap() ==============\n"; + return PixelMapProducer::CreateMap(detProp, cluster); + } + + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template PixelMap SBNDPixelMapProducer::CreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster) + { + if(fverbose) std::cout << "============ Calling the function SBNDPixelMapProducer::CreateMap() ==============\n"; + return PixelMapProducer::CreateMap(detProp, cluster); + } + + //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + template class SBNDPixelMapProducer; + template class SBNDPixelMapProducer; + template class SBNDPixelMapProducer; + +} diff --git a/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h b/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h new file mode 100644 index 000000000..568bf3bb1 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h @@ -0,0 +1,49 @@ +#ifndef LCVN_SBNDPIXELMAPPRODUCER_H +#define LCVN_SBNDPIXELMAPPRODUCER_H + +#include +#include +#include +#include +#include +#include + +#include "canvas/Persistency/Common/Ptr.h" +#include "larrecodnn/CVN/interfaces/PixelMapProducer.h" +#include "larrecodnn/CVN/func/PixelMap.h" + +namespace lcvn +{ + template class SBNDPixelMapProducer : public PixelMapProducer + { + public: + SBNDPixelMapProducer(unsigned int nWire, unsigned int nTdc, double tRes, double threshold = 0.):PixelMapProducer::PixelMapProducer(nWire, nTdc, tRes, threshold){std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDPixelMapProducer() ==============\n";} + SBNDPixelMapProducer():PixelMapProducer::PixelMapProducer(){std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDPixelMapProducer() ==============\n";} + SBNDPixelMapProducer(const fhicl::ParameterSet& pset):PixelMapProducer::PixelMapProducer(pset),fverbose(pset.get("verbose")),fChangeWireNo(pset.get("ChangeWireNo")),fReadoutSize(pset.get("ReadoutSize")),fShiftT(pset.get("ShiftT")),fInductionWires(pset.get("InductionWires")),fFlipInductionView(pset.get("FlipInductionView")),fUseT(pset.get("UseT")) {std::cout << "============ Calling the function SBNDPixelMapProducer::SBNDPixelMapProducer() ==============\n";} + Boundary DefineBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster) override; + void ConvertLocaltoGlobal(geo::WireID wireid, unsigned int &globalWire, unsigned int &globalPlane) const override; + void ConvertLocaltoGlobalTDC(geo::WireID wireid, double localTDC, unsigned int &globalWire, unsigned int &globalPlane, double &globalTDC) const override; + PixelMap CreateMapGivenBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster,const Boundary& bound) override; + PixelMap CreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector>& cluster) override; + PixelMap CreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster) override; + PixelMap SBNDCreateMapGivenBoundary(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster,const Boundary& bound); + PixelMap SBNDCreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector>& cluster); + PixelMap SBNDCreateMap(detinfo::DetectorPropertiesData const& detProp,const std::vector< const T* >& cluster); + void Set_fT0_value(float value); + protected: + bool fverbose; + bool fChangeWireNo; + double fReadoutSize; // in time ticks + float fShiftT; // size of the back/front porch + int fInductionWires; // number of wires in the first induction plane + bool fFlipInductionView; // should we flip the induction view + bool fUseT; // + float fT0; // T0 coming from the PFP particles (in time ticks) + }; + + typedef SBNDPixelMapProducer SBNDPixelMapHitProducer; + typedef SBNDPixelMapProducer SBNDPixelMapWireProducer; + typedef SBNDPixelMapProducer SBNDPixelMapSimProducer; +} + +#endif // LCVN_SBNDPIXELMAPPRODUCER_H diff --git a/sbndcode/SBNDCVN/module_helpers/classes.h b/sbndcode/SBNDCVN/module_helpers/classes.h new file mode 100644 index 000000000..9725b1cb6 --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/classes.h @@ -0,0 +1,8 @@ +#include "canvas/Persistency/Common/Wrapper.h" +#include "canvas/Persistency/Common/Assns.h" +#include "lardataobj/RecoBase/Slice.h" +#include "larrecodnn/CVN/func/PixelMap.h" +#include "larrecodnn/CVN/func/Result.h" +#include +#include +#include diff --git a/sbndcode/SBNDCVN/module_helpers/classes_def.xml b/sbndcode/SBNDCVN/module_helpers/classes_def.xml new file mode 100644 index 000000000..91995334f --- /dev/null +++ b/sbndcode/SBNDCVN/module_helpers/classes_def.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sbndcode/SBNDCVN/modules/CMakeLists.txt b/sbndcode/SBNDCVN/modules/CMakeLists.txt new file mode 100644 index 000000000..22c658fee --- /dev/null +++ b/sbndcode/SBNDCVN/modules/CMakeLists.txt @@ -0,0 +1,122 @@ +cet_build_plugin(SBNDCVNMapper art::EDProducer + LIBRARIES PRIVATE + larcorealg::Geometry + larcore::Geometry_Geometry_service + larsim::Simulation lardataobj::Simulation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + lardata::Utilities + larevt::Filters + lardataobj::RawData + lardataobj::RecoBase + larreco::Calorimetry + larreco::RecoAlg + lardata::RecoObjects + larpandora::LArPandoraInterface + sbndcode_CRTUtils + sbndcode_CRT + sbnobj::Common_CRT + nusimdata::SimulationBase + art::Framework_Core + art::Framework_Principal + art::Framework_Services_Registry + art_root_io::tfile_support ROOT::Core + art_root_io::TFileService_service + art::Persistency_Common canvas::canvas + art::Persistency_Provenance canvas::canvas + art::Utilities canvas::canvas + messagefacility::MF_MessageLogger + + fhiclcpp::fhiclcpp + ROOT::Geom + ROOT::XMLIO + ROOT::Gdml + ${ROOT_BASIC_LIB_LIST} + sbndcode_RecoUtils + sbndcode_OpDetSim + sbndcode_sbndcvn_module_helpers +) + +cet_build_plugin(SBNDCVNZlibMaker art::EDAnalyzer + LIBRARIES PRIVATE + larcorealg::Geometry + larcore::Geometry_Geometry_service + larsim::Simulation lardataobj::Simulation + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + lardata::Utilities + larevt::Filters + lardataobj::RawData + lardataobj::RecoBase + larreco::Calorimetry + larreco::RecoAlg + lardata::RecoObjects + larpandora::LArPandoraInterface + sbndcode_CRTUtils + sbndcode_CRT + sbnobj::Common_CRT + nusimdata::SimulationBase + art::Framework_Core + art::Framework_Principal + art::Framework_Services_Registry + art_root_io::tfile_support ROOT::Core + art_root_io::TFileService_service + art::Persistency_Common canvas::canvas + art::Persistency_Provenance canvas::canvas + art::Utilities canvas::canvas + messagefacility::MF_MessageLogger + + fhiclcpp::fhiclcpp + ROOT::Geom + ROOT::XMLIO + ROOT::Gdml + ${ROOT_BASIC_LIB_LIST} + sbndcode_RecoUtils + sbndcode_OpDetSim + sbndcode_sbndcvn_module_helpers +) + +cet_build_plugin(SBNDTFNetHandler art::tool + LIBRARIES PRIVATE + larrecodnn::CVN_func + larrecodnn::CVN_interfaces + larrecodnn::ImagePatternAlgs_Tensorflow_TF + messagefacility::MF_MessageLogger + fhiclcpp::types + fhiclcpp::fhiclcpp + ROOT::Hist + sbndcode_sbndcvn_module_helpers + sbndcode_SBNDCVN_tf +) + +cet_build_plugin(SBNDCVNEvaluator art::EDProducer + LIBRARIES PRIVATE + larrecodnn::CVN_func + larrecodnn::CVN_interfaces + art_plugin_support::toolMaker + art::Framework_Core + art::Framework_Principal + art_root_io::TFileService_service + canvas::canvas + sbndcode_sbndcvn_module_helpers +) + +cet_build_plugin(SBNDCVNTest art::EDAnalyzer + LIBRARIES PRIVATE + larrecodnn::CVN_func + larrecodnn::CVN_interfaces + larsim::MCCheater_BackTrackerService_service + larsim::MCCheater_ParticleInventoryService_service + art_plugin_support::toolMaker + art::Framework_Core + art::Framework_Principal + art_root_io::TFileService_service + canvas::canvas + sbndcode_sbndcvn_module_helpers + ROOT::Tree +) + +install_headers() +install_fhicl() +install_source() + diff --git a/sbndcode/SBNDCVN/modules/SBNDCVNEvaluator_module.cc b/sbndcode/SBNDCVN/modules/SBNDCVNEvaluator_module.cc new file mode 100644 index 000000000..e95296787 --- /dev/null +++ b/sbndcode/SBNDCVN/modules/SBNDCVNEvaluator_module.cc @@ -0,0 +1,190 @@ +//////////////////////////////////////////////////////////////////////// +// \file LArCVNEvaluator_module.cc +// \brief Producer module creating CVN neural net results +// \author Alexander Radovic - a.radovic@gmail.com +// Saul Alonso Monsalve - saul.alonso.monsalve@cern.ch +//////////////////////////////////////////////////////////////////////// + +// C/C++ includes +#include +#include + +// Framework includes +#include "art/Framework/Core/EDProducer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" +#include "art/Utilities/make_tool.h" +#include "art_root_io/TFileDirectory.h" +#include "art_root_io/TFileService.h" +#include "canvas/Persistency/Common/Assns.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "lardata/Utilities/AssociationUtil.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/AnalysisBase/T0.h" +#include "larrecodnn/CVN/func/AssignLabels.h" +#include "larrecodnn/CVN/func/InteractionType.h" +#include "larrecodnn/CVN/func/Result.h" +#include "larrecodnn/CVN/func/PixelMap.h" +#include "sbndcode/SBNDCVN/module_helpers/SBNDITFNetHandler.h" +#include "sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h" + +namespace lcvn { + + class SBNDCVNEvaluator : public art::EDProducer { + public: + explicit SBNDCVNEvaluator(fhicl::ParameterSet const& pset); + + void produce(art::Event& evt); + + private: + /// Module label for input pixel maps + std::string fPixelMapInput; + std::string fPixelMapModuleLabel; + art::InputTag fSliceLabel; + art::InputTag fPFParticleModuleLabel; + art::InputTag fT0Label; + + /// Can use Caffe or Tensorflow + std::string fCVNType; + + bool fverbose; + + //lcvn::CaffeNetHandler fCaffeHandler; + std::unique_ptr fTFHandler; + + /// Number of outputs fron neural net + //unsigned int fNOutput; + + SBNDPixelMapHitProducer fPMProducer; + }; + + //....................................................................... + SBNDCVNEvaluator::SBNDCVNEvaluator(fhicl::ParameterSet const& pset) + : EDProducer{pset} + , fPixelMapInput(pset.get("PixelMapInput")) + , fPixelMapModuleLabel(pset.get("PixelMapModuleLabel")) + , fSliceLabel(pset.get("SliceLabel")) + , fPFParticleModuleLabel(pset.get("PFParticleModuleLabel")) + , fT0Label(pset.get("T0Label")) + , fCVNType(pset.get("CVNType")) + , fverbose(pset.get("verbose")) + , fTFHandler{art::make_tool(pset.get("SBNDTFHandler"))} + , fPMProducer(pset.get("PixelMapProducer")) + { + produces>(); + if (fSliceLabel != ""){ + produces>(); + } + else{ + produces>(); + } + } + //...................................................................... + void SBNDCVNEvaluator::produce(art::Event& evt) + { + + /// Define containers for the things we're going to produce + std::unique_ptr> resultCol(new std::vector); + auto assn1 = std::make_unique< art::Assns >(); + auto assn2 = std::make_unique< art::Assns >(); + + if (fCVNType == "TF" || fCVNType == "Tensorflow" || fCVNType == "TensorFlow") { + if (fSliceLabel != ""){ // by default use slice information + std::vector < art::Ptr < recob::Slice > > slcList; + auto slcHandle = evt.getHandle>(fSliceLabel); + if (!slcHandle.isValid()){ + throw cet::exception("SBNDCVNEvaluator") << "Unable to get slices using label " << fSliceLabel; + } + else{ + art::fill_ptr_vector(slcList, slcHandle); + } + art::Handle< std::vector > PFPListHandle; + std::vector< art::Ptr > PFPList; + if( evt.getByLabel(fPFParticleModuleLabel,PFPListHandle)) + art::fill_ptr_vector(PFPList,PFPListHandle); + + art::FindManyP findManyHits(slcHandle, evt, fSliceLabel); + art::FindManyP findManyPFPs(slcHandle, evt, fPFParticleModuleLabel); + art::FindManyP findManyT0s(PFPListHandle, evt, fT0Label); + auto const detProp = art::ServiceHandle()->DataFor(evt); + for(auto const& slice : slcList){ + if (fverbose) std::cout << "********* " << evt.run() << " " << evt.subRun() << " " << evt.id().event() << " " << slice->ID() << " **************\n"; + std::vector pfp_T0_vec; + if(findManyPFPs.isValid()){ + std::vector> slicePFPs = findManyPFPs.at(slice.key()); + if(slicePFPs.size()){ + for(auto const &pfp : slicePFPs){ + if(findManyT0s.isValid()){ + std::vector> T0_vec = findManyT0s.at(pfp.key()); + if(T0_vec.size()){ + for(auto const& T0 : T0_vec){ + pfp_T0_vec.push_back(T0->Time()); + } + } + } + } + } + } + + float min_T0 = 0.; + if(pfp_T0_vec.size()){ + min_T0 = *min_element(pfp_T0_vec.begin(), pfp_T0_vec.end()); + } + + if(findManyHits.isValid()){ + std::vector> slicehits = findManyHits.at(slice.key()); + fPMProducer.Set_fT0_value(min_T0); + PixelMap pm = fPMProducer.SBNDCreateMap(detProp, slicehits); + auto nhits = fPMProducer.NROI(); + pm.SetTotHits(nhits); + //pm.fSliceID = slice->ID(); + std::vector> output = fTFHandler->Predict(pm); + resultCol->emplace_back(output); + util::CreateAssn(*this, evt, *resultCol, slice, *assn1); + } + } + } + else{ //Try to read pixel maps saved in the file + /// Load in the pixel maps + std::vector> pixelmaplist; + art::InputTag itag1(fPixelMapModuleLabel, fPixelMapInput); + auto pixelmapListHandle = evt.getHandle>(itag1); + if (pixelmapListHandle) art::fill_ptr_vector(pixelmaplist, pixelmapListHandle); + + // If we have a pixel map then use the TF interface to give us a prediction + if (pixelmaplist.size() > 0) { + if (fverbose) std::cout << "===================== size of the pixelmap list : " << pixelmaplist.size() << " ========================\n"; + std::vector> networkOutput = fTFHandler->Predict(*pixelmaplist[0]); + // lcvn::Result can now take a vector of floats and works out the number of outputs + for (unsigned int p = 0; p < pixelmaplist.size(); ++p) { + std::vector> output = fTFHandler->Predict(*pixelmaplist[p]); + resultCol->emplace_back(output); + util::CreateAssn(*this, evt, *resultCol, pixelmaplist[p], *assn2); + } + } + } + } + else { + mf::LogError("SBNDCVNEvaluator::produce") + << "CVN Type not in the allowed list: Tensorflow" << std::endl; + mf::LogError("SBNDCVNEvaluator::produce") << "Exiting without processing events" << std::endl; + return; + } + + evt.put(std::move(resultCol)); + if (fSliceLabel != ""){ + evt.put(std::move(assn1)); + } + else{ + evt.put(std::move(assn2)); + } + } + + DEFINE_ART_MODULE(lcvn::SBNDCVNEvaluator) +} // end namespace cvn +//////////////////////////////////////////////////////////////////////// diff --git a/sbndcode/SBNDCVN/modules/SBNDCVNMapper_module.cc b/sbndcode/SBNDCVN/modules/SBNDCVNMapper_module.cc new file mode 100644 index 000000000..3e660c5dd --- /dev/null +++ b/sbndcode/SBNDCVN/modules/SBNDCVNMapper_module.cc @@ -0,0 +1,17 @@ +#include "sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.cxx" +#include "sbndcode/SBNDCVN/module_helpers/SBNDICVNMapper.h" + +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/RecoBase/Wire.h" +#include "lardataobj/Simulation/SimChannel.h" + +#include "sbndcode/SBNDCVN/module_helpers/SBNDPixelMapProducer.h" +#include "larrecodnn/CVN/func/PixelMap.h" + +namespace lcvn { + + typedef SBNDICVNMapper SBNDCVNMapper; + template class SBNDICVNMapper; + +DEFINE_ART_MODULE(lcvn::SBNDCVNMapper) +} diff --git a/sbndcode/SBNDCVN/modules/SBNDCVNTest_module.cc b/sbndcode/SBNDCVN/modules/SBNDCVNTest_module.cc new file mode 100644 index 000000000..a6cfcc007 --- /dev/null +++ b/sbndcode/SBNDCVN/modules/SBNDCVNTest_module.cc @@ -0,0 +1,309 @@ +//////////////////////////////////////////////////////////////////////// +// Class: SBNDCVNTest +// Plugin Type: analyzer (Unknown Unknown) +// File: SBNDCVNTest_module.cc +// +// Generated at Fri Nov 22 10:10:07 2024 by Tingjun Yang using cetskelgen +// from cetlib version 3.18.02. +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "art_root_io/TFileService.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" +#include "canvas/Persistency/Common/FindOne.h" +#include "canvas/Persistency/Common/FindManyP.h" + +#include "larrecodnn/CVN/func/Result.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/Hit.h" +#include "lardataobj/AnalysisBase/BackTrackerMatchingData.h" +#include "larsim/MCCheater/ParticleInventoryService.h" +#include "TTree.h" + +using namespace std; + +namespace lcvn { + class SBNDCVNTest; +} + +class lcvn::SBNDCVNTest : public art::EDAnalyzer { +public: + explicit SBNDCVNTest(fhicl::ParameterSet const& p); + // The compiler-generated destructor is fine for non-base + // classes without bare pointers or other resource use. + + // Plugins should not be copied or assigned. + SBNDCVNTest(SBNDCVNTest const&) = delete; + SBNDCVNTest(SBNDCVNTest&&) = delete; + SBNDCVNTest& operator=(SBNDCVNTest const&) = delete; + SBNDCVNTest& operator=(SBNDCVNTest&&) = delete; + + // Required functions. + void analyze(art::Event const& e) override; + + // Selected optional functions. + void beginJob() override; + +private: + + // Declare member data here. + art::InputTag fSliceLabel; + art::InputTag fCVNLabel; + art::InputTag fHitLabel; + art::InputTag fHitMatchLabel; + + TTree *anatree; + int run; + int subrun; + int event; + vector nhits; + vector nhits0; + vector nhits1; + vector nhits2; + vector numuscore; + vector nuescore; + vector cosmicscore; + vector ncscore; + vector edep; + vector nufrac; + vector enu; + vector y; + vector nupdg; + vector ccnc; + vector type; + vector nuvtxx; + vector nuvtxy; + vector nuvtxz; +}; + + +lcvn::SBNDCVNTest::SBNDCVNTest(fhicl::ParameterSet const& p) + : EDAnalyzer{p} + , fSliceLabel(p.get("SliceLabel")) + , fCVNLabel(p.get("CVNLabel")) + , fHitLabel(p.get("HitLabel")) + , fHitMatchLabel(p.get("HitMatchLabel")) +{ + // Call appropriate consumes<>() for any products to be retrieved by this module. +} + +void lcvn::SBNDCVNTest::analyze(art::Event const& e) +{ + run = e.run(); + subrun = e.subRun(); + event = e.event(); + nhits.clear(); + nhits0.clear(); + nhits1.clear(); + nhits2.clear(); + numuscore.clear(); + nuescore.clear(); + cosmicscore.clear(); + ncscore.clear(); + edep.clear(); + nufrac.clear(); + enu.clear(); + y.clear(); + nupdg.clear(); + ccnc.clear(); + type.clear(); + nuvtxx.clear(); + nuvtxy.clear(); + nuvtxz.clear(); + + auto slcHandle = e.getHandle< std::vector >(fSliceLabel); + if (!slcHandle){ + cout<<"slcHandle invalid"<>(fGenieLabel); + auto hitHandle = e.getHandle< std::vector>(fHitLabel); + + art::FindManyP findManyHits(slcHandle, e, fSliceLabel); + art::FindOne findOneCVN(slcHandle, e, fCVNLabel); + art::FindManyP fmhitmc(hitHandle, e, fHitMatchLabel); + // ParticleInventoryService + art::ServiceHandle pi_serv; + + for (size_t i = 0; isize(); ++i){ + if (findOneCVN.at(i).isValid()){ + auto const & cvn = findOneCVN.at(i).ref().fOutput; +// for (size_t j = 0; jWireID().Plane; + if (plane == 0){ + ++this_nhits0; + } + else if (plane == 1){ + ++this_nhits1; + } + else if (plane == 2){ + ++this_nhits2; + } + } + nhits0.push_back(this_nhits0); + nhits1.push_back(this_nhits1); + nhits2.push_back(this_nhits2); + } + /* + if(findManyHits.isValid()){ + auto const & slice_hits = findManyHits.at(i); + cout<<"slice "<WireID(); + avgtpc[wid.Plane] += wid.TPC; + avgwire[wid.Plane] += wid.Wire; + avgtick[wid.Plane] += hit->PeakTime(); + ++nhits[wid.Plane]; + } + for (int ipl = 0; ipl <3; ++ipl){ + std::cout<<"plane="<TrackId()) continue; + //if (!pi_serv->TrackIdToMotherParticle_P(particles[e]->TrackId())) continue; + //size_t trkid = (pi_serv->TrackIdToMotherParticle_P(particles[e]->TrackId()))->TrackId(); + tot_slice_eng += hitmatch[e]->energy; + auto & mctruth = pi_serv->TrackIdToMCTruth_P(particles[e]->TrackId()); + if (mctruth){ + //std::cout<<"origin= "<Origin()<<" pdg= "<PdgCode()<Origin() == simb::kBeamNeutrino){ + tot_slice_nu_eng += hitmatch[e]->energy; + this_enu = mctruth->GetNeutrino().Nu().E(); + this_y = mctruth->GetNeutrino().Y(); + this_nupdg = mctruth->GetNeutrino().Nu().PdgCode(); + this_ccnc = mctruth->GetNeutrino().CCNC(); + this_type = mctruth->GetNeutrino().InteractionType(); + this_nuvtxx = mctruth->GetNeutrino().Nu().Vx(); + this_nuvtxy = mctruth->GetNeutrino().Nu().Vy(); + this_nuvtxz = mctruth->GetNeutrino().Nu().Vz(); + } + else if (mctruth->Origin() == simb::kCosmicRay){ + tot_slice_cos_eng += hitmatch[e]->energy; + } + //mc_truth_eng[mctruth.key()] += hitmatch[e]->energy; + } + } + } // loop over hits in the selected slice + + //ftotsliceE = tot_slice_eng; + + if(tot_slice_eng > 0){ +// std::cout << "Total energy : " << tot_slice_eng << "\n"; +// std::cout << "Total cosmic energy : " << tot_slice_cos_eng << "\n"; +// std::cout << "Total nu energy : " << tot_slice_nu_eng << "\n"; +// std::cout << "Cosmic fraction : " << double(tot_slice_cos_eng)/tot_slice_eng << "\n"; +// std::cout << "Neutrino fraction : " << double(tot_slice_nu_eng)/tot_slice_eng << "\n"; + this_nufrac = tot_slice_nu_eng/tot_slice_eng; +// ftotsliceNuE = tot_slice_nu_eng; +// ftotsliceCosE = tot_slice_cos_eng; +// ftotsliceOthE = ftotsliceE - ftotsliceNuE - ftotsliceCosE; +// fsliceNuEfrac = double(ftotsliceNuE)/ftotsliceE; +// fsliceCosEfrac = double(ftotsliceCosE)/ftotsliceE; +// fsliceOthEfrac = double(ftotsliceOthE)/ftotsliceE; + } + } + edep.push_back(tot_slice_eng); + nufrac.push_back(this_nufrac); + enu.push_back(this_enu); + y.push_back(this_y); + nupdg.push_back(this_nupdg); + ccnc.push_back(this_ccnc); + type.push_back(this_type); + nuvtxx.push_back(this_nuvtxx); + nuvtxy.push_back(this_nuvtxy); + nuvtxz.push_back(this_nuvtxz); + } + } + anatree->Fill(); +} + +void lcvn::SBNDCVNTest::beginJob() +{ + art::ServiceHandle tfs; + anatree = tfs->make("anatree", "anatree"); + anatree->Branch("run", &run); + anatree->Branch("subrun", &subrun); + anatree->Branch("event", &event); + anatree->Branch("nhits", &nhits); + anatree->Branch("nhits0", &nhits0); + anatree->Branch("nhits1", &nhits1); + anatree->Branch("nhits2", &nhits2); + anatree->Branch("numuscore", &numuscore); + anatree->Branch("nuescore", &nuescore); + anatree->Branch("cosmicscore", &cosmicscore); + anatree->Branch("ncscore", &ncscore); + anatree->Branch("edep", &ncscore); + anatree->Branch("nufrac", &nufrac); + anatree->Branch("enu", &enu); + anatree->Branch("y", &y); + anatree->Branch("nupdg", &nupdg); + anatree->Branch("ccnc", &ccnc); + anatree->Branch("type", &type); + anatree->Branch("nuvtxx", &nuvtxx); + anatree->Branch("nuvtxy", &nuvtxy); + anatree->Branch("nuvtxz", &nuvtxz); + +} + +DEFINE_ART_MODULE(lcvn::SBNDCVNTest) diff --git a/sbndcode/SBNDCVN/modules/SBNDCVNZlibMaker_module.cc b/sbndcode/SBNDCVN/modules/SBNDCVNZlibMaker_module.cc new file mode 100644 index 000000000..dc9aea1e7 --- /dev/null +++ b/sbndcode/SBNDCVN/modules/SBNDCVNZlibMaker_module.cc @@ -0,0 +1,937 @@ +//////////////////////////////////////////////////////////////////////// +// \file CVNZlibMaker_module.cc +// \brief Analyzer module for creating CVN gzip file objects +// \author Jeremy Hewes - jhewes15@fnal.gov +// Saul Alonso-Monsalve - saul.alonso.monsalve@cern.ch +// - wrote the zlib code used in this module +//////////////////////////////////////////////////////////////////////// + +// C/C++ includes +#include +#include + +#include "boost/filesystem.hpp" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/SubRun.h" +#include "art_root_io/TFileDirectory.h" +#include "art_root_io/TFileService.h" + +// Framework includes +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "canvas/Persistency/Common/Ptr.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/Exception.h" +#include "canvas/Persistency/Common/PtrVector.h" +#include "canvas/Persistency/Common/FindManyP.h" +#include "canvas/Persistency/Common/FindOneP.h" +#include "art/Framework/Services/Registry/ServiceHandle.h" + +// Data products +#include "nusimdata/SimulationBase/GTruth.h" +#include "nusimdata/SimulationBase/MCTruth.h" +#include "nusimdata/SimulationBase/MCFlux.h" +#include "nusimdata/SimulationBase/MCNeutrino.h" +#include "lardataobj/RecoBase/Slice.h" +#include "lardataobj/RecoBase/PFParticle.h" +#include "lardataobj/AnalysisBase/T0.h" +#include "lardataobj/RecoBase/Hit.h" +#include "larsim/MCCheater/ParticleInventoryService.h" +#include "lardata/DetectorInfoServices/DetectorClocksService.h" +#include "lardataalg/DetectorInfo/DetectorClocksData.h" +#include "larsim/MCCheater/BackTrackerService.h" +#include "lardataobj/Simulation/SimChannel.h" +#include "larpandora/LArPandoraInterface/LArPandoraHelper.h" +#include "lardataobj/RecoBase/PFParticleMetadata.h" +#include "sbndcode/RecoUtils/RecoUtils.h" +// #include "dunereco/FDSensOpt/FDSensOptData/EnergyRecoOutput.h" + +// CVN includes +#include "larrecodnn/CVN/func/AssignLabels.h" +#include "larrecodnn/CVN/func/LArTrainingData.h" +#include "larrecodnn/CVN/func/InteractionType.h" +#include "larrecodnn/CVN/func/PixelMap.h" +#include "larrecodnn/CVN/func/CVNImageUtils.h" +#include "sbndcode/SBNDCVN/module_helpers/SBNDICVNZlibMaker.h" + +// Compression +#include "zlib.h" +#include "math.h" + +#include "TH1.h" +#include "TTree.h" +#include "larcoreobj/SummaryData/POTSummary.h" + + +namespace lcvn { + + class SBNDCVNZlibMaker : public SBNDICVNZlibMaker { + public: + + explicit SBNDCVNZlibMaker(fhicl::ParameterSet const& pset); + ~SBNDCVNZlibMaker(); + + void beginJob(); + void endSubRun(art::SubRun const &sr); + void analyze(const art::Event& evt); + void reconfigure(const fhicl::ParameterSet& pset); + + private: + + unsigned int fTopologyHitsCut; + std::string fGenieGenModuleLabel; + bool fVerbose; + bool fUseBackTrackInfo; + bool fUseNuContainment; + double fCosEfrac; + double fNuEfrac; + double fVolCut; + bool fSaveTree; + std::string fPFParticleModuleLabel; + std::string fHitModuleLabel; + std::string fT0Label; + + // ParticleInventoryService + art::ServiceHandle pi_serv; + + // BackTrackerService + art::ServiceHandle bt_serv; + + void write_files(LArTrainingNuData td, std::string evtid); + //bool Is_in_TPC(double stX, double stY, double stZ); + bool Is_in_Fiducial_Vol(double stX, double stY, double stZ); + void HitTruth(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, Int_t& truthid); + bool HitTruthId(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, Int_t& mcid); + bool TrackIdToMCTruth(Int_t const trkID, art::Ptr& mctruth); + double HitEfrmTrkID(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, Int_t truthid); + double HitTotE(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit); + bool Is_Slice_Nu(art::FindManyP const& assn, art::Ptr const& slce); + art::Ptr Get_Nu_like_PFP(art::FindManyP const& assn, art::Ptr const& slce); + double Get_Slice_Score(art::FindManyP const& assn, art::Ptr const& pfp); + std::vector Get_Best_Slice_ID_PFP_pdg(art::FindManyP const& pfp_assn, art::FindManyP const& metadata_assn, std::vector> const& slice_vec); + int Get_Slice_PFP_ID(art::FindManyP const& assn, art::Ptr const& slce); + int Get_Hit_Count(unsigned int tpc_no, unsigned int pln_no, std::vector> const& hit_vec); + double Get_Tot_nu_E(detinfo::DetectorClocksData const& clockData,art::Ptr const& mcneutrino, std::vector> const& hit_vec); + + double HitTotE_frm_given_orgin(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, std::string origin_name); + double HitTotE_frm_mctruth(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, art::Ptr const& my_mctruth); + double TotE_from_mctruth(detinfo::DetectorClocksData const& clockData, std::vector> const& hit_vec, art::Ptr const& my_mctruth); + + void Clear(); + + TH1D* hPOT; + double fPOT; + int fRun; + int fSubRun; + + TTree *fEventTree; + int frun; + int fsubrun; + int fevent; + int fsliceID; + double ftotsliceE; + double ftotsliceNuE; + double ftotsliceCosE; + double ftotsliceOthE; + double fsliceNuEfrac; + double fsliceCosEfrac; + double fsliceOthEfrac; + bool fIsSliceNu; + double fSliceScore; + bool fIsbestSlice; + int fbestpfppdg; + int fbestsliceID; + int fpfppdg; + bool fNuIsContained; + int fNuID; + int fNhits_tpc_0_pl_0; + int fNhits_tpc_0_pl_1; + int fNhits_tpc_0_pl_2; + int fNhits_tpc_1_pl_0; + int fNhits_tpc_1_pl_1; + int fNhits_tpc_1_pl_2; + int fNhits_total; + double fNuSlice_purity; + double fNuSlice_completeness; + double fT0; + }; + + //...................................................................... + SBNDCVNZlibMaker::SBNDCVNZlibMaker(fhicl::ParameterSet const& pset) + : SBNDICVNZlibMaker(pset) + { + reconfigure(pset); + } + + //...................................................................... + SBNDCVNZlibMaker::~SBNDCVNZlibMaker() + { } + + //...................................................................... + void SBNDCVNZlibMaker::reconfigure(const fhicl::ParameterSet& pset) + { + SBNDICVNZlibMaker::reconfigure(pset); + fTopologyHitsCut = pset.get("TopologyHitsCut"); + fGenieGenModuleLabel = pset.get("GenieGenModuleLabel"); + fVerbose = pset.get("Verbose"); + fUseBackTrackInfo = pset.get("UseBackTrackInfo"); + fUseNuContainment = pset.get("UseNuContainment"); + fCosEfrac = pset.get("CosEfrac"); + fNuEfrac = pset.get("NuEfrac"); + fVolCut = pset.get("VolCut"); + fSaveTree = pset.get("SaveTree"); + fPFParticleModuleLabel = pset.get("PFParticleModuleLabel"); + fHitModuleLabel = pset.get("HitModuleLabel"); + fT0Label = pset.get("T0Label"); + } + + //...................................................................... + void SBNDCVNZlibMaker::endSubRun(const art::SubRun & sr){ + + std::string fPOTModuleLabel = "generator"; + fRun = sr.run(); + fSubRun = sr.subRun(); + + art::Handle< sumdata::POTSummary > potListHandle; + if(sr.getByLabel(fPOTModuleLabel,potListHandle)) + fPOT = potListHandle->totpot; + else + fPOT = 0.; + if(hPOT) hPOT->Fill(0.5, fPOT); + } + + //...................................................................... + + void SBNDCVNZlibMaker::beginJob() + { + SBNDICVNZlibMaker::beginJob(); + + art::ServiceHandle tfs; + hPOT = tfs->make("TotalPOT", "Total POT;; POT", 1, 0, 1); + } + + //...................................................................... + + void SBNDCVNZlibMaker::analyze(const art::Event& evt) + { + std::vector> pixelmaps; + art::InputTag itag1(fPixelMapInput, "cvnmap"); + auto h_pixelmaps = evt.getHandle>(itag1); + if (h_pixelmaps) + art::fill_ptr_vector(pixelmaps, h_pixelmaps); + + if (pixelmaps.size() == 0) return; + + // Get associated slice for each pixel map + art::FindOneP findOneSlice(h_pixelmaps, evt, itag1); + + AssignLabels labels; + TDNuInfo info; + double event_weight =1; + InteractionType interaction = kOther; + bool Nu_is_contained = false; + + std::vector> mctruth_list; + auto h_mctruth = evt.getHandle>(fGenieGenModuleLabel); + if (h_mctruth) + art::fill_ptr_vector(mctruth_list, h_mctruth); + + for(auto const& mctruth : mctruth_list){ + if(mctruth->Origin() == simb::kBeamNeutrino){ + simb::MCNeutrino true_neutrino = mctruth->GetNeutrino(); + + if(fUseNuContainment){ + if(Is_in_Fiducial_Vol(true_neutrino.Nu().Vx(),true_neutrino.Nu().Vy(),true_neutrino.Nu().Vz())){ + interaction = labels.GetInteractionType(true_neutrino); + labels.GetTopology(mctruth, fTopologyHitsCut); + float nu_energy = true_neutrino.Nu().E(); + float lep_energy = true_neutrino.Lepton().E(); + fNuID = true_neutrino.Nu().TrackId(); + info.SetTruthInfo(nu_energy, lep_energy, 0., event_weight); + info.SetTopologyInformation(labels.GetPDG(), labels.GetNProtons(), labels.GetNPions(), labels.GetNPizeros(), labels.GetNNeutrons(), labels.GetTopologyType(), labels.GetTopologyTypeAlt()); + Nu_is_contained = true; + break; + } + } + + else{ + interaction = labels.GetInteractionType(true_neutrino); + labels.GetTopology(mctruth, fTopologyHitsCut); + float nu_energy = true_neutrino.Nu().E(); + float lep_energy = true_neutrino.Lepton().E(); + fNuID = true_neutrino.Nu().TrackId(); + info.SetTruthInfo(nu_energy, lep_energy, 0., event_weight); + info.SetTopologyInformation(labels.GetPDG(), labels.GetNProtons(), labels.GetNPions(), labels.GetNPizeros(), labels.GetNNeutrons(), labels.GetTopologyType(), labels.GetTopologyTypeAlt()); + if(Is_in_Fiducial_Vol(true_neutrino.Nu().Vx(),true_neutrino.Nu().Vy(),true_neutrino.Nu().Vz())) Nu_is_contained = true; + break; + } + + } // select neutrino interactions + + + else if(mctruth->Origin() == simb::kCosmicRay){ + interaction = kCosmic; + break; + } // select cosmic interactions + } + + + /////////////////////// use slice section //////////////////////////////////////// + + if(fUseSlice){ + std::cout << "***************** Used slice method ****************\n"; + + art::Handle< std::vector > SliceListHandle; + std::vector< art::Ptr > SliceList; + if( evt.getByLabel(fSliceLabel,SliceListHandle)) + art::fill_ptr_vector(SliceList,SliceListHandle); + + art::Handle< std::vector > PFPListHandle; + std::vector< art::Ptr > PFPList; + if( evt.getByLabel(fPFParticleModuleLabel,PFPListHandle)) + art::fill_ptr_vector(PFPList,PFPListHandle); + + art::Handle< std::vector > HitListHandle; + std::vector< art::Ptr > HitList; + if( evt.getByLabel(fHitModuleLabel,HitListHandle)) + art::fill_ptr_vector(HitList,HitListHandle); + + + art::FindManyP findManyHits(SliceListHandle, evt, fSliceLabel); + art::FindManyP findManyPFPs(SliceListHandle, evt, fPFParticleModuleLabel); + art::FindManyP fm_pfpmd(PFPListHandle, evt, fPFParticleModuleLabel); + art::FindManyP findManyT0s(PFPListHandle, evt, fT0Label); + + if(fUseBackTrackInfo){ + std::cout << "***************** Used backtracker information to get neutrino information ****************\n"; + auto const clockData = art::ServiceHandle()->DataFor(evt); + + for(unsigned int i=0; iID() << "\n"; + AssignLabels labels; + TDNuInfo info; + double event_weight =1; + InteractionType interaction = kOther; + + fsliceID = slice->ID(); + if(findManyHits.isValid()){ + std::vector> slice_hits = findManyHits.at(slice.key()); + double tot_slice_eng = 0; + double tot_slice_nu_eng = 0; + double tot_slice_cos_eng = 0; + + fNhits_tpc_0_pl_0 = Get_Hit_Count(0,0,slice_hits); + fNhits_tpc_0_pl_1 = Get_Hit_Count(0,1,slice_hits); + fNhits_tpc_0_pl_2 = Get_Hit_Count(0,2,slice_hits); + fNhits_tpc_1_pl_0 = Get_Hit_Count(1,0,slice_hits); + fNhits_tpc_1_pl_1 = Get_Hit_Count(1,1,slice_hits); + fNhits_tpc_1_pl_2 = Get_Hit_Count(1,2,slice_hits); + fNhits_total = slice_hits.size(); + + std::vector mc_truth_eng(mctruth_list.size(),0.); + for(auto const hit : slice_hits){ + //Int_t trkId; // newly deleted + tot_slice_eng += HitTotE(clockData,hit); + tot_slice_nu_eng += HitTotE_frm_given_orgin(clockData,hit,"nu"); // newly added + tot_slice_cos_eng += HitTotE_frm_given_orgin(clockData,hit,"cos"); // newly added + + // newly added section + + if(mctruth_list.size()){ + for(auto const truth : mctruth_list){ + if(truth->Origin() == simb::kBeamNeutrino){ + mc_truth_eng[truth.key()] += HitTotE_frm_mctruth(clockData,hit,truth); + } + } + } + } // loop over hits in the selected slice + + ftotsliceE = tot_slice_eng; + + if(tot_slice_eng > 0){ + std::cout << "Total energy : " << tot_slice_eng << "\n"; + std::cout << "Total cosmic energy : " << tot_slice_cos_eng << "\n"; + std::cout << "Total nu energy : " << tot_slice_nu_eng << "\n"; + std::cout << "Cosmic fraction : " << double(tot_slice_cos_eng)/tot_slice_eng << "\n"; + std::cout << "Neutrino fraction : " << double(tot_slice_nu_eng)/tot_slice_eng << "\n"; + + ftotsliceNuE = tot_slice_nu_eng; + ftotsliceCosE = tot_slice_cos_eng; + ftotsliceOthE = ftotsliceE - ftotsliceNuE - ftotsliceCosE; + fsliceNuEfrac = double(ftotsliceNuE)/ftotsliceE; + fsliceCosEfrac = double(ftotsliceCosE)/ftotsliceE; + fsliceOthEfrac = double(ftotsliceOthE)/ftotsliceE; + + ///////////////////////////////////////////////////// Check whether this has pandora T0 /////////////////////////////// + + std::vector pfp_T0_vec; + if(findManyPFPs.isValid()){ + std::vector> slicePFPs = findManyPFPs.at(slice.key()); + if(slicePFPs.size()){ + for(auto const &pfp : slicePFPs){ + if(findManyT0s.isValid()){ + std::vector> T0_vec = findManyT0s.at(pfp.key()); + if(T0_vec.size()){ + for(auto const& T0 : T0_vec){ + pfp_T0_vec.push_back(T0->Time()); + } + } + } + } + } + } + + if(pfp_T0_vec.size()){ + fT0 = *min_element(pfp_T0_vec.begin(), pfp_T0_vec.end()); + } + + ////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// + + if((double(tot_slice_cos_eng)/tot_slice_eng) >= fCosEfrac){ + interaction = kCosmic; + } // select cosmic + else if((double(tot_slice_nu_eng)/tot_slice_eng) >= fNuEfrac){ + int index = -1; + double min_E = 0.; + std::cout << "Size of the truth energy list : " << mc_truth_eng.size() << "\n"; + for(unsigned int k=0; k min_E){ + //std::cout << "MC truth energy : " << mc_truth_eng[k] << "\n"; + art::Ptr mctruth = mctruth_list[k]; + simb::MCNeutrino true_neutrino = mctruth->GetNeutrino(); + //std::cout << "Neutrino vertext : " << true_neutrino.Nu().Vx() << " " << true_neutrino.Nu().Vy() << " " << true_neutrino.Nu().Vz() << "\n"; + + if(fUseNuContainment){ + if(Is_in_Fiducial_Vol(true_neutrino.Nu().Vx(),true_neutrino.Nu().Vy(),true_neutrino.Nu().Vz())){ + //std::cout << "================ Checking containment cut =================\n"; + index = k; + min_E = mc_truth_eng[k]; + fNuIsContained = true; + } + } + + else{ + //std::cout << "================ Not Checking containment cut =================\n"; + index = k; + min_E = mc_truth_eng[k]; + if(Is_in_Fiducial_Vol(true_neutrino.Nu().Vx(),true_neutrino.Nu().Vy(),true_neutrino.Nu().Vz())) fNuIsContained = true; + else fNuIsContained = false; + } + + /*if(fUseNuFullContainment){ + if(Is_in_Fiducial_Vol(true_neutrino.Nu().Vx(),true_neutrino.Nu().Vy(),true_neutrino.Nu().Vz())){ + index = k; + min_E = mc_truth_eng[k]; + } + }*/ + + + } + } + + if(index != -1){ + simb::MCNeutrino true_neutrino = mctruth_list[index]->GetNeutrino(); + interaction = labels.GetInteractionType(true_neutrino); + labels.GetTopology(mctruth_list[index], fTopologyHitsCut); + float nu_energy = true_neutrino.Nu().E(); + float lep_energy = true_neutrino.Lepton().E(); + fNuID = true_neutrino.Nu().TrackId(); + info.SetTruthInfo(nu_energy, lep_energy, 0., event_weight); + info.SetTopologyInformation(labels.GetPDG(), labels.GetNProtons(), labels.GetNPions(), labels.GetNPizeros(), labels.GetNNeutrons(), labels.GetTopologyType(), labels.GetTopologyTypeAlt()); + //fNuSlice_purity = double(Get_Tot_nu_E(clockData,mctruth_list[index],slice_hits))/tot_slice_eng; // newly deleted + fNuSlice_purity = double(mc_truth_eng[index])/tot_slice_eng; // newly added + //if(Get_Tot_nu_E(clockData,mctruth_list[index],HitList)>0)fNuSlice_completeness = double(Get_Tot_nu_E(clockData,mctruth_list[index],slice_hits))/Get_Tot_nu_E(clockData,mctruth_list[index],HitList); // newly deleted + if(TotE_from_mctruth(clockData, HitList, mctruth_list[index])) fNuSlice_completeness = double(mc_truth_eng[index])/TotE_from_mctruth(clockData, HitList, mctruth_list[index]); // newly added + std::cout << "Nu purity : " << fNuSlice_purity << " Nu completeness : " << fNuSlice_completeness << "\n"; + } + } // select nutrino + } // total slice energy is greater that 0 + } // valid hit association + + if(findManyPFPs.isValid()){ + fIsSliceNu=Is_Slice_Nu(findManyPFPs,slice); + if(fIsSliceNu){ + if(fm_pfpmd.isValid()){ + fSliceScore = Get_Slice_Score(fm_pfpmd,Get_Nu_like_PFP(findManyPFPs,slice)); + if(slice->ID() == Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[0]) fIsbestSlice = true; + fbestpfppdg = Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[1]; + fbestsliceID = Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[0]; + fpfppdg = Get_Slice_PFP_ID(findManyPFPs, slice); + } + } + } + + LArTrainingNuData train(interaction, *pixelmaps[i], info); + std::string evtid = "r"+std::to_string(evt.run())+"_s"+std::to_string(evt.subRun())+"_e"+std::to_string(evt.event())+"_sl"+std::to_string(slice->ID())+"_h"+std::to_string(time(0)); + write_files(train, evtid); + break; + //} // found the matching slice + } // find associated slice + } // loop over pixel maps + } // use backtrack inoformation + + + else{ + std::cout << "***************** Used truth level information to get neutrino information ****************\n"; + for(unsigned int i=0; i> slice_hits = findManyHits.at(slice.key()); + fNhits_tpc_0_pl_0 = Get_Hit_Count(0,0,slice_hits); + fNhits_tpc_0_pl_1 = Get_Hit_Count(0,1,slice_hits); + fNhits_tpc_0_pl_2 = Get_Hit_Count(0,2,slice_hits); + fNhits_tpc_1_pl_0 = Get_Hit_Count(1,0,slice_hits); + fNhits_tpc_1_pl_1 = Get_Hit_Count(1,1,slice_hits); + fNhits_tpc_1_pl_2 = Get_Hit_Count(1,2,slice_hits); + fNhits_total = slice_hits.size(); + } + + if(findManyPFPs.isValid()){ + fIsSliceNu=Is_Slice_Nu(findManyPFPs,slice); + + ////////////////////////////////////////// pandora T0 ////////////////////////////////////////////////////// + + std::vector pfp_T0_vec; + if(findManyPFPs.isValid()){ + std::vector> slicePFPs = findManyPFPs.at(slice.key()); + if(slicePFPs.size()){ + for(auto const &pfp : slicePFPs){ + if(findManyT0s.isValid()){ + std::vector> T0_vec = findManyT0s.at(pfp.key()); + if(T0_vec.size()){ + for(auto const& T0 : T0_vec){ + pfp_T0_vec.push_back(T0->Time()); + } + } + } + } + } + } + + if(pfp_T0_vec.size()){ + fT0 = *min_element(pfp_T0_vec.begin(), pfp_T0_vec.end()); + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////// + + if(fIsSliceNu){ + if(fm_pfpmd.isValid()){ + fSliceScore = Get_Slice_Score(fm_pfpmd,Get_Nu_like_PFP(findManyPFPs,slice)); + if(slice->ID() == Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[0]) fIsbestSlice = true; + fbestpfppdg = Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[1]; + fbestsliceID = Get_Best_Slice_ID_PFP_pdg(findManyPFPs,fm_pfpmd,SliceList)[0]; + fpfppdg = Get_Slice_PFP_ID(findManyPFPs, slice); + } + } + } + break; + //} + std::string evtid = "r"+std::to_string(evt.run())+"_s"+std::to_string(evt.subRun())+"_e"+std::to_string(evt.event())+"_sl"+std::to_string(slice->ID())+"_h"+std::to_string(time(0)); + write_files(train, evtid); + } + + } + } // don't use slice information to extrac truth info + } // use slcie to make images + + else{ + std::cout << "***************** Used entire event ****************\n"; + LArTrainingNuData train(interaction, *pixelmaps[0], info); + std::string evtid = "r"+std::to_string(evt.run())+"_s"+std::to_string(evt.subRun())+"_e"+std::to_string(evt.event())+"_h"+std::to_string(time(0)); + write_files(train, evtid); + } // use event to make images + } + + //...................................................................... + + void SBNDCVNZlibMaker::write_files(LArTrainingNuData td, std::string evtid) + { + // cropped from 2880 x 500 to 500 x 500 here + std::vector pixel_array(3 * fPlaneLimit * fTDCLimit); + //fImage.DisableRegionSelection(); + fImage.SetPixelMapSize(td.fPMap.NWire(), td.fPMap.NTdc()); + fImage.ConvertPixelMapToPixelArray(td.fPMap, pixel_array); + + ulong src_len = 3 * fPlaneLimit * fTDCLimit; // pixelArray length + ulong dest_len = compressBound(src_len); // calculate size of the compressed data + char* ostream = (char *) malloc(dest_len); // allocate memory for the compressed data + + int res = compress((Bytef *) ostream, &dest_len, (Bytef *) &pixel_array[0], src_len); + + // Buffer error + + if (res == Z_BUF_ERROR) + std::cout << "Buffer too small!" << std::endl; + + // Memory error + else if (res == Z_MEM_ERROR) + std::cout << "Not enough memory for compression!" << std::endl; + + // Compression ok + else { + // Create output files + std::string image_file_name = out_dir + "/event_" + evtid + ".gz"; + std::string info_file_name = out_dir + "/event_" + evtid + ".info"; + + std::ofstream image_file (image_file_name, std::ofstream::binary); + std::ofstream info_file (info_file_name); + + if(image_file.is_open() && info_file.is_open()) { + + // Write compressed data to file + + image_file.write(ostream, dest_len); + + image_file.close(); // close file + + // Write records to file + + // Category + + info_file << td.fInt << std::endl; + //info_file << td.fInfo << std::endl; + info_file << td.fInfo; + info_file << td.fPMap.GetTotHits() << "," << fNhits_tpc_0_pl_0 << "," << fNhits_tpc_0_pl_1 << "," << fNhits_tpc_0_pl_2 << "," << fNhits_tpc_1_pl_0 << "," << fNhits_tpc_1_pl_1 << "," << fNhits_tpc_1_pl_2 << "," << fNhits_total << std::endl; + info_file << frun << "," << fsubrun << "," << fevent << "," << fsliceID << std::endl; + info_file << ftotsliceE << "," << ftotsliceNuE << "," << ftotsliceCosE << "," << ftotsliceOthE << "," << fsliceNuEfrac << "," << fsliceCosEfrac << "," << fsliceOthEfrac << "," << fNuSlice_purity << "," << fNuSlice_completeness << std::endl; + info_file << fIsSliceNu << "," << fSliceScore << "," << fIsbestSlice << "," << fbestpfppdg << "," << fbestsliceID << "," << fpfppdg << std::endl; + info_file << fNuIsContained << "," << fNuID << " " << fT0 << std::endl; + info_file.close(); // close file + } + else { + + if (image_file.is_open()) + image_file.close(); + else + throw art::Exception(art::errors::FileOpenError) + << "Unable to open file " << image_file_name << "!" << std::endl; + + if (info_file.is_open()) + info_file.close(); + else + throw art::Exception(art::errors::FileOpenError) + << "Unable to open file " << info_file_name << "!" << std::endl; + } + } + + free(ostream); // free allocated memory + + } // lcvn::CVNZlibMaker::write_files + + ////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool SBNDCVNZlibMaker::Is_in_Fiducial_Vol(double stX, double stY, double stZ) + { + double X_bound = 196.5 - fVolCut; + double Y_bound = 200. - fVolCut; + double Z_up_bound = 500. - fVolCut; + double Z_low_bound = fVolCut; + + if(TMath::Abs(stX) <= X_bound && TMath::Abs(stY) <= Y_bound && (stZ >=Z_low_bound && stZ <= Z_up_bound)) return true; + else return false; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////// + + void SBNDCVNZlibMaker::HitTruth( detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, Int_t& truthid){ + std::vector trackIDEs = bt_serv->HitToTrackIDEs(clockData, hit); + if( !trackIDEs.size() ) return; + Float_t maxe = 0; + Int_t bestid = 0; + for(size_t i = 0; i < trackIDEs.size(); ++i){ + if( trackIDEs[i].energy > maxe ) { + maxe = trackIDEs[i].energy; + bestid = trackIDEs[i].trackID; + } + } + truthid = bestid; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool SBNDCVNZlibMaker::HitTruthId(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, Int_t& mcid){ + mcid = std::numeric_limits::lowest(); + HitTruth(clockData,hit,mcid); + if( mcid > std::numeric_limits::lowest() ) return true; + else return false; + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool SBNDCVNZlibMaker::TrackIdToMCTruth(Int_t const trkID, art::Ptr& mctruth){ + bool matchFound = false; + try { + mctruth = pi_serv->TrackIdToMCTruth_P(trkID); + matchFound = true; + } catch(...) { + std::cout<<"Exception thrown matching TrackID "< const& hit, Int_t truthid){ + double hit_E = 0.; + std::vector trackIDEs = bt_serv->HitToTrackIDEs(clockData, hit); + if( !trackIDEs.size() ) return hit_E; + for(size_t i = 0; i < trackIDEs.size(); ++i){ + if(trackIDEs[i].trackID == truthid) hit_E += trackIDEs[i].energy; + } + return hit_E; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::HitTotE(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit){ + double Tot_E = 0.; + std::vector trackIDEs = bt_serv->HitToTrackIDEs(clockData, hit); + if( !trackIDEs.size() ) return Tot_E; + for(size_t i = 0; i < trackIDEs.size(); ++i){ + Tot_E += trackIDEs[i].energy; + } + return Tot_E; + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + bool SBNDCVNZlibMaker::Is_Slice_Nu(art::FindManyP const& assn, art::Ptr const& slce){ + if(assn.isValid()){ + std::vector> slicePFPs = assn.at(slce.key()); + for(auto const &pfp : slicePFPs){ + if((pfp->PdgCode() == 12 || pfp->PdgCode() == 14)) return true; + } + } + return false; + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::Get_Slice_Score(art::FindManyP const& assn, art::Ptr const& pfp){ + double best_score = -9999; + if(assn.isValid() && pfp.isNonnull()){ + const std::vector> pfpMetaVec = assn.at(pfp->Self()); + if(pfpMetaVec.size()){ + for (auto const pfpMeta : pfpMetaVec){ + larpandoraobj::PFParticleMetadata::PropertiesMap propertiesMap = pfpMeta->GetPropertiesMap(); + double score = propertiesMap.at("NuScore"); + if (score > best_score) best_score = score; + } + } + } + return best_score; + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + art::Ptr SBNDCVNZlibMaker::Get_Nu_like_PFP(art::FindManyP const& assn, art::Ptr const& slce){ + art::Ptr result; + std::vector> slicePFPs = assn.at(slce.key()); + for(auto const &pfp : slicePFPs){ + if((pfp->PdgCode() == 12 || pfp->PdgCode() == 14)){ + result = pfp; + break; + } + } + return result; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + std::vector SBNDCVNZlibMaker::Get_Best_Slice_ID_PFP_pdg(art::FindManyP const& pfp_assn, art::FindManyP const& metadata_assn, + std::vector> const& slice_vec){ + std::vector Sl_ID_pfp_pdf = {-999,-999}; + std::vector> nuPfpVec; + std::vector> nuSliceVec; + for(auto const &slice : slice_vec){ + std::vector> slicePFPs = pfp_assn.at(slice.key()); + for (auto const &pfp : slicePFPs){ + if ((pfp->PdgCode() == 12 || pfp->PdgCode() == 14)){ + nuPfpVec.push_back(pfp); + nuSliceVec.push_back(slice); + break; + } + } + } + + if(nuPfpVec.size()){ + float bestScore = -999.; + art::Ptr bestNuSlice; + art::Ptr bestNuPfp; + for(size_t i=0; i> pfpMetaVec = metadata_assn.at(nuPfpVec.at(i)->Self()); + for (auto const pfpMeta : pfpMetaVec) { + larpandoraobj::PFParticleMetadata::PropertiesMap propertiesMap = pfpMeta->GetPropertiesMap(); + score = propertiesMap.at("NuScore"); + if( score > bestScore ) { + bestScore = score; + bestNuPfp = nuPfpVec.at(i); + bestNuSlice = nuSliceVec.at(i); + } + } + } + + Sl_ID_pfp_pdf[0] = bestNuSlice->ID(); + Sl_ID_pfp_pdf[1] = bestNuPfp->PdgCode(); + } + return Sl_ID_pfp_pdf; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + int SBNDCVNZlibMaker::Get_Slice_PFP_ID(art::FindManyP const& assn, art::Ptr const& slce){ + std::vector> slicePFPs = assn.at(slce.key()); + int result = -9999; + for(auto const &pfp : slicePFPs){ + if((pfp->PdgCode() == 12 || pfp->PdgCode() == 14)){ + result = pfp->PdgCode(); + break; + } + } + return result; + } + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + int SBNDCVNZlibMaker::Get_Hit_Count(unsigned int tpc_no, unsigned int pln_no, std::vector> const& hit_vec){ + int n_hits = 0; + if(hit_vec.size()){ + for(auto const hit : hit_vec){ + if(hit->WireID().TPC == tpc_no){ + if(hit->WireID().Plane == pln_no){ + n_hits++; + } + } + } + } + + return n_hits; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::Get_Tot_nu_E(detinfo::DetectorClocksData const& clockData,art::Ptr const& mcneutrino, std::vector> const& hit_vec){ + double tot_nu_E = 0; + for(auto const hit : hit_vec){ + Int_t trkId; + if(HitTruthId(clockData,hit,trkId)){ + art::Ptr mctruth; + if(TrackIdToMCTruth(trkId,mctruth)){ + if(mctruth->Origin() == simb::kBeamNeutrino){ + if(mctruth == mcneutrino){ + tot_nu_E += HitEfrmTrkID(clockData,hit,trkId); + } + } + } + } + } + return tot_nu_E; + } + + + ////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::HitTotE_frm_given_orgin(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, std::string origin_name){ + double Tot_E = 0.; + std::vector trackIDEs = bt_serv->HitToTrackIDEs(clockData, hit); + if( !trackIDEs.size() ) return Tot_E; + for(size_t i = 0; i < trackIDEs.size(); ++i){ + art::Ptr mctruth; + if(TrackIdToMCTruth(trackIDEs[i].trackID,mctruth)){ + if(origin_name == "nu"){ + if(mctruth->Origin() == simb::kBeamNeutrino) Tot_E += trackIDEs[i].energy; + } + else if(origin_name == "cos"){ + if(mctruth->Origin() == simb::kCosmicRay) Tot_E += trackIDEs[i].energy; + } + } + + } + return Tot_E; + } + + //////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::HitTotE_frm_mctruth(detinfo::DetectorClocksData const& clockData, art::Ptr const& hit, art::Ptr const& my_mctruth){ + double Tot_E = 0.; + std::vector trackIDEs = bt_serv->HitToTrackIDEs(clockData, hit); + if( !trackIDEs.size() ) return Tot_E; + for(size_t i = 0; i < trackIDEs.size(); ++i){ + art::Ptr mctruth; + if(TrackIdToMCTruth(trackIDEs[i].trackID,mctruth)){ + if(my_mctruth.isNonnull()){ + if(mctruth == my_mctruth){ + Tot_E += trackIDEs[i].energy; + } + } + } + } + return Tot_E; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + double SBNDCVNZlibMaker::TotE_from_mctruth(detinfo::DetectorClocksData const& clockData, std::vector> const& hit_vec, art::Ptr const& my_mctruth){ + double tot_E = 0; + if(hit_vec.size() && my_mctruth.isNonnull()){ + for(auto const hit : hit_vec){ + tot_E += HitTotE_frm_mctruth(clockData,hit,my_mctruth); + } + } + return tot_E; + } + + /////////////////////////////////////////////////////////////////////////////////////////////////////////////// + + void SBNDCVNZlibMaker::Clear(){ + frun = -9999; + fsubrun = -9999; + fevent = -9999; + fsliceID = -9999; + ftotsliceE = -9999; + ftotsliceNuE = -9999; + ftotsliceCosE = -9999; + ftotsliceOthE = -9999; + fsliceNuEfrac = -9999; + fsliceCosEfrac = -9999; + fsliceOthEfrac = -9999; + fIsSliceNu = false; + fSliceScore = -9999; + fIsbestSlice = false; + fbestpfppdg = -9999; + fbestsliceID = -9999; + fpfppdg = -9999; + fNuIsContained = false; + fNuID = -9999; + fNhits_tpc_0_pl_0 = -9999; + fNhits_tpc_0_pl_1 = -9999; + fNhits_tpc_0_pl_2 = -9999; + fNhits_tpc_1_pl_0 = -9999; + fNhits_tpc_1_pl_1 = -9999; + fNhits_tpc_1_pl_2 = -9999; + fNhits_total = -9999; + fNuSlice_purity = -9999.; + fNuSlice_completeness = -9999.; + fT0 = 0.; + } + + DEFINE_ART_MODULE(SBNDCVNZlibMaker) +} // namespace cvn diff --git a/sbndcode/SBNDCVN/modules/SBNDTFNetHandler_tool.cc b/sbndcode/SBNDCVN/modules/SBNDTFNetHandler_tool.cc new file mode 100644 index 000000000..7c85aaba8 --- /dev/null +++ b/sbndcode/SBNDCVN/modules/SBNDTFNetHandler_tool.cc @@ -0,0 +1,148 @@ +//////////////////////////////////////////////////////////////////////////////////// +/// \file SBNDTFNetHandler.cxx +/// \brief SBNDTFNetHandler for CVN +/// \author Varuna Meddage (copied from larrecodnn/CVN/tools/TFNetHandler_tool.cc) +/////////////////////////////////////////////////////////////////////////////////// + +#include "cetlib/getenv.h" +#include +#include + +#include "art/Utilities/ToolMacros.h" +#include "canvas/Utilities/Exception.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "larrecodnn/CVN/func/CVNImageUtils.h" +#include "sbndcode/SBNDCVN/module_helpers/SBNDITFNetHandler.h" +#include "sbndcode/SBNDCVN/tf/tf_graph.h" + +namespace lcvn { + + /// Wrapper for caffe::Net which handles construction and prediction + class SBNDTFNetHandler : public SBNDITFNetHandler { + public: + /// Constructor which takes a pset with DeployProto and ModelFile fields + explicit SBNDTFNetHandler(const fhicl::ParameterSet& pset); + + /// Return prediction arrays for PixelMap + std::vector> Predict(const PixelMap& pm) const override; + + private: + std::string fLibPath; ///< Library path (typically dune_pardata...) + std::string fTFProtoBuf; ///< location of the tf .pb file in the above path or the directory containing model files in SavedModel format (set UseBundle = true in this case) + bool fUseLogChargeScale; ///< Is the charge using a log scale? + unsigned int fImageWires; ///< Number of wires for the network to classify + unsigned int fImageTDCs; ///< Number of tdcs for the network to classify + std::vector fReverseViews; ///< Do we need to reverse any views? + bool fUseBundle; ///< Use a bundled model saved in the SavedModel format from Tensorflow + std::vector fInputs; + std::vector fOutputs; + int fNInputs; + int fNOutputs; + std::unique_ptr fTFGraph; ///< Tensorflow graph + bool fverbose; + }; + + SBNDTFNetHandler::SBNDTFNetHandler(const fhicl::ParameterSet& pset) + : fLibPath(cet::getenv(pset.get("LibPath", ""))) + , fTFProtoBuf(fLibPath + "/" + pset.get("TFProtoBuf")) + , fUseLogChargeScale(pset.get("ChargeLogScale")) + , fImageWires(pset.get("NImageWires")) + , fImageTDCs(pset.get("NImageTDCs")) + , fReverseViews(pset.get>("ReverseViews")) + , fUseBundle(pset.get("UseBundle")) + , fInputs(pset.get>("Inputs")) + , fOutputs(pset.get>("Outputs")) + , fNInputs(pset.get("NInputs")) + , fNOutputs(pset.get("NOutputs")) + , fverbose(pset.get("verbose")) + { + + // Construct the TF Graph object. The empty vector {} is used since the protobuf + // file gives the names of the output layer nodes + mf::LogInfo("TFNetHandler") << "Loading network: " << fTFProtoBuf << std::endl; + fTFGraph = tf::Graph::create( + fTFProtoBuf.c_str(), fInputs, fOutputs, fUseBundle, fNInputs, fNOutputs); + if (!fTFGraph) { + art::Exception(art::errors::Unknown) << "Tensorflow model not found or incorrect"; + } + } + + // Check the network outputs + bool check(const std::vector>& outputs) + { + if (outputs.size() == 1) return true; + size_t aux = 0; + for (size_t o = 0; o < outputs.size(); ++o) { + size_t aux2 = 0; + + for (size_t i = 0; i < outputs[o].size(); ++i) + if (outputs[o][i] == 0.0 || outputs[o][i] == 1.0) aux2++; + if (aux2 == outputs[o].size()) aux++; + } + return aux == outputs.size() ? false : true; + } + + // Fill outputs with value -3 + void fillEmpty(std::vector>& outputs) + { + for (auto& output : outputs) { + output.assign(output.size(), -3.0); + } + + return; + } + + std::vector> SBNDTFNetHandler::Predict(const PixelMap& pm) const + { + + CVNImageUtils imageUtils(fImageWires, fImageTDCs, 3); + // Configure the image utility + imageUtils.SetViewReversal(fReverseViews); + imageUtils.SetImageSize(fImageWires, fImageTDCs, 3); + imageUtils.SetLogScale(fUseLogChargeScale); + imageUtils.SetPixelMapSize(pm.NWire(), pm.NTdc()); + + ImageVectorF thisImage; + imageUtils.ConvertPixelMapToImageVectorF(pm, thisImage); + std::vector vecForTF; + + vecForTF.push_back(thisImage); + + std::vector>> + cvnResults; // shape(samples, #outputs, output_size) + bool status = false; + + int counter = 0; + + while (status == false) { // do until it gets a correct result + cvnResults = fTFGraph->run(vecForTF); + status = check(cvnResults[0]); + + counter++; + if (counter == 10) { + std::cout << "Error, CVN never outputing a correct result. Filling result with zeros."; + std::cout << std::endl; + fillEmpty(cvnResults[0]); + break; + } + }; + + if (fverbose){ + std::cout << "Classifier summary: "; + std::cout << std::endl; + int output_index = 0; + for (auto const& output : cvnResults[0]) { + std::cout << "Output " << output_index++ << ": "; + for (auto const v : output) + std::cout << v << ", "; + std::cout << std::endl; + } + std::cout << std::endl; + } + return cvnResults[0]; + } + +} +DEFINE_ART_CLASS_TOOL(lcvn::SBNDTFNetHandler) diff --git a/sbndcode/SBNDCVN/tf/CMakeLists.txt b/sbndcode/SBNDCVN/tf/CMakeLists.txt new file mode 100644 index 000000000..6408286fc --- /dev/null +++ b/sbndcode/SBNDCVN/tf/CMakeLists.txt @@ -0,0 +1,9 @@ +cet_make_library(SOURCE + tf_graph.cc + LIBRARIES PRIVATE + TensorFlow::cc + TensorFlow::framework +) + +install_headers() +install_source() diff --git a/sbndcode/SBNDCVN/tf/tf_graph.cc b/sbndcode/SBNDCVN/tf/tf_graph.cc new file mode 100644 index 000000000..731de3f1e --- /dev/null +++ b/sbndcode/SBNDCVN/tf/tf_graph.cc @@ -0,0 +1,408 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +// Class: Graph +// Authors: R.Sulej (Robert.Sulej@cern.ch), from DUNE, FNAL/NCBJ, Sept. 2017 +// P.Plonski, from DUNE, WUT, Sept. 2017 +// T.Cai (tejinc@yorku.ca) from DUNE, YorkU, March 2022 +// B.N.Nayak (nayakb@uci.edu) from DUNE, BNL, November 2022 +// +// Iterface to run Tensorflow graph saved to a file. First attempts, quite functional. +// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#include "tf_graph.h" + +#include "tensorflow/cc/saved_model/loader.h" +#include "tensorflow/cc/saved_model/tag_constants.h" +#include "tensorflow/core/platform/env.h" + +#include "tensorflow/core/public/session_options.h" + +// ------------------------------------------------------------------- +tf::Graph::Graph(const char* graph_file_name, + const std::vector& inputs, + const std::vector& outputs, + bool& success, + bool use_bundle, + int ninputs, + int noutputs) +{ + fUseBundle = use_bundle; + success = false; // until all is done correctly + + n_inputs = ninputs; + n_outputs = noutputs; + + // Force tf to only use a single core so it doesn't eat batch farms + tensorflow::SessionOptions options; + tensorflow::ConfigProto& config = options.config; + config.set_inter_op_parallelism_threads(1); + config.set_intra_op_parallelism_threads(1); + config.set_use_per_session_threads(false); + + auto status = tensorflow::NewSession(options, &fSession); + if (!status.ok()) { + std::cout << status.ToString() << std::endl; + return; + } + + if (fUseBundle) { + + fBundle = new tensorflow::SavedModelBundle(); + status = tensorflow::LoadSavedModel(tensorflow::SessionOptions(), + tensorflow::RunOptions(), + graph_file_name, + {tensorflow::kSavedModelTagServe}, + fBundle); + std::cout << "tf_graph loaded SavedModelBundle with status: " << status.ToString() << std::endl; + if (!status.ok()) return; + + auto sig_map = fBundle->meta_graph_def.signature_def(); + std::string sig_def = "serving_default"; + bool has_default_key = false; + std::vector sig_map_keys; + for (auto const& p : sig_map) { + if (p.first == sig_def) has_default_key = true; + sig_map_keys.push_back(p.first); + } + auto model_def = sig_map.at((has_default_key) ? sig_def : sig_map_keys.back()); + + // ... Get the input names + if (inputs.empty()){ + std::cout << "tf_graph using all inputs:" << std::endl; + for (auto const& p : model_def.inputs()) { + fInputNames.push_back(p.second.name()); + std::cout << "tf_graph InputName: " << fInputNames.back() << std::endl; + std::cout << " key: " << p.first << " value: " << p.second.name() << std::endl; + } + } + else{ + std::cout << "tf_graph using selected inputs:" << std::endl; + for (const auto& s : inputs) { + for (auto const& p : model_def.inputs()) { + if (p.first == s) { + fInputNames.push_back(p.second.name()); + std::cout << " key: " << p.first << " value: " << p.second.name() << std::endl; + } + } + } + } + + // ... Get the output names + // .. get all outputs if no specific name provided + if (outputs.empty()) { + std::cout << "tf_graph using all outputs:" << std::endl; + for (auto const& p : model_def.outputs()) { + fOutputNames.push_back(p.second.name()); + std::cout << " key: " << p.first << " value: " << p.second.name() << std::endl; + } + } + // .. or use only the outputs whose keys are specified + else { + std::cout << "tf_graph using selected outputs:" << std::endl; + for (const auto& s : outputs) { + for (auto const& p : model_def.outputs()) { + if (p.first == s) { + fOutputNames.push_back(p.second.name()); + std::cout << " key: " << p.first << " value: " << p.second.name() << std::endl; + } + } + } + } + if (fOutputNames.empty()) { + std::cout << "tf_graph did not find outputs in SaveModelBundle." << std::endl; + return; + } + } + else { + + tensorflow::GraphDef graph_def; + status = tensorflow::ReadBinaryProto(tensorflow::Env::Default(), graph_file_name, &graph_def); + std::cout << "tf_graph loaded ProtoBuf graph with status: " << status.ToString() << std::endl; + if (!status.ok()) return; + + size_t ng = graph_def.node().size(); + for (int i = 0; i < n_inputs; ++i) { + fInputNames.push_back(graph_def.node()[i].name()); + } + + // last node as output if no specific name provided + if (outputs.empty()) { + for (int i = n_outputs; i > 0; --i) { + fOutputNames.push_back(graph_def.node()[ng - i].name()); + } + } + else // or last nodes with names containing provided strings + { + std::string last, current, basename, name; + for (size_t n = 0; n < ng; ++n) { + name = graph_def.node()[n].name(); + auto pos = name.find("/"); + if (pos != std::string::npos) { basename = name.substr(0, pos); } + else { + continue; + } + + bool found = false; + for (const auto& s : outputs) { + if (name.find(s) != std::string::npos) { + found = true; + break; + } + } + if (found) { + if (!last.empty() && (basename != current)) { fOutputNames.push_back(last); } + current = basename; + last = name; + } + } + if (!last.empty()) { fOutputNames.push_back(last); } + } + if (fOutputNames.empty()) { + std::cout << "Output nodes not found in the graph." << std::endl; + return; + } + status = fSession->Create(graph_def); + if (!status.ok()) { + std::cout << status.ToString() << std::endl; + return; + } + } + + success = true; // ok, graph loaded from the file +} + +tf::Graph::~Graph() +{ + fSession->Close().IgnoreError(); + delete fSession; + if (fUseBundle) { delete fBundle; } +} +// ------------------------------------------------------------------- + +std::vector> tf::Graph::run(const std::vector>& x) +{ + if (x.empty() || x.front().empty()) { return std::vector>(); } + + long long int rows = x.size(), cols = x.front().size(); + + std::vector _x; + _x.push_back( + tensorflow::Tensor(tensorflow::DT_FLOAT, tensorflow::TensorShape({1, rows, cols, 1}))); + auto input_map = _x[0].tensor(); + + for (long long int r = 0; r < rows; ++r) { + const auto& row = x[r]; + for (long long int c = 0; c < cols; ++c) { + input_map(0, r, c, 0) = row[c]; + } + } + + auto result = run(_x); + if (!result.empty()) { return result.front(); } + else { + return std::vector>(); + } +} +// ------------------------------------------------------------------- + +std::vector>> tf::Graph::run( + const std::vector>>>& x, + long long int samples) +{ + if ((samples == 0) || x.empty() || x.front().empty() || x.front().front().empty() || + x.front().front().front().empty()) + return std::vector>>(); + + if ((samples == -1) || (samples > (long long int)x.size())) { samples = x.size(); } + + long long int rows = x.front().size(), cols = x.front().front().size(), + depth = x.front().front().front().size(); + + std::vector _x; + + // Single-input network + if (n_inputs == 1) { + _x.push_back(tensorflow::Tensor(tensorflow::DT_FLOAT, + tensorflow::TensorShape({samples, rows, cols, depth}))); + auto input_map = _x[0].tensor(); + for (long long int s = 0; s < samples; ++s) { + const auto& sample = x[s]; + for (long long int r = 0; r < rows; ++r) { + const auto& row = sample[r]; + for (long long int c = 0; c < cols; ++c) { + const auto& col = row[c]; + for (long long int d = 0; d < depth; ++d) { + input_map(s, r, c, d) = col[d]; + } + } + } + } + } + // Multi-input network + else { + for (int i = 0; i < depth; ++i) { + _x.push_back(tensorflow::Tensor(tensorflow::DT_FLOAT, + tensorflow::TensorShape({samples, rows, cols, 1}))); + } + + for (int view = 0; view < depth; ++view) { + auto input_map = _x[view].tensor(); + for (long long int s = 0; s < samples; ++s) { + const auto& sample = x[s]; + for (long long int r = 0; r < rows; ++r) { + const auto& row = sample[r]; + for (long long int c = 0; c < cols; ++c) { + const auto& col = row[c]; + long long int d = view; + input_map(s, r, c, 0) = col[d]; + } + } + } + } + } + + return run(_x); +} + +// ------------------------------------------------------------------- + +std::vector>> tf::Graph::run( + const std::vector& x) +{ + std::vector> inputs; + for (int i = 0; i < n_inputs; ++i) { + inputs.push_back({fInputNames[i], x[i]}); + } + + std::vector outputs; + std::vector outputNames; + auto status = (fUseBundle) ? + fBundle->GetSession()->Run(inputs, fOutputNames, outputNames, &outputs) : + fSession->Run(inputs, fOutputNames, outputNames, &outputs); + + if (status.ok()) { + size_t samples = 0; + + for (size_t o = 0; o < outputs.size(); ++o) { + if (o == 0) { samples = outputs[o].dim_size(0); } + else if ((int)samples != outputs[o].dim_size(0)) { + throw std::string("TF outputs size inconsistent."); + } + } + + std::vector>> result; + result.resize(samples, std::vector>(outputs.size())); + + for (size_t s = 0; s < samples; ++s) { + for (size_t o = 0; o < outputs.size(); ++o) { + size_t n = outputs[o].dim_size(1); + auto output_map = outputs[o].tensor(); + + result[s][o].resize(outputs[o].dim_size(1)); + + std::vector& vs = result[s][o]; + for (size_t i = 0; i < n; ++i) { + vs[i] = output_map(s, i); + } + } + } + + return result; + } + else { + std::cout << status.ToString() << std::endl; + return std::vector>>(); + } +} +// ------------------------------------------------------------------- + +std::vector> tf::Graph::runx(const std::vector& x) +{ + std::vector> inputs; + for (int i = 0; i < n_inputs; ++i) { + inputs.push_back({fInputNames[i], x[i]}); + } + + std::vector outputs; + std::vector outputNames; + auto status = (fUseBundle) ? + fBundle->GetSession()->Run(inputs, fOutputNames, outputNames, &outputs) : + fSession->Run(inputs, fOutputNames, outputNames, &outputs); + + if (status.ok()) { + size_t samples = 0, nouts = 0; + + for (size_t o = 0; o < outputs.size(); ++o) { + if (o == 0) { samples = outputs[o].dim_size(0); } + else if ((int)samples != outputs[o].dim_size(0)) { + throw std::string("TF outputs size inconsistent."); + } + nouts += outputs[o].dim_size(1); + } + + std::vector> result; + result.resize(samples, std::vector(nouts)); + + size_t idx0 = 0; + for (size_t o = 0; o < outputs.size(); ++o) { + auto output_map = outputs[o].tensor(); + + size_t n = outputs[o].dim_size(1); + for (size_t s = 0; s < samples; ++s) { + std::vector& vs = result[s]; + for (size_t i = 0; i < n; ++i) { + vs[idx0 + i] = output_map(s, i); + } + } + idx0 += n; + } + + return result; + } + else { + std::cout << status.ToString() << std::endl; + return std::vector>(); + } +} +// ------------------------------------------------------------------- + +std::vector> tf::Graph::runae(const std::vector& x) +{ + std::vector> inputs; + for (int i = 0; i < n_inputs; ++i) { + inputs.push_back({fInputNames[i], x[i]}); + } + + std::vector outputs; + std::vector outputNames; + auto status = (fUseBundle) ? + fBundle->GetSession()->Run(inputs, fOutputNames, outputNames, &outputs) : + fSession->Run(inputs, fOutputNames, outputNames, &outputs); + + if (status.ok()) { + size_t samples = 0, npoints = 0; + + if (outputs.size() > 1) { throw std::string("TF runae: detected more than one output."); } + + samples = outputs[0].dim_size(0); + npoints = outputs[0].dim_size(1); + + std::vector> result; + result.resize(samples, std::vector(npoints)); + + auto output_map = outputs[0].tensor(); + + for (size_t s = 0; s < samples; ++s) { + std::vector& vs = result[s]; + for (size_t i = 0; i < npoints; ++i) { + vs[i] = output_map(s, i, 0); + } + } + + return result; + } + else { + std::cout << status.ToString() << std::endl; + return std::vector>(); + } +} diff --git a/sbndcode/SBNDCVN/tf/tf_graph.h b/sbndcode/SBNDCVN/tf/tf_graph.h new file mode 100644 index 000000000..0dd52ac7f --- /dev/null +++ b/sbndcode/SBNDCVN/tf/tf_graph.h @@ -0,0 +1,80 @@ +//////////////////////////////////////////////////////////////////////////////////////////////////// +//// Class: Graph +//// Authors: R.Sulej (Robert.Sulej@cern.ch), from DUNE, FNAL/NCBJ, Sept. 2017 +//// P.Plonski, from DUNE, WUT, Sept. 2017 +//// T.Cai (tejinc@yorku.ca) from DUNE, YorkU, March 2022 +//// B.N.Nayak (nayakb@uci.edu) from DUNE, BNL, November 2022 +//// +//// Iterface to run Tensorflow graph saved to a file. First attempts, almost functional. +//// +//////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef Graph_h +#define Graph_h + +#include +#include +#include + +namespace tensorflow { + class Session; + class Tensor; + struct SavedModelBundle; +} + +namespace tf { + + class Graph { + public: + static std::unique_ptr create(const char* graph_file_name, + const std::vector& inputs = {}, + const std::vector& outputs = {}, + bool use_bundle = false, + int ninputs = 1, + int noutputs = 1) + { + bool success; + std::unique_ptr ptr( + new Graph(graph_file_name, inputs, outputs, success, use_bundle, ninputs, noutputs)); + if (success) { return ptr; } + else { + return nullptr; + } + } + + ~Graph(); + + std::vector> run(const std::vector>& x); + + // process vector of 3D inputs, return vector of 1D outputs; use all inputs + // if samples = -1, or only the specified number of first samples; + // can deal with multiple inputs + std::vector>> run( + const std::vector>>>& x, + long long int samples = -1); + std::vector>> run(const std::vector& x); + std::vector> runx(const std::vector& x); + std::vector> runae(const std::vector& x); + + private: + int n_inputs; + int n_outputs; + /// Not-throwing constructor. + Graph(const char* graph_file_name, + const std::vector& inputs, + const std::vector& outputs, + bool& success, + bool use_bundle = false, + int ninputs = 1, + int noutputs = 1); + + tensorflow::Session* fSession; + bool fUseBundle; + tensorflow::SavedModelBundle* fBundle; + std::vector fInputNames; + std::vector fOutputNames; + }; + +} // namespace tf + +#endif diff --git a/sbndcode/Timing/CMakeLists.txt b/sbndcode/Timing/CMakeLists.txt new file mode 100644 index 000000000..e631294d5 --- /dev/null +++ b/sbndcode/Timing/CMakeLists.txt @@ -0,0 +1,6 @@ +art_dictionary(DICTIONARY_LIBRARIES +lardataobj::RawData) + +install_headers() +# install_fhicl() +# install_source() \ No newline at end of file diff --git a/sbndcode/Timing/SBNDRawTimingObj.h b/sbndcode/Timing/SBNDRawTimingObj.h new file mode 100644 index 000000000..def710e18 --- /dev/null +++ b/sbndcode/Timing/SBNDRawTimingObj.h @@ -0,0 +1,43 @@ +//////////////////////////////////////////////////////////////////////// +// +// An offline object to associate original CAEN1730 timing information to +// the decoded OpDetWaveforms to aid in downstream timing reconstruction +// author: Lynn Tung +// with inspiration taken from Tom Junk's offline ptb object +// +//////////////////////////////////////////////////////////////////////// + +#ifndef sbndtiming_H +#define sbndtiming_H + +#include +#include + +namespace raw { + class TimingReferenceInfo { + public: + TimingReferenceInfo() {}; // constructor + TimingReferenceInfo(uint16_t timingType, + uint16_t timingChannel) : + timingType(timingType), timingChannel(timingChannel) {}; + + uint16_t timingType; // e.g. SPECTDC = 0; PTB HLT = 1; CAEN-only = 3 + uint16_t timingChannel; // e.g. TDC ETRIG = 4; PTB BNB Beam+Light = 2 + }; + + namespace pmt { + class BoardTimingInfo { + // Associate one of these to every opdetwaveform in the board/digitizer, one per trigger + public: + BoardTimingInfo() {}; // constructor + BoardTimingInfo(uint16_t postPercent, + std::vector &triggerTimeTag) : + postPercent(postPercent), triggerTimeTag(triggerTimeTag) {}; + + uint16_t postPercent; // # 0-100, represents a percentage + std::vector triggerTimeTag; // ns + }; + } +} + +#endif \ No newline at end of file diff --git a/sbndcode/Timing/classes.h b/sbndcode/Timing/classes.h new file mode 100644 index 000000000..ac8625708 --- /dev/null +++ b/sbndcode/Timing/classes.h @@ -0,0 +1,13 @@ +//File: classes.h +//Brief: Include directives needed to generate header(s) for the raw::pmt::sbndpmt data product. +//Author: Lynn Tung + +//ART includes +#include "canvas/Persistency/Common/Wrapper.h" +#include "canvas/Persistency/Common/Assns.h" + +//local includes +#include "sbndcode/Timing/SBNDRawTimingObj.h" + +//larsoft includes +#include "lardataobj/RawData/OpDetWaveform.h" diff --git a/sbndcode/Timing/classes_def.xml b/sbndcode/Timing/classes_def.xml new file mode 100644 index 000000000..4e7fa4847 --- /dev/null +++ b/sbndcode/Timing/classes_def.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/sbndcode/Trigger/CMakeLists.txt b/sbndcode/Trigger/CMakeLists.txt index b3bc5de3a..1e49f7d89 100644 --- a/sbndcode/Trigger/CMakeLists.txt +++ b/sbndcode/Trigger/CMakeLists.txt @@ -24,6 +24,7 @@ set( sbndcode_CRTUtils sbnobj::Common_CRT sbnobj::SBND_CRT + sbnobj::SBND_Timing sbndcode_CRTUtils sbndcode_GeoWrappers art::Framework_Services_Optional_RandomNumberGenerator_service @@ -41,6 +42,8 @@ add_subdirectory(PMT) cet_build_plugin(ArtdaqFragmentProducer art::module SOURCE ArtdaqFragmentProducer_module.cc LIBRARIES ${MODULE_LIBRARIES}) cet_build_plugin(MetricProducer art::module SOURCE MetricProducer_module.cc LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(MetricAnalyzer art::module SOURCE MetricAnalyzer_module.cc LIBRARIES ${MODULE_LIBRARIES}) +cet_build_plugin(MetricFilter art::module SOURCE MetricFilter_module.cc LIBRARIES ${MODULE_LIBRARIES}) install_headers() install_fhicl() diff --git a/sbndcode/Trigger/MetricAnalyzer_module.cc b/sbndcode/Trigger/MetricAnalyzer_module.cc new file mode 100644 index 000000000..eb0489171 --- /dev/null +++ b/sbndcode/Trigger/MetricAnalyzer_module.cc @@ -0,0 +1,140 @@ +//////////////////////////////////////////////////////////////////////// +// Class: MetricAnalyzer +// Plugin Type: analyzer (Unknown Unknown) +// File: MetricAnalyzer_module.cc +// +// Generated at Fri Nov 22 12:06:48 2024 by Lynn Tung using cetskelgen +// from cetlib version 3.18.02. +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDAnalyzer.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "sbndaq-artdaq-core/Obj/SBND/pmtSoftwareTrigger.hh" +#include "sbnobj/SBND/Timing/DAQTimestamp.hh" + +#include "art_root_io/TFileService.h" +#include "TFile.h" +#include "TTree.h" + +namespace sbndaq { + class MetricAnalyzer; +} + + +class sbndaq::MetricAnalyzer : public art::EDAnalyzer { +public: + explicit MetricAnalyzer(fhicl::ParameterSet const& p); + // The compiler-generated destructor is fine for non-base + // classes without bare pointers or other resource use. + + // Plugins should not be copied or assigned. + MetricAnalyzer(MetricAnalyzer const&) = delete; + MetricAnalyzer(MetricAnalyzer&&) = delete; + MetricAnalyzer& operator=(MetricAnalyzer const&) = delete; + MetricAnalyzer& operator=(MetricAnalyzer&&) = delete; + + // Required functions. + void analyze(art::Event const& e) override; + +private: + std::string fmetric_instance_name; + std::string fmetric_module_label; + + std::string fspectdc_module_label; + uint32_t fspectdc_etrig_ch; + + TTree* tree; + int _run, _subrun, _event; + float _flash_peakpe; + float _flash_peaktime; // us + float _trigger_dt; // us + int _timing_type; + int _tdc_etrig; + int _tdc_bes; +}; + + +sbndaq::MetricAnalyzer::MetricAnalyzer(fhicl::ParameterSet const& p) + : EDAnalyzer{p} // , + // More initializers here. +{ + fmetric_module_label = p.get("metric_module_label","pmtmetricproducer"); + fmetric_instance_name = p.get("metric_instance_name",""); + fspectdc_module_label = p.get("spectdc_module_name","tdcdecoder"); + fspectdc_etrig_ch = p.get("spectdc_etrig_ch",4); + + art::ServiceHandle fs; + tree = fs->make("tree","metrictree"); + tree->Branch("run",&_run,"run/I"); + tree->Branch("subrun",&_subrun,"subrun/I"); + tree->Branch("event",&_event,"event/I"); + tree->Branch("flash_peakpe",&_flash_peakpe,"flash_peakpe/F"); + tree->Branch("flash_peaktime",&_flash_peaktime,"flash_peaktime/F"); + tree->Branch("trigger_dt",&_trigger_dt,"trigger_dt/F"); + tree->Branch("timing_type",&_timing_type,"timing_type/I"); + tree->Branch("tdc_etrig",&_tdc_etrig,"tdc_etrig/I"); + tree->Branch("tdc_bes",&_tdc_bes,"tdc_bes/I"); +} + +void sbndaq::MetricAnalyzer::analyze(art::Event const& e) +{ + _run = e.id().run(); + _subrun = e.id().subRun(); + _event = e.id().event(); + + // initialize tree variables + _flash_peakpe = -999999999; + _flash_peaktime = -999999999; + _trigger_dt = -999999999; + _timing_type = -1; + _tdc_etrig = -999999999; + _tdc_bes = -999999999; + + art::Handle> metricHandle; + if (fmetric_instance_name.empty()) e.getByLabel(fmetric_module_label,metricHandle); + else e.getByLabel(fmetric_module_label,fmetric_instance_name,metricHandle); + if (!metricHandle.isValid() || metricHandle->size() == 0){ + std::cout << "No Metrics found" << std::endl; + tree->Fill(); + return; + } + else{ + const std::vector metric_v(*metricHandle); + auto metric = metric_v[0]; + _trigger_dt = float(metric.trig_ts)/1e3; + _flash_peakpe = metric.peakPE; + _flash_peaktime = metric.peaktime; + } + + // see if etrig exists + art::Handle> tdcHandle; + e.getByLabel(fspectdc_module_label,tdcHandle); + bool found_ett = false; + + if (!tdcHandle.isValid() || tdcHandle->size() == 0) + std::cout << "No SPECTDC products found." << std::endl; + else{ + const std::vector tdc_v(*tdcHandle); + for (size_t i=0; iFill(); +} + +DEFINE_ART_MODULE(sbndaq::MetricAnalyzer) diff --git a/sbndcode/Trigger/MetricFilter_module.cc b/sbndcode/Trigger/MetricFilter_module.cc new file mode 100644 index 000000000..e891a1a1f --- /dev/null +++ b/sbndcode/Trigger/MetricFilter_module.cc @@ -0,0 +1,90 @@ +//////////////////////////////////////////////////////////////////////// +// Class: MetricFilter +// Plugin Type: filter (Unknown Unknown) +// File: MetricFilter_module.cc +// +// Generated at Fri Dec 13 06:19:04 2024 by Lynn Tung using cetskelgen +// from cetlib version 3.18.02. +//////////////////////////////////////////////////////////////////////// + +#include "art/Framework/Core/EDFilter.h" +#include "art/Framework/Core/ModuleMacros.h" +#include "art/Framework/Principal/Event.h" +#include "art/Framework/Principal/Handle.h" +#include "art/Framework/Principal/Run.h" +#include "art/Framework/Principal/SubRun.h" +#include "canvas/Utilities/InputTag.h" +#include "fhiclcpp/ParameterSet.h" +#include "messagefacility/MessageLogger/MessageLogger.h" + +#include "sbndaq-artdaq-core/Obj/SBND/pmtSoftwareTrigger.hh" + +#include + +namespace sbndaq { + class MetricFilter; +} + + +class sbndaq::MetricFilter : public art::EDFilter { +public: + explicit MetricFilter(fhicl::ParameterSet const& p); + // The compiler-generated destructor is fine for non-base + // classes without bare pointers or other resource use. + + // Plugins should not be copied or assigned. + MetricFilter(MetricFilter const&) = delete; + MetricFilter(MetricFilter&&) = delete; + MetricFilter& operator=(MetricFilter const&) = delete; + MetricFilter& operator=(MetricFilter&&) = delete; + + // Required functions. + bool filter(art::Event& e) override; + +private: + std::string fmetric_instance_name; + std::string fmetric_module_label; + + float ftime_min; // us + float ftime_max; // us + float fpe_thresh; + + // Declare member data here. + +}; + + +sbndaq::MetricFilter::MetricFilter(fhicl::ParameterSet const& p) + : EDFilter{p} // , + // More initializers here. +{ + fmetric_module_label = p.get("metric_module_label","pmtmetricproducer"); + fmetric_instance_name = p.get("metric_instance_name",""); + ftime_min = p.get("time_min",0); + ftime_max = p.get("time_max",3); + fpe_thresh = p.get("pe_thresh",50); +} + +bool sbndaq::MetricFilter::filter(art::Event& e) +{ + // Implementation of required member function here. + art::Handle> metricHandle; + if (fmetric_instance_name.empty()) e.getByLabel(fmetric_module_label,metricHandle); + else e.getByLabel(fmetric_module_label,fmetric_instance_name,metricHandle); + if (!metricHandle.isValid() || metricHandle->size() == 0){ + return false; + } + else{ + const std::vector metric_v(*metricHandle); + auto metric = metric_v[0]; + auto flash_peakpe = metric.peakPE; + auto flash_peaktime = metric.peaktime; // us + + bool pass_timing = (flash_peaktime > ftime_min) && (flash_peaktime < ftime_max); + bool pass_pe = flash_peakpe > fpe_thresh; + return pass_timing && pass_pe; + } + +} + +DEFINE_ART_MODULE(sbndaq::MetricFilter) diff --git a/sbndcode/Trigger/metricfilter.fcl b/sbndcode/Trigger/metricfilter.fcl new file mode 100644 index 000000000..1b4b89ecf --- /dev/null +++ b/sbndcode/Trigger/metricfilter.fcl @@ -0,0 +1,12 @@ +BEGIN_PROLOG + +metricfilter_sbnd: +{ + module_type: "MetricFilter" + metric_module_label: "pmtmetricproducer" + time_min: 0 + time_max: 3 + pe_thresh: 50 +} + +END_PROLOG \ No newline at end of file diff --git a/sbndcode/Trigger/run_metricana.fcl b/sbndcode/Trigger/run_metricana.fcl new file mode 100644 index 000000000..bae11193d --- /dev/null +++ b/sbndcode/Trigger/run_metricana.fcl @@ -0,0 +1,52 @@ +#include "spectdc_decoder_sbnd.fcl" + +process_name: MetricAna + +services: { + TFileService : {fileName: "metricana.root"} +} + +source: +{ + module_type: RootInput + maxEvents: -1 # Number of events to create +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "metricana-art.root" + } +} + +physics: +{ + + producers:{ + tdcdecoder: @local::spec_tdc_decoder_sbnd + } + + filters:{} + + analyzers:{ + metricana: { + module_type: MetricAnalyzer + } + } + + + reco: [tdcdecoder] + + # define the output stream, there could be more than one if using filters + stream1: [metricana] + + # trigger_paths is a keyword and contains the paths that modify the art::event, + # ie filters and producers + trigger_paths: [reco] + + # end_paths is a keyword and contains the paths that do not modify the art::Event, + # ie analyzers and output streams. these all run simultaneously + end_paths: [stream1] +} \ No newline at end of file diff --git a/sbndcode/Trigger/run_metricfilter.fcl b/sbndcode/Trigger/run_metricfilter.fcl new file mode 100644 index 000000000..f52cd3287 --- /dev/null +++ b/sbndcode/Trigger/run_metricfilter.fcl @@ -0,0 +1,40 @@ +#include "metricfilter.fcl" + +process_name: MetricFilter + +source: +{ + module_type: RootInput + maxEvents: -1 # Number of events to create +} + +outputs: +{ + out1: + { + module_type: RootOutput + fileName: "metricfiltered-art.root" + } +} + +physics: +{ + producers: {} + filters: + { + metricfilter: @local::metricfilter_sbnd + } + analyzers:{} + + reco: [metricfilter] + stream1: [out1] + trigger_paths: [reco] + end_paths: [stream1] +} + +outputs.out1.SelectEvents: [ "reco" ] + +# beam window as of run17998 +physics.filters.metricfilter.time_min: 0.7 +physics.filters.metricfilter.time_max: 2.3 +physics.filters.metricfilter.pe_thresh: 50 \ No newline at end of file diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-base.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-base.jsonnet index 80f118f0b..a8c22e484 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-base.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-base.jsonnet @@ -20,17 +20,21 @@ function(params, anode, field, n, rms_cuts=[]) // For MicroBooNE, channel groups is a 2D list. Each element is // one group of channels which should be considered together for // coherent noise filtering. - groups: [std.range( 0 + n * 5638 + g*32, 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,149)] + - [std.range(4806 + n * 5638 + g*32, 4806 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,25)] , + // 5638 is the number of channels in a single APA, (1984*2 + 1670), including the 6 channel gap. + // 4806 is the number of channels for both induction + half of real collection wires + 6 channel gap + groups: [std.range( 0 + n * 5638 + g*32, 0 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,150)] + + [std.range(4806 + n * 5638 + g*32, 4806 + n * 5638 + (g+1)*32 - 1) for g in std.range(0,26)] , // Externally determined "bad" channels. // // Dead channels: 3232:3263 (inclusive) (East V). 4160:4191 (East Y) + // Jumpered region: 4800:4805 (inclusive, East Y), 10438:10443 (inclusive, West Y) + // No response: 546, 607, 8574 // Shorted channels: 7169 (West U), 8378 (West V). // There are four physically missing wires ( = bad channels) due to combs, in the center of each 1/2 APA. // They are 4374 and 5231 (East Y), 10012 and 10869 (West Y). - // So in total, there are 76 bad channels. + // So in total, there are 88 bad channels. // //bad: [], bad: [546, 607] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7169, 8378, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443], @@ -53,15 +57,15 @@ function(params, anode, field, n, rms_cuts=[]) response_offset: 0.0, // ticks? pad_window_front: 10, // ticks? pad_window_back: 10, // ticks? - decon_limit: 0.02, + decon_limit: 0.02, // (SignalProtection, same as upper_decon_limit (default 0.02)) decon_limit1: 0.09, - adc_limit: 15, + adc_limit: 10, roi_min_max_ratio: 0.8, // default 0.8 min_rms_cut: 1.0, // units??? max_rms_cut: 30.0, // units??? // parameter used to make "rcrc" spectrum - rcrc: 1.1 * wc.millisecond, // 1.1 for collection, 3.3 for induction + rcrc: 0.5 * wc.millisecond, // 1.1 for collection, 3.3 for induction rc_layers: 1, // default 2 // parameters used to make "config" spectrum diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-perfect.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-perfect.jsonnet index 80f118f0b..7a3a45ccb 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-perfect.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/chndb-perfect.jsonnet @@ -27,10 +27,12 @@ function(params, anode, field, n, rms_cuts=[]) // Externally determined "bad" channels. // // Dead channels: 3232:3263 (inclusive) (East V). 4160:4191 (East Y) + // Jumpered region: 4800:4805 (inclusive, East Y), 10438:10443 (inclusive, West Y) + // No response: 546, 607, 8574 // Shorted channels: 7169 (West U), 8378 (West V). // There are four physically missing wires ( = bad channels) due to combs, in the center of each 1/2 APA. // They are 4374 and 5231 (East Y), 10012 and 10869 (West Y). - // So in total, there are 76 bad channels. + // So in total, there are 88 bad channels. // //bad: [], bad: [546, 607] + std.range(3232, 3263) + std.range(4160, 4191) + [4374, 4800, 4801, 4802, 4803, 4804, 4805, 5060, 5231, 5636, 5637, 7169, 8378, 8574, 10012, 10869, 10438, 10439, 10440, 10441, 10442, 10443], @@ -61,7 +63,7 @@ function(params, anode, field, n, rms_cuts=[]) max_rms_cut: 30.0, // units??? // parameter used to make "rcrc" spectrum - rcrc: 1.1 * wc.millisecond, // 1.1 for collection, 3.3 for induction + rcrc: 0.5 * wc.millisecond, // 1.1 for collection, 3.3 for induction rc_layers: 1, // default 2 // parameters used to make "config" spectrum diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/funcs.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/funcs.jsonnet index 6744bb6f4..e91857304 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/funcs.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/funcs.jsonnet @@ -50,6 +50,7 @@ local g = import 'pgraph.jsonnet'; trace: { //gauss: 'gauss%d' % n, //wiener: 'wiener%d' % n, + ['raw%d' % n]: ['raw%d' % n], ['gauss%d' % n]: ['gauss%d' % n], ['wiener%d' % n]: ['wiener%d' % n], ['threshold%d' % n]: ['threshold%d' % n], diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/nf.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/nf.jsonnet index 99f135d74..bfa699d12 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/nf.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/nf.jsonnet @@ -61,7 +61,7 @@ function(params, anode, chndbobj, n, name='', dft=default_dft) wc.tn(single), ], grouped_filters: [ - //wc.tn(grouped), + // wc.tn(grouped), ], channel_status_filters: [ ], diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet index be028cc1d..5ef5dcdd8 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/params.jsonnet @@ -86,7 +86,11 @@ base { }, daq: super.daq { - nticks: 3415, + nticks: 3427, + }, + + nf: super.nf { + nsamples: $.daq.nticks, }, adc: super.adc { diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/simparams.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/simparams.jsonnet index 8ad00ebbd..8c152ebc3 100644 --- a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/simparams.jsonnet +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/simparams.jsonnet @@ -159,7 +159,7 @@ base { }, rc_resp: { - width: 1.1*wc.ms, + width: 0.5*wc.ms, rc_layers: 1, // 1 } } diff --git a/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/wcls-nf-data.jsonnet b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/wcls-nf-data.jsonnet new file mode 100644 index 000000000..648424b59 --- /dev/null +++ b/sbndcode/WireCell/cfg/pgrapher/experiment/sbnd/wcls-nf-data.jsonnet @@ -0,0 +1,213 @@ +// This is a main entry point to configure a WC/LS job that applies +// noise filtering and signal processing to existing RawDigits. The +// FHiCL is expected to provide the following parameters as attributes +// in the "params" structure. +// +// epoch: the hardware noise fix expoch: "before", "after", "dynamic" or "perfect" +// reality: whether we are running on "data" or "sim"ulation. +// raw_input_label: the art::Event inputTag for the input RawDigit +// +// see the .fcl of the same name for an example +// +// Manual testing, eg: +// +// jsonnet -V reality=data -V epoch=dynamic -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet +// +// jsonnet -V reality=sim -V epoch=perfect -V raw_input_label=daq \\ +// -V signal_output_form=sparse \\ +// -J cfg cfg/pgrapher/experiment/uboone/wcls-nf-sp.jsonnet + + +//local epoch = std.extVar('epoch'); // eg "dynamic", "after", "before", "perfect" +local sigoutform = std.extVar('signal_output_form'); // eg "sparse" or "dense" +local raw_input_label = std.extVar('raw_input_label'); // eg "daq" +local use_paramresp = std.extVar('use_paramresp'); // eg "true" or "false" + +local g = import 'pgraph.jsonnet'; +local f = import 'pgrapher/experiment/sbnd/funcs.jsonnet'; +local wc = import 'wirecell.jsonnet'; +local tools_maker = import 'pgrapher/common/tools.jsonnet'; + +local data_params = import 'params.jsonnet'; + +local params = data_params { + daq: super.daq { // <- super.daq overrides default values + // Set the waveform sample length, eg, 6000, 15000, "auto" + nticks: std.extVar('nticks'), + }, + # provides filename for parametrized per channel electronics response correction + # default is: use_parmresp = false + files: super.files { + chresp: if (use_paramresp == 'true') then "sbnd-params-chresp-ideal-v1.json.bz2" else null, + }, +}; + + +local tools = tools_maker(params); + + +local mega_anode = { + type: 'MegaAnodePlane', + name: 'meganodes', + data: { + anodes_tn: [wc.tn(anode) for anode in tools.anodes], + }, +}; + +local wcls_maker = import 'pgrapher/ui/wcls/nodes.jsonnet'; +local wcls = wcls_maker(params, tools); + +// Collect the WC/LS input converters for use below. Make sure the +// "name" argument matches what is used in the FHiCL that loads this +// file. In particular if there is no ":" in the inputer then name +// must be the emtpy string. +local wcls_input = { + adc_digits: g.pnode({ + type: 'wclsRawFrameSource', + name: '', + data: { + art_tag: raw_input_label, + frame_tags: ['orig'], // this is a WCT designator + // nticks: params.daq.nticks, + }, + }, nin=0, nout=1), + +}; + + +// Collect all the wc/ls output converters for use below. Note the +// "name" MUST match what is used in theh "outputers" parameter in the +// FHiCL that loads this file. + +local wcls_output = { + // The noise filtered "ADC" values. These are truncated for + // art::Event but left as floats for the WCT SP. Note, the tag + // "raw" is somewhat historical as the output is not equivalent to + // "raw data". + nf_digits: g.pnode({ + type: 'wclsFrameSaver', + name: 'nfsaver', + data: { + // anode: wc.tn(tools.anode), + anode: wc.tn(mega_anode), + digitize: true, // true means save as RawDigit, else recob::Wire + frame_tags: ['raw'], + nticks: params.daq.nticks, + chanmaskmaps: ['bad'], + }, + }, nin=1, nout=1, uses=[mega_anode]), + + + // The output of signal processing. Note, there are two signal + // sets each created with its own filter. The "gauss" one is best + // for charge reconstruction, the "wiener" is best for S/N + // separation. Both are used in downstream WC code. + sp_signals: g.pnode({ + type: 'wclsFrameSaver', + name: 'spsaver', + data: { + anode: wc.tn(mega_anode), + digitize: false, // true means save as RawDigit, else recob::Wire + frame_tags: ['gauss', 'wiener'], + + // this may be needed to convert the decon charge [units:e-] to be consistent with the LArSoft default ?unit? e.g. decon charge * 0.005 --> "charge value" to GaussHitFinder + frame_scale: [0.02, 0.02], + nticks: params.daq.nticks, + + + // uncomment the below configs to save summaries and cmm + summary_tags: ['wiener'], + summary_operator: {wiener: 'set'}, + summary_scale: [0.02], # summary scale should be the same as frame_scale + chanmaskmaps: ['bad'], + }, + }, nin=1, nout=1, uses=[mega_anode]), +}; + +local base = import 'pgrapher/experiment/sbnd/chndb-base.jsonnet'; + +local chndb = [{ + type: 'OmniChannelNoiseDB', + name: 'ocndbperfect%d' % n, + data: base(params, tools.anodes[n], tools.field, n){dft:wc.tn(tools.dft)}, + uses: [tools.anodes[n], tools.field, tools.dft], +} for n in std.range(0, std.length(tools.anodes) - 1)]; + +local chsel_pipes = [ + g.pnode({ + type: 'ChannelSelector', + name: 'chsel%d' % n, + data: { + channels: std.range(5638 * n, 5638 * (n + 1) - 1), + //tags: ['orig%d' % n], // traces tag + }, + }, nin=1, nout=1) + for n in std.range(0, std.length(tools.anodes) - 1) +]; + +local nf_maker = import 'pgrapher/experiment/sbnd/nf-data.jsonnet'; //added Ewerton 2024-08 +local nf_pipes = [nf_maker(params, tools.anodes[n], chndb[n], n, name='nf%d' % n) for n in std.range(0, std.length(tools.anodes) - 1)]; + +local sp_maker = import 'pgrapher/experiment/sbnd/sp.jsonnet'; +local sp = sp_maker(params, tools, { sparse: sigoutform == 'sparse' }); +local sp_pipes = [sp.make_sigproc(a) for a in tools.anodes]; + +local magoutput = 'sbnd-data-check.root'; +local magnify = import 'pgrapher/experiment/sbnd/magnify-sinks.jsonnet'; +local sinks = magnify(tools, magoutput); + +local nfsp_pipes = [ + g.pipeline([ + chsel_pipes[n], + // sinks.orig_pipe[n], + + nf_pipes[n], + // sinks.raw_pipe[n], + + // sp_pipes[n], + // sinks.decon_pipe[n], + // sinks.threshold_pipe[n], + // sinks.debug_pipe[n], // use_roi_debug_mode=true in sp.jsonnet + ], + 'nfsp_pipe_%d' % n) + for n in std.range(0, std.length(tools.anodes) - 1) +]; + +local fanpipe = f.fanpipe('FrameFanout', nfsp_pipes, 'FrameFanin', 'sn_mag_nf'); + +local retagger = g.pnode({ + type: 'Retagger', + data: { + // Note: retagger keeps tag_rules an array to be like frame fanin/fanout. + tag_rules: [{ + // Retagger also handles "frame" and "trace" like fanin/fanout + // merge separately all traces like gaussN to gauss. + frame: { + '.*': 'retagger', + }, + merge: { + 'raw\\d': 'raw', + // 'gauss\\d': 'gauss', + // 'wiener\\d': 'wiener', + }, + }], + }, +}, nin=1, nout=1); + +local sink = g.pnode({ type: 'DumpFrames' }, nin=1, nout=0); + + +// local graph = g.pipeline([wcls_input.adc_digits, rootfile_creation_frames, fanpipe, retagger, wcls_output.sp_signals, sink]); +local graph = g.pipeline([wcls_input.adc_digits, fanpipe, retagger, wcls_output.nf_digits, sink]); + +local app = { + type: 'TbbFlow', + data: { + edges: g.edges(graph), + }, +}; + +// Finally, the configuration sequence +g.uses(graph) + [app] diff --git a/sbndcode/WireCell/wcsp_data_sbnd.fcl b/sbndcode/WireCell/wcsp_data_sbnd.fcl index b9d1b6394..fad2236c7 100644 --- a/sbndcode/WireCell/wcsp_data_sbnd.fcl +++ b/sbndcode/WireCell/wcsp_data_sbnd.fcl @@ -52,12 +52,12 @@ sbnd_wcls_sp_data.wcls_main.params : { # whether or not to use calibrated, parametrized electronics response # MUST be a string! - use_paramresp: "false" + use_paramresp: "true" } sbnd_wcls_sp_data.wcls_main.structs: { # Set the waveform sample length, eg, 6000, 15000, "auto" - nticks: 3415 + nticks: 3427 } END_PROLOG diff --git a/ups/product_deps b/ups/product_deps index 18ebbdd67..3645ba444 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -253,9 +253,9 @@ wpdir product_dir wire-cell-cfg # #################################### product version qual flags -sbncode v09_93_01_01 - +sbncode v09_93_01_01 - cetmodules v3_24_01 - only_for_build -sbnd_data v01_25_00 - optional +sbnd_data v01_26_00 - optional sbndutil v09_93_01_01 - optional end_product_list ####################################