| 1 |
|
| 2 |
|
| 3 |
/** |
| 4 |
* \file CaloNuclei.h |
| 5 |
* \author Emiliano Mocchiutti |
| 6 |
*/ |
| 7 |
#ifndef calonuclei_h |
| 8 |
#define calonuclei_h |
| 9 |
|
| 10 |
#include <PamLevel2.h> |
| 11 |
|
| 12 |
#include <TTree.h> |
| 13 |
#include <TFriendElement.h> |
| 14 |
#include <TChain.h> |
| 15 |
#include <TFile.h> |
| 16 |
#include <TList.h> |
| 17 |
#include <TKey.h> |
| 18 |
#include <TSystemFile.h> |
| 19 |
#include <TSystemDirectory.h> |
| 20 |
#include <TSQLServer.h> |
| 21 |
|
| 22 |
#include <iostream> |
| 23 |
|
| 24 |
using namespace std; |
| 25 |
|
| 26 |
/** |
| 27 |
* |
| 28 |
* Class to store and calculate variables useful for nuclei analysis |
| 29 |
*/ |
| 30 |
class CaloNuclei : public TObject { |
| 31 |
|
| 32 |
private: |
| 33 |
// |
| 34 |
PamLevel2 *L2; |
| 35 |
Bool_t debug; |
| 36 |
Bool_t usetrack; |
| 37 |
// |
| 38 |
// needed to avoid reprocessing the same event over and over to obtain the variables |
| 39 |
// |
| 40 |
UInt_t OBT; |
| 41 |
UInt_t PKT; |
| 42 |
UInt_t atime; |
| 43 |
Int_t tr; |
| 44 |
Int_t sntr; |
| 45 |
// |
| 46 |
Int_t interplane; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) |
| 47 |
Int_t N; ///< Number of dE/dx measurements to be used to calculate qpremeanN, default N = 5 |
| 48 |
Int_t R; ///< Number of strip to be used around the trajectory to calculate qpremeanN, default R = 3 |
| 49 |
Float_t preq; ///< Energy release (MIP) up to the interaction plane (included) |
| 50 |
Float_t postq; ///< Energy release (MIP) from the interaction plane (excluded) up to the last plane |
| 51 |
Float_t stdedx1; ///< Energy release (MIP) on the first Silicon detector (Y EVEN) around the strip with maximum energy release (no track information). |
| 52 |
Float_t dedx1; ///< Energy release (MIP) along the track on the first Silicon detector (Y EVEN). |
| 53 |
Float_t dedx3; ///< Energy release (MIP) along the track on the first three Silicon detectors (Y EVEN, X EVEN, Y ODD). |
| 54 |
Float_t qpremean; ///< Truncated mean (MIP) along the track up to the interaction plane preq using three points |
| 55 |
Float_t qpremeanN; ///< Truncated mean (MIP) along the track up to the interaction plane preq using N points |
| 56 |
Float_t ethr; ///< Threshold (MIP) needed to find the interaction plane |
| 57 |
Bool_t multhit; ///< True if the interaction plane has been determined by multiple hit counting |
| 58 |
Bool_t gap; ///< True if determining the interaction plane a big (>5 planes) gap has been found between a point and another along the track |
| 59 |
// |
| 60 |
|
| 61 |
public: |
| 62 |
// |
| 63 |
// |
| 64 |
Int_t Get_interplane(){ Process(); return interplane;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) |
| 65 |
Int_t Get_N(){ return N;}; ///< Number of available dE/dx measurements before interaction or exit from the calo (interaction plane) |
| 66 |
Int_t Get_R(){ return R;}; ///< Number of strip to be used around the trajectory to calculate qpremeanN, default R = 3 |
| 67 |
Float_t Get_preq(){ Process(); return preq;}; ///< Energy release (MIP) up to the interaction plane (included) |
| 68 |
Float_t Get_postq(){ Process(); return postq;}; ///< Energy release (MIP) from the interaction plane (excluded) up to the last plane |
| 69 |
Float_t Get_StdEdx1(){ Process(); return stdedx1;}; ///< Energy release (MIP) on the first Silicon detector (Y EVEN) around the strip with maximum energy release (no track information, 3 strips in total). |
| 70 |
Float_t Get_dEdx1(){ Process(); return dedx1;}; ///< Energy release (MIP) along the track on the first Silicon detector (Y EVEN). |
| 71 |
Float_t Get_dEdx3(){ Process(); return dedx3;}; ///< Energy release (MIP) along the track on the first three Silicon detectors (Y EVEN, X EVEN, Y ODD). |
| 72 |
Float_t Get_qpremean(){ Process(); return qpremean;}; ///< Truncated mean (MIP) along the track up to the interaction plane preq using three points |
| 73 |
Float_t Get_qpremeanN(){ Process(); return qpremeanN;}; ///< Truncated mean (MIP) along the track up to the interaction plane preq using N points |
| 74 |
Float_t Get_ethr(){ Process(); return ethr;}; ///< Threshold (MIP) needed to find the interaction plane |
| 75 |
Bool_t IsMulthit(){ Process(); return multhit;}; ///< True if the interaction plane has been determined by multiple hit counting |
| 76 |
// |
| 77 |
void Set_N(Int_t n){ N=n;}; |
| 78 |
void Set_R(Int_t r){ R=r;}; |
| 79 |
// |
| 80 |
CaloNuclei(); |
| 81 |
CaloNuclei(PamLevel2 *L2); |
| 82 |
~CaloNuclei(){ Delete(); }; |
| 83 |
// |
| 84 |
void SetDebug(Bool_t d){ debug=d; }; |
| 85 |
void UseTrack(Bool_t d){ usetrack=d; }; |
| 86 |
// |
| 87 |
void Clear(); |
| 88 |
void Clear(Option_t *option){Clear();}; |
| 89 |
void Delete(); |
| 90 |
// |
| 91 |
void Process(); ///< Process data for track number 0 |
| 92 |
void Process(Int_t ntr); ///< Process data for track number ntr |
| 93 |
void Print(); |
| 94 |
// |
| 95 |
ClassDef(CaloNuclei,2); |
| 96 |
}; |
| 97 |
|
| 98 |
#endif |
| 99 |
|