6 |
#include <TH1F.h> |
#include <TH1F.h> |
7 |
#include <TH2F.h> |
#include <TH2F.h> |
8 |
#include <TMatrixD.h> |
#include <TMatrixD.h> |
9 |
|
#include <TMatrixF.h> |
10 |
#include <TArrayF.h> |
#include <TArrayF.h> |
11 |
#include <TArrayI.h> |
#include <TArrayI.h> |
12 |
// |
// |
16 |
using namespace std; |
using namespace std; |
17 |
// |
// |
18 |
extern Bool_t MATRIX; |
extern Bool_t MATRIX; |
19 |
|
extern Bool_t FULL; |
20 |
|
extern Bool_t SIMU; |
21 |
|
extern Bool_t CRIG; |
22 |
|
extern Bool_t SRIG; |
23 |
CaloFranzini *cf; |
CaloFranzini *cf; |
24 |
Int_t nbin; |
Int_t nbin; |
25 |
Float_t rig[18]; |
Float_t rig[18]; |
26 |
Float_t rmean[17]; |
Float_t rmean[17]; |
27 |
|
Int_t ntot[17]; |
28 |
|
Int_t MDIM = 8213; |
29 |
|
//Int_t MDIM = 4128; |
30 |
//Float_t qqplane[17][43]; |
//Float_t qqplane[17][43]; |
31 |
//Int_t nnqplane[17][43]; |
//Int_t nnqplane[17][43]; |
32 |
|
|
35 |
TMatrixD *matrix[17]; |
TMatrixD *matrix[17]; |
36 |
TMatrixD *nmat[17]; |
TMatrixD *nmat[17]; |
37 |
|
|
38 |
|
TMatrixD *fqplane; |
39 |
|
TMatrixD *fnqplane; |
40 |
|
//TMatrixD *fqplane[17]; |
41 |
|
//TMatrixD *fnqplane[17]; |
42 |
|
//TMatrixF *fmatrix[17]; |
43 |
|
//TMatrixF *fnmat[17]; |
44 |
|
//TMatrixD *fmatrix; |
45 |
|
//TMatrixD *fnmat; |
46 |
|
TMatrixF *fmatrix; |
47 |
|
//TMatrixF *fnmat; |
48 |
|
TMatrixF *fnmat[17]; |
49 |
|
//Int_t finmat[43][191]; |
50 |
|
|
51 |
//=============================================================================== |
//=============================================================================== |
52 |
bool Select( PamLevel2* event ){ |
bool Select( PamLevel2* event ){ |
53 |
|
|
62 |
// tracker pre-selection |
// tracker pre-selection |
63 |
//------------------------------------------------------------------ |
//------------------------------------------------------------------ |
64 |
TrkTrack *trk = track->GetTrkTrack(); |
TrkTrack *trk = track->GetTrkTrack(); |
65 |
|
float rigidity = trk->GetRigidity(); |
66 |
|
if ( CRIG ) rigidity = event->GetCaloLevel2()->qtot/260.; |
67 |
|
if ( SRIG ) rigidity = event->GetGPamela()->P0; |
68 |
bool TRACK__OK = false; |
bool TRACK__OK = false; |
69 |
if( |
if( |
70 |
trk->chi2 >0 && |
trk->chi2 >0 && |
90 |
!event->GetAcLevel2()->CARDhit() && |
!event->GetAcLevel2()->CARDhit() && |
91 |
!event->GetAcLevel2()->CAThit() && |
!event->GetAcLevel2()->CAThit() && |
92 |
true ) TOF__OK = true; |
true ) TOF__OK = true; |
93 |
if( !TOF__OK )return false; |
if( !TOF__OK && !SIMU)return false; |
94 |
//------------------------------------------------------ |
//------------------------------------------------------ |
95 |
// no albedo |
// no albedo |
96 |
//------------------------------------------------------ |
//------------------------------------------------------ |
97 |
if( track->GetToFTrack()->beta[12]<=0.2 || |
if( !SIMU && (track->GetToFTrack()->beta[12]<=0.2 || |
98 |
track->GetToFTrack()->beta[12] >= 1.5 ) return false; |
track->GetToFTrack()->beta[12] >= 1.5) ) return false; |
99 |
|
|
100 |
//------------------------------------------------------ |
//------------------------------------------------------ |
101 |
bool CUT1 = false; |
bool CUT1 = false; |
102 |
if( |
if( |
103 |
trk->nstep<100 && |
trk->nstep<100 && |
104 |
trk->GetRigidity()<400. && |
rigidity<400. && |
105 |
trk->GetRigidity()>0.1 && |
rigidity>0.1 && |
|
trk->GetDeflection()<0. && |
|
106 |
trk->resx[0]<0.001 && |
trk->resx[0]<0.001 && |
107 |
trk->resx[5]<0.001 && |
trk->resx[5]<0.001 && |
108 |
track->IsSolved() && |
track->IsSolved() && |
110 |
true ) CUT1 = true; |
true ) CUT1 = true; |
111 |
//------------------------------------------------------ |
//------------------------------------------------------ |
112 |
if( !CUT1 )return false; |
if( !CUT1 )return false; |
113 |
|
if ( trk->GetDeflection()>0. && !SIMU ) return false; |
114 |
|
|
115 |
|
// |
116 |
|
// ELENA'S CUT |
117 |
|
// |
118 |
|
// |
119 |
|
// lever-arm 6 |
120 |
|
//==================================================== |
121 |
|
bool LX6=false; |
122 |
|
if( |
123 |
|
track->GetTrkTrack()->GetLeverArmX()==6 && |
124 |
|
!track->GetTrkTrack()->IsBad(0,0) && |
125 |
|
!track->GetTrkTrack()->IsBad(5,0) && |
126 |
|
track->GetTrkTrack()->resx[0]<0.001 && |
127 |
|
track->GetTrkTrack()->resx[5]<0.001 && |
128 |
|
track->GetTrkTrack()->IsInsideCavity() && |
129 |
|
true ) LX6 = true; |
130 |
|
|
131 |
|
//==================================================== |
132 |
|
// lever-arm 5 |
133 |
|
//==================================================== |
134 |
|
bool LX5=false; |
135 |
|
if( |
136 |
|
track->GetTrkTrack()->GetLeverArmX()==5 && |
137 |
|
true ){ |
138 |
|
if( |
139 |
|
track->GetTrkTrack()->XGood(0) && track->GetTrkTrack()->XGood(4) |
140 |
|
){ |
141 |
|
|
142 |
|
if( |
143 |
|
!track->GetTrkTrack()->IsBad(0,0) && |
144 |
|
!track->GetTrkTrack()->IsBad(4,0) && |
145 |
|
track->GetTrkTrack()->resx[0]<0.001 && |
146 |
|
track->GetTrkTrack()->resx[4]<0.001 && |
147 |
|
track->GetTrkTrack()->IsInsideCavity() && |
148 |
|
true) LX5 = true; |
149 |
|
}else if ( |
150 |
|
track->GetTrkTrack()->XGood(1) && track->GetTrkTrack()->XGood(5) |
151 |
|
){ |
152 |
|
|
153 |
|
if( |
154 |
|
!track->GetTrkTrack()->IsBad(1,0) && |
155 |
|
!track->GetTrkTrack()->IsBad(5,0) && |
156 |
|
track->GetTrkTrack()->resx[1]<0.001 && |
157 |
|
track->GetTrkTrack()->resx[5]<0.001 && |
158 |
|
track->GetTrkTrack()->IsInsideCavity() && |
159 |
|
true) LX5 = true; |
160 |
|
} |
161 |
|
} |
162 |
|
if ( !LX5 && !LX6 ) return false; |
163 |
Float_t defl = trk->GetDeflection(); |
Float_t defl = trk->GetDeflection(); |
164 |
float p0 = 1.111588e+00; |
float p0 = 1.111588e+00; |
165 |
float p1 = 1.707656e+00; |
float p1 = 1.707656e+00; |
177 |
track->GetTrkTrack()->chi2 < chi2m && |
track->GetTrkTrack()->chi2 < chi2m && |
178 |
true ) CUT2 = true; |
true ) CUT2 = true; |
179 |
if ( !CUT2 ) return false; |
if ( !CUT2 ) return false; |
180 |
|
float dedxtrk = trk->GetDEDX(); |
181 |
|
// float zcutn = 9. + 20./(rigidity*rigidity); |
182 |
|
float zcut2 = 3. + 4.3/(rigidity*rigidity); |
183 |
|
float zcut1 = 0.52 + 0.455/(rigidity*rigidity); |
184 |
|
Bool_t Z1 = false; |
185 |
|
if(dedxtrk > zcut1 && dedxtrk < zcut2){ |
186 |
|
Z1=true; |
187 |
|
} |
188 |
|
if ( !Z1 && !SIMU ) return false; |
189 |
//------------------------------------------------------ |
//------------------------------------------------------ |
190 |
// |
// |
191 |
// energy momentum match |
// energy momentum match |
197 |
// |
// |
198 |
for (Int_t i=0; i < 22; i++){ |
for (Int_t i=0; i < 22; i++){ |
199 |
if ( track->GetCaloTrack()->tibar[i][1] < 0 || track->GetCaloTrack()->tibar[i][0] < 0 ){ |
if ( track->GetCaloTrack()->tibar[i][1] < 0 || track->GetCaloTrack()->tibar[i][0] < 0 ){ |
200 |
return false; |
return false; |
201 |
|
}; |
202 |
|
}; |
203 |
|
// |
204 |
|
if ( event->GetCaloLevel2()->qtot == 0. ) return false; |
205 |
|
if ( rigidity>5. && track->GetCaloTrack()->qtrack/event->GetCaloLevel2()->qtot < 0.4 ) return false; |
206 |
|
if ( rigidity<1. && track->GetToFTrack()->beta[12] < 0.8 ) return false; |
207 |
|
if ( rigidity>50. ){ |
208 |
|
if ( trk->GetNX()<5 && |
209 |
|
trk->GetNY()<4 ) return false; |
210 |
|
// |
211 |
|
Bool_t sphit = false; |
212 |
|
for ( Int_t plane = 0; plane < 6; plane++){ |
213 |
|
if ( !trk->XGood(plane) ){ |
214 |
|
for (Int_t sing = 0; sing < event->GetTrkLevel2()->nclsx(); sing++){ |
215 |
|
TClonesArray &t = *(event->GetTrkLevel2()->SingletX); |
216 |
|
TrkSinglet *singlet = (TrkSinglet*)t[sing]; |
217 |
|
if ( (singlet->plane-1) == plane ){ |
218 |
|
Float_t x = (singlet->coord[0]+singlet->coord[1])/2.; |
219 |
|
if ( fabs(track->GetTrkTrack()->xv[plane] - x) < 1. ) sphit = true; |
220 |
|
}; |
221 |
|
}; |
222 |
|
}; |
223 |
|
if ( !trk->YGood(plane) ){ |
224 |
|
for (Int_t sing = 0; sing < event->GetTrkLevel2()->nclsy(); sing++){ |
225 |
|
TClonesArray &t = *(event->GetTrkLevel2()->SingletY); |
226 |
|
TrkSinglet *singlet = (TrkSinglet*)t[sing]; |
227 |
|
if ( (singlet->plane-1) == plane ){ |
228 |
|
Float_t x1 = (singlet->coord[0]); |
229 |
|
Float_t x2 = (singlet->coord[1]); |
230 |
|
if ( fabs(track->GetTrkTrack()->yv[plane] - x1) < 1. ) sphit = true; |
231 |
|
if ( fabs(track->GetTrkTrack()->yv[plane] - x2) < 1. ) sphit = true; |
232 |
|
}; |
233 |
|
}; |
234 |
|
}; |
235 |
}; |
}; |
236 |
|
if ( sphit ) return false; // spurious hit along the track |
237 |
}; |
}; |
238 |
// |
// |
239 |
if ( event->GetCaloLevel1()->qtotpl(0) > 7. ) return false; |
Int_t ti0 = track->GetCaloTrack()->tibar[0][1]-1; |
240 |
|
|
241 |
|
Int_t view = 0; |
242 |
|
Int_t plane = 0; |
243 |
|
Int_t strip = 0; |
244 |
|
Float_t mip = 0.; |
245 |
|
// |
246 |
|
for ( Int_t i=0; i<event->GetCaloLevel1()->istrip; i++ ){ |
247 |
|
// |
248 |
|
mip = event->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
249 |
|
if ( view == 1 && plane == 0 && strip == ti0 && mip > 4.) return false; |
250 |
|
if ( view == 1 && (plane >0 || strip > ti0) ) break; |
251 |
|
}; |
252 |
|
// if ( event->GetCaloLevel1()->qtotpl(0) > 7. ) return false; |
253 |
|
|
254 |
|
if ( rigidity > 2.2 || rigidity < 1.5 ) return false; |
255 |
|
// printf(" rig %f CRIG %i SRIG %i \n",rigidity,CRIG,SRIG); |
256 |
// |
// |
257 |
return true; |
return true; |
258 |
} |
} |
271 |
if ( MATRIX ){ |
if ( MATRIX ){ |
272 |
cf->UpdateMatrixFile(file.Data()); |
cf->UpdateMatrixFile(file.Data()); |
273 |
cf->LoadBin(); |
cf->LoadBin(); |
274 |
|
if ( !FULL ){ |
275 |
|
cf->LoadLong(); |
276 |
|
} else { |
277 |
|
cf->LoadFull(); |
278 |
|
}; |
279 |
} else { |
} else { |
280 |
cf->CreateMatrixFile(file.Data()); |
cf->CreateMatrixFile(file.Data()); |
281 |
}; |
}; |
302 |
rig[17] = 400.; |
rig[17] = 400.; |
303 |
// |
// |
304 |
memset(rmean, 0, 17*sizeof(Float_t)); |
memset(rmean, 0, 17*sizeof(Float_t)); |
305 |
|
memset(ntot, 0, 17*sizeof(Int_t)); |
306 |
|
// memset(finmat, 0, 43*191*sizeof(Int_t)); |
307 |
// |
// |
308 |
for (Int_t i=0; i < 17 ; i++){ |
// for (Int_t i=0; i < 17 ; i++){ |
309 |
matrix[i] = new TMatrixD(43,43); |
for (Int_t i=3; i < 4 ; i++){ |
310 |
qplane[i] = new TArrayF(43); |
if ( !FULL ){ |
311 |
nqplane[i] = new TArrayI(43); |
matrix[i] = new TMatrixD(43,43); |
312 |
nmat[i] = new TMatrixD(43,43); |
qplane[i] = new TArrayF(43); |
313 |
|
nqplane[i] = new TArrayI(43); |
314 |
|
nmat[i] = new TMatrixD(43,43); |
315 |
|
} else { |
316 |
|
if ( MATRIX ){ |
317 |
|
// fmatrix = new TMatrixF(4128,4128); |
318 |
|
// fnmat = new TMatrixF(4128,4128); |
319 |
|
// fmatrix = new TMatrixF(8213,8213); |
320 |
|
// fnmat = new TMatrixF(8213,8213); |
321 |
|
fmatrix = new TMatrixF(MDIM,MDIM); |
322 |
|
// fnmat = new TMatrixF(MDIM,MDIM); |
323 |
|
fnmat[i] = new TMatrixF(43,191); |
324 |
|
// cf->WriteFullMatrix(fmatrix, i); |
325 |
|
// cf->WriteFullNMatrix(fnmat, i); |
326 |
|
// delete fmatrix; |
327 |
|
// delete fnmat; |
328 |
|
//fnmat[i] = new TMatrixI(8213,8213); |
329 |
|
} else { |
330 |
|
fqplane = new TMatrixD(43,191); // 43 planes x 191 strip (= 1 + 95 x 2, one strip is the one transversed by the track that could be on the extreme right or left) |
331 |
|
fnqplane = new TMatrixD(43,191);// |
332 |
|
// |
333 |
|
cf->WriteFullMean(fqplane, i); |
334 |
|
cf->WriteFullNMean(fnqplane, i); |
335 |
|
delete fqplane; |
336 |
|
delete fnqplane; |
337 |
|
// |
338 |
|
}; |
339 |
|
}; |
340 |
}; |
}; |
341 |
// |
// |
342 |
} |
} |
345 |
void FindAverage( PamLevel2* L2, int iev ){ |
void FindAverage( PamLevel2* L2, int iev ){ |
346 |
// |
// |
347 |
Float_t erig = L2->GetTrack(0)->GetTrkTrack()->GetRigidity(); |
Float_t erig = L2->GetTrack(0)->GetTrkTrack()->GetRigidity(); |
348 |
|
if ( SRIG ) erig = L2->GetGPamela()->P0; |
349 |
|
if ( CRIG ) erig = L2->GetCaloLevel2()->qtot/260.; |
350 |
// |
// |
351 |
Int_t rbi = 0; |
Int_t rbi = 0; |
352 |
for (Int_t i = 0; i<nbin-1; i++){ |
for (Int_t i = 0; i<nbin-1; i++){ |
360 |
if ( erig >= rig[nbin-1] ) return; |
if ( erig >= rig[nbin-1] ) return; |
361 |
// |
// |
362 |
rmean[rbi] += erig; |
rmean[rbi] += erig; |
363 |
|
ntot[rbi]++; |
364 |
// |
// |
365 |
Int_t dgf = 43; |
if (!FULL ){ |
366 |
// |
Int_t dgf = 43; |
367 |
for (Int_t i=0; i<dgf; i++){ |
// |
368 |
(*nqplane[rbi])[i]++; |
for (Int_t i=0; i<dgf; i++){ |
369 |
}; |
(*nqplane[rbi])[i]++; |
370 |
// |
}; |
371 |
// Fill the estrip matrix |
// |
372 |
// |
// Fill the estrip matrix |
373 |
Int_t nplane = 0; |
// |
374 |
Int_t view = 0; |
Int_t nplane = 0; |
375 |
Int_t plane = 0; |
Int_t view = 0; |
376 |
Int_t strip = 0; |
Int_t plane = 0; |
377 |
Float_t mip = 0.; |
Int_t strip = 0; |
378 |
// |
Float_t mip = 0.; |
379 |
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
// |
380 |
|
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
381 |
|
// |
382 |
|
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
383 |
|
// |
384 |
|
nplane = 1 - view + 2 * plane; |
385 |
|
if ( erig > 4. && nplane == 0 && mip > 15. ) printf(" IEV %i erig %f OBT %u pkt %u file %s \n",iev,erig,L2->GetOrbitalInfo()->OBT,L2->GetOrbitalInfo()->pkt_num,L2->GetPamTree()->GetFile()->GetName()); |
386 |
|
//printf(" IEV %i OBT %u pkt %u file %s \n",iev,L2->GetOrbitalInfo()->OBT,L2->GetOrbitalInfo()->pkt_num,L2->GetPamTree()->GetFile()->GetName()); |
387 |
|
if ( nplane > 37 ) nplane--; |
388 |
|
if ( nplane < dgf ){ |
389 |
|
(*qplane[rbi])[nplane] += mip; |
390 |
|
}; |
391 |
|
// |
392 |
|
}; |
393 |
|
} else { |
394 |
|
// |
395 |
|
// FULL CALORIMETER |
396 |
|
// |
397 |
|
fqplane = cf->LoadFullAverage(rbi); |
398 |
|
fnqplane = cf->LoadFullNAverage(rbi); |
399 |
|
CaloTrkVar *ct = L2->GetTrack(0)->GetCaloTrack(); |
400 |
|
// |
401 |
|
Int_t nplane = 0; |
402 |
|
Int_t view = 0; |
403 |
|
Int_t plane = 0; |
404 |
|
Int_t strip = 0; |
405 |
|
Float_t mip = 0.; |
406 |
|
// |
407 |
|
Int_t cs = 0; |
408 |
|
Int_t cd = 0; |
409 |
|
Int_t mstrip = 0; |
410 |
|
// |
411 |
|
for (Int_t j=0; j<2; j++){ |
412 |
|
for (Int_t i=0; i<21; i++){ |
413 |
|
nplane = 1 - j + 2*i; |
414 |
|
if ( nplane > 37 ) nplane--; |
415 |
|
// |
416 |
|
cs = ct->tibar[i][j] - 1; |
417 |
|
// |
418 |
|
cd = 95 - cs; |
419 |
|
// |
420 |
|
for (Int_t k=0; k<191; k++){ |
421 |
|
mstrip = cd + k; |
422 |
|
// if ( mstrip < (191-cs) ) (*fnqplane[rbi])[nplane][mstrip] += 1.; |
423 |
|
if ( mstrip < (191-cs) ) (*fnqplane)[nplane][mstrip] += 1.; |
424 |
|
}; |
425 |
|
}; |
426 |
|
}; |
427 |
// |
// |
|
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
|
428 |
// |
// |
429 |
nplane = 1 - view + 2 * plane; |
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
430 |
if ( nplane > 37 ) nplane--; |
// |
431 |
if ( nplane < dgf ){ |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
432 |
(*qplane[rbi])[nplane] += mip; |
// |
433 |
|
nplane = 1 - view + 2 * plane; |
434 |
|
if ( nplane > 37 ) nplane--; |
435 |
|
// |
436 |
|
cs = ct->tibar[plane][view] - 1; |
437 |
|
// |
438 |
|
cd = 95 - cs; |
439 |
|
// |
440 |
|
mstrip = cd + strip; |
441 |
|
// |
442 |
|
// (*fqplane[rbi])[nplane][mstrip] += mip; |
443 |
|
(*fqplane)[nplane][mstrip] += mip; |
444 |
|
// |
445 |
}; |
}; |
446 |
// |
// |
447 |
|
cf->WriteFullMean(fqplane, rbi); |
448 |
|
cf->WriteFullNMean(fnqplane, rbi); |
449 |
|
cf->UnLoadFullAverage(rbi); |
450 |
|
cf->UnLoadFullNAverage(rbi); |
451 |
|
delete fqplane; |
452 |
|
delete fnqplane; |
453 |
|
// |
454 |
}; |
}; |
455 |
} |
} |
456 |
|
|
457 |
void CalculateAverage(){ |
void CalculateAverage(){ |
458 |
for (Int_t i=0; i<nbin-1; i++){ |
// |
459 |
if ( (*nqplane[i])[0] > 0 ) rmean[i] /= (Float_t)(*nqplane[i])[0]; |
if ( !FULL ){ |
460 |
for (Int_t j=0; j<43 ; j++){ |
for (Int_t i=0; i<nbin-1; i++){ |
461 |
if ( (*nqplane[i])[j] > 0 ){ |
if ( (*nqplane[i])[0] > 0 ) rmean[i] /= (Float_t)(*nqplane[i])[0]; |
462 |
(*qplane[i])[j] /= (Float_t)(*nqplane[i])[j]; |
for (Int_t j=0; j<43 ; j++){ |
463 |
} else { |
if ( (*nqplane[i])[j] > 0 ){ |
464 |
(*qplane[i])[j] = 0.; |
(*qplane[i])[j] /= (Float_t)(*nqplane[i])[j]; |
465 |
|
} else { |
466 |
|
(*qplane[i])[j] = 0.; |
467 |
|
}; |
468 |
|
printf(" BIN %i plane %i average energy %f qplane %f nqplane %i \n",i,j,rmean[i],(*qplane[i])[j],(*nqplane[i])[j]); |
469 |
}; |
}; |
|
printf(" BIN %i plane %i average energy %f qplane %f nqplane %i \n",i,j,rmean[i],(*qplane[i])[j],(*nqplane[i])[j]); |
|
470 |
}; |
}; |
471 |
|
for (Int_t i=0; i<nbin-1; i++){ |
472 |
|
// |
473 |
|
cf->WriteLongMean(qplane[i], i); |
474 |
|
// |
475 |
|
}; |
476 |
|
} else { |
477 |
|
// |
478 |
|
for (Int_t i=0; i<nbin-1; i++){ |
479 |
|
fqplane = cf->LoadFullAverage(i); |
480 |
|
fnqplane = cf->LoadFullNAverage(i); |
481 |
|
if ( ntot[i] > 0 ) rmean[i] /= (Float_t)(ntot[i]); |
482 |
|
// |
483 |
|
for (Int_t j=0; j<43 ; j++){ |
484 |
|
for (Int_t k=0; k<191; k++){ |
485 |
|
// if ( (*fnqplane[i])[j][k] > 0 ){ |
486 |
|
// (*fqplane[i])[j][k] /= (Float_t)(*fnqplane[i])[j][k]; |
487 |
|
// } else { |
488 |
|
// (*fqplane[i])[j][k] = 0.; |
489 |
|
// }; |
490 |
|
// printf(" BIN %i plane %i strip %i average energy %f qplane %f nqplane %f \n",i,j,k,rmean[i],(*fqplane[i])[j][k],(*fnqplane[i])[j][k]); |
491 |
|
if ( (*fnqplane)[j][k] > 0 ){ |
492 |
|
if ( (*fqplane)[j][k] == 0. ) (*fqplane)[j][k] = 0.7; |
493 |
|
(*fqplane)[j][k] /= (Float_t)(*fnqplane)[j][k]; |
494 |
|
} else { |
495 |
|
(*fqplane)[j][k] = 0.; |
496 |
|
}; |
497 |
|
printf(" BIN %i plane %i strip %i average energy %f qplane %f nqplane %f \n",i,j,k,rmean[i],(*fqplane)[j][k],(*fnqplane)[j][k]); |
498 |
|
}; |
499 |
|
}; |
500 |
|
cf->WriteFullMean(fqplane, i); |
501 |
|
cf->WriteFullNMean(fnqplane, i); |
502 |
|
cf->UnLoadFullAverage(i); |
503 |
|
cf->UnLoadFullNAverage(i); |
504 |
|
delete fqplane; |
505 |
|
delete fnqplane; |
506 |
|
}; |
507 |
|
// |
508 |
|
// for (Int_t i=0; i<nbin-1; i++){ |
509 |
|
// // |
510 |
|
// cf->WriteFullMean(fqplane[i], i); |
511 |
|
// // |
512 |
|
// }; |
513 |
}; |
}; |
514 |
|
// |
515 |
cf->WriteNumBin(nbin); |
cf->WriteNumBin(nbin); |
516 |
|
// |
517 |
TArrayF *rigbin = new TArrayF(18, rig); |
TArrayF *rigbin = new TArrayF(18, rig); |
518 |
cf->WriteRigBin(rigbin); |
cf->WriteRigBin(rigbin); |
519 |
|
// |
520 |
TArrayF *rmeanbin = new TArrayF(17, rmean); |
TArrayF *rmeanbin = new TArrayF(17, rmean); |
521 |
TFile *file = cf->GetFile(); |
TFile *file = cf->GetFile(); |
522 |
file->cd(); |
file->cd(); |
523 |
file->WriteObject(&(*rmeanbin), "binrigmean"); |
file->WriteObject(&(*rmeanbin), "binrigmean"); |
524 |
// |
// |
|
for (Int_t i=0; i<nbin-1; i++){ |
|
|
// |
|
|
cf->WriteLongMean(qplane[i], i); |
|
|
// |
|
|
}; |
|
525 |
// |
// |
526 |
} |
} |
527 |
|
|
529 |
void FindMatrix( PamLevel2* L2, int iev ){ |
void FindMatrix( PamLevel2* L2, int iev ){ |
530 |
// |
// |
531 |
Float_t erig = L2->GetTrack(0)->GetTrkTrack()->GetRigidity(); |
Float_t erig = L2->GetTrack(0)->GetTrkTrack()->GetRigidity(); |
532 |
|
if ( SRIG ) erig = L2->GetGPamela()->P0; |
533 |
|
if ( CRIG ) erig = L2->GetCaloLevel2()->qtot/260.; |
534 |
// |
// |
535 |
Int_t rbi = 0; |
Int_t rbi = 0; |
536 |
for (Int_t i = 0; i<nbin-1; i++){ |
for (Int_t i = 0; i<nbin-1; i++){ |
540 |
}; |
}; |
541 |
}; |
}; |
542 |
// |
// |
543 |
|
if ( rbi != 3 ) return; |
544 |
if ( erig < rig[0] ) return; |
if ( erig < rig[0] ) return; |
545 |
if ( erig >= rig[nbin-1] ) return; |
if ( erig >= rig[nbin-1] ) return; |
546 |
// |
// |
547 |
Int_t dgf = 43; |
if ( !FULL ){ |
548 |
// printf("1qui \n"); |
Int_t dgf = 43; |
549 |
// |
// |
550 |
for (Int_t i=0; i<dgf; i++){ |
for (Int_t i=0; i<dgf; i++){ |
551 |
for (Int_t j=0; j<dgf; j++){ |
for (Int_t j=0; j<dgf; j++){ |
552 |
(*nmat[rbi])[i][j] += 1.; |
(*nmat[rbi])[i][j] += 1.; |
553 |
|
}; |
554 |
}; |
}; |
|
}; |
|
|
// printf("2qui \n"); |
|
|
// |
|
|
// Fill the estrip matrix |
|
|
// |
|
|
Int_t nplane = 0; |
|
|
Int_t view = 0; |
|
|
Int_t plane = 0; |
|
|
Int_t strip = 0; |
|
|
Float_t mip = 0.; |
|
|
Float_t hpl[43]; |
|
|
memset(hpl,0,43*sizeof(Float_t)); |
|
|
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
|
555 |
// |
// |
556 |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
// Fill the estrip matrix |
557 |
// |
// |
558 |
nplane = 1 - view + 2 * plane; |
Int_t nplane = 0; |
559 |
if ( nplane > 37 ) nplane--; |
Int_t view = 0; |
560 |
if ( nplane < dgf ){ |
Int_t plane = 0; |
561 |
hpl[nplane] += mip; |
Int_t strip = 0; |
562 |
|
Float_t mip = 0.; |
563 |
|
Float_t hpl[43]; |
564 |
|
memset(hpl,0,43*sizeof(Float_t)); |
565 |
|
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
566 |
|
// |
567 |
|
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
568 |
|
// |
569 |
|
nplane = 1 - view + 2 * plane; |
570 |
|
if ( nplane > 37 ) nplane--; |
571 |
|
if ( nplane < dgf ){ |
572 |
|
hpl[nplane] += mip; |
573 |
|
}; |
574 |
|
// |
575 |
}; |
}; |
576 |
// |
// |
577 |
}; |
for (Int_t i=0; i<dgf; i++){ |
578 |
// |
for (Int_t j=0; j<dgf; j++){ |
579 |
// printf("3qui \n"); |
(*matrix[rbi])[i][j] += (hpl[i] - cf->GetAverageAt(i,erig)) * (hpl[j] - cf->GetAverageAt(j,erig)); |
580 |
// |
}; |
|
for (Int_t i=0; i<dgf; i++){ |
|
|
for (Int_t j=0; j<dgf; j++){ |
|
|
(*matrix[rbi])[i][j] += (hpl[i] - cf->GetAverageAt(i,erig)) * (hpl[j] - cf->GetAverageAt(j,erig)); |
|
581 |
}; |
}; |
582 |
|
} else { |
583 |
|
// |
584 |
|
// FULL CALORIMETER |
585 |
|
// |
586 |
|
printf(" Retrieve matrix %i IEV %i \n",rbi,iev); |
587 |
|
// fmatrix = cf->LoadFullMatrix(rbi); |
588 |
|
// cf->LoadFullMatrix(rbi,fmatrix); |
589 |
|
// fnmat = cf->LoadFullNMatrix(rbi); |
590 |
|
printf(" done \n"); |
591 |
|
printf(" start loop \n"); |
592 |
|
// |
593 |
|
CaloTrkVar *ct = L2->GetTrack(0)->GetCaloTrack(); |
594 |
|
// |
595 |
|
Int_t nplane = 0; |
596 |
|
Int_t view = 0; |
597 |
|
Int_t plane = 0; |
598 |
|
Int_t strip = 0; |
599 |
|
Float_t mip = 0.; |
600 |
|
// |
601 |
|
// Int_t mindgf = 48; |
602 |
|
// Int_t dgf = 143; |
603 |
|
Int_t mindgf = 0; |
604 |
|
Int_t dgf = 191; |
605 |
|
// Int_t mindgf = 85; |
606 |
|
// Int_t dgf = 115; |
607 |
|
Int_t cs = 0; |
608 |
|
Int_t cd = 0; |
609 |
|
Int_t mstrip = 0; |
610 |
|
// |
611 |
|
Float_t mipv[43][191]; |
612 |
|
memset(mipv,0,43*191*sizeof(Float_t)); |
613 |
|
// |
614 |
|
for ( Int_t i=0; i<L2->GetCaloLevel1()->istrip; i++ ){ |
615 |
|
// |
616 |
|
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
617 |
|
// |
618 |
|
nplane = 1 - view + 2 * plane; |
619 |
|
if ( nplane > 37 ) nplane--; |
620 |
|
// |
621 |
|
cs = ct->tibar[plane][view] - 1; |
622 |
|
// |
623 |
|
cd = 95 - cs; |
624 |
|
// |
625 |
|
mstrip = cd + strip; |
626 |
|
// |
627 |
|
mipv[nplane][mstrip] = mip; |
628 |
|
// |
629 |
|
}; |
630 |
|
// |
631 |
|
Float_t mip1 = 1.; |
632 |
|
Int_t cs1; |
633 |
|
Int_t cd1; |
634 |
|
Float_t mip2 = 1.; |
635 |
|
Int_t cs2; |
636 |
|
Int_t cd2; |
637 |
|
Int_t mi = -1; |
638 |
|
Int_t mj = -1; |
639 |
|
Int_t nn1 = 0; |
640 |
|
Int_t pl1 = 0; |
641 |
|
Int_t vi1 = 0; |
642 |
|
Int_t nn2 = 0; |
643 |
|
Int_t pl2 = 0; |
644 |
|
Int_t vi2 = 0; |
645 |
|
Int_t mstrip1min = 0; |
646 |
|
Int_t mstrip1max = 0; |
647 |
|
Int_t mstrip2min = 0; |
648 |
|
Int_t mstrip2max = 0; |
649 |
|
// |
650 |
|
Int_t toto = 0; |
651 |
|
// |
652 |
|
for (Int_t nplane1=0; nplane1<43; nplane1++){ |
653 |
|
if ( nplane1 >= 37 ) nn1 = nplane1 + 1; |
654 |
|
vi1 = 1; |
655 |
|
if ( nn1%2 ) vi1 = 0; |
656 |
|
pl1 = (nn1 - 1 + vi1)/2; |
657 |
|
// |
658 |
|
cs1 = ct->tibar[pl1][vi1] - 1; // convertire nplane in pl1 e vi1 |
659 |
|
// |
660 |
|
cd1 = 95 - cs1; |
661 |
|
// |
662 |
|
mstrip1min = TMath::Max(mindgf,(cd1+0)); |
663 |
|
mstrip1max = TMath::Min(dgf,(cd1+95)) + 1; |
664 |
|
// |
665 |
|
if ( nplane1 == 0 || nplane1 == 42 ) printf(" pl %i mstrip1min %i mstrip1max %i \n",nplane1,mstrip1min,mstrip1max); |
666 |
|
// |
667 |
|
for (Int_t mstrip1=mstrip1min; mstrip1<mstrip1max; mstrip1++){ |
668 |
|
// printf(".\n"); |
669 |
|
// |
670 |
|
mj = -1; |
671 |
|
// |
672 |
|
mip1 = mipv[nplane1][mstrip1] - cf->GetFullAverageAt(nplane1,mstrip1,erig,rbi); |
673 |
|
// |
674 |
|
mi = (nplane1 * 191) + mstrip1; |
675 |
|
// |
676 |
|
// if ( mstrip1 > mstrip1min ) break; |
677 |
|
// if ( mstrip1 > dgf ) break; |
678 |
|
// if ( mstrip1 >= mindgf && mstrip1 <= dgf && mstrip1 >= mstrip1min && mstrip1 <= mstrip1max ){ |
679 |
|
// |
680 |
|
// finmat[nplane1][mstrip1]++; |
681 |
|
(*fnmat[rbi])[nplane1][mstrip1] += 1.; |
682 |
|
// |
683 |
|
if ( mip1 != 0. ){ |
684 |
|
// |
685 |
|
for (Int_t nplane2=0; nplane2<43; nplane2++){ |
686 |
|
// |
687 |
|
if ( nplane2 >= 37 ) nn2 = nplane2 + 1; |
688 |
|
vi2 = 1; |
689 |
|
if ( nn2%2 ) vi2 = 0; |
690 |
|
pl1 = (nn2 - 1 + vi2)/2; |
691 |
|
// |
692 |
|
cs2 = ct->tibar[pl2][vi2] - 1; |
693 |
|
// |
694 |
|
cd2 = 95 - cs2; |
695 |
|
// |
696 |
|
// mstrip2min = cd2 + 0; |
697 |
|
// mstrip2max = cd2 + 95; |
698 |
|
mstrip2min = TMath::Max(mindgf,(cd2+0)); |
699 |
|
mstrip2max = TMath::Min(dgf,(cd2+95)) + 1; |
700 |
|
// |
701 |
|
if ( nplane1 == 0 && nplane2 == 0 && mstrip1==mstrip1min ) printf(" mstrip2min %i mstrip2max %i \n",mstrip2min,mstrip2max); |
702 |
|
// |
703 |
|
for (Int_t mstrip2=mstrip2min; mstrip2<mstrip2max; mstrip2++){ |
704 |
|
// |
705 |
|
mip2 = mipv[nplane2][mstrip2] - cf->GetFullAverageAt(nplane2,mstrip2,erig,rbi); |
706 |
|
// |
707 |
|
if ( mip2 != 0. ){ |
708 |
|
// |
709 |
|
mj = (nplane2 * 191) + mstrip2; |
710 |
|
// mj++; |
711 |
|
// |
712 |
|
// if ( mstrip2 > mstrip2min ) break; |
713 |
|
// if ( mstrip2 > dgf ) break; |
714 |
|
// if ( mstrip2 >= mindgf && mstrip2 <= dgf && mstrip2 >= mstrip2min && mstrip2 <= mstrip2max ){ |
715 |
|
// if ( mstrip1 >= mstrip1min && mstrip1 <= mstrip1max && mstrip2 >= mstrip2min && mstrip2 <= mstrip2max){ |
716 |
|
// (*fmatrix[rbi])[mi][mj] += (mipv[nplane1][mstrip1] - cf->GetFullAverageAt(nplane1,mstrip1,erig)) * (mipv[nplane2][mstrip2] - cf->GetFullAverageAt(nplane2,mstrip2,erig)); |
717 |
|
// (*fnmat[rbi])[mi][mj] += 1.; |
718 |
|
(*fmatrix)[mi][mj] += (mip1 * mip2); // giusto |
719 |
|
toto++; |
720 |
|
// (*fmatrix)[mi][mj] += 1.; |
721 |
|
// cf->GetFullAverageAt(nplane1,mstrip1,erig,rbi); |
722 |
|
// cf->GetFullAverageAt(nplane2,mstrip2,erig,rbi); |
723 |
|
// (*fnmat)[mi][mj] += 1.; |
724 |
|
// }; |
725 |
|
}; |
726 |
|
}; |
727 |
|
}; |
728 |
|
}; |
729 |
|
}; |
730 |
|
}; |
731 |
|
// |
732 |
|
printf(" toto = %i \n",toto); |
733 |
|
printf("\n done \n"); |
734 |
|
printf(" write matrix \n"); |
735 |
|
// cf->WriteFullMatrix(fmatrix, rbi); |
736 |
|
// cf->WriteFullNMatrix(fnmat, rbi); |
737 |
|
printf(" done \n"); |
738 |
|
printf(" unload matrix \n"); |
739 |
|
// cf->UnLoadFullMatrix(rbi); |
740 |
|
// cf->UnLoadFullNMatrix(rbi); |
741 |
|
printf(" done \n"); |
742 |
|
printf(" delete matrix \n"); |
743 |
|
// delete fmatrix; |
744 |
|
// delete fnmat; |
745 |
|
printf(" done \n"); |
746 |
}; |
}; |
|
// printf("4qui \n"); |
|
|
// gObjectTable->Print(); |
|
747 |
} |
} |
748 |
|
|
749 |
//=============================================================== |
//=============================================================== |
760 |
// |
// |
761 |
printf("Finished, calculating average and inverting matrices\n"); |
printf("Finished, calculating average and inverting matrices\n"); |
762 |
// |
// |
763 |
for (Int_t i=0; i<nbin-1; i++){ |
if ( !FULL ){ |
764 |
// |
for (Int_t i=0; i<nbin-1; i++){ |
765 |
// determine the average matrix |
// |
766 |
// |
// determine the average matrix |
767 |
for (Int_t ii=0; ii<43; ii++){ |
// |
768 |
for (Int_t j=0; j<43; j++){ |
for (Int_t ii=0; ii<43; ii++){ |
769 |
if ( (*nmat[i])[ii][j] > 0. ){ |
for (Int_t j=0; j<43; j++){ |
770 |
(*matrix[i])[ii][j] /= (*nmat[i])[ii][j]; |
if ( (*nmat[i])[ii][j] > 0. ){ |
771 |
} else { |
(*matrix[i])[ii][j] /= (*nmat[i])[ii][j]; |
772 |
(*matrix[i])[ii][j] = 0.; |
} else { |
773 |
|
(*matrix[i])[ii][j] = 0.; |
774 |
|
}; |
775 |
}; |
}; |
776 |
}; |
}; |
777 |
|
// |
778 |
|
cf->WriteLongMatrix(matrix[i],i); |
779 |
|
// |
780 |
|
if ( matrix[i]->Determinant() == 0. ){ |
781 |
|
printf("\n"); |
782 |
|
for (Int_t ii=0; ii<43; ii++){ |
783 |
|
for (Int_t j=0; j<43; j++){ |
784 |
|
printf(" %.f",(*matrix[i])[ii][j]); |
785 |
|
}; |
786 |
|
printf("\n"); |
787 |
|
}; |
788 |
|
printf("\n"); |
789 |
|
printf(" ERROR: the matrix at bin %i is singular, determinant = 0., it cannot be inverted! \n",i); |
790 |
|
} else { |
791 |
|
Double_t det = 0.; |
792 |
|
TMatrixD invmatrix = (TMatrixD)(matrix[i]->Invert(&det)); |
793 |
|
printf(" Bin %i determinant is %f \n",i,det); |
794 |
|
cf->WriteInvertedLongMatrix((TMatrixD)invmatrix,i); |
795 |
|
}; |
796 |
}; |
}; |
797 |
|
} else { |
798 |
// |
// |
799 |
cf->WriteLongMatrix(matrix[i],i); |
// FULL |
800 |
// |
// |
801 |
if ( matrix[i]->Determinant() == 0. ){ |
// for (Int_t i=0; i<nbin-1; i++){ |
802 |
printf("\n"); |
// for (Int_t i=3; i<5; i++){ |
803 |
|
for (Int_t i=3; i<4; i++){ |
804 |
|
// |
805 |
|
// determine the average matrix |
806 |
|
// |
807 |
|
// fmatrix = cf->LoadFullMatrix(i); |
808 |
|
// fnmat = cf->LoadFullNMatrix(i); |
809 |
|
// |
810 |
|
// for (Int_t ii=0; ii<MDIM; ii++){ |
811 |
|
// for (Int_t j=0; j<MDIM; j++){ |
812 |
|
// // if ( (*fnmat[i])[ii][j] > 0. ){ |
813 |
|
// // (*fmatrix[i])[ii][j] /= (*fnmat[i])[ii][j]; |
814 |
|
// // } else { |
815 |
|
// // (*fmatrix[i])[ii][j] = 0.; |
816 |
|
// // }; |
817 |
|
// if ( (*fnmat)[ii][j] > 0. ){ |
818 |
|
// (*fmatrix)[ii][j] /= (*fnmat)[ii][j]; |
819 |
|
// } else { |
820 |
|
// (*fmatrix)[ii][j] = 0.; |
821 |
|
// }; |
822 |
|
// }; |
823 |
|
// }; |
824 |
|
// |
825 |
|
Int_t i1 = -1; |
826 |
|
Int_t j1 = -1; |
827 |
|
Int_t nonzero = 0; |
828 |
|
Int_t nonzero1 = 0; |
829 |
for (Int_t ii=0; ii<43; ii++){ |
for (Int_t ii=0; ii<43; ii++){ |
830 |
for (Int_t j=0; j<43; j++){ |
for (Int_t j=0; j<191; j++){ |
831 |
printf(" %.f",(*matrix[i])[ii][j]); |
// if ( (*fnmat[i])[ii][j] > 0. ){ |
832 |
|
// (*fmatrix[i])[ii][j] /= (*fnmat[i])[ii][j]; |
833 |
|
// } else { |
834 |
|
// (*fmatrix[i])[ii][j] = 0.; |
835 |
|
// }; |
836 |
|
i1 = (ii * 191) + j; |
837 |
|
// j1 = -1; |
838 |
|
for (Int_t iij=0; iij<43; iij++){ |
839 |
|
for (Int_t jj=0; jj<191; jj++){ |
840 |
|
// |
841 |
|
j1 = (iij * 191) + jj; |
842 |
|
// j1++; |
843 |
|
// if ( finmat[ii][j] > 0 ){ |
844 |
|
// (*fmatrix)[i1][j1] /= finmat[ii][j]; |
845 |
|
if ( (*fnmat[i])[ii][j] == 0. || (*fmatrix)[i1][j1] == 0. || !((*fmatrix)[i1][j1] == (*fmatrix)[i1][j1]) ){ |
846 |
|
(*fmatrix)[i1][j1] = 0.; |
847 |
|
} else { |
848 |
|
(*fmatrix)[i1][j1] /= (*fnmat[i])[ii][j]; |
849 |
|
nonzero++; |
850 |
|
if ( i1 == 0 ) nonzero1++; |
851 |
|
}; |
852 |
|
}; |
853 |
|
}; |
854 |
}; |
}; |
|
printf("\n"); |
|
855 |
}; |
}; |
856 |
printf("\n"); |
// |
857 |
printf(" ERROR: the matrix at bin %i is singular, determinant = 0., it cannot be inverted! \n",i); |
printf(" Matrix has %i non-zero elements \n",nonzero); |
858 |
} else { |
printf(" Matrix has %i non-zero elements on the first row\n",nonzero1); |
859 |
Double_t det = 0.; |
// |
860 |
TMatrixD invmatrix = (TMatrixD)(matrix[i]->Invert(&det)); |
// Bool_t BAD = false; |
861 |
printf(" Bin %i determinant is %f \n",i,det); |
// for (Int_t ii=0; ii<43; ii++){ |
862 |
cf->WriteInvertedLongMatrix((TMatrixD)invmatrix,i); |
// for (Int_t j=0; j<191; j++){ |
863 |
|
// // |
864 |
|
// i1 = (ii * 191) + j; |
865 |
|
// // |
866 |
|
// for (Int_t iij=0; iij<43; iij++){ |
867 |
|
// for (Int_t jj=0; jj<191; jj++){ |
868 |
|
// // |
869 |
|
// j1 = (iij * 191) + jj; |
870 |
|
// // |
871 |
|
// // printf(" ROW %i COLUMN %i VALUE %f \n",i1,j1,(*fmatrix)[i1][j1]); |
872 |
|
// if ( (*fmatrix)[i1][j1] == 0. || !((*fmatrix)[i1][j1]==(*fmatrix)[i1][j1]) ){ |
873 |
|
// printf(" ROW %i COLUMN %i VALUE %f \n",i1,j1,(*fmatrix)[i1][j1]); |
874 |
|
// printf(" che schifo! \n"); |
875 |
|
// BAD = true; |
876 |
|
// }; |
877 |
|
// // |
878 |
|
// }; |
879 |
|
// }; |
880 |
|
// }; |
881 |
|
// }; |
882 |
|
// // |
883 |
|
// if ( BAD ) printf(" questa matrice fa cagare \n"); |
884 |
|
// |
885 |
|
// |
886 |
|
// cf->WriteFullMatrix(fmatrix[i],i); |
887 |
|
cf->WriteFullMatrix(fmatrix, i); |
888 |
|
// cf->WriteFullNMatrix(fnmat, i); |
889 |
|
cf->WriteFullNMatrix(fnmat[i], i); |
890 |
|
// |
891 |
|
// if ( fmatrix[i]->Determinant() == 0. ){ |
892 |
|
if ( fmatrix->Determinant() == 0. ){ |
893 |
|
printf(" ERROR: the matrix at bin %i is singular, determinant = 0., it cannot be inverted! \n",i); |
894 |
|
} else { |
895 |
|
Double_t det = 0.; |
896 |
|
// TMatrixF invmatrix = (TMatrixF)(fmatrix[i]->Invert(&det)); |
897 |
|
// printf(" Bin %i determinant is %f \n",i,det); |
898 |
|
// cf->WriteInvertedFullMatrix((TMatrixF)invmatrix,i); |
899 |
|
TMatrixF invmatrix = (TMatrixF)(fmatrix->Invert(&det)); |
900 |
|
printf(" Bin %i determinant is %f \n",i,det); |
901 |
|
cf->WriteInvertedFullMatrix((TMatrixF)invmatrix,i); |
902 |
|
}; |
903 |
|
// |
904 |
|
cf->UnLoadFullMatrix(i); |
905 |
|
// cf->UnLoadFullNMatrix(i); |
906 |
|
delete fmatrix; |
907 |
|
// delete fnmat; |
908 |
|
// |
909 |
}; |
}; |
910 |
}; |
}; |
911 |
// |
// |