24 |
#include <TCanvas.h> |
#include <TCanvas.h> |
25 |
#include <TStyle.h> |
#include <TStyle.h> |
26 |
#include <TH1F.h> |
#include <TH1F.h> |
27 |
|
#include <TF1.h> |
28 |
|
#include <TGraph.h> |
29 |
|
#include <TDecompSVD.h> |
30 |
// |
// |
31 |
|
|
32 |
#include <PamLevel2.h> |
#include <PamLevel2.h> |
43 |
// |
// |
44 |
PamLevel2 *L2; |
PamLevel2 *L2; |
45 |
Bool_t debug; |
Bool_t debug; |
46 |
TFile *file; |
TFile *lfile; |
47 |
|
TFile *ffile; |
48 |
Int_t nbin; |
Int_t nbin; |
49 |
TArrayF *brig; |
TArrayF *brig; |
50 |
TArrayF *brigm; |
TArrayF *brigm; |
51 |
TArrayF *qplmean[17]; |
TArrayF *qplmean[17]; |
52 |
TMatrixD *hmat[17]; |
TMatrixD *hmat[17]; |
53 |
TMatrixF *hfmat[17]; |
TMatrixD *hfmat[17]; |
54 |
TMatrixD *fqplmean[17]; |
TMatrixD *fqplmean[17]; |
55 |
Int_t N; |
Int_t N; |
56 |
Int_t NC; |
Int_t NC; |
67 |
Bool_t cont; |
Bool_t cont; |
68 |
Bool_t crig; |
Bool_t crig; |
69 |
// |
// |
70 |
|
Bool_t usepl18x; |
71 |
|
// |
72 |
Int_t mask18b; |
Int_t mask18b; |
73 |
Bool_t dofull; |
Bool_t dofull; |
74 |
Bool_t dolong; |
Bool_t dolong; |
75 |
Int_t degfre; |
Int_t degfre; |
76 |
|
Int_t fdegfre; |
77 |
// |
// |
78 |
Float_t longtzeta; ///< longitudinal covariance parameter used for event selection |
Float_t longtzeta; ///< longitudinal covariance parameter used for event selection |
79 |
Float_t fulltzeta; ///< full calorimeter covariance parameter used for event selection |
Float_t fulltzeta; ///< full calorimeter covariance parameter used for event selection |
80 |
// |
// |
81 |
|
Float_t negfulltzeta; |
82 |
|
Float_t posfulltzeta; |
83 |
|
Float_t minsvalue; |
84 |
|
Float_t maxsvalue; |
85 |
|
Float_t aveposvar; |
86 |
|
Float_t avenegvar; |
87 |
|
Int_t numneg; |
88 |
|
Int_t numpos; |
89 |
|
// |
90 |
|
|
91 |
public: |
public: |
92 |
// |
// |
100 |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
Float_t GetNormLongTZeta(); ///< Returns longitudinal covariance parameter used for event selection |
101 |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
Float_t GetNormFullTZeta(); ///< Returns full calorimeter covariance parameter used for event selection |
102 |
// |
// |
103 |
|
|
104 |
|
Float_t GetFullPositive(){Process(); return posfulltzeta;}; |
105 |
|
Float_t GetFullNegative(){Process(); return negfulltzeta;}; |
106 |
|
Int_t GetFullNumPositive(){Process(); return numpos;}; |
107 |
|
Int_t GetFullNumNegative(){Process(); return numneg;}; |
108 |
|
Float_t GetFullMaxVar(){Process(); return maxsvalue;}; |
109 |
|
Float_t GetFullMinVar(){Process(); return minsvalue;}; |
110 |
|
Float_t GetFullAveragePosVar(){Process(); return aveposvar;}; |
111 |
|
Float_t GetFullAverageNegVar(){Process(); return avenegvar;}; |
112 |
|
|
113 |
|
// |
114 |
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); |
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); |
115 |
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
void Contamination(){sel = false; cont = true;}; ///< Set contamination mode: planes from N to 22 are used. |
116 |
Int_t GetDegreeOfFreedom(){return degfre;}; |
Int_t GetDegreeOfFreedom(){return degfre;}; |
117 |
|
Int_t GetLongDegreeOfFreedom(){return degfre;}; |
118 |
|
Int_t GetFullDegreeOfFreedom(){return fdegfre;}; |
119 |
// |
// |
120 |
TArrayF *LoadLongAverage(Float_t rig); |
TArrayF *LoadLongAverage(Float_t rig); |
121 |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
TMatrixD *LoadCovarianceMatrix(Float_t rig); |
127 |
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig); |
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig); |
128 |
Float_t GetFullAverageAt(Int_t plane, Int_t strip, Float_t rig, Int_t rigbin); |
Float_t GetFullAverageAt(Int_t plane, Int_t strip, Float_t rig, Int_t rigbin); |
129 |
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig, Int_t rigbin); |
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig, Int_t rigbin); |
130 |
|
Float_t GetFullHmatrixAt(Int_t i, Int_t j, Float_t rig, Int_t rigbin, Int_t mtherig); |
131 |
// |
// |
132 |
Bool_t Open(TString matrixfile); |
Bool_t Open(TString matrixfile); |
133 |
|
Bool_t Open(TString longmatrixfile,TString fullmatrixfile); |
134 |
Bool_t LoadBin(); |
Bool_t LoadBin(); |
135 |
|
Bool_t LoadBin(Bool_t full); |
136 |
Bool_t LoadLong(); |
Bool_t LoadLong(); |
137 |
Bool_t LoadFull(); |
Bool_t LoadFull(); |
138 |
Bool_t LoadMatrices(); |
Bool_t LoadMatrices(); |
139 |
Bool_t LoadFullMatrices(); |
Bool_t LoadFullMatrices(); |
140 |
TFile *GetFile(){return file;}; |
TFile *GetFile(){return lfile;}; |
141 |
|
TFile *GetLongFile(){return lfile;}; |
142 |
|
TFile *GetFullFile(){return ffile;}; |
143 |
// |
// |
144 |
TMatrixD *LoadFullAverage(Int_t rigbin); |
TMatrixD *LoadFullAverage(Int_t rigbin); |
145 |
TMatrixD *LoadFullNAverage(Int_t rigbin); |
TMatrixD *LoadFullNAverage(Int_t rigbin); |
146 |
void UnLoadFullAverage(Int_t rigbin); |
void UnLoadFullAverage(Int_t rigbin); |
147 |
void UnLoadFullNAverage(Int_t rigbin); |
void UnLoadFullNAverage(Int_t rigbin); |
148 |
TMatrixF *LoadFullMatrix(Int_t rigbin); |
TMatrixF *LoadFullMatrix(Int_t rigbin); |
149 |
void LoadFullMatrix(Int_t rigbin, TMatrixF *&fmatri); |
// void LoadFullMatrix(Int_t rigbin, TMatrixF *&fmatri); |
150 |
|
void LoadFullMatrix(Int_t rigbin, TMatrixF *fmatri); |
151 |
TMatrixF *LoadFullNMatrix(Int_t rigbin); |
TMatrixF *LoadFullNMatrix(Int_t rigbin); |
152 |
void UnLoadFullMatrix(Int_t rigbin); |
void UnLoadFullMatrix(Int_t rigbin); |
153 |
void UnLoadFullNMatrix(Int_t rigbin); |
void UnLoadFullNMatrix(Int_t rigbin); |
154 |
// |
// |
155 |
|
Int_t ConvertStrip(Int_t mstrip); |
156 |
|
// |
157 |
Bool_t CreateMatrixFile(TString matrixfile); |
Bool_t CreateMatrixFile(TString matrixfile); |
158 |
Bool_t UpdateMatrixFile(TString matrixfile); |
Bool_t UpdateMatrixFile(TString matrixfile); |
159 |
void WriteNumBin(Int_t numbin); |
void WriteNumBin(Int_t numbin); |
160 |
void WriteRigBin(TArrayF *rigbin); |
void WriteRigBin(TArrayF *rigbin); |
161 |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
void WriteLongMean(TArrayF *qpl, Int_t bin); |
162 |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
void WriteLongMatrix(TMatrixD *matrix, Int_t bin); |
163 |
void WriteFullMatrix(TMatrixF *matrix, Int_t bin); |
void WriteFullMatrix(TMatrixD *matrix, Int_t bin); |
164 |
void WriteFullNMatrix(TMatrixF *matrix, Int_t bin); |
void WriteFullNMatrix(TMatrixF *matrix, Int_t bin); |
165 |
void WriteFullMean(TMatrixD *matrix, Int_t bin); |
void WriteFullMean(TMatrixD *matrix, Int_t bin); |
166 |
void WriteFullNMean(TMatrixD *matrix, Int_t bin); |
void WriteFullNMean(TMatrixD *matrix, Int_t bin); |
167 |
void WriteInvertedLongMatrix(TMatrixD matrix, Int_t bin); |
void WriteInvertedLongMatrix(TMatrixD matrix, Int_t bin); |
168 |
void WriteInvertedFullMatrix(TMatrixF matrix, Int_t bin); |
void WriteInvertedFullMatrix(TMatrixD matrix, Int_t bin); |
169 |
void CloseMatrixFile(); |
void CloseMatrixFile(); |
170 |
// |
// |
171 |
void CalculateLongTZeta(){ dofull = false; dolong=true; }; |
void CalculateLongTZeta(){ dolong=true; }; |
172 |
void CalculateFullTZeta(){ dolong = false; dofull=true; }; |
void CalculateFullTZeta(){ dofull=true; }; |
173 |
|
void CalculateLongTZeta(Bool_t bo){ dolong=bo; }; |
174 |
|
void CalculateFullTZeta(Bool_t bo){ dofull=bo; }; |
175 |
void SetDebug(Bool_t d){ debug=d; }; |
void SetDebug(Bool_t d){ debug=d; }; |
176 |
void SetNoWpreSampler(Int_t n); |
void SetNoWpreSampler(Int_t n); |
177 |
void SetNoWcalo(Int_t n); |
void SetNoWcalo(Int_t n); |
178 |
|
void SplitInto(Int_t NoWpreSampler, Int_t NoWcalo); |
179 |
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
Int_t GetNoWpreSampler(){return N;}; ///< Get the number of W planes used as presampler. |
180 |
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
Int_t GetNoWcalo(){return NC;}; ///< Get the number of W planes used as calorimeter. |
181 |
void DrawLongAverage(Float_t rig); |
void DrawLongAverage(Float_t rig); |
182 |
void DrawLongAverage(Int_t bin); |
void DrawLongAverage(Int_t bin); |
183 |
void UseCaloRig(){crig=true;}; |
void UseCaloRig(){crig=true;}; |
184 |
// |
// |
185 |
|
void UsePlane18X(Bool_t use){usepl18x = use;}; |
186 |
|
// |
187 |
|
// |
188 |
void Clear(); |
void Clear(); |
189 |
void Clear(Option_t *option){Clear();}; |
void Clear(Option_t *option){Clear();}; |
190 |
void Delete(); |
void Delete(); |
195 |
void Print(); |
void Print(); |
196 |
void Print(Option_t *option){Print();}; |
void Print(Option_t *option){Print();}; |
197 |
// |
// |
198 |
ClassDef(CaloFranzini,1); |
ClassDef(CaloFranzini,2); |
199 |
}; |
}; |
200 |
|
|
201 |
#endif |
#endif |