From c8a5c5f93078f01d5440d3c931d2329362e74e8e Mon Sep 17 00:00:00 2001 From: David Nathan Brown Date: Wed, 26 Apr 2023 15:26:58 -0500 Subject: [PATCH 1/2] Small updates --- fcl/TrkAnaExtracted.fcl | 2 +- fcl/prolog.fcl | 1 + src/InfoMCStructHelper.cc | 23 +++++++++++------------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fcl/TrkAnaExtracted.fcl b/fcl/TrkAnaExtracted.fcl index 20ecd3e..61eeae1 100644 --- a/fcl/TrkAnaExtracted.fcl +++ b/fcl/TrkAnaExtracted.fcl @@ -3,7 +3,7 @@ #include "Offline/fcl/standardServices.fcl" #include "TrkAna/fcl/prolog.fcl" -process_name : TrkAnaReco +process_name : TrkAnaExt source : { module_type : RootInput } diff --git a/fcl/prolog.fcl b/fcl/prolog.fcl index de83397..4f99cdd 100644 --- a/fcl/prolog.fcl +++ b/fcl/prolog.fcl @@ -258,6 +258,7 @@ TrkAnaReco : { TrkAnaExt : { @table::TrkAnaTreeMaker candidate : @local::Ext supplements : [ ] + ExtraMCStepCollectionTags : [ "compressRecoMCs:protonabsorber", "compressRecoMCs:stoppingtarget" ] } genCountLogger : @local::genCountLogger diff --git a/src/InfoMCStructHelper.cc b/src/InfoMCStructHelper.cc index 5e5970f..e200bcb 100644 --- a/src/InfoMCStructHelper.cc +++ b/src/InfoMCStructHelper.cc @@ -141,19 +141,18 @@ namespace mu2e { // go through the SimParticles of this primary, and find the one most related to the // downstream fit (KalSeedMC) - if (primary.primarySimParticles().empty()) { - throw cet::exception("Simulation")<<"InfoMCStructHelper: No Primary Particle found" << std::endl; + if (!primary.primarySimParticles().empty()) { + auto bestprimarysp = primary.primarySimParticles().front(); + MCRelationship bestrel; + for(auto const& spp : primary.primarySimParticles()){ + MCRelationship mcrel(spp,trkprimary); + if(mcrel > bestrel){ + bestrel = mcrel; + bestprimarysp = spp; + } + } // redundant: FIXME! + fillSimInfo(bestprimarysp, priinfo); } - auto bestprimarysp = primary.primarySimParticles().front(); - MCRelationship bestrel; - for(auto const& spp : primary.primarySimParticles()){ - MCRelationship mcrel(spp,trkprimary); - if(mcrel > bestrel){ - bestrel = mcrel; - bestprimarysp = spp; - } - } // redundant: FIXME! - fillSimInfo(bestprimarysp, priinfo); } From 0abaa43565c92afafb176be2650e7e162132a91c Mon Sep 17 00:00:00 2001 From: David Nathan Brown Date: Sat, 29 Apr 2023 13:07:39 -0500 Subject: [PATCH 2/2] Fix CRV for straight tracks --- fcl/prolog.fcl | 1 + src/BestCrvHitDeltaT_module.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fcl/prolog.fcl b/fcl/prolog.fcl index 4f99cdd..aa8611e 100644 --- a/fcl/prolog.fcl +++ b/fcl/prolog.fcl @@ -198,6 +198,7 @@ UmuP : { input : "KFF" Ext : { input : "KK" branch : "kl" suffix : "Line" + @table::StdSegments } diff --git a/src/BestCrvHitDeltaT_module.cc b/src/BestCrvHitDeltaT_module.cc index 41291c6..f0ea5c7 100644 --- a/src/BestCrvHitDeltaT_module.cc +++ b/src/BestCrvHitDeltaT_module.cc @@ -77,7 +77,7 @@ namespace mu2e { size_t i_secondBestCrvCoinc = nCrvCoincidences; float mindt=1.0e9; float min2dt=1.0e9; - float t0 = kalSeed.t0().t0(); + float t0 = kalSeed.t0Val(); for(size_t i_crvCoinc = 0; i_crvCoinc != nCrvCoincidences; ++i_crvCoinc) { const auto& crvCoinc = crvCoincidenceHandle->at(i_crvCoinc); auto const& crvStartTime = crvCoinc.GetStartTime();