Skip to content

Commit cb7dd01

Browse files
authored
Merge pull request #31 from MuonColliderSoft/madbaron-patch-1
Replace Chi2Spatial with MaxChi2OverNdf check
2 parents 9109745 + 348caa3 commit cb7dd01

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

source/Utils/src/FilterTracks.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ FilterTracks::FilterTracks() : Processor("FilterTracks") {
5858

5959
registerProcessorParameter("MaxZ0", "Max z0", _MaxZ0, _MaxZ0);
6060

61-
registerProcessorParameter("Chi2Spatial", "Spatial chi squared", _Chi2Spatial, _Chi2Spatial);
61+
registerProcessorParameter("MaxChi2OverNdf", "Max redcuced chi squared", _Chi2Spatial, _Chi2Spatial);
6262
}
6363

6464
void FilterTracks::init() {
@@ -123,6 +123,7 @@ void FilterTracks::processEvent(LCEvent* evt) {
123123
float pt = fabs(0.3 * _Bz / trk->getOmega() / 1000);
124124

125125
float chi2spatial = trk->getChi2();
126+
int ndf = trk->getNdf();
126127

127128
int nholes = trk->getNholes();
128129

@@ -170,8 +171,8 @@ void FilterTracks::processEvent(LCEvent* evt) {
170171
streamlog_out(DEBUG) << "Pt = " << pt << " GeV, skipping track!" << std::endl;
171172
continue;
172173
}
173-
if (chi2spatial > _Chi2Spatial){
174-
streamlog_out(DEBUG) << "Chi2 spatial = " << chi2spatial << ", skipping track!" << std::endl;
174+
if (chi2spatial/ndf > _Chi2Spatial){
175+
streamlog_out(DEBUG) << "Chi2/ndf = " << chi2spatial/ndf << ", skipping track!" << std::endl;
175176
continue;
176177
}
177178
if (nholes > _MaxHoles){

0 commit comments

Comments
 (0)