29 Long_t i_this = (Long_t)
this;
36 if( iCnaParCout == 0 )
44 if( iCnaParPaths == 0 )
51 Long_t iEcalNumbering = pObjectManager->
GetPointerValue(
"TEcnaNumbering");
52 if( iEcalNumbering == 0 )
59 Long_t iCnaParHistos = pObjectManager->
GetPointerValue(
"TEcnaParHistos");
60 if( iCnaParHistos == 0 )
88 const Text_t *h_name =
"CnaHeader";
89 const Text_t *h_title =
"CnaHeader";
99 if( iFileHeader == 0 )
236 std::cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> " 237 <<
" It is time to write a copy constructor" 271 std::cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << std::endl;}
289 std::cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = " 299 std::cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << std::endl;}
314 const Int_t& n1StexStin,
const Int_t& i0StinEcha,
const Int_t& n1Sample)
318 if( VecDim == VecDimTest )
320 TVectorD vec(VecDim);
322 TString CallingMethod =
"1D";
325 if( StandardQuantity ==
"Adc" )
327 Int_t i0Sample = n1Sample-1;
332 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
333 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
334 <<
"(StandardQuantity = " << StandardQuantity
335 <<
"). Wrong code, no file reading." <<
fTTBELL << std::endl;
341 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
342 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
343 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")" 344 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
352 if( VecDim == VecDimTest )
354 TVectorD vec(VecDim);
356 TString CallingMethod =
"1D";
359 if( StandardQuantity ==
"MSp" || StandardQuantity ==
"SSp" )
361 if( StandardQuantity ==
"MSp" ){vec =
ReadSampleMeans(n1StexStin, VecDim);}
362 if( StandardQuantity ==
"SSp" ){vec =
ReadSampleSigmas(n1StexStin, VecDim);}
366 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
367 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
368 <<
", StandardQuantity = " << StandardQuantity
369 <<
". Wrong code, no file reading." <<
fTTBELL << std::endl;
375 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
376 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
377 <<
", VecDim = " << VecDim <<
"(VecDimTest = " << VecDimTest <<
")" 378 <<
". Wrong code or array dimension. No file reading." <<
fTTBELL << std::endl;
388 Int_t VecDimTest = 1;
393 if( VecDim == VecDimTest )
395 TVectorD vec(VecDim);
397 TString CallingMethod =
"1D";
398 TString StandardQuantity =
"?";
400 TString rTechReadCode =
GetTechReadCode(StandardQuantity, StandardDetector);
402 if( rTechReadCode !=
"?" )
404 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee")
415 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" )
422 TString xStartDate =
"sStartDate";
423 TString xStopDate =
"sStopDate";
427 Int_t n1Stex = i0Stex+1;
440 if( rTechReadCode ==
"MCsStas" )
442 if( rTechReadCode ==
"SCsStas" )
463 if( cStartTime < xStartTime ){xStartTime = cStartTime; xStartDate = cStartDate;}
464 if( cStopTime > xStopTime ){xStopTime = cStopTime; xStopDate = cStopDate;}
471 std::cout <<
"!TEcnaRead::Read1DHisto(const TString&, const TString&)> *ERROR* =====> " 472 <<
" ROOT file not found" <<
fTTBELL << std::endl;
479 for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
480 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
481 <<
", UserDetector = " << UserDetector
482 <<
". Wrong code(s). No file reading." <<
fTTBELL << std::endl;
488 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i) = (double_t)0.;}
489 std::cout <<
"!TEcnaRead::Read1DHisto(...)> UserQuantity = " << UserQuantity
490 <<
", UserDetector = " << UserDetector <<
", VecDim = " << VecDim
491 <<
". Wrong code(s) or array dimension. No file reading." <<
fTTBELL << std::endl;
502 const Int_t& nb_arg_1,
const Int_t& nb_arg_2)
504 TMatrixD mat(MatDim, MatDim);
505 TString CallingMethod =
"2D";
506 TString StandardMatrixType =
"?";
507 TString StandardBetweenWhat =
"?";
512 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
514 if( StandardBetweenWhat ==
"Mss" )
516 Int_t n1StexStin = nb_arg_1;
517 Int_t i0StinEcha = nb_arg_2;
519 if( StandardMatrixType ==
"Cov" )
522 if( StandardMatrixType ==
"Cor" )
526 if( StandardBetweenWhat !=
"Mss" )
528 Int_t n1StexStin_a = nb_arg_1;
529 Int_t n1StexStin_b = nb_arg_2;
531 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
534 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
537 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
540 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
546 for(Int_t
i=0;
i-MatDim<0;
i++)
547 {
for(Int_t j=0; j-MatDim<0; j++)
548 {mat(
i,j) = (double_t)0.;}}
549 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
550 <<
", UserBetweenWhat = " << UserBetweenWhat
551 <<
". Wrong code(s), no file reading." <<
fTTBELL << std::endl;
559 TMatrixD mat(MatDim, MatDim);
560 TString CallingMethod =
"2D";
561 TString StandardMatrixType =
"?";
562 TString StandardBetweenWhat =
"?";
567 if( StandardMatrixType !=
"?" && StandardBetweenWhat !=
"?" )
570 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccLF" )
573 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccLF" )
576 if( StandardMatrixType ==
"Cov" && StandardBetweenWhat ==
"MccHF" )
579 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MccHF" )
583 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttLF" )
586 if( StandardMatrixType ==
"Cor" && StandardBetweenWhat ==
"MttHF" )
591 for(Int_t
i=0;
i-MatDim<0;
i++)
592 {
for(Int_t j=0; j-MatDim<0; j++)
593 {mat(
i,j) = (double_t)0.;}}
594 std::cout <<
"!TEcnaRead::ReadMatrix(...)> UserCorOrCov = " << UserCorOrCov
595 <<
", UserBetweenWhat = " << UserBetweenWhat
596 <<
". Wrong code(s), no file reading." <<
fTTBELL << std::endl;
604 TString rTechReadCode =
"?";
605 TString dTechDetector =
"?";
607 if( StandardDetector ==
"SM" || StandardDetector ==
"Dee"){dTechDetector =
"Stex";}
608 if( StandardDetector ==
"EB" || StandardDetector ==
"EE" ){dTechDetector =
"Stas";}
610 if( dTechDetector ==
"?")
612 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** dTechDetector = " 613 << dTechDetector <<
", StandardDetector = " << StandardDetector
618 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stex" ){rTechReadCode =
"NOEStex";}
619 if( StandardQuantity ==
"NOE" && dTechDetector ==
"Stas" ){rTechReadCode =
"NOEStas";}
620 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stex" ){rTechReadCode =
"PedStex";}
621 if( StandardQuantity ==
"Ped" && dTechDetector ==
"Stas" ){rTechReadCode =
"PedStas";}
622 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stex" ){rTechReadCode =
"TNoStex";}
623 if( StandardQuantity ==
"TNo" && dTechDetector ==
"Stas" ){rTechReadCode =
"TNoStas";}
624 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"LFNStex";}
625 if( StandardQuantity ==
"LFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"LFNStas";}
626 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stex" ){rTechReadCode =
"HFNStex";}
627 if( StandardQuantity ==
"HFN" && dTechDetector ==
"Stas" ){rTechReadCode =
"HFNStas";}
628 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"MCsStex";}
629 if( StandardQuantity ==
"MCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"MCsStas";}
630 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stex" ){rTechReadCode =
"SCsStex";}
631 if( StandardQuantity ==
"SCs" && dTechDetector ==
"Stas" ){rTechReadCode =
"SCsStas";}
634 if( rTechReadCode ==
"?")
636 std::cout <<
"!TEcnaRead::GetTechReadCode(...)> *** ERROR: wrong standard code *** rTechReadCode = " << rTechReadCode
637 <<
", StandardQuantity = " << StandardQuantity
641 return rTechReadCode;
650 const Int_t& run_number,
const Int_t& nfirst,
651 const Int_t&
nlast,
const Int_t& nreqevts,
652 const Int_t& Stex,
const TString& path_root)
658 TString sTypAna = typ_ana;
659 Int_t nNbOfSamples = nb_of_samples;
660 Int_t nRunNumber = run_number;
661 Int_t nFirstEvt = nfirst;
662 Int_t nLastEvt =
nlast;
663 Int_t nReqNbOfEvts = nreqevts;
664 Int_t nStexNumber = Stex;
667 const Text_t *h_name =
"CnaHeader";
668 const Text_t *h_title =
"CnaHeader";
687 nFirstEvt, nLastEvt, nReqNbOfEvts, nStexNumber);
711 std::cout <<
"*TEcnaRead::FileParameters(...)>" << std::endl
712 <<
" The method has been called with the following argument values:" << std::endl
713 <<
" Analysis name = " 715 <<
" Nb of required samples = " 719 <<
" First requested event number = " 721 <<
" Last requested event number = " 723 <<
" Requested number of events = " 727 <<
" Path for the ROOT file = " 760 TString cType =
"run type not defined";
764 if( numtype == 0 ){cType =
"COSMICS";}
765 if( numtype == 1 ){cType =
"BEAMH4";}
766 if( numtype == 2 ){cType =
"BEAMH2";}
767 if( numtype == 3 ){cType =
"MTCC";}
768 if( numtype == 4 ){cType =
"LASER_STD";}
769 if( numtype == 5 ){cType =
"LASER_POWER_SCAN";}
770 if( numtype == 6 ){cType =
"LASER_DELAY_SCAN";}
771 if( numtype == 7 ){cType =
"TESTPULSE_SCAN_MEM";}
772 if( numtype == 8 ){cType =
"TESTPULSE_MGPA";}
773 if( numtype == 9 ){cType =
"PEDESTAL_STD";}
774 if( numtype == 10 ){cType =
"PEDESTAL_OFFSET_SCAN";}
775 if( numtype == 11 ){cType =
"PEDESTAL_25NS_SCAN";}
776 if( numtype == 12 ){cType =
"LED_STD";}
778 if( numtype == 13 ){cType =
"PHYSICS_GLOBAL";}
779 if( numtype == 14 ){cType =
"COSMICS_GLOBAL";}
780 if( numtype == 15 ){cType =
"HALO_GLOBAL";}
782 if( numtype == 16 ){cType =
"LASER_GAP";}
783 if( numtype == 17 ){cType =
"TESTPULSE_GAP";}
784 if( numtype == 18 ){cType =
"PEDESTAL_GAP";}
785 if( numtype == 19 ){cType =
"LED_GAP";}
787 if( numtype == 20 ){cType =
"PHYSICS_LOCAL";}
788 if( numtype == 21 ){cType =
"COSMICS_LOCAL";}
789 if( numtype == 22 ){cType =
"HALO_LOCAL";}
790 if( numtype == 23 ){cType =
"CALIB_LOCAL";}
792 if( numtype == 24 ){cType =
"PEDSIM";}
810 Bool_t ok_open = kFALSE;
832 if( iCnaRootFile == 0 )
846 if ( ok_open == kFALSE )
848 std::cout <<
"!TEcnaRead::OpenRootFile> " << s_name.Data() <<
": file not found." << std::endl;
856 std::cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << s_name.Data() <<
" OK " 864 <<
", gCnaRootFile = " <<
gCnaRootFile << std::endl << std::endl;
878 Bool_t ok_close = kFALSE;
887 TString e_path; e_path.Append(name);
888 std::cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << std::endl;}
891 std::cout <<
"*TEcnaRead::CloseRootFile(...)> going to delete gCnaRootFile, gCnaRootFile = " <<
gCnaRootFile 892 <<
", pointer = " << pointer_value << std::endl;}
903 std::cout <<
"*TEcnaRead::CloseRootFile(...)> RootFile pointer equal to zero. Close not possible. gCnaRootFile = " 910 std::cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open. fOpenRootFile = " <<
fOpenRootFile 956 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 957 <<
" ROOT file not found " <<
fTTBELL << std::endl;
963 std::cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>" 964 <<
" FileParameters not called " <<
fTTBELL << std::endl;
995 if( i_print == 1 ){
std::cout <<
"*TEcnaRead::ReadRootFileHeader> file_name = " 998 Bool_t ok_open = kFALSE;
1001 Bool_t allowed_to_read = kFALSE;
1011 allowed_to_read = kTRUE;
1019 allowed_to_read = kTRUE;
1023 std::cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open .root file failed for file: " 1024 << file_name <<
fTTBELL << std::endl;
1025 allowed_to_read = kFALSE;
1029 if( allowed_to_read == kTRUE )
1077 const Int_t& MaxValue,
const Int_t& VecDim)
1081 if( MaxValue != VecDim)
1083 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1084 <<
", MaxName: " << MaxName.Data()
1085 <<
", Maxvalue = " << MaxValue
1086 <<
", VecDim = " << VecDim <<
fTTBELL << std::endl;
1092 std::cout <<
"!TEcnaRead::TestArrayDimH1(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1093 <<
", MaxName: " << MaxName.Data()
1094 <<
", Maxvalue = " << MaxValue
1095 <<
", VecDim = " << VecDim << std::endl;
1101 const Int_t& MaxValue,
const Int_t& MatDim)
1105 if( MaxValue != MatDim)
1107 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> No matching for array dimension: CallingMethod: " << CallingMethod.Data()
1108 <<
", MaxName: " << MaxName.Data()
1109 <<
", Maxvalue = " << MaxValue
1110 <<
", MatDim = " << MatDim <<
fTTBELL << std::endl;
1116 std::cout <<
"!TEcnaRead::TestArrayDimH2(...)> matching array dimension: OK. CallingMethod: " << CallingMethod.Data()
1117 <<
", MaxName: " << MaxName.Data()
1118 <<
", Maxvalue = " << MaxValue
1119 <<
", MatDim = " << MatDim << std::endl;
1138 TVectorD vec(VecDim);
1142 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1153 Bool_t ok_open = kFALSE;
1154 Bool_t ok_read = kFALSE;
1157 Bool_t allowed_to_read = kFALSE;
1167 allowed_to_read = kTRUE;
1176 allowed_to_read = kTRUE;
1180 std::cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Open .root file failed for file: " 1181 << file_name <<
fTTBELL << std::endl;
1182 allowed_to_read = kFALSE;
1187 if( allowed_to_read == kTRUE )
1192 if( ok_read == kTRUE )
1196 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1206 std::cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> " 1208 <<
" -> quantity: <" 1215 if( ok_read == kTRUE )
1220 for(Int_t
i=0;
i < VecDim;
i++)
1222 std::cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = " 1223 << vec[
i] << std::endl;
1231 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
1249 const Int_t&
sample,
const Int_t& VecDim)
1260 TVectorD vec(VecDim);
1261 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1268 Bool_t ok_open = kFALSE;
1269 Bool_t ok_read = kFALSE;
1272 Bool_t allowed_to_read = kFALSE;
1282 allowed_to_read = kTRUE;
1291 allowed_to_read = kTRUE;
1295 std::cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> Open .root file failed for file: " 1296 << file_name <<
fTTBELL << std::endl;
1297 allowed_to_read = kFALSE;
1302 if( allowed_to_read == kTRUE )
1306 if ( ok_read == kTRUE )
1309 for ( Int_t i_bin=0; i_bin<VecDim; i_bin++)
1317 std::cout <<
"!TEcnaRead::ReadSampleAdcValues(...) *** ERROR ***> " 1319 <<
" -> quantity: <" 1336 const Int_t & VecDim)
1348 TVectorD vec(VecDim);
1349 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1356 Bool_t ok_open = kFALSE;
1357 Bool_t ok_read = kFALSE;
1360 Bool_t allowed_to_read = kFALSE;
1370 allowed_to_read = kTRUE;
1378 allowed_to_read = kTRUE;
1382 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " 1383 << file_name <<
fTTBELL << std::endl;
1384 allowed_to_read = kFALSE;
1389 if( allowed_to_read == kTRUE )
1394 if ( ok_read == kTRUE )
1397 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1405 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " 1424 TestArrayDimH1(
"ReadSampleMeans",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1427 TVectorD vec(VecDim);
1428 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1435 Bool_t ok_open = kFALSE;
1436 Bool_t ok_read = kFALSE;
1439 Bool_t allowed_to_read = kFALSE;
1449 allowed_to_read = kTRUE;
1458 allowed_to_read = kTRUE;
1462 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> Open .root file failed for file: " 1463 << file_name <<
fTTBELL << std::endl;
1464 allowed_to_read = kFALSE;
1469 if( allowed_to_read == kTRUE )
1474 if ( ok_read == kTRUE )
1491 std::cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> " 1493 <<
" -> quantity: <" 1508 const Int_t & VecDim)
1520 TVectorD vec(VecDim);
1543 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " 1544 << file_name <<
fTTBELL << std::endl;
1554 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1562 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " 1564 <<
" -> quantity: <" 1580 TestArrayDimH1(
"ReadSampleSigmas",
"fFileHeader->fNbOfSamples*fEcal->MaxCrysInStin()",
1583 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1590 Bool_t ok_open = kFALSE;
1591 Bool_t ok_read = kFALSE;
1594 Bool_t allowed_to_read = kFALSE;
1604 allowed_to_read = kTRUE;
1613 allowed_to_read = kTRUE;
1617 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> Open .root file failed for file: " 1618 << file_name <<
fTTBELL << std::endl;
1619 allowed_to_read = kFALSE;
1624 if( allowed_to_read == kTRUE )
1629 if ( ok_read == kTRUE )
1646 std::cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> " 1648 <<
" -> quantity: <" 1673 TVectorD vec(VecDim);
1674 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1684 Int_t n1StexStin = iStexStin+1;
1690 vec(i0StexEcha) = 0;
1693 {vec(i0StexEcha) += mat(i0StinEcha, i_samp);}
1706 const Int_t& MatDimX,
const Int_t& MatDimY)
1717 TMatrixD mat(MatDimX, MatDimY);
1718 for(Int_t
i=0;
i-MatDimX<0;
i++)
1719 {
for(Int_t j=0; j-MatDimY<0; j++){mat(
i,j)=(Double_t)0.;}}
1722 if( Stin_index >= 0 )
1730 Bool_t ok_open = kFALSE;
1731 Bool_t ok_read = kFALSE;
1734 Bool_t allowed_to_read = kFALSE;
1744 allowed_to_read = kTRUE;
1752 allowed_to_read = kTRUE;
1756 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> Open .root file failed for file: " 1757 << file_name <<
fTTBELL << std::endl;
1758 allowed_to_read = kFALSE;
1763 if( allowed_to_read == kTRUE )
1768 if ( ok_read == kTRUE )
1771 for (Int_t i_crys=0; i_crys-MatDimX<0; i_crys++)
1773 Int_t j_cna_chan = Stin_index*MatDimX + i_crys;
1774 for ( Int_t i_samp=0; i_samp-MatDimY<0; i_samp++)
1783 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1785 <<
" -> quantity: <" 1794 std::cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> " 1795 <<
"It is not possible to access the number of found events: the ROOT file has not been read." 1817 TVectorD vec(VecDim);
1818 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1824 Bool_t ok_open = kFALSE;
1825 Bool_t ok_read = kFALSE;
1828 Bool_t allowed_to_read = kFALSE;
1838 allowed_to_read = kTRUE;
1846 allowed_to_read = kTRUE;
1850 std::cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> Open .root file failed for file: " 1851 << file_name <<
fTTBELL << std::endl;
1852 allowed_to_read = kFALSE;
1857 if( allowed_to_read == kTRUE )
1862 if ( ok_read == kTRUE )
1865 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1873 std::cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> " 1875 <<
" -> quantity: <" 1899 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1904 Bool_t ok_open = kFALSE;
1905 Bool_t ok_read = kFALSE;
1908 Bool_t allowed_to_read = kFALSE;
1918 allowed_to_read = kTRUE;
1926 allowed_to_read = kTRUE;
1930 std::cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> Open .root file failed for file: " 1931 << file_name <<
fTTBELL << std::endl;
1932 allowed_to_read = kFALSE;
1937 if( allowed_to_read == kTRUE )
1942 if ( ok_read == kTRUE )
1945 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
1953 std::cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> " 1955 <<
" -> quantity: <" 1976 TestArrayDimH1(
"ReadMeanCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
1979 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1984 Bool_t ok_open = kFALSE;
1985 Bool_t ok_read = kFALSE;
1988 Bool_t allowed_to_read = kFALSE;
1998 allowed_to_read = kTRUE;
2006 allowed_to_read = kTRUE;
2010 std::cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2011 << file_name <<
fTTBELL << std::endl;
2012 allowed_to_read = kFALSE;
2017 if( allowed_to_read == kTRUE )
2022 if ( ok_read == kTRUE )
2025 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2033 std::cout <<
"!TEcnaRead::ReadMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2035 <<
" -> quantity: <" 2059 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2064 Bool_t ok_open = kFALSE;
2065 Bool_t ok_read = kFALSE;
2068 Bool_t allowed_to_read = kFALSE;
2078 allowed_to_read = kTRUE;
2087 allowed_to_read = kTRUE;
2091 std::cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2092 << file_name <<
fTTBELL << std::endl;
2093 allowed_to_read = kFALSE;
2098 if( allowed_to_read == kTRUE )
2103 if ( ok_read == kTRUE )
2106 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2114 std::cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> " 2116 <<
" -> quantity: <" 2140 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2145 Bool_t ok_open = kFALSE;
2146 Bool_t ok_read = kFALSE;
2149 Bool_t allowed_to_read = kFALSE;
2159 allowed_to_read = kTRUE;
2168 allowed_to_read = kTRUE;
2172 std::cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2173 << file_name <<
fTTBELL << std::endl;
2174 allowed_to_read = kFALSE;
2179 if( allowed_to_read == kTRUE )
2184 if ( ok_read == kTRUE )
2187 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2195 std::cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> " 2197 <<
" -> quantity: <" 2219 TestArrayDimH1(
"ReadSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxCrysEcnaInStex()",
2222 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2227 Bool_t ok_open = kFALSE;
2228 Bool_t ok_read = kFALSE;
2231 Bool_t allowed_to_read = kFALSE;
2241 allowed_to_read = kTRUE;
2250 allowed_to_read = kTRUE;
2254 std::cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2255 << file_name <<
fTTBELL << std::endl;
2256 allowed_to_read = kFALSE;
2261 if( allowed_to_read == kTRUE )
2266 if ( ok_read == kTRUE )
2269 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2277 std::cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2279 <<
" -> quantity: <" 2307 TVectorD vecAverage(VecDim);
2308 for(Int_t
i=0;
i<VecDim;
i++){vecAverage(
i)=(Double_t)0.;}
2315 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2317 vecAverage(i0StexStin) = 0;
2321 Int_t n1StexStin = i0StexStin+1;
2325 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2332 Int_t n1StinEcha = i0StinEcha+1;
2333 if( n1StexStin == 10 && n1StinEcha == 11 )
2335 if( n1StexStin == 11 && n1StinEcha == 11 )
2337 if( !( (n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11 ) )
2338 {vecAverage(i0StexStin) += vecMean(i0StexEcha);}
2342 Double_t xdivis = (Double_t)0.;
2347 Int_t n1StexStin = i0StexStin+1;
2351 vecAverage(i0StexStin) = vecAverage(i0StexStin)/xdivis;
2371 TVectorD vec(VecDim);
2372 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2378 Bool_t ok_open = kFALSE;
2379 Bool_t ok_read = kFALSE;
2382 Bool_t allowed_to_read = kFALSE;
2392 allowed_to_read = kTRUE;
2401 allowed_to_read = kTRUE;
2405 std::cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> Open .root file failed for file: " 2406 << file_name <<
fTTBELL << std::endl;
2407 allowed_to_read = kFALSE;
2412 if( allowed_to_read == kTRUE )
2417 if ( ok_read == kTRUE )
2420 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2428 std::cout <<
"!TEcnaRead::ReadAveragePedestals(...) *** ERROR ***> " 2430 <<
" -> quantity: <" 2454 TVectorD vec(VecDim);
2455 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2461 Bool_t ok_open = kFALSE;
2462 Bool_t ok_read = kFALSE;
2465 Bool_t allowed_to_read = kFALSE;
2475 allowed_to_read = kTRUE;
2484 allowed_to_read = kTRUE;
2488 std::cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> Open .root file failed for file: " 2489 << file_name <<
fTTBELL << std::endl;
2490 allowed_to_read = kFALSE;
2495 if( allowed_to_read == kTRUE )
2500 if ( ok_read == kTRUE )
2503 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2511 std::cout <<
"!TEcnaRead::ReadAverageTotalNoise(...) *** ERROR ***> " 2513 <<
" -> quantity: <" 2537 TVectorD vec(VecDim);
2538 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2544 Bool_t ok_open = kFALSE;
2545 Bool_t ok_read = kFALSE;
2548 Bool_t allowed_to_read = kFALSE;
2558 allowed_to_read = kTRUE;
2567 allowed_to_read = kTRUE;
2571 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2572 << file_name <<
fTTBELL << std::endl;
2573 allowed_to_read = kFALSE;
2578 if( allowed_to_read == kTRUE )
2583 if ( ok_read == kTRUE )
2586 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2594 std::cout <<
"!TEcnaRead::ReadAverageLowFrequencyNoise(...) *** ERROR ***> " 2596 <<
" -> quantity: <" 2620 TVectorD vec(VecDim);
2621 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2627 Bool_t ok_open = kFALSE;
2628 Bool_t ok_read = kFALSE;
2631 Bool_t allowed_to_read = kFALSE;
2641 allowed_to_read = kTRUE;
2650 allowed_to_read = kTRUE;
2654 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> Open .root file failed for file: " 2655 << file_name <<
fTTBELL << std::endl;
2656 allowed_to_read = kFALSE;
2661 if( allowed_to_read == kTRUE )
2666 if ( ok_read == kTRUE )
2669 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2677 std::cout <<
"!TEcnaRead::ReadAverageHighFrequencyNoise(...) *** ERROR ***> " 2679 <<
" -> quantity: <" 2701 TestArrayDimH1(
"ReadAverageMeanCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2704 TVectorD vec(VecDim);
2705 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2711 Bool_t ok_open = kFALSE;
2712 Bool_t ok_read = kFALSE;
2715 Bool_t allowed_to_read = kFALSE;
2725 allowed_to_read = kTRUE;
2734 allowed_to_read = kTRUE;
2738 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2739 << file_name <<
fTTBELL << std::endl;
2740 allowed_to_read = kFALSE;
2745 if( allowed_to_read == kTRUE )
2750 if ( ok_read == kTRUE )
2753 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2761 std::cout <<
"!TEcnaRead::ReadAverageMeanCorrelationsBetweenSamples(...) *** ERROR ***> " 2763 <<
" -> quantity: <" 2785 TestArrayDimH1(
"ReadAverageSigmaOfCorrelationsBetweenSamples",
"fEcal->MaxStinEcnaInStex()",
2788 TVectorD vec(VecDim);
2789 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2795 Bool_t ok_open = kFALSE;
2796 Bool_t ok_read = kFALSE;
2799 Bool_t allowed_to_read = kFALSE;
2809 allowed_to_read = kTRUE;
2818 allowed_to_read = kTRUE;
2822 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2823 << file_name <<
fTTBELL << std::endl;
2824 allowed_to_read = kFALSE;
2829 if( allowed_to_read == kTRUE )
2834 if ( ok_read == kTRUE )
2837 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2845 std::cout <<
"!TEcnaRead::ReadAverageSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> " 2847 <<
" -> quantity: <" 2868 const Int_t& MatDim)
2879 TMatrixD mat(MatDim, MatDim);
2880 for(Int_t
i=0;
i-MatDim<0;
i++)
2881 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
2888 Bool_t ok_open = kFALSE;
2889 Bool_t ok_read = kFALSE;
2892 Bool_t allowed_to_read = kFALSE;
2902 allowed_to_read = kTRUE;
2911 allowed_to_read = kTRUE;
2915 std::cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 2916 << file_name <<
fTTBELL << std::endl;
2917 allowed_to_read = kFALSE;
2922 if( allowed_to_read == kTRUE )
2926 if ( ok_read == kTRUE )
2929 for( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++ )
2931 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++)
2940 std::cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> " 2942 <<
" -> quantity: <" 2957 const Int_t& MatDim)
2967 TMatrixD mat(MatDim, MatDim);
2968 for(Int_t
i=0;
i- MatDim <0;
i++)
2969 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
2975 Bool_t ok_open = kFALSE;
2976 Bool_t ok_read = kFALSE;
2979 Bool_t allowed_to_read = kFALSE;
2989 allowed_to_read = kTRUE;
2998 allowed_to_read = kTRUE;
3002 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 3003 << file_name <<
fTTBELL << std::endl;
3004 allowed_to_read = kFALSE;
3009 if( allowed_to_read == kTRUE )
3013 if ( ok_read == kTRUE )
3016 for ( Int_t i_samp = 0; i_samp - MatDim < 0; i_samp++){
3017 for ( Int_t j_samp = 0; j_samp - MatDim < 0; j_samp++){
3023 std::cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> " 3025 <<
" -> quantity: <" 3039 const Int_t & InPutMatDim )
3048 TestArrayDimH2(
"ReadRelevantCorrelationsBetweenSamples",
"fFileHeader->fNbOfSamples",
3052 Int_t nb_of_relevant = InPutMatDim*(InPutMatDim-1)/2;
3053 TVectorD vec_rel(nb_of_relevant);
for(Int_t
i=0;
i<nb_of_relevant;
i++){vec_rel(
i)=(Double_t)0.;}
3058 Bool_t ok_open = kFALSE;
3059 Bool_t ok_read = kFALSE;
3062 Bool_t allowed_to_read = kFALSE;
3072 allowed_to_read = kTRUE;
3081 allowed_to_read = kTRUE;
3085 std::cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> Open .root file failed for file: " 3086 << file_name <<
fTTBELL << std::endl;
3087 allowed_to_read = kFALSE;
3092 if( allowed_to_read == kTRUE )
3096 if ( ok_read == kTRUE )
3100 for ( Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++){
3101 for ( Int_t j_samp = 0; j_samp < i_samp; j_samp++){
3108 std::cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> " 3110 <<
" -> quantity: <" 3126 const Int_t& n1StexStin_b,
3127 const Int_t& MatDim)
3134 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3140 TMatrixD mat(MatDim, MatDim);
3141 for(Int_t
i=0;
i-MatDim<0;
i++)
3142 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3149 Bool_t ok_open = kFALSE;
3150 Bool_t ok_read = kFALSE;
3153 Bool_t allowed_to_read = kFALSE;
3163 allowed_to_read = kTRUE;
3172 allowed_to_read = kTRUE;
3176 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3177 << file_name <<
fTTBELL << std::endl;
3178 allowed_to_read = kFALSE;
3183 if( allowed_to_read == kTRUE )
3188 if ( ok_read == kTRUE )
3191 for ( Int_t i_crys = 0; i_crys - MatDim < 0; i_crys++)
3193 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3194 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3196 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3204 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3206 <<
" -> quantity: <" 3222 const Int_t & n1StexStin_b,
3223 const Int_t& MatDim)
3235 TMatrixD mat(MatDim, MatDim);
3236 for(Int_t
i=0;
i-MatDim<0;
i++)
3237 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3244 Bool_t ok_open = kFALSE;
3245 Bool_t ok_read = kFALSE;
3248 Bool_t allowed_to_read = kFALSE;
3258 allowed_to_read = kTRUE;
3267 allowed_to_read = kTRUE;
3271 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3272 << file_name <<
fTTBELL << std::endl;
3273 allowed_to_read = kFALSE;
3278 if( allowed_to_read == kTRUE )
3284 if ( ok_read == kTRUE )
3287 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3289 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3290 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3292 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3300 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3302 <<
" -> quantity: <" 3318 const Int_t & n1StexStin_b,
3319 const Int_t& MatDim)
3326 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysInStin()",
3332 TMatrixD mat(MatDim, MatDim);
3333 for(Int_t
i=0;
i-MatDim<0;
i++)
3334 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3341 Bool_t ok_open = kFALSE;
3342 Bool_t ok_read = kFALSE;
3345 Bool_t allowed_to_read = kFALSE;
3355 allowed_to_read = kTRUE;
3364 allowed_to_read = kTRUE;
3368 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3369 << file_name <<
fTTBELL << std::endl;
3370 allowed_to_read = kFALSE;
3375 if( allowed_to_read == kTRUE )
3380 if ( ok_read == kTRUE )
3383 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3385 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3386 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3388 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3396 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> " 3398 <<
" -> quantity: <" 3414 const Int_t & n1StexStin_b,
3415 const Int_t& MatDim)
3422 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysInStin()",
3428 TMatrixD mat(MatDim, MatDim);
3429 for(Int_t
i=0;
i-MatDim<0;
i++)
3430 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3437 Bool_t ok_open = kFALSE;
3438 Bool_t ok_read = kFALSE;
3441 Bool_t allowed_to_read = kFALSE;
3451 allowed_to_read = kTRUE;
3460 allowed_to_read = kTRUE;
3464 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3465 << file_name <<
fTTBELL << std::endl;
3466 allowed_to_read = kFALSE;
3471 if( allowed_to_read == kTRUE )
3477 if ( ok_read == kTRUE )
3480 for ( Int_t i_crys = 0; i_crys - MatDim<0; i_crys++)
3482 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
3483 for ( Int_t j_crys = 0; j_crys - MatDim<0; j_crys++)
3485 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
3493 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> " 3495 <<
" -> quantity: <" 3517 TestArrayDimH2(
"ReadLowFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3521 TMatrixD mat(MatDim, MatDim);
3522 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3533 Bool_t ok_open = kFALSE;
3534 Bool_t ok_read = kFALSE;
3537 Bool_t allowed_to_read = kFALSE;
3547 allowed_to_read = kTRUE;
3556 allowed_to_read = kTRUE;
3560 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3561 << file_name <<
fTTBELL << std::endl;
3562 allowed_to_read = kFALSE;
3567 if( allowed_to_read == kTRUE )
3572 if ( ok_read == kTRUE )
3591 mat(i_chan_sm, j_chan_sm) =
3603 std::cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3605 <<
" -> quantity: <" 3627 TestArrayDimH2(
"ReadLowFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3631 TMatrixD mat(MatDim, MatDim);
3632 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3643 Bool_t ok_open = kFALSE;
3644 Bool_t ok_read = kFALSE;
3647 Bool_t allowed_to_read = kFALSE;
3657 allowed_to_read = kTRUE;
3666 allowed_to_read = kTRUE;
3670 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3671 << file_name <<
fTTBELL << std::endl;
3672 allowed_to_read = kFALSE;
3677 if( allowed_to_read == kTRUE )
3682 if ( ok_read == kTRUE )
3701 mat(i_chan_sm, j_chan_sm) =
3713 std::cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3715 <<
" -> quantity: <" 3737 TestArrayDimH2(
"ReadHighFrequencyCovariancesBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3741 TMatrixD mat(MatDim, MatDim);
3742 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3753 Bool_t ok_open = kFALSE;
3754 Bool_t ok_read = kFALSE;
3757 Bool_t allowed_to_read = kFALSE;
3767 allowed_to_read = kTRUE;
3776 allowed_to_read = kTRUE;
3780 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3781 << file_name <<
fTTBELL << std::endl;
3782 allowed_to_read = kFALSE;
3787 if( allowed_to_read == kTRUE )
3792 if ( ok_read == kTRUE )
3811 mat(i_chan_sm, j_chan_sm) =
3823 std::cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> " 3825 <<
" -> quantity: <" 3847 TestArrayDimH2(
"ReadHighFrequencyCorrelationsBetweenChannels",
"fEcal->MaxCrysEcnaInStex()",
3851 TMatrixD mat(MatDim, MatDim);
3852 for(Int_t
i=0;
i-MatDim<0;
i++){
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3863 Bool_t ok_open = kFALSE;
3864 Bool_t ok_read = kFALSE;
3867 Bool_t allowed_to_read = kFALSE;
3877 allowed_to_read = kTRUE;
3886 allowed_to_read = kTRUE;
3890 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> Open .root file failed for file: " 3891 << file_name <<
fTTBELL << std::endl;
3892 allowed_to_read = kFALSE;
3897 if( allowed_to_read == kTRUE )
3902 if ( ok_read == kTRUE )
3921 mat(i_chan_sm, j_chan_sm) =
3933 std::cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> " 3935 <<
" -> quantity: <" 3958 TestArrayDimH2(
"ReadLowFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
3961 TMatrixD mat(MatDim, MatDim);
3962 for(Int_t
i=0;
i-MatDim<0;
i++)
3963 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
3974 Bool_t ok_open = kFALSE;
3975 Bool_t ok_read = kFALSE;
3978 Bool_t allowed_to_read = kFALSE;
3988 allowed_to_read = kTRUE;
3997 allowed_to_read = kTRUE;
4001 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " 4002 << file_name <<
fTTBELL << std::endl;
4003 allowed_to_read = kFALSE;
4008 if( allowed_to_read == kTRUE )
4013 if( ok_read == kTRUE )
4016 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim < 0; index_Stin_a++)
4018 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim < 0; index_Stin_b++)
4020 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4022 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4024 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4025 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4026 mat((Int_t)vec_ia_m, vec_ib_m) =
4036 std::cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 4038 <<
" -> quantity: <" 4060 TestArrayDimH2(
"ReadHighFrequencyMeanCorrelationsBetweenStins",
"fEcal->MaxStinEcnaInStex()",
4063 TMatrixD mat(MatDim, MatDim);
4064 for(Int_t
i=0;
i-MatDim<0;
i++)
4065 {
for(Int_t j=0; j-MatDim<0; j++){mat(
i,j)=(Double_t)0.;}}
4076 Bool_t ok_open = kFALSE;
4077 Bool_t ok_read = kFALSE;
4080 Bool_t allowed_to_read = kFALSE;
4090 allowed_to_read = kTRUE;
4099 allowed_to_read = kTRUE;
4103 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins(...) *** ERROR ***> Open .root file failed for file: " 4104 << file_name <<
fTTBELL << std::endl;
4105 allowed_to_read = kFALSE;
4110 if( allowed_to_read == kTRUE )
4115 if( ok_read == kTRUE )
4118 for(Int_t index_Stin_a = 0; index_Stin_a - MatDim<0; index_Stin_a++)
4120 for(Int_t index_Stin_b = 0; index_Stin_b - MatDim<0; index_Stin_b++)
4122 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
4124 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
4126 Int_t vec_ia_m = (Int_t)vec(index_Stin_a)-1;
4127 Int_t vec_ib_m = (Int_t)vec(index_Stin_b)-1;
4128 mat((Int_t)vec_ia_m, (Int_t)vec_ib_m) =
4138 std::cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> " 4140 <<
" -> quantity: <" 4176 for(Int_t i0StexEcha = 0 ; i0StexEcha < DimX ; i0StexEcha++){
4178 for(Int_t j_samp = 0 ; j_samp < DimY ; j_samp++){
4180 DimZ*(DimY*i0StexEcha+j_samp);}}
4184 for (Int_t iza=0; iza<DimX; iza++)
4186 for (Int_t izb=0; izb<DimY; izb++)
4188 for (Int_t izc=0; izc<DimZ; izc++)
4203 Bool_t ok_open = kFALSE;
4204 Bool_t ok_read = kFALSE;
4207 Int_t i_entry_fail = 0;
4211 if( ok_open == kTRUE )
4213 for(Int_t i0StexEcha=0; i0StexEcha<DimX; i0StexEcha++)
4215 if( i0StexEcha == 0 )
4218 if( i_entry >= 0 ){ok_read = kTRUE;}
4224 if ( ok_read == kTRUE )
4229 for ( Int_t i_bin=0; i_bin<DimZ; i_bin++)
4239 std::cout <<
"!TEcnaRead::ReadSampleAdcValuesSameFile(...) *** ERROR ***> " 4241 <<
" -> quantity: <" 4255 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4256 <<
" ROOT file not found" <<
fTTBELL << std::endl;
4259 if(i_entry_fail > 0 )
4261 std::cout <<
"*TEcnaRead::ReadSampleAdcValuesSameFile(...)> *ERROR* =====> " 4262 <<
" Entry reading failure(s). i_entry_fail = " 4263 << i_entry_fail <<
fTTBELL << std::endl;
4278 Int_t xFapNbOfEvts = 0;
4292 delete [] NOFE_int; NOFE_int = 0;
fCdelete++;
4294 return xFapNbOfEvts;
4304 TString quantity_name =
"?";
4308 if(
fFlagSubDet ==
"EB" ){quantity_name =
"SM numbers";}
4309 if(
fFlagSubDet ==
"EE" ){quantity_name =
"Dee numbers";}
4311 if( arg_typ ==
cTypMSp ){quantity_name =
"Mean samples";}
4312 if( arg_typ ==
cTypSSp ){quantity_name =
"Sigma of samples";}
4314 if( arg_typ ==
cTypNbOfEvts ){quantity_name =
"Number of events";}
4315 if( arg_typ ==
cTypPed ){quantity_name =
"Pedestals";}
4316 if( arg_typ ==
cTypTno ){quantity_name =
"Total noise";}
4317 if( arg_typ ==
cTypLfn ){quantity_name =
"LF noise";}
4318 if( arg_typ ==
cTypHfn ){quantity_name =
"HF noise";}
4319 if( arg_typ ==
cTypMeanCorss){quantity_name =
"Mean cor(s,s')";}
4320 if( arg_typ ==
cTypSigCorss ){quantity_name =
"Sigma of cor(s,s')";}
4322 if( arg_typ ==
cTypAvPed ){quantity_name =
"Average pedestals";}
4323 if( arg_typ ==
cTypAvTno ){quantity_name =
"Average total noise";}
4324 if( arg_typ ==
cTypAvLfn ){quantity_name =
"Average LF noise";}
4325 if( arg_typ ==
cTypAvHfn ){quantity_name =
"Average HF noise";}
4326 if( arg_typ ==
cTypAvMeanCorss){quantity_name =
"Average mean cor(s,s')";}
4327 if( arg_typ ==
cTypAvSigCorss ){quantity_name =
"Average sigma of cor(s,s')";}
4329 if( arg_typ ==
cTypAdcEvt ){quantity_name =
"Sample ADC a.f.o event number";}
4331 if( arg_typ ==
cTypCovCss ){quantity_name =
"Cov(s,s')";}
4332 if( arg_typ ==
cTypCorCss ){quantity_name =
"Cor(s,s')";}
4333 if( arg_typ ==
cTypLfCov ){quantity_name =
"LF Cov(c,c')";}
4334 if( arg_typ ==
cTypLfCor ){quantity_name =
"LF Cor(c,c')";}
4335 if( arg_typ ==
cTypHfCov ){quantity_name =
"HF Cov(c,c')";}
4336 if( arg_typ ==
cTypHfCor ){quantity_name =
"HF Cor(c,c')";}
4340 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";}
4341 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";}
4345 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";}
4346 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";}
4348 return quantity_name;
4373 number = (Int_t)vec(i0StexStinEcna);
4390 std::cout <<
"*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = " 4392 <<
" n1StexStin = " << n1StexStin
4393 << std::endl << std::endl;}
4395 Int_t Stin_index = n1StexStin-1;
4399 Int_t Stin_index = -1;
4409 std::cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = " 4410 << vec[
i] << std::endl;}
4411 if ( vec[
i] == n1StexStin ){Stin_index =
i;}
4415 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;
4416 std::cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << std::endl
4417 <<
" Stin index : " << Stin_index << std::endl;
4418 std::cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << std::endl;}
4420 if ( Stin_index < 0 )
4423 std::cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : " 4424 <<
"index Stin not found" 4443 std::cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << std::endl;
4451 std::cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << std::endl;
4459 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 &)
ClassImp(TEcnaRead) TEcnaRead
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 &)