/[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.2 - (hide annotations) (download)
Fri May 29 10:10:19 2009 UTC (15 years, 6 months ago) by pam-fi
Branch: MAIN
CVS Tags: Root_V8, MergedToHEAD_1, nuclei_reproc, MergedFromV8_1, BeforeMergingFromV8_1, V9, HEAD
Branch point for: V8
Changes since 1.1: +3 -1 lines
File MIME type: text/plain
Previous commit was outdated; fixed.

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 pam-fi 1.2 * @param thresholdCoeff The threshold rigidity coefficient for the event selection.
35 pam-fi 1.1 */
36     LTGeoFillCut(const char *cutName, std::vector<float> binning, float thresholdCoeff) :
37 pam-fi 1.2 PamCut(cutName), _binning(binning), _thresholdCoeff(thresholdCoeff), _histogram(binning.size() - 1, 0.),
38     _histogram_tot(0.) {
39 pam-fi 1.1 }
40     /*! @brief Destructor. */
41     ~LTGeoFillCut() {
42     }
43    
44     /*! @brief The threshold rigidity check.
45     *
46     * The event is discarded if its threshold rigidity is less than the lower
47     * histogram limit or higher than the upper limit.
48     *
49     * @param event The event to analyze.
50     * @return #CUTOK if the threshold rigidity is contained in the histogram limits.
51     * @return 0 otherwise.
52     */
53     int Check(PamLevel2 *event);
54    
55     /*! @brief The histogram filling.
56     *
57     * The method fills the LT histogram (in seconds) with the currently selected event.
58     *
59     * @param event The currently selected event.
60     */
61     void OnGood(PamLevel2 *event);
62    
63     /*! @brief Returns the histogram.
64     *
65     * This method returns a vector filled with the LT (in seconds) corresponding to each
66     * threshold rigidity bin (in GV) defined in the binning argument of the constructor.
67     * Element 0 is the total LT for events whose threshold rigidity lies in the
68     * lowest bin and so on.
69     *
70     * @return The LT histogram binned in threshold rigidity.
71     */
72     std::vector<float> &GetHisto() {
73     return _histogram;
74     }
75    
76     /*! @brief Returns the histogram total.
77     *
78     * This method returns the LT (in seconds) summed over all threshold rigidity bins (in GV) defined in the binning argument of the constructor.
79     *
80     * @return The LT histogram total.
81     */
82     float GetHistoTot() {
83     return _histogram_tot;
84     }
85    
86     private:
87    
88     std::vector<float> _binning;
89     float _thresholdCoeff;
90    
91     std::vector<float> _histogram;
92     float _histogram_tot;
93    
94     };
95    
96     #endif /* LTGEOFILLCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23