/[PAMELA software]/PamCut/CollectionActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.h
ViewVC logotype

Annotation of /PamCut/CollectionActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Sep 25 15:39:35 2009 UTC (15 years, 2 months ago) by pam-fi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
File MIME type: text/plain
FILE REMOVED
Removed from repository (switch to the new Histo1DAction and Histo2DAction framework)

1 pam-fi 1.1 /*
2     * TofDedxVsBetaHistoAction.h
3     *
4     * Created on: 25-giu-2009
5     * Author: Nicola Mori
6     */
7    
8     /*! @file TofDedxVsBetaHistoAction.h The TofDedxVsBetaHistoAction class declaration file. */
9    
10     #ifndef TOFDEDXVSBETAHISTOACTION_H_
11     #define TOFDEDXVSBETAHISTOACTION_H_
12    
13     #include "../CollectionAction/CollectionAction.h"
14     #include <TH2F.h>
15    
16     /*! @brief An action that fills a TOF dE/dx Vs beta histogram. */
17     class TofDedxVsBetaHistoAction: public CollectionAction {
18     public:
19    
20     /*! @brief Constructor.
21 pam-fi 1.2 *
22 pam-fi 1.1 * @param actionName The action's name.
23     * @param outFileName The output file name.
24 pam-fi 1.2 * @param layers The layers from which dE/dx is measured. See #TOFLAYERS. If combinations like
25 pam-fi 1.1 * S11+S12 are used, the mean dE/dx will be used.
26     * @param mode The mode of ROOT file creation (see documentation of TFile constructor
27     * in ROOT's reference guide).
28 pam-fi 1.2 * @param standAlone If true, the standalone TOF track will be used to compute beta; otherwise
29     * the track associated to the physical track will be used.
30 pam-fi 1.1 * @param minDedx The lower limit for dE/dx axis (in MIP).
31     * @param maxDedx The upper limit for dE/dx axis (in MIP).
32     * @param nBinsDedx The number of dE/dx bins.
33     * @param minBeta The lower limit for beta axis.
34     * @param maxBeta The upper limit for beta axis.
35     * @param nBinsBeta The number of beta bins.
36     */
37     TofDedxVsBetaHistoAction(const char *actionName, TString outFileName, unsigned int layers, TString mode = "UPDATE",
38 pam-fi 1.2 bool standAlone = true, float minDedx = 0., float maxDedx = 50., unsigned int nBinsDedx = 100,
39     float minBeta = 0., float maxBeta = 2., unsigned int nBinsBeta = 100);
40 pam-fi 1.1
41     /*! @brief Destructor. */
42     ~TofDedxVsBetaHistoAction() {
43     }
44    
45     /*! @brief Fills histogram with the selected event.
46     *
47     * @param event The selected event.
48     */
49     void OnGood(PamLevel2 *event);
50    
51     /*! @brief Writes the histogram to the output ROOT file.*/
52     void Finalize();
53    
54     /*! Returns the number of bad events.
55     *
56     * Bad events are those events for which no valid dE/dx information (dE/dx > 0 && dE/dx < 4090)
57     * can be found for any layer.
58     */
59     unsigned int GetNBadEvents() {
60     return _badEvents;
61     }
62     private:
63    
64     TString _outFileName;
65     unsigned int _layers;
66     unsigned int _nLayers;
67     unsigned int _badEvents;
68     TH2F _histo;
69     TString _mode;
70 pam-fi 1.2 bool _standAlone;
71 pam-fi 1.1
72     };
73     #endif /* TOFDEDXVSBETAHISTOACTION_H_ */

  ViewVC Help
Powered by ViewVC 1.1.23