PamCut: TrkCuts/TrkChi2QualCut/TrkChi2QualCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# TrkCuts/TrkChi2QualCut/TrkChi2QualCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * TrkChi2QualCut.cpp
    00003  *
    00004  *  Created on: 13-mar-2009
    00005  *      Author: Sergio Ricciarini, Nicola Mori
    00006  */
    00007
    00010 #include "TrkChi2QualCut.h"
    00011
    00012 int TrkChi2QualCut::Check(PamLevel2 *event) {
    00013
    00014   TrkTrack *trkTrack = event->GetTrack(0)->GetTrkTrack();
    00015
    00016   float p0 = 1.111588e+00;
    00017   float p1 = 1.707656e+00;
    00018   float p2 = 1.489693e-01;
    00019   float def_0 = 0.07;
    00020   float chi2m025_0 = p0 + fabs(def_0) * p1 + def_0 * def_0 * p2;
    00021
    00022   float chi2m025 = p0 + fabs(trkTrack->GetDeflection()) * p1 + pow(trkTrack->GetDeflection(), 2) * p2;
    00023
    00024   float chi2m = pow(chi2m025 - chi2m025_0 + pow(6.4, 0.25), 4.); // cut at ~90% of chi^2 distribution
    00025
    00026   if (!(trkTrack->chi2 < chi2m))
    00027     return 0;
    00028   return CUTOK;
    00029
    00030 }