PamCut: TrkCuts/TrkChi2DeflCut/TrkChi2DeflCut.h Source File

- Main Page
- Classes
- Files

- File List
- File Members

# TrkCuts/TrkChi2DeflCut/TrkChi2DeflCut.h

Go to the documentation of this file.

    00001 /*
    00002  * TrkChi2DeflCut.h
    00003  *
    00004  *  Created on: 7-apr-2009
    00005  *      Author: Nicola Mori
    00006  */
    00007
    00010 #ifndef TRKCHI2DEFLCUT_H_
    00011 #define TRKCHI2DEFLCUT_H_
    00012
    00013 #include "../../PamCutBase/PamCutBase.h"
    00014
    00015 #include <TH2F.h>
    00016
    00028 class TrkChi2DeflCut: public PamCut {
    00029
    00030 public:
    00038   TrkChi2DeflCut(const char *cutName, float p0, float p1, float p2) :
    00039     PamCut(cutName), _p0(p0), _p1(p1), _p2(p2) {
    00040
    00041 #ifdef DEBUGPAMCUT
    00042
    00043     TString hId;
    00044     TString hTitle;
    00045
    00046     for (UInt_t j = 0; j < 2; j++) {
    00047       hId.Form("h_trk_chi2_vs_defl_%i_", j);
    00048       hId.Append(TString(cutName));
    00049       hTitle.Form("TRK chi2 vs defl (%i)", j);
    00050       h_trk_chi2_defl[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 2.5, 50, 0, 20);
    00051     }
    00052
    00053 #endif
    00054
    00055   }
    00056
    00058   ~TrkChi2DeflCut() {
    00059
    00060 #ifdef DEBUGPAMCUT
    00061
    00062     for (UInt_t j = 0; j < 2; j++) {
    00063       h_trk_chi2_defl[j]->Write();
    00064     }
    00065
    00066 #endif
    00067
    00068   }
    00069
    00077   int Check(PamLevel2 *event);
    00078
    00079 private:
    00080
    00081 #ifdef DEBUGPAMCUT
    00082
    00083   TH2F* h_trk_chi2_defl[2];
    00084
    00085 #endif
    00086
    00087   float _p0, _p1, _p2;
    00088 };
    00089 #endif /* TRKCHI2DEFLCUT_H_ */