diff --git a/TrkFilters/src/HelixFilter_module.cc b/TrkFilters/src/HelixFilter_module.cc index ba36530857..a116f77f0f 100644 --- a/TrkFilters/src/HelixFilter_module.cc +++ b/TrkFilters/src/HelixFilter_module.cc @@ -188,6 +188,7 @@ namespace mu2e explicit HelixFilter(const Parameters& conf); virtual bool filter(art::Event& event) override; + virtual void beginJob(); virtual bool beginRun(art::Run& run ); virtual bool endRun( art::Run& run ) override; @@ -216,6 +217,18 @@ namespace mu2e produces(); } + void HelixFilter::beginJob() { + if ( (!_posHelCuts._configured) && (!_negHelCuts._configured)) { + std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; + } + if ( (!_posHelCuts._configured)){ + std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET FOR THE HELICES WITH POSITIVE HELICITY. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; + } + if ( (!_negHelCuts._configured)){ + std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET FOR THE HELICES WITH NEGATIVE HELICITY. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; + } + } + bool HelixFilter::beginRun(art::Run & run){ // get bfield GeomHandle bfmgr; @@ -228,15 +241,6 @@ namespace mu2e _posHelCuts.setTrackerGeomHandle(_tracker); _negHelCuts.setTrackerGeomHandle(_tracker); - if ( (!_posHelCuts._configured) && (!_negHelCuts._configured)) { - std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; - } - if ( (!_posHelCuts._configured)){ - std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET FOR THE HELICES WITH POSITIVE HELICITY. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; - } - if ( (!_negHelCuts._configured)){ - std::cout << moduleDescription().moduleLabel() << " NO HELIX CUT HAS BEEN SET FOR THE HELICES WITH NEGATIVE HELICITY. IF THAT'S NOT THE DESIRED BEHAVIOUR REVIEW YOUR CONFIGUREATION!" << std::endl; - } return true; } diff --git a/TrkReco/fcl/prolog.fcl b/TrkReco/fcl/prolog.fcl index b66a12d4be..f76ffd41e5 100644 --- a/TrkReco/fcl/prolog.fcl +++ b/TrkReco/fcl/prolog.fcl @@ -126,6 +126,8 @@ TrkReco: { @table::TrkReco deltanh : 5 # if the difference in the strawHit counts between the helices is less than deltanh, use the chisq of the helices to select the better helix scaleXY : 1.1 # scale the weight for having chi2XY/ndof distribution peaking at 1 scaleZPhi : 0.75 # scale the weight for having chi2ZPhi/ndof distribution peaking at 1 + MinHitOverlapFraction : 0.5 + MinNHitOverlap : 10 } } } diff --git a/TrkReco/src/MergeHelices_module.cc b/TrkReco/src/MergeHelices_module.cc index 72e3aa6629..ee5e69cbd1 100644 --- a/TrkReco/src/MergeHelices_module.cc +++ b/TrkReco/src/MergeHelices_module.cc @@ -30,16 +30,16 @@ namespace mu2e { using Name=fhicl::Name; using Comment=fhicl::Comment; struct Config { - fhicl::Atom debug{ Name("debugLevel"), Comment("Debug Level"), 0}; - fhicl::Atom deltanh{ Name("deltanh"), Comment("difference in the active StrawHit counts")}; - fhicl::Atom scaleXY{ Name("scaleXY"), Comment("scaling factor to get chi2XY/ndof distribution peak at 1")}; - fhicl::Atom scaleZPhi{ Name("scaleZPhi"), Comment("scaling factor to get chi2ZPhi/ndof distribution peak at 1")}; - fhicl::Atom selectbest{ Name("SelectBest"), Comment("Select best overlapping helices for output"), true}; - fhicl::Atom usecalo{ Name("UseCalo"), Comment("Use CaloCluster info in comparison"), true}; - fhicl::Atom minnover{ Name("MinNHitOverlap"), Comment("Minimum number of common hits to consider helices to be 'the same'"), 10}; - fhicl::Atom minoverfrac{ Name("MinHitOverlapFraction"), Comment("Minimum fraction of common hits to consider helices to be 'the same'"), 0.5}; - fhicl::Sequence BadHitFlags { Name("BadHitFlags"), Comment("HelixHit flag bits to exclude from counting"),std::vector{"Outlier"}}; - fhicl::Sequence HelixFinders { Name("HelixFinders"), Comment("HelixSeed producers to merge")}; + fhicl::Atom debug { Name("debugLevel"), Comment("Debug Level"), 0}; + fhicl::Atom deltanh { Name("deltanh"), Comment("difference in the active StrawHit counts")}; + fhicl::Atom scaleXY { Name("scaleXY"), Comment("scaling factor to get chi2XY/ndof distribution peak at 1")}; + fhicl::Atom scaleZPhi { Name("scaleZPhi"), Comment("scaling factor to get chi2ZPhi/ndof distribution peak at 1")}; + fhicl::Atom selectbest { Name("SelectBest"), Comment("Select best overlapping helices for output"), true}; + fhicl::Atom usecalo { Name("UseCalo"), Comment("Use CaloCluster info in comparison"), true}; + fhicl::Atom minnover { Name("MinNHitOverlap"), Comment("Minimum number of common hits to consider helices to be 'the same'")}; + fhicl::Atom minoverfrac { Name("MinHitOverlapFraction"), Comment("Minimum fraction of common hits to consider helices to be 'the same'")}; + fhicl::Sequence BadHitFlags { Name("BadHitFlags"), Comment("HelixHit flag bits to exclude from counting"),std::vector{"Outlier"}}; + fhicl::Sequence HelixFinders { Name("HelixFinders"), Comment("HelixSeed producers to merge")}; }; using Parameters = art::EDProducer::Table; explicit MergeHelices(const Parameters& conf); diff --git a/Validation/inc/ValKalSeed.hh b/Validation/inc/ValKalSeed.hh index 4b32c52fd4..64d8000377 100644 --- a/Validation/inc/ValKalSeed.hh +++ b/Validation/inc/ValKalSeed.hh @@ -44,6 +44,7 @@ class ValKalSeed { TH1D* _hpce; TH1D* _hpcep; TH1D* _hsignedp; + TH1D* _hsignedp2; TH1D* _hpe; TH1D* _hRho; TH1D* _hPhi; diff --git a/Validation/src/ValKalSeed.cc b/Validation/src/ValKalSeed.cc index 8704f73b54..6624160c7f 100644 --- a/Validation/src/ValKalSeed.cc +++ b/Validation/src/ValKalSeed.cc @@ -32,12 +32,13 @@ namespace mu2e { _hfitConC = tfs.make("FitConnC", "Fit CL CPR", 100, 0.0, 1.0); _hfitConT = tfs.make("FitConnT", "Fit CL TPR", 100, 0.0, 1.0); _hp = tfs.make("p", "p", 100, 0., 110.); - _hp2 = tfs.make("p2", "p", 100, 0., 300.); + _hp2 = tfs.make("p2", "p", 150, 0., 500.); _hpC = tfs.make("pC", "p CPR", 100, 0., 110.); _hpT = tfs.make("pT", "p TPR", 100, 0., 110.); _hpce = tfs.make("pce", "p CE", 100, 95.0, 110.); _hpcep = tfs.make("pcep", "p CE+", 100, 82.0, 97.); _hsignedp = tfs.make("signedp", "signedp", 200, -110., 110.); + _hsignedp2 = tfs.make("signedp", "signedp", 300, -500., 500.); _hpe = tfs.make("pe", "p error", 100, 0.0, 1.0); _hRho = tfs.make("rho", "Transverse radius", 100, 0.0, 800.); _hPhi = tfs.make("phi", "phi", 100, -M_PI, M_PI); @@ -80,7 +81,7 @@ namespace mu2e { art::Event const& event) { // increment this by 1 any time the defnitions of the histograms or the // histogram contents change, and will not match previous versions - _hVer->Fill(8.0); + _hVer->Fill(9.0); _hN->Fill(coll.size()); for (auto const& ks : coll) { @@ -127,6 +128,7 @@ namespace mu2e { _hpce->Fill(p); _hpcep->Fill(p); _hsignedp->Fill(p*ksCharge); + _hsignedp2->Fill(p*ksCharge); _hpe->Fill(ikinter->momerr()); _hRho->Fill(ikinter->position3().Rho()); _hPhi->Fill(mom3.Phi());