From 692194c722fd4be5d6335974100e29e85695561b Mon Sep 17 00:00:00 2001 From: gianelle Date: Mon, 14 Oct 2024 17:04:54 +0200 Subject: [PATCH] Add new parameter in the filter: MaxPt --- source/Utils/include/FilterTracks.h | 3 ++- source/Utils/src/FilterTracks.cc | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/Utils/include/FilterTracks.h b/source/Utils/include/FilterTracks.h index 3c94d6f..564ec0f 100644 --- a/source/Utils/include/FilterTracks.h +++ b/source/Utils/include/FilterTracks.h @@ -74,7 +74,8 @@ class FilterTracks : public marlin::Processor int _MaxHoles = 1; //! Cut off for momentum (GeV) - float _MinPt = 1.0; //units GeV + float _MinPt = 0.5; //units GeV + float _MaxPt = 1000.0; //units GeV //! Cut off for the value ndf int _MinNdf = 1; diff --git a/source/Utils/src/FilterTracks.cc b/source/Utils/src/FilterTracks.cc index 3a8b3d8..cab4077 100644 --- a/source/Utils/src/FilterTracks.cc +++ b/source/Utils/src/FilterTracks.cc @@ -60,6 +60,12 @@ FilterTracks::FilterTracks() _MinPt ); + registerProcessorParameter("MaxPt", + "Max transverse momentum", + _MaxPt, + _MaxPt + ); + registerProcessorParameter("Chi2Spatial", "iMinimum value for Spatial chi squared", _Chi2Spatial, @@ -129,7 +135,8 @@ void FilterTracks::init() { // Print the initial parameters printParameters() ; - //buildBfield() ; + // it require that geometry is initialized + // buildBfield() ; } void FilterTracks::processRunHeader( LCRunHeader* /*run*/) @@ -228,6 +235,7 @@ void FilterTracks::processEvent( LCEvent * evt ) vars["trtihn"] > _NHitsInner && vars["trtohn"] > _NHitsOuter && pt > _MinPt && + pt < _MaxPt && vars["trch2"] > _Chi2Spatial && vars["trndf"] > _MinNdf && vars["trthn"] < _MaxHoles)