5 |
#ifndef calofranzini_h |
#ifndef calofranzini_h |
6 |
#define calofranzini_h |
#define calofranzini_h |
7 |
|
|
8 |
#include <PamLevel2.h> |
#include <iostream> |
9 |
|
|
10 |
#include <TTree.h> |
#include <TTree.h> |
11 |
#include <TFriendElement.h> |
#include <TFriendElement.h> |
19 |
#include <TMatrixD.h> |
#include <TMatrixD.h> |
20 |
#include <TArrayI.h> |
#include <TArrayI.h> |
21 |
#include <TArrayF.h> |
#include <TArrayF.h> |
22 |
|
#include <TStyle.h> |
23 |
|
#include <TCanvas.h> |
24 |
|
#include <TStyle.h> |
25 |
|
#include <TH1F.h> |
26 |
|
// |
27 |
|
|
28 |
#include <iostream> |
#include <PamLevel2.h> |
29 |
|
|
30 |
using namespace std; |
using namespace std; |
31 |
|
|
42 |
TFile *file; |
TFile *file; |
43 |
Int_t nbin; |
Int_t nbin; |
44 |
TArrayF *brig; |
TArrayF *brig; |
45 |
|
TArrayF *brigm; |
46 |
|
TArrayF *qplmean[17]; |
47 |
|
TMatrixD *hmat[17]; |
48 |
|
Int_t N; |
49 |
|
Int_t NC; |
50 |
// |
// |
51 |
// needed to avoid reprocessing the same event over and over to obtain the variables; |
// needed to avoid reprocessing the same event over and over to obtain the variables; |
52 |
// |
// |
55 |
UInt_t atime; |
UInt_t atime; |
56 |
Int_t sntr; |
Int_t sntr; |
57 |
Float_t estrip[2][22][96]; |
Float_t estrip[2][22][96]; |
58 |
Float_t qplane[44]; |
Float_t qplane[43]; |
59 |
|
Bool_t sel; |
60 |
|
Bool_t cont; |
61 |
// |
// |
62 |
|
Int_t mask18b; |
63 |
Bool_t dofull; |
Bool_t dofull; |
64 |
Bool_t dolong; |
Bool_t dolong; |
65 |
Int_t degfre; |
Int_t degfre; |
80 |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
81 |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
82 |
// |
// |
83 |
|
void Selection(){sel = true; cont = false;}; ///< Set selection mode: planes from 1 to 22-N are used, plane 18 - N is masked if "emulate18" variable is true (DEFAULT); |
84 |
|
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
85 |
|
Int_t GetDegreeOfFreedom(){return degfre;}; |
86 |
|
// |
87 |
TArrayF *LoadLongAverage(Float_t rig); |
TArrayF *LoadLongAverage(Float_t rig); |
88 |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
89 |
// |
// |
90 |
|
Float_t GetAverageAt(Int_t plane, Float_t rig); |
91 |
|
Float_t GetHmatrixAt(Int_t i, Int_t j, Float_t rig); |
92 |
|
// |
93 |
Bool_t Open(TString matrixfile); |
Bool_t Open(TString matrixfile); |
94 |
|
Bool_t LoadBin(); |
95 |
|
Bool_t LoadMatrices(); |
96 |
|
TFile *GetFile(){return file;}; |
97 |
// |
// |
98 |
Bool_t CreateMatrixFile(TString matrixfile); |
Bool_t CreateMatrixFile(TString matrixfile); |
99 |
|
Bool_t UpdateMatrixFile(TString matrixfile); |
100 |
void WriteNumBin(Int_t numbin); |
void WriteNumBin(Int_t numbin); |
101 |
void WriteRigBin(TArrayF *rigbin); |
void WriteRigBin(TArrayF *rigbin); |
102 |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
103 |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
104 |
|
void WriteInvertedLongMatrix(TMatrixD matrix, Int_t bin); |
105 |
void CloseMatrixFile(); |
void CloseMatrixFile(); |
106 |
// |
// |
107 |
void CalculateLongTZeta(){ dofull = false; dolong=true; }; |
void CalculateLongTZeta(){ dofull = false; dolong=true; }; |
108 |
void CalculateFullTZeta(){ dolong = false; dofull=true; }; |
void CalculateFullTZeta(){ dolong = false; dofull=true; }; |
109 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
110 |
|
void SetNoWpreSampler(Int_t n); |
111 |
|
void SetNoWcalo(Int_t n); |
112 |
|
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
113 |
|
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
114 |
|
void DrawLongAverage(Float_t rig); |
115 |
// |
// |
116 |
void Clear(); |
void Clear(); |
117 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |