Skip to content

Commit

Permalink
Merge pull request #83 from brownd1978/crvfix
Browse files Browse the repository at this point in the history
Crv Extracted Fix
  • Loading branch information
AndrewEdmonds11 authored Apr 30, 2023
2 parents 2300712 + 0abaa43 commit 1adc9f4
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion fcl/TrkAnaExtracted.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "Offline/fcl/standardServices.fcl"
#include "TrkAna/fcl/prolog.fcl"

process_name : TrkAnaReco
process_name : TrkAnaExt

source : { module_type : RootInput }

Expand Down
2 changes: 2 additions & 0 deletions fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ UmuP : { input : "KFF"
Ext : { input : "KK"
branch : "kl"
suffix : "Line"
@table::StdSegments
}


Expand Down Expand Up @@ -258,6 +259,7 @@ TrkAnaReco : {
TrkAnaExt : { @table::TrkAnaTreeMaker
candidate : @local::Ext
supplements : [ ]
ExtraMCStepCollectionTags : [ "compressRecoMCs:protonabsorber", "compressRecoMCs:stoppingtarget" ]
}

genCountLogger : @local::genCountLogger
Expand Down
2 changes: 1 addition & 1 deletion src/BestCrvHitDeltaT_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
23 changes: 11 additions & 12 deletions src/InfoMCStructHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit 1adc9f4

Please sign in to comment.