| 1 |
pam-fi |
1.1 |
/* |
| 2 |
|
|
* ChargeHistosAction.h |
| 3 |
|
|
* |
| 4 |
|
|
* Created on: 17-mag-2009 |
| 5 |
|
|
* Author: Nicola Mori |
| 6 |
|
|
*/ |
| 7 |
|
|
|
| 8 |
|
|
/*! @file ChargeHistosAction.h The ChargeHistosAction class declaration file */ |
| 9 |
|
|
|
| 10 |
|
|
#ifndef CHARGEHISTOSACTION_H_ |
| 11 |
|
|
#define CHARGEHISTOSACTION_H_ |
| 12 |
|
|
|
| 13 |
|
|
#include "TH1.h" |
| 14 |
|
|
#include "TH2.h" |
| 15 |
|
|
|
| 16 |
|
|
#ifndef NO_TOFNUCLEI |
| 17 |
|
|
#include <ToFNuclei.h> |
| 18 |
|
|
#endif |
| 19 |
|
|
|
| 20 |
|
|
#ifndef NO_CALONUCLEI |
| 21 |
|
|
#include <CaloNuclei.h> |
| 22 |
|
|
#endif |
| 23 |
|
|
|
| 24 |
|
|
#ifndef NO_TRKNUCLEI |
| 25 |
|
|
#include <TrkNuclei.h> |
| 26 |
|
|
#endif |
| 27 |
|
|
|
| 28 |
|
|
#include "../CollectionAction/CollectionAction.h" |
| 29 |
|
|
|
| 30 |
|
|
/*! @brief An action that fills some charge histograms. |
| 31 |
|
|
* |
| 32 |
|
|
* This class uses ToFNuclei, TrkNuclei and CaloNuclei to compute the charge |
| 33 |
|
|
* of the particle and fills various histograms. Note that if the Nuclei routines |
| 34 |
|
|
* are not available in the environment it is possible to exclude the corresponding |
| 35 |
|
|
* code by passing the appropriate flags to the compiler (see the EXCLUDEFLAGS |
| 36 |
|
|
* variable in the PamCut's makefile). |
| 37 |
|
|
* Currently, filled histograms are: |
| 38 |
|
|
* - charge from TrkNuclei (Siegen method); |
| 39 |
|
|
* - charge from CaloNuclei (first plane dE/dx Vs. beta); |
| 40 |
|
|
* - charge from each ToF layer (dE/dx Vs. beta); |
| 41 |
|
|
* - charge correlation for each pair of ToF layers. |
| 42 |
|
|
*/ |
| 43 |
|
|
class ChargeHistosAction: public CollectionAction { |
| 44 |
|
|
|
| 45 |
|
|
public: |
| 46 |
|
|
/*! @brief Constructor. |
| 47 |
|
|
* |
| 48 |
|
|
* @param actionName The action's name. |
| 49 |
|
|
* @param outFileName The output ROOT file name. |
| 50 |
|
|
*/ |
| 51 |
|
|
ChargeHistosAction(const char *actionName, TString outFileName); |
| 52 |
|
|
|
| 53 |
|
|
/*! @brief Destructor. */ |
| 54 |
|
|
~ChargeHistosAction(); |
| 55 |
|
|
|
| 56 |
|
|
/*! @brief The histogram filling method. |
| 57 |
|
|
* |
| 58 |
|
|
* This routine fills the charge histograms for the selected event. |
| 59 |
|
|
* @param event The selected event. |
| 60 |
|
|
*/ |
| 61 |
|
|
void OnGood(PamLevel2 *event); |
| 62 |
|
|
|
| 63 |
|
|
/*! @brief Saves the histograms and closes the file. */ |
| 64 |
|
|
void Finalize(); |
| 65 |
|
|
|
| 66 |
|
|
private: |
| 67 |
|
|
|
| 68 |
|
|
#ifndef NO_TOFNUCLEI |
| 69 |
|
|
ToFNuclei *_tofNuclei; |
| 70 |
|
|
|
| 71 |
|
|
TH1F _chargeS11; |
| 72 |
|
|
TH1F _chargeS12; |
| 73 |
|
|
TH1F _chargeS21; |
| 74 |
|
|
TH1F _chargeS22; |
| 75 |
|
|
TH1F _chargeS31; |
| 76 |
|
|
TH1F _chargeS32; |
| 77 |
|
|
|
| 78 |
|
|
TH2F _chCorrS11S12; |
| 79 |
|
|
TH2F _chCorrS11S21; |
| 80 |
|
|
TH2F _chCorrS11S22; |
| 81 |
|
|
TH2F _chCorrS11S31; |
| 82 |
|
|
TH2F _chCorrS11S32; |
| 83 |
|
|
TH2F _chCorrS12S21; |
| 84 |
|
|
TH2F _chCorrS12S22; |
| 85 |
|
|
TH2F _chCorrS12S31; |
| 86 |
|
|
TH2F _chCorrS12S32; |
| 87 |
|
|
TH2F _chCorrS21S22; |
| 88 |
|
|
TH2F _chCorrS21S31; |
| 89 |
|
|
TH2F _chCorrS21S32; |
| 90 |
|
|
TH2F _chCorrS22S31; |
| 91 |
|
|
TH2F _chCorrS22S32; |
| 92 |
|
|
TH2F _chCorrS31S32; |
| 93 |
|
|
#endif |
| 94 |
|
|
|
| 95 |
|
|
#ifndef NO_CALONUCLEI |
| 96 |
|
|
CaloNuclei *_caloNuclei; |
| 97 |
|
|
TH1F _chargeCalo; |
| 98 |
|
|
#endif |
| 99 |
|
|
|
| 100 |
|
|
#ifndef NO_TRKNUCLEI |
| 101 |
|
|
TrkNuclei *_trkNuclei; |
| 102 |
|
|
TH1F _chargeTrk; |
| 103 |
|
|
#endif |
| 104 |
|
|
|
| 105 |
|
|
TString _outFileName; |
| 106 |
|
|
|
| 107 |
|
|
}; |
| 108 |
|
|
|
| 109 |
|
|
#endif /* CHARGEHISTOSACTION_H_ */ |