diff --git a/fcl/detsim/CMakeLists.txt b/fcl/detsim/CMakeLists.txt index 4c6c89df5..a64906003 100644 --- a/fcl/detsim/CMakeLists.txt +++ b/fcl/detsim/CMakeLists.txt @@ -1,6 +1,7 @@ # add underlying subfolders add_subdirectory(SBNNov17) add_subdirectory(SBNMar18) +add_subdirectory(SBNNoise) # Install fcl files in /job subdirectory. install_fhicl() diff --git a/fcl/detsim/SBNNoise/CMakeLists.txt b/fcl/detsim/SBNNoise/CMakeLists.txt new file mode 100644 index 000000000..520ed808b --- /dev/null +++ b/fcl/detsim/SBNNoise/CMakeLists.txt @@ -0,0 +1,8 @@ +# Install fcl files in /job subdirectory. + +install_fhicl() + +# Also put a copy in the source tree. + +FILE(GLOB fcl_files *.fcl) +install_source( EXTRAS ${fcl_files} ) diff --git a/fcl/detsim/SBNNoise/multitpc_detsim_icarus_sbnnoise.fcl b/fcl/detsim/SBNNoise/multitpc_detsim_icarus_sbnnoise.fcl new file mode 100644 index 000000000..6898b3048 --- /dev/null +++ b/fcl/detsim/SBNNoise/multitpc_detsim_icarus_sbnnoise.fcl @@ -0,0 +1,90 @@ +#include "services_icarus_simulation.fcl" +#include "detsimmodules_ICARUS.fcl" +#include "opdetsim_pmt_icarus.fcl" +#include "crtsimmodules_icarus.fcl" + +process_name: DetSim + +services: +{ + #FileCatalogMetadata: @local::art_file_catalog_mc + @table::icarus_detsim_services +} + +#source is now a root file +source: +{ + module_type: RootInput + saveMemoryObjectThreshold: 0 +} + +# 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: + { + crtdaq: @local::icarus_crtsim + #opdaq: @local::icarus_simpmt + opdaq: @local::icarus_simpmt_nonoise #turn off the noise so it runs more quickly + daq0: @local::icarus_simwire + daq1: @local::icarus_simwire + daq2: @local::icarus_simwire + daq3: @local::icarus_simwire + rns: { module_type: "RandomNumberSaver" } + } + + #define the producer and filter modules for this path, order matters, + #filters reject all following items. see lines starting physics.producers below + simulate: [ rns, opdaq, daq0, daq1, daq2, daq3, crtdaq ] + + #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, + #ie filters and producers + trigger_paths: [ simulate ] + + #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] +} + +# +# For MCC1.1 we are still suppressing channels with no signal in the TPC +physics.producers.daq0.SuppressNoSignal: true +physics.producers.daq0.Cryostat: 0 +physics.producers.daq0.TPC: 0 +physics.producers.daq1.SuppressNoSignal: true +physics.producers.daq1.Cryostat: 0 +physics.producers.daq1.TPC: 1 +physics.producers.daq2.SuppressNoSignal: true +physics.producers.daq2.Cryostat: 1 +physics.producers.daq2.TPC: 0 +physics.producers.daq3.SuppressNoSignal: true +physics.producers.daq3.Cryostat: 1 +physics.producers.daq3.TPC: 1 + +physics.producers.daq0.NoiseGenToolVec: [@local::SBNNoiseToolInd1, @local::SBNNoiseToolInd2, @local::SBNNoiseToolColl] +physics.producers.daq1.NoiseGenToolVec: [@local::SBNNoiseToolInd1, @local::SBNNoiseToolInd2, @local::SBNNoiseToolColl] +physics.producers.daq2.NoiseGenToolVec: [@local::SBNNoiseToolInd1, @local::SBNNoiseToolInd2, @local::SBNNoiseToolColl] +physics.producers.daq3.NoiseGenToolVec: [@local::SBNNoiseToolInd1, @local::SBNNoiseToolInd2, @local::SBNNoiseToolColl] + +#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: + { + module_type: RootOutput + fileName: "%ifb_%tc-%p.root" + dataTier: "detector-simulated" + saveMemoryObjectThreshold: 0 + compressionLevel: 1 + fastCloning: false + } +} + diff --git a/fcl/evd/evd_multitpc_icarus.fcl b/fcl/evd/evd_multitpc_icarus.fcl new file mode 100644 index 000000000..e04d74484 --- /dev/null +++ b/fcl/evd/evd_multitpc_icarus.fcl @@ -0,0 +1,103 @@ +#include "evdservices_icarus.fcl" +#include "services_icarus.fcl" + +process_name: EvdIcarus + +services: +{ + @table::icarus_disp +} + + +#Look at the input files +source: +{ + module_type: RootInput + fileNames: [ "data.root" ] + maxEvents: -1 # Number of events to create +} + +outputs:{} + +# 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: {} + + filters:{} + + analyzers: + { + evdisp:{module_type: EVD} + } + + #list the modules for this path, order matters, filters reject all following items + evd: [ evdisp ] + + #end_path are things that do not modify art::Event, includes analyzers + #and output modules. all items here can be run simultaneously + end_paths: [evd] +} +services.RawDrawingOptions.TotalTicks: 4100 + +# Some basic overrides to set up basic drawing + +services.RawDrawingOptions.DrawRawDataOrCalibWires: 1 # set to zero for raw digits only +services.RawDrawingOptions.MinimumSignal: 10 # This sets the minimum ADC value to be displayed in 2D display +services.RecoDrawingOptions.DrawHits: 1 # This turns on the drawing of hits in the 2D display +services.RecoDrawingOptions.DrawPFParticles: 4 # Can be range of numbers, 4 is maximum options +services.RecoDrawingOptions.DrawClusters: 4 # draw with connecting lines & labels +services.RecoDrawingOptions.DrawTracks: 3 # Draws "tracks" +services.RecoDrawingOptions.DrawProngs: 3 # Draws "prongs" (which is really the same) +services.RecoDrawingOptions.DrawTrackTrajectoryPoints: 3 # Draws points associated to tracks +services.RecoDrawingOptions.Draw2DSlopeEndPoints: 1 # This draws cluster axis in 2D (but there is bug) +services.RecoDrawingOptions.DrawTrackSpacePoints: 3 # Draws space points +services.RecoDrawingOptions.DrawVertices: 3 +services.RecoDrawingOptions.DrawSpacePoints: 3 + + +# Set up the display of truth information +# For 2D display the information is not great +services.SimulationDrawingOptions.ShowMCTruthVectors: 0 +services.SimulationDrawingOptions.ShowMCTruthTrajectories: true +services.SimulationDrawingOptions.MinimumEnergyDeposition: 0.0001 # in GeV + +# The 3D display has better truth information +services.SimulationDrawingOptions.ShowSimChannelInfo: true +services.SimulationDrawingOptions.ShowSimEnergyInfo: false +services.SimulationDrawingOptions.ShowSimPhotonInfo: false + +# Below sets up the 2D viwer to see RawDigit, Wire and Hit data for the multi TPC reconstruction work flow +# To view the "signgle" reconstruction work flow, replace the multiple names in the braces below with a single name: +# For RawDigits --> "rawdigitfilter" +# For Wire --> "decon1droi" +# For hits --> "cluster3d" (or "gaushit") +services.RawDrawingOptions.RawDataLabels: ["rawDigitFilterTPC0","rawDigitFilterTPC1","rawDigitFilterTPC2","rawDigitFilterTPC3"] +services.RecoDrawingOptions.WireModuleLabels: ["decon1DroiTPC0", "decon1DroiTPC1", "decon1DroiTPC2", "decon1DroiTPC3"] +services.RecoDrawingOptions.HitModuleLabels: ["cluster3DCryo0", "cluster3DCryo1"] + +# Below sets up basic drawing of output from pandora (using gauss hits) +# +services.RecoDrawingOptions.ClusterModuleLabels: ["pandoraGausCryo0", "pandoraGausCryo1"] +services.RecoDrawingOptions.EndPoint2DModuleLabels: ["pandoraGausCryo0", "pandoraGausCryo1"] +services.RecoDrawingOptions.PFParticleModuleLabels: ["pandoraGausCryo0", "pandoraGausCryo1"] +services.RecoDrawingOptions.SpacePointModuleLabels: ["pandoraGausCryo0", "pandoraGausCryo1"] +services.RecoDrawingOptions.VertexModuleLabels: ["pandoraGausCryo0", "pandoraGausCryo1"] +services.RecoDrawingOptions.TrackModuleLabels: ["pandoraTrackGausCryo0", "pandoraTrackGausCryo1"] +services.RecoDrawingOptions.ProngModuleLabels: ["pandoraTrackGausCryo0", "pandoraTrackGausCryo1"] +services.RecoDrawingOptions.EdgeModuleLabels: [] + +# Set up the optical display for the 3D display +# +# Note there are both MC and reconstructed versions to look at, below includes names for switching +# +services.RecoDrawingOptions.DrawOpHits: 1 +services.RecoDrawingOptions.OpHitModuleLabels: ["mcophit"] #["ophit"] +services.RecoDrawingOptions.DrawOpFlashes: 0 +services.RecoDrawingOptions.OpFlashModuleLabels: ["opflashTPC0", "opflashTPC1", "opflashTPC2", "opflashTPC3"] +#services.RecoDrawingOptions.OpFlashModuleLabels: ["mcopflashTPC0", "mcopflashTPC1", "mcopflashTPC2", "mcopflashTPC3"] + + diff --git a/icaruscode/Analysis/ana_mods_icarus.fcl b/icaruscode/Analysis/ana_mods_icarus.fcl new file mode 100644 index 000000000..17d6d4bee --- /dev/null +++ b/icaruscode/Analysis/ana_mods_icarus.fcl @@ -0,0 +1,71 @@ +#include "analysis_icarus.fcl" +#include "reco_icarus_driver_common.fcl" + +process_name: HitEfficiency + +#Start each new event with an empty event. +source: +{ + module_type: RootInput + maxEvents: 10 # 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: +{ + analyzers: + { + hitEffAnalysisGauss: @local::icarus_HitEfficiencyAnalysis + hitEffAnalysisCluster3d: @local::icarus_HitEfficiencyAnalysis + hitEffAnalysisRaw: @local::icarus_HitEfficiencyAnalysis + } + + #define the producer and filter modules for this path, order matters, + #filters reject all following items. see lines starting physics.producers below + ana: [ hitEffAnalysisGauss, hitEffAnalysisCluster3d, hitEffAnalysisRaw ] + end_paths: [ana] +} + +#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: + { + module_type: RootOutput + fileName: "hitEfficiency_icarus.root" + dataTier: "reco-simulated" + compressionLevel: 1 + fastCloning: false + } +} + +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].OffsetVec: [9, 4, 2] +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].RawDigitLabel: "rawdigitfilter" +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].WireModuleLabel: "recowireraw" +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].HitModuleLabel: "icarushit" +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].MCParticleLabel: "largeant" +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].SimChannelLabel: "largeant" +phsyics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].UseBadChannelDB: false + +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].RawDigitLabel: "rawdigitfilter" +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].WireModuleLabel: "recowire" #"decon1droi" +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].HitModuleLabel: "gaushit" +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].MCParticleLabel: "largeant" +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].SimChannelLabel: "largeant" +phsyics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].UseBadChannelDB: false + +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].RawDigitLabelVec: ["rawDigitFilterTPC0","rawDigitFilterTPC1","rawDigitFilterTPC2","rawDigitFilterTPC3"] +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].WireModuleLabelVec: ["decon1DroiTPC0","decon1DroiTPC1","decon1DroiTPC2","decon1DroiTPC3"] +physics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].HitModuleLabelVec: ["gaushitTPC0","gaushitTPC1","gaushitTPC2","gaushitTPC3"] +phsyics.analyzers.hitEffAnalysisGauss.HitEfficiencyHistogramToolList[0].UseBadChannelDB: false +physics.analyzers.hitEffAnalysisCluster3d.HitEfficiencyHistogramToolList[0].RawDigitLabelVec: ["rawDigitFilterTPC0","rawDigitFilterTPC1","rawDigitFilterTPC2","rawDigitFilterTPC3"] +physics.analyzers.hitEffAnalysisCluster3d.HitEfficiencyHistogramToolList[0].WireModuleLabelVec: ["decon1DroiTPC0","decon1DroiTPC1","decon1DroiTPC2","decon1DroiTPC3"] +physics.analyzers.hitEffAnalysisCluster3d.HitEfficiencyHistogramToolList[0].HitModuleLabelVec: ["cluster3DCryo0","cluster3DCryo1"] +phsyics.analyzers.hitEffAnalysisCluster3d.HitEfficiencyHistogramToolList[0].UseBadChannelDB: false +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].RawDigitLabelVec: ["rawDigitFilterTPC0","rawDigitFilterTPC1","rawDigitFilterTPC2","rawDigitFilterTPC3"] +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].WireModuleLabelVec: ["recoWireRawTPC0","recoWireRawTPC1","recoWireRawTPC2","recoWireRawTPC3"] +physics.analyzers.hitEffAnalysisRaw.HitEfficiencyHistogramToolList[0].HitModuleLabelVec: ["icarusHitTPC0","icarusHitTPC1","icarusHitTPC2","icarusHitTPC3"] diff --git a/icaruscode/Analysis/tools/TrackHitEfficiencyAnalysis_tool.cc b/icaruscode/Analysis/tools/TrackHitEfficiencyAnalysis_tool.cc index 6957c4e28..62aa4d40e 100755 --- a/icaruscode/Analysis/tools/TrackHitEfficiencyAnalysis_tool.cc +++ b/icaruscode/Analysis/tools/TrackHitEfficiencyAnalysis_tool.cc @@ -149,8 +149,11 @@ class TrackHitEfficiencyAnalysis : virtual public IHitEfficiencyHistogramTool std::vector fNSimChannelHitsVec; std::vector fNRecobHitVec; + //std::vector fNRejectedHitVec; std::vector fHitEfficiencyVec; + std::vector fNFakeHitVec; + // TTree variables mutable TTree* fTree; @@ -262,6 +265,7 @@ void TrackHitEfficiencyAnalysis::initializeHists(art::ServiceHandleNplanes()); fNSimChannelHitsVec.resize(fGeometry->Nplanes()); fNRecobHitVec.resize(fGeometry->Nplanes()); + fNFakeHitVec.resize(fGeometry->Nplanes()); fHitEfficiencyVec.resize(fGeometry->Nplanes()); fSimDivHitChgVec.resize(fGeometry->Nplanes()); fSimDivHitChg1Vec.resize(fGeometry->Nplanes()); @@ -290,6 +294,7 @@ void TrackHitEfficiencyAnalysis::initializeHists(art::ServiceHandle(("DeltaMid" + std::to_string(plane)).c_str(), ";# hits", 50, -25., 25.); fNSimChannelHitsVec.at(plane) = dir.make(("NSimChan" + std::to_string(plane)).c_str(), ";# hits", 100, 0., 1200.); fNRecobHitVec.at(plane) = dir.make(("NRecobHit" + std::to_string(plane)).c_str(), ";# hits", 100, 0., 1200.); + fNFakeHitVec.at(plane) = dir.make(("NFakeHit" + std::to_string(plane)).c_str(), ";# hits", 100, 0., 50.); fHitEfficiencyVec.at(plane) = dir.make(("PlnEffic" + std::to_string(plane)).c_str(), ";# hits", 101, 0., 1.01); fSimDivHitChgVec.at(plane) = dir.make(("SimDivHit" + std::to_string(plane)).c_str(), ";# e / SummedADC", 200, 0., 200.); fSimDivHitChg1Vec.at(plane) = dir.make(("SimDivHit1" + std::to_string(plane)).c_str(), ";# e / Integral", 200, 0., 200.); @@ -389,6 +394,7 @@ void TrackHitEfficiencyAnalysis::clear() const void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const { + // std::cout << " filling histos " << std::endl; // Basic assumption is that the producer label vecs for RawDigits and Wire data are // all the same length and in the same order. Here we just check for length if (fRawDigitProducerLabelVec.size() != fWireProducerLabelVec.size()) return; @@ -448,7 +454,7 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const art::Handle< std::vector > wireHandle; event.getByLabel(fWireProducerLabelVec[tpcID], wireHandle); - + if (!rawDigitHandle.isValid() || !wireHandle.isValid()) return; for(const auto& wire : *wireHandle) channelToWireMap[wire.Channel()] = &wire; @@ -475,12 +481,18 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const TrackIDToMCParticleMap trackIDToMCParticleMap; - for(const auto& mcParticle : *mcParticleHandle) trackIDToMCParticleMap[mcParticle.TrackId()] = &mcParticle; + for(const auto& mcParticle : *mcParticleHandle) + trackIDToMCParticleMap[mcParticle.TrackId()] = &mcParticle; const lariov::ChannelStatusProvider& chanFilt = art::ServiceHandle()->GetProvider(); - std::vector nSimChannelHitVec = {0,0,0}; - std::vector nRecobHitVec = {0,0,0}; + std::vector nSimChannelHitVec = {0,0,0}; + std::vector nRecobHitVec = {0,0,0}; + std::vector nFakeHitVec = {0,0,0}; + std::vector nSimulatedWiresVec = {0,0,0}; + + unsigned int lastwire=-1; + for(const auto& partToChanInfo : partToChanToTDCToIDEMap) { TrackIDToMCParticleMap::const_iterator trackIDToMCPartItr = trackIDToMCParticleMap.find(partToChanInfo.first); @@ -489,10 +501,10 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const int trackPDGCode = trackIDToMCPartItr->second->PdgCode(); std::string processName = trackIDToMCPartItr->second->Process(); - + // Looking for primary muons (e.g. CR Tracks) if (fabs(trackPDGCode) != 13 || processName != "primary") continue; - + // Recover particle position and angle information Eigen::Vector3f partStartPos(trackIDToMCPartItr->second->Vx(),trackIDToMCPartItr->second->Vy(),trackIDToMCPartItr->second->Vz()); Eigen::Vector3f partStartDir(trackIDToMCPartItr->second->Px(),trackIDToMCPartItr->second->Py(),trackIDToMCPartItr->second->Pz()); @@ -515,8 +527,8 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const // This is the "correct" way to check and remove bad channels... if( chanFilt.Status(chanToTDCToIDEMap.first) < fMinAllowedChanStatus) { - //std::vector wids = fGeometry->ChannelToWire(chanToTDCToIDEMap.first); - //std::cout << "*** skipping bad channel with status: " << chanFilt.Status(chanToTDCToIDEMap.first) << " for channel: " << chanToTDCToIDEMap.first << ", plane: " << wids[0].Plane << ", wire: " << wids[0].Wire << std::endl; + std::vector wids = fGeometry->ChannelToWire(chanToTDCToIDEMap.first); + std::cout << "*** skipping bad channel with status: " << chanFilt.Status(chanToTDCToIDEMap.first) << " for channel: " << chanToTDCToIDEMap.first << ", plane: " << wids[0].Plane << ", wire: " << wids[0].Wire << std::endl; continue; } } @@ -562,9 +574,12 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const // Recover plane and wire in the plane unsigned int plane = wids[0].Plane; -// unsigned int wire = wids[0].Wire; - + unsigned int wire = wids[0].Wire; + Eigen::Vector3f avePosition(0.,0.,0.); + + if(wire!=lastwire) nSimulatedWiresVec[plane]++; + lastwire=wire; for(const auto& ideVal : tdcToIDEMap) { @@ -605,7 +620,7 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const unsigned short startTDC = tdcToIDEMap.begin()->first; unsigned short stopTDC = tdcToIDEMap.rbegin()->first; - + // Convert to ticks to get in same units as hits unsigned short startTick = fClockService->TPCTDC2Tick(startTDC) + fOffsetVec[plane]; unsigned short stopTick = fClockService->TPCTDC2Tick(stopTDC) + fOffsetVec[plane]; @@ -628,7 +643,6 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const float hitSnippetLenBest(0.); unsigned short hitStopTickBest(0); unsigned short hitStartTickBest(0); -// unsigned short midHitTickBest(0); // Start by recovering the Wire associated to this channel ChanToWireMap::const_iterator wireItr = channelToWireMap.find(chanToTDCToIDEMap.first); @@ -680,12 +694,12 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const { unsigned short hitStartTick = hit->PeakTime() - fSigmaVec[plane] * hit->RMS(); unsigned short hitStopTick = hit->PeakTime() + fSigmaVec[plane] * hit->RMS(); -// unsigned short midHitTick = (hitStopTick + hitStartTick) / 2; // If hit is out of range then skip, it is not related to this particle if (hitStartTick > stopTick || hitStopTick < startTick) { - if (plane == 2) rejectedHit = hit; + nFakeHitVec[plane]++; + rejectedHit = hit; continue; } @@ -698,7 +712,6 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const bestHit = hit; hitStartTickBest = hitStartTick; hitStopTickBest = hitStopTick; -// midHitTickBest = midHitTick; } // Find a match? @@ -749,9 +762,10 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const fDeltaMidTDCVec[plane]->Fill(hitPeakTimeBest - maxETick, 1.); nRecobHitVec[plane]++; + } else if (rejectedHit) - { + { unsigned short hitStartTick = rejectedHit->PeakTime() - fSigmaVec[plane] * rejectedHit->RMS(); unsigned short hitStopTick = rejectedHit->PeakTime() + fSigmaVec[plane] * rejectedHit->RMS(); @@ -822,6 +836,7 @@ void TrackHitEfficiencyAnalysis::fillHistograms(const art::Event& event) const fNSimChannelHitsVec[idx]->Fill(std::min(nSimChannelHitVec[idx],1999),1.); fNRecobHitVec[idx]->Fill(std::min(nRecobHitVec[idx],1999), 1.); + fNFakeHitVec[idx]->Fill(nFakeHitVec[idx]/(float)nSimulatedWiresVec[idx],1.); fHitEfficiencyVec[idx]->Fill(hitEfficiency, 1.); } } diff --git a/icaruscode/PMT/Algorithms/pmtsimulation_icarus.fcl b/icaruscode/PMT/Algorithms/pmtsimulation_icarus.fcl index 0b411c7af..4d92ae353 100644 --- a/icaruscode/PMT/Algorithms/pmtsimulation_icarus.fcl +++ b/icaruscode/PMT/Algorithms/pmtsimulation_icarus.fcl @@ -40,7 +40,7 @@ icarus_pmtsimulationalg_standard: { RiseTime: 3.8 #ns MeanAmplitude: 0.9 #in pC AmpNoise: 1.0 #in ADC - DarkNoiseRate: 1000.0 #in Hz + DarkNoiseRate: 1600.0 # in Hz; from CERN test stand measurement ##This is the readout window size for each "trigger" on the electronics ReadoutWindowSize: 2000 #ticks (if 2ns each --> 4us) diff --git a/icaruscode/TPC/Simulation/DetSim/detsimmodules_ICARUS.fcl b/icaruscode/TPC/Simulation/DetSim/detsimmodules_ICARUS.fcl index 5769d7504..a98cf6597 100644 --- a/icaruscode/TPC/Simulation/DetSim/detsimmodules_ICARUS.fcl +++ b/icaruscode/TPC/Simulation/DetSim/detsimmodules_ICARUS.fcl @@ -1,81 +1,95 @@ -BEGIN_PROLOG + BEGIN_PROLOG NoiseFromHistTool: { - tool_type: NoiseFromHist - NoiseRand: 0. - NoiseHistFileName: "T600noise_corr.root" - HistogramName: "hnoiseI1" - HistNormFactor: 0.45 # --> Histogram rms noise = 1 + tool_type: NoiseFromHist + NoiseRand: 0. + NoiseHistFileName: "T600noise_corr.root" + HistogramName: "hnoiseI1" + HistNormFactor: 0.45 # --> Histogram rms noise = 1 } + CorrelatedNoiseTool: { - tool_type: CorrelatedNoise - Plane: 0 - MedianNumBins: 25 - NoiseRand: 0. - CorrelatedSeed: 1000 - UncorrelatedSeed: 5000 - IncoherentNoiseFraction: 0.95 - StoreHistograms: true - NoiseHistFileName: "T600noise_corr.root" - HistogramName: "hnoiseI1" + tool_type: CorrelatedNoise + Plane: 0 + MedianNumBins: 25 + NoiseRand: 0. + CorrelatedSeed: 1000 + UncorrelatedSeed: 5000 + IncoherentNoiseFraction: 0.95 + StoreHistograms: true + NoiseHistFileName: "T600noise_corr.root" + HistogramName: "hnoiseI1" - CorrAmpHistFileName: "CorrAmplitude.root" - CorrAmpHistogramName: "hbrms" - StoreHistograms: true + CorrAmpHistFileName: "CorrAmplitude.root" + CorrAmpHistogramName: "hbrms" + StoreHistograms: true } + SBNNoiseTool: { - tool_type: SBNNoise - Plane: 0 - MedianNumBins: 25 - NoiseRand: 0. - CorrelatedSeed: 1000 - UncorrelatedSeed: 5000 - StoreHistograms: false - NoiseHistFileName: "FFtsbnEE20M.root" - CorrelatedHistogramName: "fftBhisto" - UncorrelatedHistogramName: "fftUhisto" - TotalRMSHistoName: "RMShisto" - CorrelatedRMSHistoName: "RMSBhisto" - UncorrelatedRMSHistoName: "RMSUhisto" + tool_type: SBNNoise + Plane: 0 # All default values are for induction 1 (first induction) + MedianNumBins: 25 + NoiseRand: 0. + CorrelatedSeed: 1000 + UncorrelatedSeed: 5000 + StoreHistograms: false + NoiseHistFileName: "FFTww01m.root" + CorrelatedHistogramName: "fftBhisto" + UncorrelatedHistogramName: "fftUhisto" + TotalRMSHistoName: "RMShisto" + CorrelatedRMSHistoName: "RMSBhisto" + UncorrelatedRMSHistoName: "RMSUhisto" } + WhiteNoiseTool: { - tool_type: RandomNoise + tool_type: RandomNoise } NoNoiseTool: { - tool_type: NoNoise + tool_type: NoNoise } standard_simwire: { - module_type: "SimWireICARUS" - DriftEModuleLabel: "largeant" - ProcessAllTPCs: false - Cryostat: 0 - TPC: 0 - CompressionType: "none" - SimDeadChannels: false - SuppressNoSignal: false - SmearPedestals: true - Test: false - TestWire: 0 - TestIndex: [ 0. ] - TestCharge: [ 0. ] - Sample: -1 - MakeHistograms: "true" - NoiseGenToolVec: [@local::CorrelatedNoiseTool, @local::CorrelatedNoiseTool, @local::CorrelatedNoiseTool] + module_type: "SimWireICARUS" + DriftEModuleLabel: "largeant" + ProcessAllTPCs: false + Cryostat: 0 + TPC: 0 + CompressionType: "none" + SimDeadChannels: false + SuppressNoSignal: true + SmearPedestals: true + Test: false + TestWire: 0 + TestIndex: [ 0. ] + TestCharge: [ 0. ] + Sample: -1 + MakeHistograms: "true" + # current default (Sep 2019) is to run the noise model based on Gran Sasso experience + NoiseGenToolVec: [@local::CorrelatedNoiseTool, @local::CorrelatedNoiseTool, @local::CorrelatedNoiseTool] + # This switches to an updated model, currently under development (Sep 2019), based on FNAL running + #NoiseGenToolVec: [@local::SBNNoiseTool, @local::SBNNoiseTool, @local::SBNNoiseTool] } icarus_simwire: @local::standard_simwire -icarus_simwire.NoiseGenToolVec[0].Plane: 0 -icarus_simwire.NoiseGenToolVec[1].Plane: 1 -icarus_simwire.NoiseGenToolVec[2].Plane: 2 +icarus_simwire.NoiseGenToolVec[0].Plane: 0 +# Below overrides for SBN Noise tool +#icarus_simwire.NoiseGenToolVec[0].NoiseHistFileName: "FFTww01m.root" + +icarus_simwire.NoiseGenToolVec[1].Plane: 1 +# Below overrides for SBN Noise model +#icarus_simwire.NoiseGenToolVec[1].NoiseHistFileName: "FFTwe10.root" + +icarus_simwire.NoiseGenToolVec[2].Plane: 2 +# Below overrides for SBN Noise model +#icarus_simwire.NoiseGenToolVec[2].NoiseHistFileName: "FFTwe10.root" END_PROLOG diff --git a/ups/product_deps b/ups/product_deps index 50075c08f..31ca80e94 100644 --- a/ups/product_deps +++ b/ups/product_deps @@ -2,7 +2,7 @@ # The *parent* line must the first non-commented line and defines this product and version # The version must be of the form vxx_yy_zz (e.g. v01_02_03) -parent icaruscode v08_30_01 +parent icaruscode v08_31_01 defaultqual e17 # These optional lines define where headers, libraries, and executables go and should @@ -33,12 +33,12 @@ table_fragment_end # Add the dependent product and version product version -larsoft v08_30_01 -icarusutil v08_30_00 -icarus_data v08_28_00 +larsoft v08_31_01 +icarusutil v08_31_01 +icarus_data v08_31_01 genie_xsec v3_00_04a -cetbuildtools v7_13_02 - only_for_build +cetbuildtools v7_14_00 - only_for_build end_product_list # Restore this temporarily...