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> |
17 |
#include <TSystemDirectory.h> |
#include <TSystemDirectory.h> |
18 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
19 |
#include <TMatrixD.h> |
#include <TMatrixD.h> |
20 |
|
#include <TMatrixF.h> |
21 |
#include <TArrayI.h> |
#include <TArrayI.h> |
22 |
#include <TArrayF.h> |
#include <TArrayF.h> |
23 |
|
#include <TStyle.h> |
24 |
|
#include <TCanvas.h> |
25 |
|
#include <TStyle.h> |
26 |
|
#include <TH1F.h> |
27 |
|
// |
28 |
|
|
29 |
#include <iostream> |
#include <PamLevel2.h> |
30 |
|
|
31 |
using namespace std; |
using namespace std; |
32 |
|
|
43 |
TFile *file; |
TFile *file; |
44 |
Int_t nbin; |
Int_t nbin; |
45 |
TArrayF *brig; |
TArrayF *brig; |
46 |
|
TArrayF *brigm; |
47 |
|
TArrayF *qplmean[17]; |
48 |
|
TMatrixD *hmat[17]; |
49 |
|
TMatrixF *hfmat[17]; |
50 |
|
TMatrixD *fqplmean[17]; |
51 |
|
Int_t N; |
52 |
|
Int_t NC; |
53 |
// |
// |
54 |
// 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; |
55 |
// |
// |
58 |
UInt_t atime; |
UInt_t atime; |
59 |
Int_t sntr; |
Int_t sntr; |
60 |
Float_t estrip[2][22][96]; |
Float_t estrip[2][22][96]; |
61 |
Float_t qplane[44]; |
Float_t qplane[43]; |
62 |
|
Bool_t sel; |
63 |
|
Bool_t cont; |
64 |
|
Bool_t crig; |
65 |
// |
// |
66 |
|
Int_t mask18b; |
67 |
Bool_t dofull; |
Bool_t dofull; |
68 |
Bool_t dolong; |
Bool_t dolong; |
69 |
Int_t degfre; |
Int_t degfre; |
84 |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
85 |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
86 |
// |
// |
87 |
|
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); |
88 |
|
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
89 |
|
Int_t GetDegreeOfFreedom(){return degfre;}; |
90 |
|
// |
91 |
TArrayF *LoadLongAverage(Float_t rig); |
TArrayF *LoadLongAverage(Float_t rig); |
92 |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
93 |
// |
// |
94 |
|
Float_t GetAverageAt(Int_t plane, Float_t rig); |
95 |
|
Float_t GetHmatrixAt(Int_t i, Int_t j, Float_t rig); |
96 |
|
// |
97 |
|
Float_t GetFullAverageAt(Int_t plane, Int_t strip, Float_t rig); |
98 |
|
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig); |
99 |
|
// |
100 |
Bool_t Open(TString matrixfile); |
Bool_t Open(TString matrixfile); |
101 |
|
Bool_t LoadBin(); |
102 |
|
Bool_t LoadLong(); |
103 |
|
Bool_t LoadFull(); |
104 |
|
Bool_t LoadMatrices(); |
105 |
|
Bool_t LoadFullMatrices(); |
106 |
|
TFile *GetFile(){return file;}; |
107 |
// |
// |
108 |
Bool_t CreateMatrixFile(TString matrixfile); |
Bool_t CreateMatrixFile(TString matrixfile); |
109 |
|
Bool_t UpdateMatrixFile(TString matrixfile); |
110 |
void WriteNumBin(Int_t numbin); |
void WriteNumBin(Int_t numbin); |
111 |
void WriteRigBin(TArrayF *rigbin); |
void WriteRigBin(TArrayF *rigbin); |
112 |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
113 |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
114 |
|
void WriteFullMatrix(TMatrixF *matrix, Int_t bin); |
115 |
|
void WriteFullMean(TMatrixD *matrix, Int_t bin); |
116 |
|
void WriteInvertedLongMatrix(TMatrixD matrix, Int_t bin); |
117 |
|
void WriteInvertedFullMatrix(TMatrixF matrix, Int_t bin); |
118 |
void CloseMatrixFile(); |
void CloseMatrixFile(); |
119 |
// |
// |
120 |
void CalculateLongTZeta(){ dofull = false; dolong=true; }; |
void CalculateLongTZeta(){ dofull = false; dolong=true; }; |
121 |
void CalculateFullTZeta(){ dolong = false; dofull=true; }; |
void CalculateFullTZeta(){ dolong = false; dofull=true; }; |
122 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
123 |
|
void SetNoWpreSampler(Int_t n); |
124 |
|
void SetNoWcalo(Int_t n); |
125 |
|
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
126 |
|
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
127 |
|
void DrawLongAverage(Float_t rig); |
128 |
|
void DrawLongAverage(Int_t bin); |
129 |
|
void UseCaloRig(){crig=true;}; |
130 |
// |
// |
131 |
void Clear(); |
void Clear(); |
132 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |