/[PAMELA software]/PamCut/TofCuts/TofBetaRigCut/TofBetaRigCut.h
ViewVC logotype

Annotation of /PamCut/TofCuts/TofBetaRigCut/TofBetaRigCut.h

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, MAIN
CVS Tags: v0r00, Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
First import

1 pam-fi 1.1 /*
2     * TofBetaRigCut.h
3     *
4     * Created on: 22-apr-2009
5     * Author: S. Ricciarini
6     */
7    
8     /*! @file TofBetaRigCut.h The TofBetaRigCut class definition file */
9    
10     #ifndef TOFBETARIGCUT_H_
11     #define TOFBETARIGCUT_H_
12    
13     #include "../../PamCutBase/PamCutBase.h"
14    
15     #include <TH2F.h>
16    
17     /*! @brief The match between TOF beta modulus and TRK beta modulus.
18     * This cut discards all the events for which the absolute RELATIVE difference between TRK beta modulus (calculated from rigidity of TRK track, mass M and charge Z) and TOF beta modulus is greater than the threshold.
19     * Rigidity is defined as p/Z (GV) where Z is the particle charge and p the momentum modulus.
20     * CUT DEPENDENCIES: TrkPhysSin for object trkTrack
21     */
22     class TofBetaRigCut: public PamCut {
23    
24     public:
25     /*! @brief Constructor.
26     *
27     * @param cutName The cut's name.
28     * @param charge The particle charge (in units of proton charge: e.g. Z=1)
29     * @param mass The particle mass (in GeV; e.g. m=0.93827203 GeV)
30     * @param threshold The rigidity-difference threshold (in GV)
31     */
32     TofBetaRigCut(const char *cutName, float threshold, int charge=1, float mass=0.93827203) :
33     PamCut(cutName), _threshold(threshold), _charge(charge), _mass(mass) {
34    
35     #ifdef DEBUGPAMCUT
36    
37     TString hId;
38     TString hTitle;
39    
40     for (UInt_t j = 0; j < 2; j++) {
41     hId.Form("h_trk_vs_tof_betamod_%i", j);
42     hTitle.Form("TRK |beta| vs TOF |beta| (%i)", j);
43     h_trk_vs_tof_betamod[j] = new TH2F(hId.Data(), hTitle.Data(), 50, 0, 1, 50, 0, 1);
44     }
45    
46     #endif
47    
48     }
49     /*! @brief Destructor. */
50     ~TofBetaRigCut() {
51    
52     #ifdef DEBUGPAMCUT
53    
54     for (UInt_t j = 0; j < 2; j++) {
55     h_trk_vs_tof_betamod[j]->Write();
56     }
57    
58     #endif
59    
60     }
61    
62     /*! @brief The rigidity check.
63     *
64     * @param event The event to analyze.
65     * @return #CUTOK if the beta difference is less than the threshold
66     * @return 0 otherwise.
67     */
68     int Check(PamLevel2 *event);
69    
70     private:
71    
72     #ifdef DEBUGPAMCUT
73    
74     TH2F* h_trk_vs_tof_betamod[2];
75    
76     #endif
77    
78     float _threshold;
79     int _charge;
80     float _mass;
81    
82     };
83     #endif /* TOFBETARIGCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23