From 5e02871713b79b696128ec3d969c6ed9ab9d315f Mon Sep 17 00:00:00 2001 From: David Nathan Brown Date: Thu, 6 Aug 2026 08:47:55 -0700 Subject: [PATCH] Add script to select and regrow cosmic reflections --- JobConfig/recoMC/RefRegrow.fcl | 137 +++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 JobConfig/recoMC/RefRegrow.fcl diff --git a/JobConfig/recoMC/RefRegrow.fcl b/JobConfig/recoMC/RefRegrow.fcl new file mode 100644 index 00000000..82a33337 --- /dev/null +++ b/JobConfig/recoMC/RefRegrow.fcl @@ -0,0 +1,137 @@ +# +# Script to select and regrow reflecting cosmic ray particles starting with standard recoMC output +# original author: D. Brown, 6/25/26 +# +#include "Production/JobConfig/recoMC/prolog.fcl" +outputs.CentralHelixOutput.fileName : nil +outputs.LoopHelixOutput.fileName : nil +services : @local::Services.Reco +process_name: RefRegrow +source : { module_type : RootInput } + +physics.filters : { + eidsel : { + module_type : EventIDFilter + idsToMatch: [ "*:*:*" ] + } + + Reflecte : { + @table::TrkReco.filters.SelectT0Reflections + UpstreamKalSeedCollection : "KKUe" + DownstreamKalSeedCollection : "KKDe" + } + + RegrowReflecte : { + @table::TrkReco.filters.SelectReflections + UpstreamKalSeedCollection : "RegrowKKe" + DownstreamKalSeedCollection : "RegrowKKe" + } + + Reflectmu : { + @table::TrkReco.filters.SelectT0Reflections + UpstreamKalSeedCollection : "KKUmu" + DownstreamKalSeedCollection : "KKDmu" + } + + RegrowReflectmu : { + @table::TrkReco.filters.SelectReflections + UpstreamKalSeedCollection : "RegrowKKmu" + DownstreamKalSeedCollection : "RegrowKKmu" + } + + RegrowKKe : { + @table::Mu2eKinKal.RegrowLH + KalSeedMCAssns : "SelectReco" + CopyKalSeedMCs : true + KalSeedPtrCollection : Reflecte + ComboHitCollection : RegrowSH + MustRegrow : "All" + } + + RegrowKKmu : { + @table::Mu2eKinKal.RegrowLH + KalSeedMCAssns : "SelectReco" + CopyKalSeedMCs : true + KalSeedPtrCollection : Reflectmu + ComboHitCollection : RegrowSH + MustRegrow : "All" + } +} + +physics.producers : { + RegrowSH : { + @table::TrkHitReco.makeSH + StrawDigiCollectionTag : "SelectReco" + StrawDigiADCWaveformCollectionTag : "SelectReco" + } + +# MC recompression not yet debugged: TODO + RefCompressRecoMCse : { + @table::Reconstruction.producers.compressRecoMCs + strawDigiMCIndexMapTag: "SelectReco:StrawDigiMap" + crvDigiMCIndexMapTag: "SelectReco:CrvDigiMap" + simParticleTags: [ "compressRecoMCs" ] + crvDigiMCTag: "compressRecoMCs" + extraStepPointMCTags: [ "compressRecoMCs:virtualdetector" ] + mcTrajectoryTag: "compressRecoMCs" + primaryParticleTag: "compressRecoMCs" + strawDigiMCTag: "compressRecoMCs" + surfaceStepTags: [ "compressRecoMCs" ] + caloClusterMCTag: "compressRecoMCs" + crvCoincClusterMCTags : [ "compressRecoMCs:CrvCoincidenceClusterMatchMC" ] + } + + RefCompressRecoMCsmu : { + @table::Reconstruction.producers.compressRecoMCs + strawDigiMCIndexMapTag: "SelectReco:StrawDigiMap" + crvDigiMCIndexMapTag: "SelectReco:CrvDigiMap" + simParticleTags: [ "compressRecoMCs" ] + crvDigiMCTag: "compressRecoMCs" + extraStepPointMCTags: [ "compressRecoMCs:virtualdetector" ] + mcTrajectoryTag: "compressRecoMCs" + primaryParticleTag: "compressRecoMCs" + strawDigiMCTag: "compressRecoMCs" + surfaceStepTags: [ "compressRecoMCs" ] + caloClusterMCTag: "compressRecoMCs" + crvCoincClusterMCTags : [ "compressRecoMCs:CrvCoincidenceClusterMatchMC" ] + } +} + +physics.RePath : [ eidsel, Reflecte, RegrowSH, RegrowKKe, RegrowReflecte ] +physics.RmuPath : [ eidsel, Reflectmu, RegrowSH, RegrowKKmu, RegrowReflectmu ] + +physics.trigger_paths : [ RePath, RmuPath ] + +outputs.RefOutpute : { + @table::Reconstruction.Output + SelectEvents : [RePath] + outputCommands: [ @sequence::Reconstruction.Output.outputCommands, + "drop mu2e::*_KK*_*_*", + "drop mu2e::KalSeeds_K*_*_*", + "drop mu2e::Kal*_SelectReco_*_*", + "drop mu2e::PrimaryParticle_*_*_*", + "keep mu2e::*_compressRecoMCs_*_*", + "keep mu2e::*_RegrowKK*_*_*" ] +} + +outputs.RefOutputmu : { + @table::Reconstruction.Output + fileName : "/data/HD6/users/brownd/mcs.brownd.RefRegrowmu.art" + SelectEvents : [RmuPath] + outputCommands: [ @sequence::Reconstruction.Output.outputCommands, + "drop mu2e::*_KK*_*_*", + "drop mu2e::KalSeeds_K*_*_*", + "drop mu2e::Kal*_SelectReco_*_*", + "drop mu2e::PrimaryParticle_*_*_*", + "keep mu2e::*_compressRecoMCs_*_*", + "keep mu2e::*_RegrowKK*_*_*" ] +} + +physics.RefEndPath : [ RefOutpute, RefOutputmu ] + +physics.end_paths : [ RefEndPath ] + +# Uncomment and update as needed +#services.DbService.purpose: Sim_best +#services.DbService.version: v1_4 +#services.DbService.verbose: 2