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) {
238 std::cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> " 239 <<
" It is time to write a copy constructor" << std::endl;
269 std::cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << std::endl;
281 Adelete(
"fT1d_StexStinFromIndex");
302 std::cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " <<
fCnew 310 std::cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << std::endl;
326 const TString &UserQuantity,
327 const Int_t &n1StexStin,
328 const Int_t &i0StinEcha,
329 const Int_t &n1Sample) {
332 if (VecDim == VecDimTest) {
333 TVectorD vec(VecDim);
335 TString CallingMethod =
"1D";
338 if (StandardQuantity ==
"Adc") {
339 Int_t i0Sample = n1Sample - 1;
342 for (Int_t
i = 0;
i < VecDim;
i++) {
343 vec(
i) = (double_t)0.;
345 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
346 <<
"(StandardQuantity = " << StandardQuantity <<
"). Wrong code, no file reading." <<
fTTBELL 351 TVectorD vec(VecDim);
352 for (Int_t
i = 0;
i < VecDim;
i++) {
353 vec(
i) = (double_t)0.;
355 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", VecDim = " << VecDim
356 <<
"(VecDimTest = " << VecDimTest <<
")" 357 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
364 if (VecDim == VecDimTest) {
365 TVectorD vec(VecDim);
367 TString CallingMethod =
"1D";
370 if (StandardQuantity ==
"MSp" || StandardQuantity ==
"SSp") {
371 if (StandardQuantity ==
"MSp") {
374 if (StandardQuantity ==
"SSp") {
378 for (Int_t
i = 0;
i < VecDim;
i++) {
379 vec(
i) = (double_t)0.;
381 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
382 <<
", StandardQuantity = " << StandardQuantity <<
". Wrong code, no file reading." <<
fTTBELL 387 TVectorD vec(VecDim);
388 for (Int_t
i = 0;
i < VecDim;
i++) {
389 vec(
i) = (double_t)0.;
391 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", VecDim = " << VecDim
392 <<
"(VecDimTest = " << VecDimTest <<
")" 393 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
402 Int_t VecDimTest = 1;
404 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
407 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
411 if (VecDim == VecDimTest) {
412 TVectorD vec(VecDim);
414 TString CallingMethod =
"1D";
415 TString StandardQuantity =
"?";
417 TString rTechReadCode =
GetTechReadCode(StandardQuantity, StandardDetector);
419 if (rTechReadCode !=
"?") {
420 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
421 if (rTechReadCode ==
"NOEStex") {
424 if (rTechReadCode ==
"PedStex") {
427 if (rTechReadCode ==
"TNoStex") {
430 if (rTechReadCode ==
"LFNStex") {
433 if (rTechReadCode ==
"HFNStex") {
436 if (rTechReadCode ==
"MCsStex") {
439 if (rTechReadCode ==
"SCsStex") {
444 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
447 vecStex(
i) = (Double_t)0.;
452 TString xStartDate =
"sStartDate";
453 TString xStopDate =
"sStopDate";
456 Int_t n1Stex = i0Stex + 1;
467 if (rTechReadCode ==
"NOEStas") {
470 if (rTechReadCode ==
"PedStas") {
473 if (rTechReadCode ==
"TNoStas") {
476 if (rTechReadCode ==
"LFNStas") {
479 if (rTechReadCode ==
"HFNStas") {
482 if (rTechReadCode ==
"MCsStas") {
485 if (rTechReadCode ==
"SCsStas") {
505 if (cStartTime < xStartTime) {
506 xStartTime = cStartTime;
507 xStartDate = cStartDate;
509 if (cStopTime > xStopTime) {
510 xStopTime = cStopTime;
511 xStopDate = cStopDate;
517 std::cout <<
"!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> " 518 <<
" ROOT file not found" <<
fTTBELL << std::endl;
523 for (Int_t
i = 0;
i < VecDim;
i++) {
524 vec(
i) = (double_t)0.;
526 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
527 <<
", UserDetector = " << UserDetector <<
". Wrong code(s). No file reading." <<
fTTBELL << std::endl;
531 TVectorD vec(VecDim);
532 for (Int_t
i = 0;
i < VecDim;
i++) {
533 vec(
i) = (double_t)0.;
535 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity <<
", UserDetector = " << UserDetector
536 <<
", VecDim = " << VecDim <<
". Wrong code(s) or array dimension. No file reading." <<
fTTBELL 548 const TString &UserCorOrCov,
549 const TString &UserBetweenWhat,
550 const Int_t &nb_arg_1,
551 const Int_t &nb_arg_2) {
552 TMatrixD mat(MatDim, MatDim);
553 TString CallingMethod =
"2D";
554 TString StandardMatrixType =
"?";
555 TString StandardBetweenWhat =
"?";
560 if (StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?") {
561 if (StandardBetweenWhat ==
"Mss") {
562 Int_t n1StexStin = nb_arg_1;
563 Int_t i0StinEcha = nb_arg_2;
565 if (StandardMatrixType ==
"Cov") {
569 if (StandardMatrixType ==
"Cor") {
574 if (StandardBetweenWhat !=
"Mss") {
575 Int_t n1StexStin_a = nb_arg_1;
576 Int_t n1StexStin_b = nb_arg_2;
578 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF") {
582 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF") {
586 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF") {
590 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF") {
595 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
596 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
597 mat(
i,
j) = (double_t)0.;
600 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
601 <<
", UserBetweenWhat = " << UserBetweenWhat <<
". Wrong code(s), no file reading." <<
fTTBELL 609 TMatrixD mat(MatDim, MatDim);
610 TString CallingMethod =
"2D";
611 TString StandardMatrixType =
"?";
612 TString StandardBetweenWhat =
"?";
617 if (StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?") {
619 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF") {
623 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF") {
627 if (StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF") {
631 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF") {
636 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttLF") {
640 if (StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttHF") {
644 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
645 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
646 mat(
i,
j) = (double_t)0.;
649 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
650 <<
", UserBetweenWhat = " << UserBetweenWhat <<
". Wrong code(s), no file reading." <<
fTTBELL 658 TString rTechReadCode =
"?";
659 TString dTechDetector =
"?";
661 if (StandardDetector ==
"SM" || StandardDetector ==
"Dee") {
662 dTechDetector =
"Stex";
664 if (StandardDetector ==
"EB" || StandardDetector ==
"EE") {
665 dTechDetector =
"Stas";
668 if (dTechDetector ==
"?") {
669 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = " 670 << dTechDetector <<
", StandardDetector = " << StandardDetector <<
fTTBELL << std::endl;
672 if (StandardQuantity ==
"NOE" && dTechDetector ==
"Stex") {
673 rTechReadCode =
"NOEStex";
675 if (StandardQuantity ==
"NOE" && dTechDetector ==
"Stas") {
676 rTechReadCode =
"NOEStas";
678 if (StandardQuantity ==
"Ped" && dTechDetector ==
"Stex") {
679 rTechReadCode =
"PedStex";
681 if (StandardQuantity ==
"Ped" && dTechDetector ==
"Stas") {
682 rTechReadCode =
"PedStas";
684 if (StandardQuantity ==
"TNo" && dTechDetector ==
"Stex") {
685 rTechReadCode =
"TNoStex";
687 if (StandardQuantity ==
"TNo" && dTechDetector ==
"Stas") {
688 rTechReadCode =
"TNoStas";
690 if (StandardQuantity ==
"LFN" && dTechDetector ==
"Stex") {
691 rTechReadCode =
"LFNStex";
693 if (StandardQuantity ==
"LFN" && dTechDetector ==
"Stas") {
694 rTechReadCode =
"LFNStas";
696 if (StandardQuantity ==
"HFN" && dTechDetector ==
"Stex") {
697 rTechReadCode =
"HFNStex";
699 if (StandardQuantity ==
"HFN" && dTechDetector ==
"Stas") {
700 rTechReadCode =
"HFNStas";
702 if (StandardQuantity ==
"MCs" && dTechDetector ==
"Stex") {
703 rTechReadCode =
"MCsStex";
705 if (StandardQuantity ==
"MCs" && dTechDetector ==
"Stas") {
706 rTechReadCode =
"MCsStas";
708 if (StandardQuantity ==
"SCs" && dTechDetector ==
"Stex") {
709 rTechReadCode =
"SCsStex";
711 if (StandardQuantity ==
"SCs" && dTechDetector ==
"Stas") {
712 rTechReadCode =
"SCsStas";
716 if (rTechReadCode ==
"?") {
717 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " 718 << rTechReadCode <<
", StandardQuantity = " << StandardQuantity <<
fTTBELL << std::endl;
721 return rTechReadCode;
730 const Int_t &nb_of_samples,
734 const Int_t &nreqevts,
736 const TString &path_root) {
741 const TString &sTypAna = typ_ana;
742 Int_t nNbOfSamples = nb_of_samples;
744 Int_t nFirstEvt = nfirst;
745 Int_t nLastEvt =
nlast;
746 Int_t nReqNbOfEvts = nreqevts;
747 Int_t nStexNumber = Stex;
750 const Text_t *h_name =
"CnaHeader";
751 const Text_t *h_title =
"CnaHeader";
795 std::cout <<
"*TEcnaRead::FileParameters(...)>" << std::endl
796 <<
" The method has been called with the following argument values:" << std::endl
804 <<
" Path for the ROOT file = " <<
fPathRoot << std::endl
835 TString cType =
"run type not defined";
855 cType =
"LASER_POWER_SCAN";
858 cType =
"LASER_DELAY_SCAN";
861 cType =
"TESTPULSE_SCAN_MEM";
864 cType =
"TESTPULSE_MGPA";
867 cType =
"PEDESTAL_STD";
870 cType =
"PEDESTAL_OFFSET_SCAN";
873 cType =
"PEDESTAL_25NS_SCAN";
880 cType =
"PHYSICS_GLOBAL";
883 cType =
"COSMICS_GLOBAL";
886 cType =
"HALO_GLOBAL";
893 cType =
"TESTPULSE_GAP";
896 cType =
"PEDESTAL_GAP";
903 cType =
"PHYSICS_LOCAL";
906 cType =
"COSMICS_LOCAL";
909 cType =
"HALO_LOCAL";
912 cType =
"CALIB_LOCAL";
935 Bool_t ok_open = kFALSE;
957 if (iCnaRootFile == 0) {
972 if (ok_open == kFALSE) {
973 std::cout <<
"!TEcnaRead::OpenRootFile> " << s_name.Data() <<
": file not found." << std::endl;
978 std::cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() <<
" OK " 1000 Bool_t ok_close = kFALSE;
1008 e_path.Append(
name);
1009 std::cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << std::endl;
1013 std::cout <<
"*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " <<
gCnaRootFile 1014 <<
", pointer = " << pointer_value << std::endl;
1024 std::cout <<
"*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = " 1028 std::cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " <<
fOpenRootFile 1053 Anew(
"fTagStinNumbers");
1059 Anew(
"fT1d_StexStinFromIndex");
1065 vec(
i) = (Double_t)0.;
1079 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 1080 <<
" ROOT file not found " <<
fTTBELL << std::endl;
1084 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 1085 <<
" FileParameters not called " <<
fTTBELL << std::endl;
1118 Bool_t ok_open = kFALSE;
1121 Bool_t allowed_to_read = kFALSE;
1130 allowed_to_read = kTRUE;
1137 allowed_to_read = kTRUE;
1139 std::cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1141 allowed_to_read = kFALSE;
1145 if (allowed_to_read == kTRUE) {
1194 const TString &MaxName,
1195 const Int_t &MaxValue,
1196 const Int_t &VecDim) {
1199 if (MaxValue != VecDim) {
1200 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " 1201 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1202 <<
", VecDim = " << VecDim <<
fTTBELL << std::endl;
1207 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " 1208 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1209 <<
", VecDim = " << VecDim << std::endl;
1215 const TString &MaxName,
1216 const Int_t &MaxValue,
1217 const Int_t &MatDim) {
1220 if (MaxValue != MatDim) {
1221 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " 1222 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1223 <<
", MatDim = " << MatDim <<
fTTBELL << std::endl;
1228 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " 1229 << CallingMethod.Data() <<
", MaxName: " << MaxName.Data() <<
", Maxvalue = " << MaxValue
1230 <<
", MatDim = " << MatDim << std::endl;
1248 TVectorD vec(VecDim);
1252 for (Int_t
i = 0;
i < VecDim;
i++) {
1253 vec(
i) = (Double_t)0.;
1264 Bool_t ok_open = kFALSE;
1265 Bool_t ok_read = kFALSE;
1268 Bool_t allowed_to_read = kFALSE;
1277 allowed_to_read = kTRUE;
1285 allowed_to_read = kTRUE;
1287 std::cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1289 allowed_to_read = kFALSE;
1293 if (allowed_to_read == kTRUE) {
1297 if (ok_read == kTRUE) {
1300 for (Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++) {
1308 <<
": .root file failed" << std::endl
1310 <<
"> not available in file." <<
fTTBELL << std::endl;
1315 if (ok_read == kTRUE) {
1318 for (Int_t
i = 0;
i < VecDim;
i++) {
1319 std::cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = " << vec[
i] << std::endl;
1325 for (Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++) {
1344 const Int_t &i0StinEcha,
1346 const Int_t &VecDim) {
1356 TVectorD vec(VecDim);
1357 for (Int_t
i = 0;
i < VecDim;
i++) {
1358 vec(
i) = (Double_t)0.;
1366 Bool_t ok_open = kFALSE;
1367 Bool_t ok_read = kFALSE;
1370 Bool_t allowed_to_read = kFALSE;
1379 allowed_to_read = kTRUE;
1387 allowed_to_read = kTRUE;
1389 std::cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1391 allowed_to_read = kFALSE;
1395 if (allowed_to_read == kTRUE) {
1398 if (ok_read == kTRUE) {
1400 for (Int_t i_bin = 0; i_bin < VecDim; i_bin++) {
1406 <<
": .root file failed" << std::endl
1408 <<
"> not available in file." <<
fTTBELL << std::endl;
1432 TVectorD vec(VecDim);
1433 for (Int_t
i = 0;
i < VecDim;
i++) {
1434 vec(
i) = (Double_t)0.;
1442 Bool_t ok_open = kFALSE;
1443 Bool_t ok_read = kFALSE;
1446 Bool_t allowed_to_read = kFALSE;
1455 allowed_to_read = kTRUE;
1462 allowed_to_read = kTRUE;
1464 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1466 allowed_to_read = kFALSE;
1470 if (allowed_to_read == kTRUE) {
1474 if (ok_read == kTRUE) {
1476 for (Int_t i_samp = 0; i_samp < VecDim; i_samp++) {
1482 <<
": .root file failed" << std::endl
1484 <<
"> not available in file." <<
fTTBELL << std::endl;
1499 "fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1503 TVectorD vec(VecDim);
1504 for (Int_t
i = 0;
i < VecDim;
i++) {
1505 vec(
i) = (Double_t)0.;
1513 Bool_t ok_open = kFALSE;
1514 Bool_t ok_read = kFALSE;
1517 Bool_t allowed_to_read = kFALSE;
1526 allowed_to_read = kTRUE;
1534 allowed_to_read = kTRUE;
1536 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1538 allowed_to_read = kFALSE;
1542 if (allowed_to_read == kTRUE) {
1546 if (ok_read == kTRUE) {
1559 <<
": .root file failed" << std::endl
1561 <<
"> not available in file." <<
fTTBELL << std::endl;
1584 TVectorD vec(VecDim);
1605 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1615 for (Int_t i_samp = 0; i_samp < VecDim; i_samp++) {
1621 <<
": .root file failed" << std::endl
1623 <<
"> not available in file." <<
fTTBELL << std::endl;
1637 "fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1641 TVectorD vec(VecDim);
1642 for (Int_t
i = 0;
i < VecDim;
i++) {
1643 vec(
i) = (Double_t)0.;
1651 Bool_t ok_open = kFALSE;
1652 Bool_t ok_read = kFALSE;
1655 Bool_t allowed_to_read = kFALSE;
1664 allowed_to_read = kTRUE;
1672 allowed_to_read = kTRUE;
1674 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1676 allowed_to_read = kFALSE;
1680 if (allowed_to_read == kTRUE) {
1684 if (ok_read == kTRUE) {
1697 <<
": .root file failed" << std::endl
1699 <<
"> not available in file." <<
fTTBELL << std::endl;
1721 TVectorD vec(VecDim);
1722 for (Int_t
i = 0;
i < VecDim;
i++) {
1723 vec(
i) = (Double_t)0.;
1732 mat(
i,
j) = (Double_t)0.;
1736 Int_t n1StexStin = iStexStin + 1;
1741 vec(i0StexEcha) = 0;
1744 vec(i0StexEcha) += mat(i0StinEcha, i_samp);
1765 TMatrixD mat(MatDimX, MatDimY);
1766 for (Int_t
i = 0;
i - MatDimX < 0;
i++) {
1767 for (Int_t
j = 0;
j - MatDimY < 0;
j++) {
1768 mat(
i,
j) = (Double_t)0.;
1773 if (Stin_index >= 0) {
1779 Bool_t ok_open = kFALSE;
1780 Bool_t ok_read = kFALSE;
1783 Bool_t allowed_to_read = kFALSE;
1792 allowed_to_read = kTRUE;
1799 allowed_to_read = kTRUE;
1801 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: " 1803 allowed_to_read = kFALSE;
1807 if (allowed_to_read == kTRUE) {
1811 if (ok_read == kTRUE) {
1813 for (Int_t i_crys = 0; i_crys - MatDimX < 0; i_crys++) {
1814 Int_t j_cna_chan = Stin_index * MatDimX + i_crys;
1815 for (Int_t i_samp = 0; i_samp - MatDimY < 0; i_samp++) {
1821 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1823 <<
" -> quantity: <" 1830 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1831 <<
"It is not possible to access the number of found events: the ROOT file has not been read." 1852 TVectorD vec(VecDim);
1853 for (Int_t
i = 0;
i < VecDim;
i++) {
1854 vec(
i) = (Double_t)0.;
1861 Bool_t ok_open = kFALSE;
1862 Bool_t ok_read = kFALSE;
1865 Bool_t allowed_to_read = kFALSE;
1874 allowed_to_read = kTRUE;
1881 allowed_to_read = kTRUE;
1883 std::cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1885 allowed_to_read = kFALSE;
1889 if (allowed_to_read == kTRUE) {
1893 if (ok_read == kTRUE) {
1895 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
1901 <<
": .root file failed" << std::endl
1903 <<
"> not available in file." <<
fTTBELL << std::endl;
1924 TVectorD vec(VecDim);
1925 for (Int_t
i = 0;
i < VecDim;
i++) {
1926 vec(
i) = (Double_t)0.;
1932 Bool_t ok_open = kFALSE;
1933 Bool_t ok_read = kFALSE;
1936 Bool_t allowed_to_read = kFALSE;
1945 allowed_to_read = kTRUE;
1952 allowed_to_read = kTRUE;
1954 std::cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 1956 allowed_to_read = kFALSE;
1960 if (allowed_to_read == kTRUE) {
1964 if (ok_read == kTRUE) {
1966 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
1972 <<
": .root file failed" << std::endl
1974 <<
"> not available in file." <<
fTTBELL << std::endl;
1995 TVectorD vec(VecDim);
1996 for (Int_t
i = 0;
i < VecDim;
i++) {
1997 vec(
i) = (Double_t)0.;
2003 Bool_t ok_open = kFALSE;
2004 Bool_t ok_read = kFALSE;
2007 Bool_t allowed_to_read = kFALSE;
2016 allowed_to_read = kTRUE;
2023 allowed_to_read = kTRUE;
2026 <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2028 allowed_to_read = kFALSE;
2032 if (allowed_to_read == kTRUE) {
2036 if (ok_read == kTRUE) {
2038 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2043 std::cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2045 <<
" -> quantity: <" 2067 TVectorD vec(VecDim);
2068 for (Int_t
i = 0;
i < VecDim;
i++) {
2069 vec(
i) = (Double_t)0.;
2075 Bool_t ok_open = kFALSE;
2076 Bool_t ok_read = kFALSE;
2079 Bool_t allowed_to_read = kFALSE;
2088 allowed_to_read = kTRUE;
2096 allowed_to_read = kTRUE;
2098 std::cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2100 allowed_to_read = kFALSE;
2104 if (allowed_to_read == kTRUE) {
2108 if (ok_read == kTRUE) {
2110 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2116 <<
": .root file failed" << std::endl
2118 <<
"> not available in file." <<
fTTBELL << std::endl;
2139 TVectorD vec(VecDim);
2140 for (Int_t
i = 0;
i < VecDim;
i++) {
2141 vec(
i) = (Double_t)0.;
2147 Bool_t ok_open = kFALSE;
2148 Bool_t ok_read = kFALSE;
2151 Bool_t allowed_to_read = kFALSE;
2160 allowed_to_read = kTRUE;
2168 allowed_to_read = kTRUE;
2170 std::cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2172 allowed_to_read = kFALSE;
2176 if (allowed_to_read == kTRUE) {
2180 if (ok_read == kTRUE) {
2182 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2188 <<
": .root file failed" << std::endl
2190 <<
"> not available in file." <<
fTTBELL << std::endl;
2210 "ReadSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), VecDim);
2212 TVectorD vec(VecDim);
2213 for (Int_t
i = 0;
i < VecDim;
i++) {
2214 vec(
i) = (Double_t)0.;
2220 Bool_t ok_open = kFALSE;
2221 Bool_t ok_read = kFALSE;
2224 Bool_t allowed_to_read = kFALSE;
2233 allowed_to_read = kTRUE;
2241 allowed_to_read = kTRUE;
2244 <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2246 allowed_to_read = kFALSE;
2250 if (allowed_to_read == kTRUE) {
2254 if (ok_read == kTRUE) {
2256 for (Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++) {
2261 std::cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2263 <<
" -> quantity: <" 2289 TVectorD vecAverage(VecDim);
2290 for (Int_t
i = 0;
i < VecDim;
i++) {
2291 vecAverage(
i) = (Double_t)0.;
2296 vecMean(
i) = (Double_t)0.;
2301 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2302 vecAverage(i0StexStin) = 0;
2305 Int_t n1StexStin = i0StexStin + 1;
2309 vecAverage(i0StexStin) += vecMean(i0StexEcha);
2316 Int_t n1StinEcha = i0StinEcha + 1;
2317 if (n1StexStin == 10 && n1StinEcha == 11) {
2320 if (n1StexStin == 11 && n1StinEcha == 11) {
2323 if (!((n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11)) {
2324 vecAverage(i0StexStin) += vecMean(i0StexEcha);
2329 Double_t xdivis = (Double_t)0.;
2334 Int_t n1StexStin = i0StexStin + 1;
2338 vecAverage(i0StexStin) = vecAverage(i0StexStin) / xdivis;
2357 TVectorD vec(VecDim);
2358 for (Int_t
i = 0;
i < VecDim;
i++) {
2359 vec(
i) = (Double_t)0.;
2366 Bool_t ok_open = kFALSE;
2367 Bool_t ok_read = kFALSE;
2370 Bool_t allowed_to_read = kFALSE;
2379 allowed_to_read = kTRUE;
2387 allowed_to_read = kTRUE;
2389 std::cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " <<
file_name 2391 allowed_to_read = kFALSE;
2395 if (allowed_to_read == kTRUE) {
2399 if (ok_read == kTRUE) {
2401 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2407 <<
": .root file failed" << std::endl
2409 <<
"> not available in file." <<
fTTBELL << std::endl;
2430 TVectorD vec(VecDim);
2431 for (Int_t
i = 0;
i < VecDim;
i++) {
2432 vec(
i) = (Double_t)0.;
2439 Bool_t ok_open = kFALSE;
2440 Bool_t ok_read = kFALSE;
2443 Bool_t allowed_to_read = kFALSE;
2452 allowed_to_read = kTRUE;
2460 allowed_to_read = kTRUE;
2462 std::cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: " 2464 allowed_to_read = kFALSE;
2468 if (allowed_to_read == kTRUE) {
2472 if (ok_read == kTRUE) {
2474 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2480 <<
": .root file failed" << std::endl
2482 <<
"> not available in file." <<
fTTBELL << std::endl;
2503 TVectorD vec(VecDim);
2504 for (Int_t
i = 0;
i < VecDim;
i++) {
2505 vec(
i) = (Double_t)0.;
2512 Bool_t ok_open = kFALSE;
2513 Bool_t ok_read = kFALSE;
2516 Bool_t allowed_to_read = kFALSE;
2525 allowed_to_read = kTRUE;
2533 allowed_to_read = kTRUE;
2535 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2537 allowed_to_read = kFALSE;
2541 if (allowed_to_read == kTRUE) {
2545 if (ok_read == kTRUE) {
2547 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2552 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " 2554 <<
" -> quantity: <" 2576 TVectorD vec(VecDim);
2577 for (Int_t
i = 0;
i < VecDim;
i++) {
2578 vec(
i) = (Double_t)0.;
2585 Bool_t ok_open = kFALSE;
2586 Bool_t ok_read = kFALSE;
2589 Bool_t allowed_to_read = kFALSE;
2598 allowed_to_read = kTRUE;
2606 allowed_to_read = kTRUE;
2608 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2610 allowed_to_read = kFALSE;
2614 if (allowed_to_read == kTRUE) {
2618 if (ok_read == kTRUE) {
2620 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2625 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " 2627 <<
" -> quantity: <" 2648 "ReadAverageMeanCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), VecDim);
2650 TVectorD vec(VecDim);
2651 for (Int_t
i = 0;
i < VecDim;
i++) {
2652 vec(
i) = (Double_t)0.;
2659 Bool_t ok_open = kFALSE;
2660 Bool_t ok_read = kFALSE;
2663 Bool_t allowed_to_read = kFALSE;
2672 allowed_to_read = kTRUE;
2680 allowed_to_read = kTRUE;
2682 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed " 2685 allowed_to_read = kFALSE;
2689 if (allowed_to_read == kTRUE) {
2693 if (ok_read == kTRUE) {
2695 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2700 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2702 <<
" -> quantity: <" 2723 "ReadAverageSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), VecDim);
2725 TVectorD vec(VecDim);
2726 for (Int_t
i = 0;
i < VecDim;
i++) {
2727 vec(
i) = (Double_t)0.;
2734 Bool_t ok_open = kFALSE;
2735 Bool_t ok_read = kFALSE;
2738 Bool_t allowed_to_read = kFALSE;
2747 allowed_to_read = kTRUE;
2755 allowed_to_read = kTRUE;
2757 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file " 2760 allowed_to_read = kFALSE;
2764 if (allowed_to_read == kTRUE) {
2768 if (ok_read == kTRUE) {
2770 for (Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++) {
2775 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2777 <<
" -> quantity: <" 2796 const Int_t &i0StinEcha,
2797 const Int_t &MatDim) {
2807 TMatrixD mat(MatDim, MatDim);
2808 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
2809 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
2810 mat(
i,
j) = (Double_t)0.;
2819 Bool_t ok_open = kFALSE;
2820 Bool_t ok_read = kFALSE;
2823 Bool_t allowed_to_read = kFALSE;
2832 allowed_to_read = kTRUE;
2840 allowed_to_read = kTRUE;
2842 std::cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2844 allowed_to_read = kFALSE;
2848 if (allowed_to_read == kTRUE) {
2851 if (ok_read == kTRUE) {
2853 for (Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++) {
2854 for (Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++) {
2861 <<
": .root file failed" << std::endl
2863 <<
"> not available in file." <<
fTTBELL << std::endl;
2876 const Int_t &i0StinEcha,
2877 const Int_t &MatDim) {
2886 TMatrixD mat(MatDim, MatDim);
2887 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
2888 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
2889 mat(
i,
j) = (Double_t)0.;
2897 Bool_t ok_open = kFALSE;
2898 Bool_t ok_read = kFALSE;
2901 Bool_t allowed_to_read = kFALSE;
2910 allowed_to_read = kTRUE;
2918 allowed_to_read = kTRUE;
2920 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2922 allowed_to_read = kFALSE;
2926 if (allowed_to_read == kTRUE) {
2929 if (ok_read == kTRUE) {
2931 for (Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++) {
2932 for (Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++) {
2938 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> " 2940 <<
" -> quantity: <" 2953 const Int_t &i0StinEcha,
2954 const Int_t &InPutMatDim) {
2963 "ReadRelevantCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples",
fFileHeader->
fNbOfSamples, InPutMatDim);
2966 Int_t nb_of_relevant = InPutMatDim * (InPutMatDim - 1) / 2;
2967 TVectorD vec_rel(nb_of_relevant);
2968 for (Int_t
i = 0;
i < nb_of_relevant;
i++) {
2969 vec_rel(
i) = (Double_t)0.;
2975 Bool_t ok_open = kFALSE;
2976 Bool_t ok_read = kFALSE;
2979 Bool_t allowed_to_read = kFALSE;
2988 allowed_to_read = kTRUE;
2996 allowed_to_read = kTRUE;
2999 <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 3001 allowed_to_read = kFALSE;
3005 if (allowed_to_read == kTRUE) {
3008 if (ok_read == kTRUE) {
3011 for (Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++) {
3012 for (Int_t j_samp = 0; j_samp < i_samp; j_samp++) {
3019 std::cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> " 3021 <<
" -> quantity: <" 3036 const Int_t &n1StexStin_b,
3037 const Int_t &MatDim) {
3044 "ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3049 TMatrixD mat(MatDim, MatDim);
3050 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3051 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3052 mat(
i,
j) = (Double_t)0.;
3061 Bool_t ok_open = kFALSE;
3062 Bool_t ok_read = kFALSE;
3065 Bool_t allowed_to_read = kFALSE;
3074 allowed_to_read = kTRUE;
3082 allowed_to_read = kTRUE;
3084 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3087 allowed_to_read = kFALSE;
3091 if (allowed_to_read == kTRUE) {
3095 if (ok_read == kTRUE) {
3097 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3098 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3099 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3100 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3106 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3108 <<
" -> quantity: <" 3123 const Int_t &n1StexStin_b,
3124 const Int_t &MatDim) {
3131 "ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3136 TMatrixD mat(MatDim, MatDim);
3137 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3138 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3139 mat(
i,
j) = (Double_t)0.;
3148 Bool_t ok_open = kFALSE;
3149 Bool_t ok_read = kFALSE;
3152 Bool_t allowed_to_read = kFALSE;
3161 allowed_to_read = kTRUE;
3169 allowed_to_read = kTRUE;
3171 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed " 3174 allowed_to_read = kFALSE;
3178 if (allowed_to_read == kTRUE) {
3183 if (ok_read == kTRUE) {
3185 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3186 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3187 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3188 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3194 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3196 <<
" -> quantity: <" 3211 const Int_t &n1StexStin_b,
3212 const Int_t &MatDim) {
3219 "ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3224 TMatrixD mat(MatDim, MatDim);
3225 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3226 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3227 mat(
i,
j) = (Double_t)0.;
3236 Bool_t ok_open = kFALSE;
3237 Bool_t ok_read = kFALSE;
3240 Bool_t allowed_to_read = kFALSE;
3249 allowed_to_read = kTRUE;
3257 allowed_to_read = kTRUE;
3259 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3262 allowed_to_read = kFALSE;
3266 if (allowed_to_read == kTRUE) {
3270 if (ok_read == kTRUE) {
3272 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3273 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3274 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3275 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3281 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3283 <<
" -> quantity: <" 3298 const Int_t &n1StexStin_b,
3299 const Int_t &MatDim) {
3306 "ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
fEcal->
MaxCrysInStin(), MatDim);
3311 TMatrixD mat(MatDim, MatDim);
3312 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3313 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3314 mat(
i,
j) = (Double_t)0.;
3323 Bool_t ok_open = kFALSE;
3324 Bool_t ok_read = kFALSE;
3327 Bool_t allowed_to_read = kFALSE;
3336 allowed_to_read = kTRUE;
3344 allowed_to_read = kTRUE;
3346 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file " 3349 allowed_to_read = kFALSE;
3353 if (allowed_to_read == kTRUE) {
3358 if (ok_read == kTRUE) {
3360 for (Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++) {
3361 Int_t i_cna_chan = index_Stin_a * MatDim + i_crys;
3362 for (Int_t j_crys = 0; j_crys - MatDim < 0; j_crys++) {
3363 Int_t j_cna_chan = index_Stin_b * MatDim + j_crys;
3369 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3371 <<
" -> quantity: <" 3392 "ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3395 TMatrixD mat(MatDim, MatDim);
3396 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3397 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3398 mat(
i,
j) = (Double_t)0.;
3404 vec(
i) = (Double_t)0.;
3413 Bool_t ok_open = kFALSE;
3414 Bool_t ok_read = kFALSE;
3417 Bool_t allowed_to_read = kFALSE;
3426 allowed_to_read = kTRUE;
3434 allowed_to_read = kTRUE;
3436 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3439 allowed_to_read = kFALSE;
3443 if (allowed_to_read == kTRUE) {
3447 if (ok_read == kTRUE) {
3468 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3470 <<
" -> quantity: <" 3491 "ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3494 TMatrixD mat(MatDim, MatDim);
3495 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3496 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3497 mat(
i,
j) = (Double_t)0.;
3503 vec(
i) = (Double_t)0.;
3512 Bool_t ok_open = kFALSE;
3513 Bool_t ok_read = kFALSE;
3516 Bool_t allowed_to_read = kFALSE;
3525 allowed_to_read = kTRUE;
3533 allowed_to_read = kTRUE;
3535 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed " 3538 allowed_to_read = kFALSE;
3542 if (allowed_to_read == kTRUE) {
3546 if (ok_read == kTRUE) {
3567 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3569 <<
" -> quantity: <" 3590 "ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3593 TMatrixD mat(MatDim, MatDim);
3594 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3595 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3596 mat(
i,
j) = (Double_t)0.;
3602 vec(
i) = (Double_t)0.;
3611 Bool_t ok_open = kFALSE;
3612 Bool_t ok_read = kFALSE;
3615 Bool_t allowed_to_read = kFALSE;
3624 allowed_to_read = kTRUE;
3632 allowed_to_read = kTRUE;
3634 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed " 3637 allowed_to_read = kFALSE;
3641 if (allowed_to_read == kTRUE) {
3645 if (ok_read == kTRUE) {
3666 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3668 <<
" -> quantity: <" 3689 "ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
fEcal->
MaxCrysEcnaInStex(), MatDim);
3692 TMatrixD mat(MatDim, MatDim);
3693 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3694 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3695 mat(
i,
j) = (Double_t)0.;
3701 vec(
i) = (Double_t)0.;
3710 Bool_t ok_open = kFALSE;
3711 Bool_t ok_read = kFALSE;
3714 Bool_t allowed_to_read = kFALSE;
3723 allowed_to_read = kTRUE;
3731 allowed_to_read = kTRUE;
3733 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file " 3736 allowed_to_read = kFALSE;
3740 if (allowed_to_read == kTRUE) {
3744 if (ok_read == kTRUE) {
3765 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3767 <<
" -> quantity: <" 3788 "ReadLowFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
fEcal->
MaxStinEcnaInStex(), MatDim);
3790 TMatrixD mat(MatDim, MatDim);
3791 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3792 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3793 mat(
i,
j) = (Double_t)0.;
3799 vec(
i) = (Double_t)0.;
3808 Bool_t ok_open = kFALSE;
3809 Bool_t ok_read = kFALSE;
3812 Bool_t allowed_to_read = kFALSE;
3821 allowed_to_read = kTRUE;
3829 allowed_to_read = kTRUE;
3831 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file " 3834 allowed_to_read = kFALSE;
3838 if (allowed_to_read == kTRUE) {
3842 if (ok_read == kTRUE) {
3844 for (Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++) {
3845 for (Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++) {
3846 if (vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim) {
3847 if (vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim) {
3848 Int_t vec_ia_m = (Int_t)vec(index_Stin_a) - 1;
3849 Int_t vec_ib_m = (Int_t)vec(index_Stin_b) - 1;
3857 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 3859 <<
" -> quantity: <" 3880 "fEcal->MaxStinEcnaInStex()",
3884 TMatrixD mat(MatDim, MatDim);
3885 for (Int_t
i = 0;
i - MatDim < 0;
i++) {
3886 for (Int_t
j = 0;
j - MatDim < 0;
j++) {
3887 mat(
i,
j) = (Double_t)0.;
3893 vec(
i) = (Double_t)0.;
3902 Bool_t ok_open = kFALSE;
3903 Bool_t ok_read = kFALSE;
3906 Bool_t allowed_to_read = kFALSE;
3915 allowed_to_read = kTRUE;
3923 allowed_to_read = kTRUE;
3925 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file " 3928 allowed_to_read = kFALSE;
3932 if (allowed_to_read == kTRUE) {
3936 if (ok_read == kTRUE) {
3938 for (Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++) {
3939 for (Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++) {
3940 if (vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim) {
3941 if (vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim) {
3942 Int_t vec_ia_m = (Int_t)vec(index_Stin_a) - 1;
3943 Int_t vec_ib_m = (Int_t)vec(index_Stin_b) - 1;
3944 mat((Int_t)vec_ia_m, (Int_t)vec_ib_m) =
3952 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 3954 <<
" -> quantity: <" 3989 for (Int_t i0StexEcha = 0; i0StexEcha < DimX; i0StexEcha++) {
3991 for (Int_t j_samp = 0; j_samp < DimY; j_samp++) {
3998 for (Int_t iza = 0; iza < DimX; iza++) {
3999 for (Int_t izb = 0; izb < DimY; izb++) {
4000 for (Int_t izc = 0; izc < DimZ; izc++) {
4013 Bool_t ok_open = kFALSE;
4014 Bool_t ok_read = kFALSE;
4017 Int_t i_entry_fail = 0;
4021 if (ok_open == kTRUE) {
4022 for (Int_t i0StexEcha = 0; i0StexEcha < DimX; i0StexEcha++) {
4023 if (i0StexEcha == 0) {
4031 if (i0StexEcha > 0) {
4036 if (ok_read == kTRUE) {
4039 for (Int_t i_bin = 0; i_bin < DimZ; i_bin++) {
4046 std::cout <<
"!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> " 4048 <<
" -> quantity: <" 4057 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4058 <<
" ROOT file not found" <<
fTTBELL << std::endl;
4061 if (i_entry_fail > 0) {
4062 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4063 <<
" Entry reading failure(s). i_entry_fail = " << i_entry_fail <<
fTTBELL << std::endl;
4076 Int_t xFapNbOfEvts = 0;
4080 NOFE_histp(
i) = (Double_t)0.;
4089 NOFE_int[
i] = (Int_t)NOFE_histp(
i);
4098 return xFapNbOfEvts;
4107 TString quantity_name =
"?";
4111 quantity_name =
"SM numbers";
4114 quantity_name =
"Dee numbers";
4118 quantity_name =
"Mean samples";
4121 quantity_name =
"Sigma of samples";
4125 quantity_name =
"Number of events";
4128 quantity_name =
"Pedestals";
4131 quantity_name =
"Total noise";
4134 quantity_name =
"LF noise";
4137 quantity_name =
"HF noise";
4140 quantity_name =
"Mean cor(s,s')";
4143 quantity_name =
"Sigma of cor(s,s')";
4147 quantity_name =
"Average pedestals";
4150 quantity_name =
"Average total noise";
4153 quantity_name =
"Average LF noise";
4156 quantity_name =
"Average HF noise";
4159 quantity_name =
"Average mean cor(s,s')";
4162 quantity_name =
"Average sigma of cor(s,s')";
4166 quantity_name =
"Sample ADC a.f.o event number";
4170 quantity_name =
"Cov(s,s')";
4173 quantity_name =
"Cor(s,s')";
4176 quantity_name =
"LF Cov(c,c')";
4179 quantity_name =
"LF Cor(c,c')";
4182 quantity_name =
"HF Cov(c,c')";
4185 quantity_name =
"HF Cor(c,c')";
4190 quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";
4193 quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";
4198 quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";
4201 quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";
4204 return quantity_name;
4227 vec(
i) = (Double_t)0.;
4230 number = (Int_t)vec(i0StexStinEcna);
4248 <<
" n1StexStin = " << n1StexStin << std::endl
4252 Int_t Stin_index = n1StexStin - 1;
4256 Int_t Stin_index = -1;
4259 vec(
i) = (Double_t)0.;
4267 std::cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = " << vec[
i] << std::endl;
4269 if (vec[
i] == n1StexStin) {
4275 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;
4276 std::cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << std::endl
4277 <<
" Stin index : " << Stin_index << std::endl;
4278 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;
4281 if (Stin_index < 0) {
4283 std::cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : " 4284 <<
"index Stin not found" <<
fTTBELL << std::endl;
4302 std::cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << std::endl;
4309 std::cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << std::endl;
4316 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 &)
const TString & GetRootFileNameShort() const
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 &)
const TString & GetStartDate() const
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)
const TString & GetStopDate() const
const TString & GetRootFileName() const
TString fRootFileNameShort
Int_t GetFirstReqEvtNumber()
Bool_t ReadRootFileHeader(const Int_t &)
R__EXTERN TEcnaRootFile * gCnaRootFile
const TString & GetRootFileNameShort() const
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 &)
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 &)
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 &)
const TString & GetRootFileName() const
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 &)
const TString & GetAnalysisName() const
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()
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()
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 &)