PamCut: TrkCuts/TrkChi2DeflCut/TrkChi2DeflCut.cpp Source File

- Main Page
- Classes
- Files

- File List
- File Members

# TrkCuts/TrkChi2DeflCut/TrkChi2DeflCut.cpp

Go to the documentation of this file.

    00001 /*
    00002  * TrkChi2DeflCut.cpp
    00003  *
    00004  *  Created on: 7-apr-2009
    00005  *      Author: Nicola Mori
    00006  */
    00007
    00008 #include "TrkChi2DeflCut.h"
    00009
    00010 int TrkChi2DeflCut::Check(PamLevel2 *event) {
    00011
    00012   float chi2 = event->GetTrack(0)->GetTrkTrack()->chi2;
    00013   if (chi2 < 0.)
    00014     return 0;
    00015   float eta2 = event->GetTrack(0)->GetTrkTrack()->GetDeflection(); //Sign doesn't matter
    00016   eta2 *= eta2;  // Now eta2 is deflection^2
    00017
    00018 #ifdef DEBUGPAMCUT
    00019
    00020   h_trk_chi2_defl[0]->Fill(event->GetTrack(0)->GetTrkTrack()->GetDeflection(), pow(chi2,0.25));
    00021
    00022 #endif
    00023
    00024   if (chi2 > _p0 + _p1 * eta2 + _p2 * eta2 * eta2)
    00025     return 0;
    00026
    00027 #ifdef DEBUGPAMCUT
    00028
    00029   h_trk_chi2_defl[1]->Fill(event->GetTrack(0)->GetTrkTrack()->GetDeflection(), pow(chi2,0.25));
    00030
    00031 #endif
    00032
    00033   return CUTOK;
    00034
    00035 }