27 Long_t i_this = (Long_t)
this;
34 if (iCnaParCout == 0) {
43 if (iCnaParPaths == 0) {
51 Long_t iEcalNumbering = pObjectManager->
GetPointerValue(
"TEcnaNumbering");
52 if (iEcalNumbering == 0) {
60 Long_t iCnaParHistos = pObjectManager->
GetPointerValue(
"TEcnaParHistos");
61 if (iCnaParHistos == 0) {
92 const Text_t *h_name =
"CnaHeader";
93 const Text_t *h_title =
"CnaHeader";
103 if (iFileHeader == 0) {
241 std::cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> " 242 <<
" It is time to write a copy constructor" << std::endl;
272 std::cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << std::endl;
284 Adelete(
"fT1d_StexStinFromIndex");
305 std::cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " <<
fCnew 313 std::cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << std::endl;
329 const TString &UserQuantity,
330 const Int_t &n1StexStin,
331 const Int_t &i0StinEcha,
332 const Int_t &n1Sample) {
335 if (VecDim == VecDimTest) {
336 TVectorD vec(VecDim);
338 TString CallingMethod =
"1D";
341 if (StandardQuantity ==
"Adc") {
342 Int_t i0Sample = n1Sample - 1;
345 for (Int_t
i = 0;
i < VecDim;
i++) {
346 vec(
i) = (double_t)0.;
348 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
349 <<
"(StandardQuantity = " << StandardQuantity <<
"). Wrong code, no file reading." <<
fTTBELL 354 TVectorD vec(VecDim);
355 for (Int_t
i = 0;
i < VecDim;
i++) {
356 vec(
i) = (double_t)0.;
358 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", VecDim = " << VecDim
359 <<
"(VecDimTest = " << VecDimTest <<
")" 360 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
367 if (VecDim == VecDimTest) {
368 TVectorD vec(VecDim);
370 TString CallingMethod =
"1D";
373 if (StandardQuantity ==
"MSp" || StandardQuantity ==
"SSp") {
374 if (StandardQuantity ==
"MSp") {
377 if (StandardQuantity ==
"SSp") {
381 for (Int_t
i = 0;
i < VecDim;
i++) {
382 vec(
i) = (double_t)0.;
384 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
385 <<
", StandardQuantity = " << StandardQuantity <<
". Wrong code, no file reading." <<
fTTBELL 390 TVectorD vec(VecDim);
391 for (Int_t
i = 0;
i < VecDim;
i++) {
392 vec(
i) = (double_t)0.;
394 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", VecDim = " << VecDim
395 <<
"(VecDimTest = " << VecDimTest <<
")" 396 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
405 Int_t VecDimTest = 1;
407 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
410 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
414 if (VecDim == VecDimTest) {
415 TVectorD vec(VecDim);
417 TString CallingMethod =
"1D";
418 TString StandardQuantity =
"?";
420 TString rTechReadCode =
GetTechReadCode(StandardQuantity, StandardDetector);
422 if (rTechReadCode !=
"?") {
423 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
424 if (rTechReadCode ==
"NOEStex") {
427 if (rTechReadCode ==
"PedStex") {
430 if (rTechReadCode ==
"TNoStex") {
433 if (rTechReadCode ==
"LFNStex") {
436 if (rTechReadCode ==
"HFNStex") {
439 if (rTechReadCode ==
"MCsStex") {
442 if (rTechReadCode ==
"SCsStex") {
447 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
450 vecStex(
i) = (Double_t)0.;
455 TString xStartDate =
"sStartDate";
456 TString xStopDate =
"sStopDate";
459 Int_t n1Stex = i0Stex + 1;
470 if (rTechReadCode ==
"NOEStas") {
473 if (rTechReadCode ==
"PedStas") {
476 if (rTechReadCode ==
"TNoStas") {
479 if (rTechReadCode ==
"LFNStas") {
482 if (rTechReadCode ==
"HFNStas") {
485 if (rTechReadCode ==
"MCsStas") {
488 if (rTechReadCode ==
"SCsStas") {
508 if (cStartTime < xStartTime) {
509 xStartTime = cStartTime;
510 xStartDate = cStartDate;
512 if (cStopTime > xStopTime) {
513 xStopTime = cStopTime;
514 xStopDate = cStopDate;
520 std::cout <<
"!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> " 521 <<
" ROOT file not found" <<
fTTBELL << std::endl;
526 for (Int_t
i = 0;
i < VecDim;
i++) {
527 vec(
i) = (double_t)0.;
529 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
530 <<
", UserDetector = " << UserDetector <<
". Wrong code(s). No file reading." <<
fTTBELL << std::endl;
534 TVectorD vec(VecDim);
535 for (Int_t
i = 0;
i < VecDim;
i++) {
536 vec(
i) = (double_t)0.;
538 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", UserDetector = " << UserDetector
539 <<
", VecDim = " << VecDim <<
". Wrong code(s) or array dimension. No file reading." <<
fTTBELL 551 const TString &UserCorOrCov,
552 const TString &UserBetweenWhat,
553 const Int_t &nb_arg_1,
554 const Int_t &nb_arg_2) {
555 TMatrixD mat(MatDim, MatDim);
556 TString CallingMethod =
"2D";
557 TString StandardMatrixType =
"?";
558 TString StandardBetweenWhat =
"?";
563 if (StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?") {
564 if (StandardBetweenWhat ==
"Mss") {
565 Int_t n1StexStin = nb_arg_1;
566 Int_t i0StinEcha = nb_arg_2;
568 if (StandardMatrixType ==
"Cov") {
572 if (StandardMatrixType ==
"Cor") {
577 if (StandardBetweenWhat !=
"Mss") {
578 Int_t n1StexStin_a = nb_arg_1;
579 Int_t n1StexStin_b = nb_arg_2;
581 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF") {
585 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF") {
589 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF") {
593 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF") {
598 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
599 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
600 mat(
i,
j) = (double_t)0.;
603 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
604 <<
", UserBetweenWhat = " << UserBetweenWhat <<
". Wrong code(s), no file reading." <<
fTTBELL 612 TMatrixD mat(MatDim, MatDim);
613 TString CallingMethod =
"2D";
614 TString StandardMatrixType =
"?";
615 TString StandardBetweenWhat =
"?";
620 if (StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?") {
622 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF") {
626 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF") {
630 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF") {
634 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF") {
639 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttLF") {
643 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttHF") {
647 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
648 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
649 mat(
i,
j) = (double_t)0.;
652 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
653 <<
", UserBetweenWhat = " << UserBetweenWhat <<
". Wrong code(s), no file reading." <<
fTTBELL 661 TString rTechReadCode =
"?";
662 TString dTechDetector =
"?";
664 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
665 dTechDetector =
"Stex";
667 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
668 dTechDetector =
"Stas";
671 if (dTechDetector ==
"?") {
672 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = " 673 << dTechDetector <<
", StandardDetector = " << StandardDetector <<
fTTBELL << std::endl;
675 if (StandardQuantity ==
"NOE" && dTechDetector ==
"Stex") {
676 rTechReadCode =
"NOEStex";
678 if (StandardQuantity ==
"NOE" && dTechDetector ==
"Stas") {
679 rTechReadCode =
"NOEStas";
681 if (StandardQuantity ==
"Ped" && dTechDetector ==
"Stex") {
682 rTechReadCode =
"PedStex";
684 if (StandardQuantity ==
"Ped" && dTechDetector ==
"Stas") {
685 rTechReadCode =
"PedStas";
687 if (StandardQuantity ==
"TNo" && dTechDetector ==
"Stex") {
688 rTechReadCode =
"TNoStex";
690 if (StandardQuantity ==
"TNo" && dTechDetector ==
"Stas") {
691 rTechReadCode =
"TNoStas";
693 if (StandardQuantity ==
"LFN" && dTechDetector ==
"Stex") {
694 rTechReadCode =
"LFNStex";
696 if (StandardQuantity ==
"LFN" && dTechDetector ==
"Stas") {
697 rTechReadCode =
"LFNStas";
699 if (StandardQuantity ==
"HFN" && dTechDetector ==
"Stex") {
700 rTechReadCode =
"HFNStex";
702 if (StandardQuantity ==
"HFN" && dTechDetector ==
"Stas") {
703 rTechReadCode =
"HFNStas";
705 if (StandardQuantity ==
"MCs" && dTechDetector ==
"Stex") {
706 rTechReadCode =
"MCsStex";
708 if (StandardQuantity ==
"MCs" && dTechDetector ==
"Stas") {
709 rTechReadCode =
"MCsStas";
711 if (StandardQuantity ==
"SCs" && dTechDetector ==
"Stex") {
712 rTechReadCode =
"SCsStex";
714 if (StandardQuantity ==
"SCs" && dTechDetector ==
"Stas") {
715 rTechReadCode =
"SCsStas";
719 if (rTechReadCode ==
"?") {
720 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " 721 << rTechReadCode <<
", StandardQuantity = " << StandardQuantity <<
fTTBELL << std::endl;
724 return rTechReadCode;
733 const Int_t &nb_of_samples,
737 const Int_t &nreqevts,
739 const TString &path_root) {
744 const TString &sTypAna = typ_ana;
745 Int_t nNbOfSamples = nb_of_samples;
747 Int_t nFirstEvt = nfirst;
748 Int_t nLastEvt =
nlast;
749 Int_t nReqNbOfEvts = nreqevts;
750 Int_t nStexNumber = Stex;
753 const Text_t *h_name =
"CnaHeader";
754 const Text_t *h_title =
"CnaHeader";
798 std::cout <<
"*TEcnaRead::FileParameters(...)>" << std::endl
799 <<
" The method has been called with the following argument values:" << std::endl
807 <<
" Path for the ROOT file = " <<
fPathRoot << std::endl
838 TString cType =
"run type not defined";
858 cType =
"LASER_POWER_SCAN";
861 cType =
"LASER_DELAY_SCAN";
864 cType =
"TESTPULSE_SCAN_MEM";
867 cType =
"TESTPULSE_MGPA";
870 cType =
"PEDESTAL_STD";
873 cType =
"PEDESTAL_OFFSET_SCAN";
876 cType =
"PEDESTAL_25NS_SCAN";
883 cType =
"PHYSICS_GLOBAL";
886 cType =
"COSMICS_GLOBAL";
889 cType =
"HALO_GLOBAL";
896 cType =
"TESTPULSE_GAP";
899 cType =
"PEDESTAL_GAP";
906 cType =
"PHYSICS_LOCAL";
909 cType =
"COSMICS_LOCAL";
912 cType =
"HALO_LOCAL";
915 cType =
"CALIB_LOCAL";
938 Bool_t ok_open = kFALSE;
960 if (iCnaRootFile == 0) {
975 if (ok_open == kFALSE) {
976 std::cout <<
"!TEcnaRead::OpenRootFile> " << s_name.Data() <<
": file not found." << std::endl;
981 std::cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() <<
" OK " 1003 Bool_t ok_close = kFALSE;
1011 e_path.Append(name);
1012 std::cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << std::endl;
1016 std::cout <<
"*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " <<
gCnaRootFile 1017 <<
", pointer = " << pointer_value << std::endl;
1027 std::cout <<
"*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = " 1031 std::cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " <<
fOpenRootFile 1056 Anew(
"fTagStinNumbers");
1062 Anew(
"fT1d_StexStinFromIndex");
1068 vec(
i) = (Double_t)0.;
1082 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 1083 <<
" ROOT file not found " <<
fTTBELL << std::endl;
1087 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 1088 <<
" FileParameters not called " <<
fTTBELL << std::endl;
1121 Bool_t ok_open = kFALSE;
1124 Bool_t allowed_to_read = kFALSE;
1133 allowed_to_read = kTRUE;
1140 allowed_to_read = kTRUE;
1142 std::cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: " << file_name
1144 allowed_to_read = kFALSE;
1148 if (allowed_to_read == kTRUE) {
1197 const TString &MaxName,
1198 const Int_t &MaxValue,
1199 const Int_t &VecDim) {
1202 if (MaxValue != VecDim) {
1203 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " 1204 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1205 <<
", VecDim = " << VecDim <<
fTTBELL << std::endl;
1210 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " 1211 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1212 <<
", VecDim = " << VecDim << std::endl;
1218 const TString &MaxName,
1219 const Int_t &MaxValue,
1220 const Int_t &MatDim) {
1223 if (MaxValue != MatDim) {
1224 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " 1225 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1226 <<
", MatDim = " << MatDim <<
fTTBELL << std::endl;
1231 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " 1232 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1233 <<
", MatDim = " << MatDim << std::endl;
1251 TVectorD vec(VecDim);
1255 for (Int_t
i = 0;
i < VecDim;
i++) {
1256 vec(
i) = (Double_t)0.;
1267 Bool_t ok_open = kFALSE;
1268 Bool_t ok_read = kFALSE;
1271 Bool_t allowed_to_read = kFALSE;
1280 allowed_to_read = kTRUE;
1288 allowed_to_read = kTRUE;
1290 std::cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " << file_name
1292 allowed_to_read = kFALSE;
1297 if (allowed_to_read == kTRUE) {
1301 if (ok_read == kTRUE) {
1304 for (Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++) {
1312 <<
": .root file failed" << std::endl
1314 <<
"> not available in file." <<
fTTBELL << std::endl;
1319 if (ok_read == kTRUE) {
1322 for (Int_t
i = 0;
i < VecDim;
i++) {
1323 std::cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = " << vec[
i] << std::endl;
1329 for (Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++) {
1348 const Int_t &i0StinEcha,
1350 const Int_t &VecDim) {
1360 TVectorD vec(VecDim);
1361 for (Int_t
i = 0;
i < VecDim;
i++) {
1362 vec(
i) = (Double_t)0.;
1370 Bool_t ok_open = kFALSE;
1371 Bool_t ok_read = kFALSE;
1374 Bool_t allowed_to_read = kFALSE;
1383 allowed_to_read = kTRUE;
1391 allowed_to_read = kTRUE;
1393 std::cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " << file_name
1395 allowed_to_read = kFALSE;
1400 if (allowed_to_read == kTRUE) {
1403 if (ok_read == kTRUE) {
1405 for (Int_t i_bin = 0; i_bin < VecDim; i_bin++) {
1411 <<
": .root file failed" << std::endl
1413 <<
"> not available in file." <<
fTTBELL << std::endl;
1437 TVectorD vec(VecDim);
1438 for (Int_t
i = 0;
i < VecDim;
i++) {
1439 vec(
i) = (Double_t)0.;
1447 Bool_t ok_open = kFALSE;
1448 Bool_t ok_read = kFALSE;
1451 Bool_t allowed_to_read = kFALSE;
1460 allowed_to_read = kTRUE;
1467 allowed_to_read = kTRUE;
1469 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " << file_name
1471 allowed_to_read = kFALSE;
1476 if (allowed_to_read == kTRUE) {
1480 if (ok_read == kTRUE) {
1482 for (Int_t i_samp = 0; i_samp < VecDim; i_samp++) {
1488 <<
": .root file failed" << std::endl
1490 <<
"> not available in file." <<
fTTBELL << std::endl;
1505 "fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1509 TVectorD vec(VecDim);
1510 for (Int_t
i = 0;
i < VecDim;
i++) {
1511 vec(
i) = (Double_t)0.;
1519 Bool_t ok_open = kFALSE;
1520 Bool_t ok_read = kFALSE;
1523 Bool_t allowed_to_read = kFALSE;
1532 allowed_to_read = kTRUE;
1540 allowed_to_read = kTRUE;
1542 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " << file_name
1544 allowed_to_read = kFALSE;
1549 if (allowed_to_read == kTRUE) {
1553 if (ok_read == kTRUE) {
1566 <<
": .root file failed" << std::endl
1568 <<
"> not available in file." <<
fTTBELL << std::endl;
1591 TVectorD vec(VecDim);
1612 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " << file_name
1622 for (Int_t i_samp = 0; i_samp < VecDim; i_samp++) {
1628 <<
": .root file failed" << std::endl
1630 <<
"> not available in file." <<
fTTBELL << std::endl;
1644 "fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1648 TVectorD vec(VecDim);
1649 for (Int_t
i = 0;
i < VecDim;
i++) {
1650 vec(
i) = (Double_t)0.;
1658 Bool_t ok_open = kFALSE;
1659 Bool_t ok_read = kFALSE;
1662 Bool_t allowed_to_read = kFALSE;
1671 allowed_to_read = kTRUE;
1679 allowed_to_read = kTRUE;
1681 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " << file_name
1683 allowed_to_read = kFALSE;
1688 if (allowed_to_read == kTRUE) {
1692 if (ok_read == kTRUE) {
1705 <<
": .root file failed" << std::endl
1707 <<
"> not available in file." <<
fTTBELL << std::endl;
1729 TVectorD vec(VecDim);
1730 for (Int_t
i = 0;
i < VecDim;
i++) {
1731 vec(
i) = (Double_t)0.;
1740 mat(
i,
j) = (Double_t)0.;
1744 Int_t n1StexStin = iStexStin + 1;
1749 vec(i0StexEcha) = 0;
1752 vec(i0StexEcha) += mat(i0StinEcha, i_samp);
1773 TMatrixD mat(MatDimX, MatDimY);
1774 for (Int_t
i = 0;
i - MatDimX < 0;
i++) {
1775 for (Int_t
j = 0;
j - MatDimY < 0;
j++) {
1776 mat(
i,
j) = (Double_t)0.;
1781 if (Stin_index >= 0) {
1787 Bool_t ok_open = kFALSE;
1788 Bool_t ok_read = kFALSE;
1791 Bool_t allowed_to_read = kFALSE;
1800 allowed_to_read = kTRUE;
1807 allowed_to_read = kTRUE;
1809 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: " 1810 << file_name <<
fTTBELL << std::endl;
1811 allowed_to_read = kFALSE;
1816 if (allowed_to_read == kTRUE) {
1820 if (ok_read == kTRUE) {
1822 for (Int_t i_crys = 0; i_crys - MatDimX < 0; i_crys++) {
1823 Int_t j_cna_chan = Stin_index * MatDimX + i_crys;
1824 for (Int_t i_samp = 0; i_samp - MatDimY < 0; i_samp++) {
1830 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1832 <<
" -> quantity: <" 1839 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1840 <<
"It is not possible to access the number of found events: the ROOT file has not been read." 1861 TVectorD vec(VecDim);
1862 for (Int_t
i = 0;
i < VecDim;
i++) {
1863 vec(
i) = (Double_t)0.;
1870 Bool_t ok_open = kFALSE;
1871 Bool_t ok_read = kFALSE;
1874 Bool_t allowed_to_read = kFALSE;
1883 allowed_to_read = kTRUE;
1890 allowed_to_read = kTRUE;
1892 std::cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " << file_name
1894 allowed_to_read = kFALSE;
1899 if (allowed_to_read == kTRUE) {
1903 if (ok_read == kTRUE) {
1905 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
1911 <<
": .root file failed" << std::endl
1913 <<
"> not available in file." <<
fTTBELL << std::endl;
1934 TVectorD vec(VecDim);
1935 for (Int_t
i = 0;
i < VecDim;
i++) {
1936 vec(
i) = (Double_t)0.;
1942 Bool_t ok_open = kFALSE;
1943 Bool_t ok_read = kFALSE;
1946 Bool_t allowed_to_read = kFALSE;
1955 allowed_to_read = kTRUE;
1962 allowed_to_read = kTRUE;
1964 std::cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " << file_name
1966 allowed_to_read = kFALSE;
1971 if (allowed_to_read == kTRUE) {
1975 if (ok_read == kTRUE) {
1977 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
1983 <<
": .root file failed" << std::endl
1985 <<
"> not available in file." <<
fTTBELL << std::endl;
2006 TVectorD vec(VecDim);
2007 for (Int_t
i = 0;
i < VecDim;
i++) {
2008 vec(
i) = (Double_t)0.;
2014 Bool_t ok_open = kFALSE;
2015 Bool_t ok_read = kFALSE;
2018 Bool_t allowed_to_read = kFALSE;
2027 allowed_to_read = kTRUE;
2034 allowed_to_read = kTRUE;
2037 <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2038 << file_name <<
fTTBELL << std::endl;
2039 allowed_to_read = kFALSE;
2044 if (allowed_to_read == kTRUE) {
2048 if (ok_read == kTRUE) {
2050 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2055 std::cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2057 <<
" -> quantity: <" 2079 TVectorD vec(VecDim);
2080 for (Int_t
i = 0;
i < VecDim;
i++) {
2081 vec(
i) = (Double_t)0.;
2087 Bool_t ok_open = kFALSE;
2088 Bool_t ok_read = kFALSE;
2091 Bool_t allowed_to_read = kFALSE;
2100 allowed_to_read = kTRUE;
2108 allowed_to_read = kTRUE;
2110 std::cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2111 << file_name <<
fTTBELL << std::endl;
2112 allowed_to_read = kFALSE;
2117 if (allowed_to_read == kTRUE) {
2121 if (ok_read == kTRUE) {
2123 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2129 <<
": .root file failed" << std::endl
2131 <<
"> not available in file." <<
fTTBELL << std::endl;
2152 TVectorD vec(VecDim);
2153 for (Int_t
i = 0;
i < VecDim;
i++) {
2154 vec(
i) = (Double_t)0.;
2160 Bool_t ok_open = kFALSE;
2161 Bool_t ok_read = kFALSE;
2164 Bool_t allowed_to_read = kFALSE;
2173 allowed_to_read = kTRUE;
2181 allowed_to_read = kTRUE;
2183 std::cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2184 << file_name <<
fTTBELL << std::endl;
2185 allowed_to_read = kFALSE;
2190 if (allowed_to_read == kTRUE) {
2194 if (ok_read == kTRUE) {
2196 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2202 <<
": .root file failed" << std::endl
2204 <<
"> not available in file." <<
fTTBELL << std::endl;
2224 "ReadSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), VecDim);
2226 TVectorD vec(VecDim);
2227 for (Int_t
i = 0;
i < VecDim;
i++) {
2228 vec(
i) = (Double_t)0.;
2234 Bool_t ok_open = kFALSE;
2235 Bool_t ok_read = kFALSE;
2238 Bool_t allowed_to_read = kFALSE;
2247 allowed_to_read = kTRUE;
2255 allowed_to_read = kTRUE;
2258 <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2259 << file_name <<
fTTBELL << std::endl;
2260 allowed_to_read = kFALSE;
2265 if (allowed_to_read == kTRUE) {
2269 if (ok_read == kTRUE) {
2271 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2276 std::cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2278 <<
" -> quantity: <" 2304 TVectorD vecAverage(VecDim);
2305 for (Int_t
i = 0;
i < VecDim;
i++) {
2306 vecAverage(
i) = (Double_t)0.;
2311 vecMean(
i) = (Double_t)0.;
2316 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2317 vecAverage(i0StexStin) = 0;
2320 Int_t n1StexStin = i0StexStin + 1;
2324 vecAverage(i0StexStin) += vecMean(i0StexEcha);
2331 Int_t n1StinEcha = i0StinEcha + 1;
2332 if (n1StexStin == 10 && n1StinEcha == 11) {
2335 if (n1StexStin == 11 && n1StinEcha == 11) {
2338 if (!((n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11)) {
2339 vecAverage(i0StexStin) += vecMean(i0StexEcha);
2344 Double_t xdivis = (Double_t)0.;
2349 Int_t n1StexStin = i0StexStin + 1;
2353 vecAverage(i0StexStin) = vecAverage(i0StexStin) / xdivis;
2372 TVectorD vec(VecDim);
2373 for (Int_t
i = 0;
i < VecDim;
i++) {
2374 vec(
i) = (Double_t)0.;
2381 Bool_t ok_open = kFALSE;
2382 Bool_t ok_read = kFALSE;
2385 Bool_t allowed_to_read = kFALSE;
2394 allowed_to_read = kTRUE;
2402 allowed_to_read = kTRUE;
2404 std::cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " << file_name
2406 allowed_to_read = kFALSE;
2411 if (allowed_to_read == kTRUE) {
2415 if (ok_read == kTRUE) {
2417 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2423 <<
": .root file failed" << std::endl
2425 <<
"> not available in file." <<
fTTBELL << std::endl;
2446 TVectorD vec(VecDim);
2447 for (Int_t
i = 0;
i < VecDim;
i++) {
2448 vec(
i) = (Double_t)0.;
2455 Bool_t ok_open = kFALSE;
2456 Bool_t ok_read = kFALSE;
2459 Bool_t allowed_to_read = kFALSE;
2468 allowed_to_read = kTRUE;
2476 allowed_to_read = kTRUE;
2478 std::cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: " 2479 << file_name <<
fTTBELL << std::endl;
2480 allowed_to_read = kFALSE;
2485 if (allowed_to_read == kTRUE) {
2489 if (ok_read == kTRUE) {
2491 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2497 <<
": .root file failed" << std::endl
2499 <<
"> not available in file." <<
fTTBELL << std::endl;
2520 TVectorD vec(VecDim);
2521 for (Int_t
i = 0;
i < VecDim;
i++) {
2522 vec(
i) = (Double_t)0.;
2529 Bool_t ok_open = kFALSE;
2530 Bool_t ok_read = kFALSE;
2533 Bool_t allowed_to_read = kFALSE;
2542 allowed_to_read = kTRUE;
2550 allowed_to_read = kTRUE;
2552 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2553 << file_name <<
fTTBELL << std::endl;
2554 allowed_to_read = kFALSE;
2559 if (allowed_to_read == kTRUE) {
2563 if (ok_read == kTRUE) {
2565 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2570 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " 2572 <<
" -> quantity: <" 2594 TVectorD vec(VecDim);
2595 for (Int_t
i = 0;
i < VecDim;
i++) {
2596 vec(
i) = (Double_t)0.;
2603 Bool_t ok_open = kFALSE;
2604 Bool_t ok_read = kFALSE;
2607 Bool_t allowed_to_read = kFALSE;
2616 allowed_to_read = kTRUE;
2624 allowed_to_read = kTRUE;
2626 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2627 << file_name <<
fTTBELL << std::endl;
2628 allowed_to_read = kFALSE;
2633 if (allowed_to_read == kTRUE) {
2637 if (ok_read == kTRUE) {
2639 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2644 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " 2646 <<
" -> quantity: <" 2667 "ReadAverageMeanCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), VecDim);
2669 TVectorD vec(VecDim);
2670 for (Int_t
i = 0;
i < VecDim;
i++) {
2671 vec(
i) = (Double_t)0.;
2678 Bool_t ok_open = kFALSE;
2679 Bool_t ok_read = kFALSE;
2682 Bool_t allowed_to_read = kFALSE;
2691 allowed_to_read = kTRUE;
2699 allowed_to_read = kTRUE;
2701 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed " 2703 << file_name <<
fTTBELL << std::endl;
2704 allowed_to_read = kFALSE;
2709 if (allowed_to_read == kTRUE) {
2713 if (ok_read == kTRUE) {
2715 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2720 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2722 <<
" -> quantity: <" 2743 "ReadAverageSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), VecDim);
2745 TVectorD vec(VecDim);
2746 for (Int_t
i = 0;
i < VecDim;
i++) {
2747 vec(
i) = (Double_t)0.;
2754 Bool_t ok_open = kFALSE;
2755 Bool_t ok_read = kFALSE;
2758 Bool_t allowed_to_read = kFALSE;
2767 allowed_to_read = kTRUE;
2775 allowed_to_read = kTRUE;
2777 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file " 2779 << file_name <<
fTTBELL << std::endl;
2780 allowed_to_read = kFALSE;
2785 if (allowed_to_read == kTRUE) {
2789 if (ok_read == kTRUE) {
2791 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2796 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2798 <<
" -> quantity: <" 2817 const Int_t &i0StinEcha,
2818 const Int_t &MatDim) {
2828 TMatrixD mat(MatDim, MatDim);
2829 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
2830 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
2831 mat(
i,
j) = (Double_t)0.;
2840 Bool_t ok_open = kFALSE;
2841 Bool_t ok_read = kFALSE;
2844 Bool_t allowed_to_read = kFALSE;
2853 allowed_to_read = kTRUE;
2861 allowed_to_read = kTRUE;
2863 std::cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2864 << file_name <<
fTTBELL << std::endl;
2865 allowed_to_read = kFALSE;
2870 if (allowed_to_read == kTRUE) {
2873 if (ok_read == kTRUE) {
2875 for (Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++) {
2876 for (Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++) {
2883 <<
": .root file failed" << std::endl
2885 <<
"> not available in file." <<
fTTBELL << std::endl;
2898 const Int_t &i0StinEcha,
2899 const Int_t &MatDim) {
2908 TMatrixD mat(MatDim, MatDim);
2909 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
2910 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
2911 mat(
i,
j) = (Double_t)0.;
2919 Bool_t ok_open = kFALSE;
2920 Bool_t ok_read = kFALSE;
2923 Bool_t allowed_to_read = kFALSE;
2932 allowed_to_read = kTRUE;
2940 allowed_to_read = kTRUE;
2942 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2943 << file_name <<
fTTBELL << std::endl;
2944 allowed_to_read = kFALSE;
2949 if (allowed_to_read == kTRUE) {
2952 if (ok_read == kTRUE) {
2954 for (Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++) {
2955 for (Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++) {
2961 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> " 2963 <<
" -> quantity: <" 2976 const Int_t &i0StinEcha,
2977 const Int_t &InPutMatDim) {
2986 "ReadRelevantCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples",
fFileHeader->
fNbOfSamples, InPutMatDim);
2989 Int_t nb_of_relevant = InPutMatDim * (InPutMatDim - 1) / 2;
2990 TVectorD vec_rel(nb_of_relevant);
2991 for (Int_t
i = 0;
i < nb_of_relevant;
i++) {
2992 vec_rel(
i) = (Double_t)0.;
2998 Bool_t ok_open = kFALSE;
2999 Bool_t ok_read = kFALSE;
3002 Bool_t allowed_to_read = kFALSE;
3011 allowed_to_read = kTRUE;
3019 allowed_to_read = kTRUE;
3022 <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 3023 << file_name <<
fTTBELL << std::endl;
3024 allowed_to_read = kFALSE;
3029 if (allowed_to_read == kTRUE) {
3032 if (ok_read == kTRUE) {
3035 for (Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++) {
3036 for (Int_t j_samp = 0; j_samp < i_samp; j_samp++) {
3043 std::cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> " 3045 <<
" -> quantity: <" 3060 const Int_t &n1StexStin_b,
3061 const Int_t &MatDim) {
3068 "ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3073 TMatrixD mat(MatDim, MatDim);
3074 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3075 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3076 mat(
i,
j) = (Double_t)0.;
3085 Bool_t ok_open = kFALSE;
3086 Bool_t ok_read = kFALSE;
3089 Bool_t allowed_to_read = kFALSE;
3098 allowed_to_read = kTRUE;
3106 allowed_to_read = kTRUE;
3108 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3110 << file_name <<
fTTBELL << std::endl;
3111 allowed_to_read = kFALSE;
3116 if (allowed_to_read == kTRUE) {
3120 if (ok_read == kTRUE) {
3122 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3123 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3124 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3125 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3131 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3133 <<
" -> quantity: <" 3148 const Int_t &n1StexStin_b,
3149 const Int_t &MatDim) {
3156 "ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3161 TMatrixD mat(MatDim, MatDim);
3162 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3163 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3164 mat(
i,
j) = (Double_t)0.;
3173 Bool_t ok_open = kFALSE;
3174 Bool_t ok_read = kFALSE;
3177 Bool_t allowed_to_read = kFALSE;
3186 allowed_to_read = kTRUE;
3194 allowed_to_read = kTRUE;
3196 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed " 3198 << file_name <<
fTTBELL << std::endl;
3199 allowed_to_read = kFALSE;
3204 if (allowed_to_read == kTRUE) {
3209 if (ok_read == kTRUE) {
3211 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3212 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3213 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3214 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3220 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3222 <<
" -> quantity: <" 3237 const Int_t &n1StexStin_b,
3238 const Int_t &MatDim) {
3245 "ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3250 TMatrixD mat(MatDim, MatDim);
3251 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3252 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3253 mat(
i,
j) = (Double_t)0.;
3262 Bool_t ok_open = kFALSE;
3263 Bool_t ok_read = kFALSE;
3266 Bool_t allowed_to_read = kFALSE;
3275 allowed_to_read = kTRUE;
3283 allowed_to_read = kTRUE;
3285 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3287 << file_name <<
fTTBELL << std::endl;
3288 allowed_to_read = kFALSE;
3293 if (allowed_to_read == kTRUE) {
3297 if (ok_read == kTRUE) {
3299 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3300 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3301 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3302 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3308 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3310 <<
" -> quantity: <" 3325 const Int_t &n1StexStin_b,
3326 const Int_t &MatDim) {
3333 "ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3338 TMatrixD mat(MatDim, MatDim);
3339 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3340 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3341 mat(
i,
j) = (Double_t)0.;
3350 Bool_t ok_open = kFALSE;
3351 Bool_t ok_read = kFALSE;
3354 Bool_t allowed_to_read = kFALSE;
3363 allowed_to_read = kTRUE;
3371 allowed_to_read = kTRUE;
3373 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file " 3375 << file_name <<
fTTBELL << std::endl;
3376 allowed_to_read = kFALSE;
3381 if (allowed_to_read == kTRUE) {
3386 if (ok_read == kTRUE) {
3388 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3389 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3390 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3391 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3397 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3399 <<
" -> quantity: <" 3420 "ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3423 TMatrixD mat(MatDim, MatDim);
3424 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3425 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3426 mat(
i,
j) = (Double_t)0.;
3432 vec(
i) = (Double_t)0.;
3441 Bool_t ok_open = kFALSE;
3442 Bool_t ok_read = kFALSE;
3445 Bool_t allowed_to_read = kFALSE;
3454 allowed_to_read = kTRUE;
3462 allowed_to_read = kTRUE;
3464 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3466 << file_name <<
fTTBELL << std::endl;
3467 allowed_to_read = kFALSE;
3472 if (allowed_to_read == kTRUE) {
3476 if (ok_read == kTRUE) {
3497 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3499 <<
" -> quantity: <" 3520 "ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3523 TMatrixD mat(MatDim, MatDim);
3524 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3525 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3526 mat(
i,
j) = (Double_t)0.;
3532 vec(
i) = (Double_t)0.;
3541 Bool_t ok_open = kFALSE;
3542 Bool_t ok_read = kFALSE;
3545 Bool_t allowed_to_read = kFALSE;
3554 allowed_to_read = kTRUE;
3562 allowed_to_read = kTRUE;
3564 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed " 3566 << file_name <<
fTTBELL << std::endl;
3567 allowed_to_read = kFALSE;
3572 if (allowed_to_read == kTRUE) {
3576 if (ok_read == kTRUE) {
3597 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3599 <<
" -> quantity: <" 3620 "ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3623 TMatrixD mat(MatDim, MatDim);
3624 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3625 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3626 mat(
i,
j) = (Double_t)0.;
3632 vec(
i) = (Double_t)0.;
3641 Bool_t ok_open = kFALSE;
3642 Bool_t ok_read = kFALSE;
3645 Bool_t allowed_to_read = kFALSE;
3654 allowed_to_read = kTRUE;
3662 allowed_to_read = kTRUE;
3664 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3666 << file_name <<
fTTBELL << std::endl;
3667 allowed_to_read = kFALSE;
3672 if (allowed_to_read == kTRUE) {
3676 if (ok_read == kTRUE) {
3697 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3699 <<
" -> quantity: <" 3720 "ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3723 TMatrixD mat(MatDim, MatDim);
3724 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3725 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3726 mat(
i,
j) = (Double_t)0.;
3732 vec(
i) = (Double_t)0.;
3741 Bool_t ok_open = kFALSE;
3742 Bool_t ok_read = kFALSE;
3745 Bool_t allowed_to_read = kFALSE;
3754 allowed_to_read = kTRUE;
3762 allowed_to_read = kTRUE;
3764 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file " 3766 << file_name <<
fTTBELL << std::endl;
3767 allowed_to_read = kFALSE;
3772 if (allowed_to_read == kTRUE) {
3776 if (ok_read == kTRUE) {
3797 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3799 <<
" -> quantity: <" 3820 "ReadLowFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), MatDim);
3822 TMatrixD mat(MatDim, MatDim);
3823 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3824 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3825 mat(
i,
j) = (Double_t)0.;
3831 vec(
i) = (Double_t)0.;
3840 Bool_t ok_open = kFALSE;
3841 Bool_t ok_read = kFALSE;
3844 Bool_t allowed_to_read = kFALSE;
3853 allowed_to_read = kTRUE;
3861 allowed_to_read = kTRUE;
3863 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file " 3865 << file_name <<
fTTBELL << std::endl;
3866 allowed_to_read = kFALSE;
3871 if (allowed_to_read == kTRUE) {
3875 if (ok_read == kTRUE) {
3877 for (Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++) {
3878 for (Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++) {
3879 if (vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim) {
3880 if (vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim) {
3881 Int_t vec_ia_m = (Int_t)vec(index_Stin_a) - 1;
3882 Int_t vec_ib_m = (Int_t)vec(index_Stin_b) - 1;
3890 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 3892 <<
" -> quantity: <" 3913 "fEcal->MaxStinEcnaInStex()",
3917 TMatrixD mat(MatDim, MatDim);
3918 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3919 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3920 mat(
i,
j) = (Double_t)0.;
3926 vec(
i) = (Double_t)0.;
3935 Bool_t ok_open = kFALSE;
3936 Bool_t ok_read = kFALSE;
3939 Bool_t allowed_to_read = kFALSE;
3948 allowed_to_read = kTRUE;
3956 allowed_to_read = kTRUE;
3958 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file " 3960 << file_name <<
fTTBELL << std::endl;
3961 allowed_to_read = kFALSE;
3966 if (allowed_to_read == kTRUE) {
3970 if (ok_read == kTRUE) {
3972 for (Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++) {
3973 for (Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++) {
3974 if (vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim) {
3975 if (vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim) {
3976 Int_t vec_ia_m = (Int_t)vec(index_Stin_a) - 1;
3977 Int_t vec_ib_m = (Int_t)vec(index_Stin_b) - 1;
3978 mat((Int_t)vec_ia_m, (Int_t)vec_ib_m) =
3986 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 3988 <<
" -> quantity: <" 4023 for (Int_t i0StexEcha = 0; i0StexEcha < DimX; i0StexEcha++) {
4025 for (Int_t j_samp = 0; j_samp < DimY; j_samp++) {
4032 for (Int_t iza = 0; iza < DimX; iza++) {
4033 for (Int_t izb = 0; izb < DimY; izb++) {
4034 for (Int_t izc = 0; izc < DimZ; izc++) {
4047 Bool_t ok_open = kFALSE;
4048 Bool_t ok_read = kFALSE;
4051 Int_t i_entry_fail = 0;
4055 if (ok_open == kTRUE) {
4056 for (Int_t i0StexEcha = 0; i0StexEcha < DimX; i0StexEcha++) {
4057 if (i0StexEcha == 0) {
4065 if (i0StexEcha > 0) {
4070 if (ok_read == kTRUE) {
4073 for (Int_t i_bin = 0; i_bin < DimZ; i_bin++) {
4080 std::cout <<
"!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> " 4082 <<
" -> quantity: <" 4091 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4092 <<
" ROOT file not found" <<
fTTBELL << std::endl;
4095 if (i_entry_fail > 0) {
4096 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4097 <<
" Entry reading failure(s). i_entry_fail = " << i_entry_fail <<
fTTBELL << std::endl;
4110 Int_t xFapNbOfEvts = 0;
4114 NOFE_histp(
i) = (Double_t)0.;
4123 NOFE_int[
i] = (Int_t)NOFE_histp(
i);
4132 return xFapNbOfEvts;
4141 TString quantity_name =
"?";
4145 quantity_name =
"SM numbers";
4148 quantity_name =
"Dee numbers";
4152 quantity_name =
"Mean samples";
4155 quantity_name =
"Sigma of samples";
4159 quantity_name =
"Number of events";
4162 quantity_name =
"Pedestals";
4165 quantity_name =
"Total noise";
4168 quantity_name =
"LF noise";
4171 quantity_name =
"HF noise";
4174 quantity_name =
"Mean cor(s,s')";
4177 quantity_name =
"Sigma of cor(s,s')";
4181 quantity_name =
"Average pedestals";
4184 quantity_name =
"Average total noise";
4187 quantity_name =
"Average LF noise";
4190 quantity_name =
"Average HF noise";
4193 quantity_name =
"Average mean cor(s,s')";
4196 quantity_name =
"Average sigma of cor(s,s')";
4200 quantity_name =
"Sample ADC a.f.o event number";
4204 quantity_name =
"Cov(s,s')";
4207 quantity_name =
"Cor(s,s')";
4210 quantity_name =
"LF Cov(c,c')";
4213 quantity_name =
"LF Cor(c,c')";
4216 quantity_name =
"HF Cov(c,c')";
4219 quantity_name =
"HF Cor(c,c')";
4224 quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";
4227 quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";
4232 quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";
4235 quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";
4238 return quantity_name;
4261 vec(
i) = (Double_t)0.;
4264 number = (Int_t)vec(i0StexStinEcna);
4282 <<
" n1StexStin = " << n1StexStin << std::endl
4286 Int_t Stin_index = n1StexStin - 1;
4290 Int_t Stin_index = -1;
4293 vec(
i) = (Double_t)0.;
4301 std::cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = " << vec[
i] << std::endl;
4303 if (vec[
i] == n1StexStin) {
4309 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;
4310 std::cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << std::endl
4311 <<
" Stin index : " << Stin_index << std::endl;
4312 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;
4315 if (Stin_index < 0) {
4317 std::cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : " 4318 <<
"index Stin not found" <<
fTTBELL << std::endl;
4336 std::cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << std::endl;
4343 std::cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << std::endl;
4350 std::cout <<
"*TEcnaRead::PrintAllComments()> All the comments will be printed" << std::endl;
TEcnaResultType * fCnaIndivResult
Bool_t OpenR(const Text_t *="")
void TestArrayDimH1(const TString &, const TString &, const Int_t &, const Int_t &)
Int_t NumberOfEventsAnalysis(Int_t **, const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadLowFrequencyNoise(const Int_t &)
TVectorD ReadAverageHighFrequencyNoise(const Int_t &)
Int_t GetLastReqEvtNumber()
TEcnaRead & operator=(const TEcnaRead &)
TString BuildStandard1DHistoCodeY(const TString &, const TString &)
TMatrixD ReadCovariancesBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
void RegisterFileParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString &, const TString &, const time_t, const time_t)
TVectorD Read1DHisto(const Int_t &, const TString &, const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadSampleAdcValues(const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Int_t GetNumberOfEvents(const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Int_t GetStinIndex(const Int_t &)
TVectorD ReadSigmaOfCorrelationsBetweenSamples(const Int_t &)
TString GetRootFileNameShort()
TVectorD ReadAverageNumberOfEvents(const Int_t &)
Int_t fReadyToReadRootFile
TEcnaParHistos * fCnaParHistos
Int_t fCodePrintAllComments
TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TMatrixD ReadMatrix(const Int_t &, const TString &, const TString &, const Int_t &, const Int_t &)
void Adelete(const TString &)
TString BuildStandardBetweenWhatCode(const TString &, const TString &)
Int_t GetNumberOfBinsSampleAsFunctionOfTime()
TVectorD ReadRelevantCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
Bool_t RegisterPointer(const TString &, const Long_t &)
TMatrixD ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TVectorD ReadAverageTotalNoise(const Int_t &)
TString GetTypeOfQuantity(const CnaResultTyp)
TString fRootFileNameShort
Int_t GetFirstReqEvtNumber()
Bool_t ReadRootFileHeader(const Int_t &)
R__EXTERN TEcnaRootFile * gCnaRootFile
TString BuildStandardDetectorCode(const TString &)
Int_t fCodePrintNoComment
void SetEcalSubDetector(const TString &)
Int_t * fT1d_StexStinFromIndex
TVectorD ReadStinNumbers(const Int_t &)
TVectorD ReadSampleSigmas(const Int_t &, const Int_t &, const Int_t &)
Int_t GetStexStinFromIndex(const Int_t &)
TVectorD ReadTotalNoise(const Int_t &)
TVectorD ReadAveragePedestals(const Int_t &)
TEcnaParCout * fCnaParCout
TVectorD ReadPedestals(const Int_t &)
TString GetRootFileName()
TMatrixD ReadLowFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Double_t ** fT3d2_AdcValues
Double_t * fT3d1_AdcValues
TEcnaParPaths * fCnaParPaths
void fCopy(const TEcnaRead &)
TString GetAnalysisName()
TEcnaHeader * fFileHeader
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
void Anew(const TString &)
TVectorD ReadHighFrequencyNoise(const Int_t &)
TString BuildStandardCovOrCorCode(const TString &, const TString &)
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Double_t *** ReadSampleAdcValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAverageLowFrequencyNoise(const Int_t &)
void FileParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString &)
TString GetTechReadCode(const TString &, const TString &)
Int_t GetCodePrint(const TString &)
Bool_t OpenRootFile(const Text_t *, const TString &)
Int_t MaxCrysEcnaInStex()
TEcnaObject * fObjectManager
TEcnaNumbering * fEcalNumbering
Int_t ReadElementNextEntryNumber(CnaResultTyp, Int_t)
Int_t MaxStinEcnaInStas()
TMatrixD ReadCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
TVectorD ReadMeanCorrelationsBetweenSamples(const Int_t &)
void ReStart(const Text_t *)
Int_t MaxStinEcnaInStex()
TString GetRootFileNameShort()
TMatrixD ReadHighFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Double_t *** fT3d_AdcValues
Bool_t ReadElement(Int_t)
Bool_t CloseRootFile(const Text_t *)
TString GetEcalSubDetector()
Bool_t OpenW(const Text_t *="")
void fMakeResultsFileName()
TString GetRootFileName()
void TestArrayDimH2(const TString &, const TString &, const Int_t &, const Int_t &)
Long_t GetPointerValue(const TString &)
TVectorD ReadSampleMeans(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAverageMeanCorrelationsBetweenSamples(const Int_t &)
TString fCurrentlyOpenFileName
TVectorD ReadAverageSigmaOfCorrelationsBetweenSamples(const Int_t &)
TVectorD ReadNumberOfEvents(const Int_t &)