diff --git a/source/Utils/include/FilterTracks.h b/source/Utils/include/FilterTracks.h index 636eb73..0b701d1 100644 --- a/source/Utils/include/FilterTracks.h +++ b/source/Utils/include/FilterTracks.h @@ -75,6 +75,7 @@ class FilterTracks : public marlin::Processor { //! Cut off for momentum (GeV) float _MinPt = 1.0; // units GeV + float _MaxPt = -99.0; // units GeV //! Cut off for spatial and temporal chi squared values float _Chi2Spatial = 0; diff --git a/source/Utils/src/FilterTracks.cc b/source/Utils/src/FilterTracks.cc index 0f51023..b0364e1 100644 --- a/source/Utils/src/FilterTracks.cc +++ b/source/Utils/src/FilterTracks.cc @@ -54,6 +54,8 @@ FilterTracks::FilterTracks() : Processor("FilterTracks") { registerProcessorParameter("MinPt", "Minimum transverse momentum", _MinPt, _MinPt); + registerProcessorParameter("MaxPt", "Maximum transverse momentum", _MaxPt, _MaxPt); + registerProcessorParameter("MaxD0", "Max d0", _MaxD0, _MaxD0); registerProcessorParameter("MaxZ0", "Max z0", _MaxZ0, _MaxZ0); @@ -168,7 +170,11 @@ void FilterTracks::processEvent(LCEvent* evt) { continue; } if (pt < _MinPt){ - streamlog_out(DEBUG) << "Pt = " << pt << " GeV, skipping track!" << std::endl; + streamlog_out(DEBUG) << "Pt = " << pt << " GeV [below minimum], skipping track!" << std::endl; + continue; + } + if (_MaxPt > 0 && pt > _MaxPt){ + streamlog_out(DEBUG) << "Pt = " << pt << " GeV [above maximum], skipping track!" << std::endl; continue; } if (chi2spatial/ndf > _Chi2Spatial){