/[PAMELA software]/PamCut/MiscCuts/LTGeoFillCut/LTGeoFillCut.h
ViewVC logotype

Annotation of /PamCut/MiscCuts/LTGeoFillCut/LTGeoFillCut.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed May 27 13:30:09 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: MAIN
Branch point for: DEV
File MIME type: text/plain
Initial revision

1 pam-fi 1.1 /*
2     * LTGeoFillCut.h
3     *
4     * Created on: 26-mar-2009
5     * Author: Nicola Mori
6     * Last update: 30-apr-2009, S. Ricciarini
7     */
8    
9     /*! @file LTGeoFillCut.h The LTGeoFillCut class definition file */
10    
11     #ifndef LTGEOFILLCUT_H_
12     #define LTGEOFILLCUT_H_
13    
14     #include "../../PamCutBase/PamCutBase.h"
15    
16     /*! @brief The LT histogram filling.
17     *
18     * This cut fills a Live Time (LT) histogram (in seconds) binned in threshold rigidity (in GV), given by
19     * the geomagnetic cutoff rigidity (the Stoermer cutoff) for that event multiplied by a threshold
20     * coefficient. It discards an event only if its threshold rigidity is outside the limits of the
21     * histogram.
22     *
23     */
24     class LTGeoFillCut: public PamCut {
25    
26     public:
27     /*! @brief Constructor.
28     *
29     * @param cutName The cut's name.
30     * @param binning A vector containing the histogram binning in threshold rigidity.
31     * Note that it must contain both the upper and lower limits, and
32     * that the elements must be ordered (ie., lowest value in the first
33     * element and so on).
34     */
35     LTGeoFillCut(const char *cutName, std::vector<float> binning, float thresholdCoeff) :
36     PamCut(cutName), _binning(binning), _thresholdCoeff(thresholdCoeff), _histogram(binning.size() - 1, 0.), _histogram_tot(0.) {
37     }
38     /*! @brief Destructor. */
39     ~LTGeoFillCut() {
40     }
41    
42     /*! @brief The threshold rigidity check.
43     *
44     * The event is discarded if its threshold rigidity is less than the lower
45     * histogram limit or higher than the upper limit.
46     *
47     * @param event The event to analyze.
48     * @return #CUTOK if the threshold rigidity is contained in the histogram limits.
49     * @return 0 otherwise.
50     */
51     int Check(PamLevel2 *event);
52    
53     /*! @brief The histogram filling.
54     *
55     * The method fills the LT histogram (in seconds) with the currently selected event.
56     *
57     * @param event The currently selected event.
58     */
59     void OnGood(PamLevel2 *event);
60    
61     /*! @brief Returns the histogram.
62     *
63     * This method returns a vector filled with the LT (in seconds) corresponding to each
64     * threshold rigidity bin (in GV) defined in the binning argument of the constructor.
65     * Element 0 is the total LT for events whose threshold rigidity lies in the
66     * lowest bin and so on.
67     *
68     * @return The LT histogram binned in threshold rigidity.
69     */
70     std::vector<float> &GetHisto() {
71     return _histogram;
72     }
73    
74     /*! @brief Returns the histogram total.
75     *
76     * This method returns the LT (in seconds) summed over all threshold rigidity bins (in GV) defined in the binning argument of the constructor.
77     *
78     * @return The LT histogram total.
79     */
80     float GetHistoTot() {
81     return _histogram_tot;
82     }
83    
84     private:
85    
86     std::vector<float> _binning;
87     float _thresholdCoeff;
88    
89     std::vector<float> _histogram;
90     float _histogram_tot;
91    
92     };
93    
94     #endif /* LTGEOFILLCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23