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

Contents of /PamCut/TrkCuts/TrkChi2DeflCut/TrkChi2DeflCut.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed May 27 13:30:08 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: MAIN
Branch point for: DEV
Initial revision

1 /*
2 * TrkChi2DeflCut.cpp
3 *
4 * Created on: 7-apr-2009
5 * Author: Nicola Mori
6 */
7
8 #include "TrkChi2DeflCut.h"
9
10 int TrkChi2DeflCut::Check(PamLevel2 *event) {
11
12 float chi2 = event->GetTrack(0)->GetTrkTrack()->chi2;
13 if (chi2 < 0.)
14 return 0;
15 float eta2 = event->GetTrack(0)->GetTrkTrack()->GetDeflection(); //Sign doesn't matter
16 eta2 *= eta2; // Now eta2 is deflection^2
17
18 #ifdef DEBUGPAMCUT
19
20 h_trk_chi2_defl[0]->Fill(event->GetTrack(0)->GetTrkTrack()->GetDeflection(), pow(chi2,0.25));
21
22 #endif
23
24 if (chi2 > _p0 + _p1 * eta2 + _p2 * eta2 * eta2)
25 return 0;
26
27 #ifdef DEBUGPAMCUT
28
29 h_trk_chi2_defl[1]->Fill(event->GetTrack(0)->GetTrkTrack()->GetDeflection(), pow(chi2,0.25));
30
31 #endif
32
33 return CUTOK;
34
35 }

  ViewVC Help
Powered by ViewVC 1.1.23