/[PAMELA software]/PamCut/TrkCuts/RigFillCut/RigFillCut.h
ViewVC logotype

Annotation of /PamCut/TrkCuts/RigFillCut/RigFillCut.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Wed May 27 13:30:08 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     * RigFillCut.h
3     *
4     * Created on: 27-mar-2009
5     * Author: Nicola Mori, S. Ricciarini
6     * Last update: 30-apr-2009
7     */
8    
9     /*! @file RigFillCut.h The RigFillCut class definition file */
10    
11     #ifndef RIGFILLCUT_H_
12     #define RIGFILLCUT_H_
13    
14     #include "../../PamCutBase/PamCutBase.h"
15    
16     /*! @enum RIGFILL_return Return codes for RigFillCut discarded events */
17     enum RIGFILL_return {
18     RIGOUT, ///< Event is discarded because its rigidity is outside the rigidity binning limits.
19     THRESHRIGOUT ///< Event is discarded because its threshold rigidity is outside the threshold rigidity binning limits.
20     };
21    
22     /*! @brief The rigidity vs threshold rigidity histogram filling.
23     *
24     * This class checks the events and builds a 2D histogram binned in rigidity modulus
25     * and threshold rigidity. Each 2D bin will contain the number of events whose
26     * rigidity modulus and threshold rigidity (eg., Stoermer cutoff rigidity times a threshold coefficient)
27     * lie in that bin. Note that the meaning of this threshold coefficient is the same as in
28     * TrkRigGeoCut, so it must have the same value used for TrkRigGeoCut (consider
29     * using TrkRigGeoCut::GetThresholdCoeff() to retrieve its value).
30     * Events are discarded only if their rigidity modulus or cutoff rigidity lies
31     * outside the histogram bounds.
32     *
33     * CUT DEPENDECIES: TrkPhSinCut for single physical track, TrkRigGeoCut for galactic event.
34     *
35     */
36    
37     class RigFillCut: public PamCut {
38    
39     public:
40     /*! @brief Constructor.
41     *
42     * The binning vectors must contain both the upper and lower limits, and
43     * the elements must be ordered (ie., lowest value in the first element and so on)
44     * and positive, so that charge sign will be irrelevant.
45     *
46     * @param cutName The cut's name.
47     * @param binning A vector containing the histogram binning in rigidity modulus (X axis) and cutoff rigidity (Y axis).
48     * @param
49     *
50     */
51     RigFillCut(const char *cutName, std::vector<float> binning, float thresholdCoeff) :
52     PamCut(cutName), _binning(binning), _histogram(binning.size() - 1, binning.size() - 1, 0),
53     _thresholdCoeff(thresholdCoeff) {
54     }
55    
56     /*! @brief Destructor. */
57     ~RigFillCut() {
58     }
59    
60     /*! @brief The rigidity and cutoff rigidity check.
61     *
62     * The event is discarded if its rigidity modulus or threshold rigidity are outside the limits of the
63     * binnings. Please note that only absolute rigidity is considered.
64     *
65     * @param event The event to analyze.
66     * @return #CUTOK if both rigidity modulus and threshold rigidity is contained in the histogram limits.
67     * @return 0 otherwise.
68     */
69     int Check(PamLevel2 *event);
70    
71     /*! @brief The histogram filling.
72     *
73     * The method fills the histogram with the currently selected event.
74     *
75     * @param event The currently selected event.
76     */
77     void OnGood(PamLevel2 *event);
78    
79     /*! @brief Returns the histogram.
80     *
81     * This method returns a SimpleMatrix. Its [i][j] element contain the number of analyzed events
82     * whose rigidity modulus falls in the i-th rigidity bin and whose threshold rigidity falls in the j-th rigidity bin.
83     *
84     * @return The rigidity modulus - threshold rigidity 2D histogram
85     */
86     SimpleMatrix<UInt_t> &GetHisto() {
87     return _histogram;
88     }
89    
90     private:
91    
92     std::vector<float> _binning;
93     SimpleMatrix<UInt_t> _histogram;
94     float _thresholdCoeff;
95     };
96     #endif /* RIGFILLCUT_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23