/[PAMELA software]/PamCut/TrkCuts/TrkChi2QualCut/TrkChi2QualCut.cpp
ViewVC logotype

Annotation of /PamCut/TrkCuts/TrkChi2QualCut/TrkChi2QualCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed May 27 13:30:09 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: DEV
Changes since 1.1: +0 -0 lines
First import

1 pam-fi 1.1 /*
2     * TrkChi2QualCut.cpp
3     *
4     * Created on: 13-mar-2009
5     * Author: Sergio Ricciarini, Nicola Mori
6     */
7    
8     /*! @file TrkChi2QualCut.cpp The TrkChi2QualCut class implementation file */
9    
10     #include "TrkChi2QualCut.h"
11    
12     int TrkChi2QualCut::Check(PamLevel2 *event) {
13    
14     TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
15    
16     float p0 = 1.111588e+00;
17     float p1 = 1.707656e+00;
18     float p2 = 1.489693e-01;
19     float def_0 = 0.07;
20     float chi2m025_0 = p0 + fabs(def_0) * p1 + def_0 * def_0 * p2;
21    
22     float chi2m025 = p0 + fabs(trkTrack->GetDeflection()) * p1 + pow(trkTrack->GetDeflection(), 2) * p2;
23    
24     float chi2m = pow(chi2m025 - chi2m025_0 + pow(6.4, 0.25), 4.); // cut at ~90% of chi^2 distribution
25    
26     if (!(trkTrack->chi2 < chi2m))
27     return 0;
28     return CUTOK;
29    
30     }

  ViewVC Help
Powered by ViewVC 1.1.23