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

Annotation of /PamCut/CollectionActions/CaloChi2HistoAction/CaloChi2HistoAction.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3.2.1 - (hide annotations) (download)
Thu Jul 8 10:43:18 2010 UTC (14 years, 4 months ago) by pam-fi
Branch: V8
CVS Tags: MergedToHEAD_1, nuclei_reproc
Changes since 1.3: +4 -1 lines
File MIME type: text/plain
Support for external CaloAxis library added.

1 pam-fi 1.1 /*
2     * CaloChi2HistoAction.h
3     *
4     * Created on: 04/ago/2009
5     * Author: Nicola Mori
6     */
7    
8     /*! @file CaloChi2HistoAction.h The CaloChi2HistoAction class declaration file. */
9    
10 pam-fi 1.3.2.1 #ifndef NO_CALOAXIS
11    
12 pam-fi 1.1 #ifndef CALOCHI2HISTOACTION_H_
13     #define CALOCHI2HISTOACTION_H_
14    
15     #include "../CollectionAction/CollectionAction.h"
16 pam-fi 1.3.2.1 #include <CaloAxis.h>
17 pam-fi 1.1 #include <TH1F.h>
18     #include <TH2F.h>
19    
20     /*! @brief An action that fills a CALO Chi2 histogram. The value of Chi2 is obtained from CaloAxis objects. */
21     class CaloChi2HistoAction: public CollectionAction {
22     public:
23    
24     /*! @brief Constructor.
25     *
26     * Note that this action does NOT perform the fit of the CALO track, so the fitting procedure must be already done by the
27     * CaloAxis objects pointed by xAxis and yAxis.
28     *
29     * @param actionName The action's name.
30     * @param outFileName The output file name.
31     * @param xAxis The X axis CaloAxis object.
32     * @param yAxis The Y axis CaloAxis object.
33     * @param min The lower limit of the histogram's X axis.
34     * @param max The upper limit of the histogram's X axis.
35     * @param nBins The number of bins.
36     * @param mode The mode of ROOT file creation (see documentation of TFile constructor
37     * in ROOT's reference guide).
38     */
39     CaloChi2HistoAction(const char *actionName, TString outFileName, CaloAxis *xAxis, CaloAxis *yAxis, float min = 0.,
40     float max = 1., unsigned int nBins = 100, TString mode = "UPDATE");
41    
42     /*! @brief Destructor. */
43     ~CaloChi2HistoAction() {
44     }
45    
46     /*! @brief Fills histogram with the selected event.
47     *
48     * @param event The selected event.
49     */
50     void OnGood(PamLevel2 *event);
51    
52     /*! @brief Writes the histogram to the output ROOT file.*/
53     void Finalize();
54    
55     private:
56    
57     TString _outFileName;
58     CaloAxis *_xAxis, *_yAxis;
59     TString _mode;
60     TH1F _xHisto, _yHisto;
61     TH2F _xyHisto;
62     };
63     #endif /* CALOCHI2HISTOACTION_H_ */
64 pam-fi 1.3.2.1 #endif /* NO_CALOAXIS */

  ViewVC Help
Powered by ViewVC 1.1.23