Skip to content

Commit

Permalink
Add new parameter in the filter: MaxPt
Browse files Browse the repository at this point in the history
  • Loading branch information
gianelle committed Oct 14, 2024
1 parent 05f4a0a commit 692194c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/Utils/include/FilterTracks.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 9 additions & 1 deletion source/Utils/src/FilterTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ FilterTracks::FilterTracks()
_MinPt
);

registerProcessorParameter("MaxPt",
"Max transverse momentum",
_MaxPt,
_MaxPt
);

registerProcessorParameter("Chi2Spatial",
"iMinimum value for Spatial chi squared",
_Chi2Spatial,
Expand Down Expand Up @@ -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*/)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 692194c

Please sign in to comment.