1 |
/* |
2 |
* TrkRigHistoAction.h |
3 |
* |
4 |
* Created on: 2009-06-05 |
5 |
* Author: S. Ricciarini |
6 |
*/ |
7 |
/*! @file TrkRigHistoAction.h The TrkRigHistoAction class declaration file. */ |
8 |
|
9 |
#ifndef TRKRIGHISTOACTION_H_ |
10 |
#define TRKRIGHISTOACTION_H_ |
11 |
|
12 |
#include "../CollectionAction/CollectionAction.h" |
13 |
#include <TH2F.h> |
14 |
|
15 |
/*! @brief An action that fills the histogram: TRK rigidity (with sign). |
16 |
*/ |
17 |
class TrkRigHistoAction: public CollectionAction { |
18 |
|
19 |
public: |
20 |
/*! @brief Constructor. |
21 |
* |
22 |
* @param actionName The action's name. |
23 |
* @param binning A vector containing the histogram binning in rigidity (with sign) |
24 |
*/ |
25 |
|
26 |
TrkRigHistoAction(const char *actionName, std::vector<float> binning); |
27 |
|
28 |
/*! @brief Destructor */ |
29 |
~TrkRigHistoAction() { |
30 |
} |
31 |
|
32 |
/*! @brief Fills histogram with the selected event. |
33 |
* |
34 |
* @param event The selected event. |
35 |
*/ |
36 |
void OnGood(PamLevel2 *event); |
37 |
|
38 |
void Finalize() { |
39 |
} |
40 |
|
41 |
vector<UInt_t> &GetHisto() { |
42 |
return _histogram; |
43 |
} |
44 |
|
45 |
private: |
46 |
|
47 |
std::vector<float> _binning; |
48 |
vector<UInt_t> _histogram; |
49 |
|
50 |
}; |
51 |
|
52 |
#endif /* TRKRIGHISTOACTION_H_ */ |