| 11 |
|
|
| 12 |
#include "../Histo1DAction/Histo1DAction.h" |
#include "../Histo1DAction/Histo1DAction.h" |
| 13 |
|
|
| 14 |
/*! @brief An action that, given the rigidity bins, fills the histogram with the number of events for which |
/*! @brief An action that, given the rigidity bins, fills an integral histogram with the number of events for which |
| 15 |
* the deflection error (sigma_defl) is smaller than minimum bin deflection=1/(maximum bin rigidity). |
* the deflection error (sigma_defl) times a constant is smaller than minimum bin deflection=1/(maximum bin rigidity). |
| 16 |
* |
* |
| 17 |
* For each event, the content of ALL the rigidity bins, which satisfy the above condition, is increased by 1. |
* For each event, the content of ALL the rigidity bins, which satisfy the above condition, is increased by 1. |
| 18 |
* Since this is quite different from what is done by Histo1DAction::Fill(), the OnGodd() implementation |
* Since this is quite different from what is done by Histo1DAction::Fill(), the OnGodd() implementation |
| 19 |
* is customary and doesn't call Fill(). Notice that this implies that no overflow nor underflow counter is |
* is customary and doesn't call Fill(). Notice that this implies that no overflow nor underflow counter is |
| 20 |
* maintained (in current implementation). |
* maintained (in current implementation). |
| 21 |
*/ |
*/ |
| 22 |
class TrkSigmaDeflHistoAction: public Histo1DAction<Int_t> { |
class TrkSigmaDeflHistoAction: public Histo1DAction<Float_t> { |
| 23 |
|
|
| 24 |
public: |
public: |
| 25 |
|
|
| 26 |
/*! @brief Constructor. |
/*! @brief Constructor. |
|
* |
|
|
* Binning is read from a text file. |
|
| 27 |
* |
* |
| 28 |
* @param actionName The action's name. |
* @param actionName The action's name. |
|
* @param rigBinsFile The file containing the bins (with sign, eventually; from lowest to highest). |
|
| 29 |
* @param outFileBase The file base name for the ROOT histogram output (".root" will be appended). |
* @param outFileBase The file base name for the ROOT histogram output (".root" will be appended). |
| 30 |
* If "", no ROOT output will be produced. |
* If "", no ROOT output will be produced. |
| 31 |
* @param mode The mode of ROOT file creation (see documentation of TFile constructor |
* @param mode The mode of ROOT file creation (see documentation of TFile constructor). |
| 32 |
* in ROOT's reference guide). |
* @param sigmaDeflFactor The factor to multiply sigma_deflection by before comparing it to the deflection. |
| 33 |
* @param outRoot If true, the output file in ROOT format will be produced. |
* @param outRoot If true, the output file in ROOT format will be produced. |
| 34 |
* @param outText If true, the output file in text format will be produced. |
* @param outText If true, the output file in text format will be produced. |
| 35 |
|
* in ROOT's reference guide). |
| 36 |
* @param title The ROOT histogram title. |
* @param title The ROOT histogram title. |
| 37 |
*/ |
*/ |
| 38 |
TrkSigmaDeflHistoAction(const char *actionName, TString outFileBase = "", TString mode = "UPDATE", |
TrkSigmaDeflHistoAction(const char *actionName, TString outFileBase = "", TString mode = "UPDATE", |
| 39 |
bool outRoot = true, bool outText = true, TString title = "Sigma(deflection)"); |
float sigmaDeflFactor = 1., bool outRoot = true, bool outText = true, TString title = "Sigma(deflection)"); |
|
|
|
| 40 |
|
|
| 41 |
/*! @brief Destructor */ |
/*! @brief Destructor */ |
| 42 |
~TrkSigmaDeflHistoAction() { |
~TrkSigmaDeflHistoAction() { |
| 47 |
* @param event The selected event. |
* @param event The selected event. |
| 48 |
*/ |
*/ |
| 49 |
void OnGood(PamLevel2 *event); |
void OnGood(PamLevel2 *event); |
| 50 |
|
|
| 51 |
|
private: |
| 52 |
|
float _sigmaDeflFactor; |
| 53 |
}; |
}; |
| 54 |
|
|
| 55 |
#endif /* TrkSigmaDeflHISTOACTION_H_ */ |
#endif /* TrkSigmaDeflHISTOACTION_H_ */ |