284 if( pCnaParPaths == 0 )
290 if( pCnaParCout == 0 )
296 if( pFileHeader == 0 )
298 const Text_t *h_name =
"CnaHeader";
299 const Text_t *h_title =
"CnaHeader";
381 if( pEcalNumbering == 0 )
454 cout <<
"*TEcnaRead::TEcnaRead(const TEcnaRead& dcop)> "
455 <<
" It is time to write a copy constructor" << endl
490 cout <<
"*TEcnaRead::~TEcnaRead()> Entering destructor" << endl;}
508 cout <<
"!TEcnaRead/destructor> WRONG MANAGEMENT OF ALLOCATIONS: fCnew = "
518 cout <<
"*TEcnaRead::~TEcnaRead()> End of destructor " << endl;}
533 const Int_t& run_number,
const Int_t& nfirst,
534 const Int_t&
nlast,
const Int_t& nreqevts,
const Int_t& Stex,
542 TString sTypAna = typ_ana;
543 Int_t nNbOfSamples = nb_of_samples;
544 Int_t nRunNumber = run_number;
545 Int_t nFirstEvt = nfirst;
546 Int_t nLastEvt =
nlast;
547 Int_t nReqNbOfEvts = nreqevts;
548 Int_t nStexNumber = Stex;
551 const Text_t *h_name =
"CnaHeader";
552 const Text_t *h_title =
"CnaHeader";
565 nFirstEvt, nLastEvt, nReqNbOfEvts, nStexNumber);
588 cout <<
"*TEcnaRead::GetReadyToReadRootFile(...)>" << endl
589 <<
" The method has been called with the following argument values:" << endl
590 <<
" Analysis name = "
592 <<
" Nb of required samples = "
596 <<
" First requested event number = "
598 <<
" Last requested event number = "
600 <<
" Requested number of events = "
604 <<
" Path for the ROOT file = "
612 cout <<
"*TEcnaRead::GetReadyToReadRootFile(...)> Leaving the method."
627 TString cType =
"run type not defined";
631 if( numtype == 0 ){cType =
"COSMICS";}
632 if( numtype == 1 ){cType =
"BEAMH4";}
633 if( numtype == 2 ){cType =
"BEAMH2";}
634 if( numtype == 3 ){cType =
"MTCC";}
635 if( numtype == 4 ){cType =
"LASER_STD";}
636 if( numtype == 5 ){cType =
"LASER_POWER_SCAN";}
637 if( numtype == 6 ){cType =
"LASER_DELAY_SCAN";}
638 if( numtype == 7 ){cType =
"TESTPULSE_SCAN_MEM";}
639 if( numtype == 8 ){cType =
"TESTPULSE_MGPA";}
640 if( numtype == 9 ){cType =
"PEDESTAL_STD";}
641 if( numtype == 10 ){cType =
"PEDESTAL_OFFSET_SCAN";}
642 if( numtype == 11 ){cType =
"PEDESTAL_25NS_SCAN";}
643 if( numtype == 12 ){cType =
"LED_STD";}
645 if( numtype == 13 ){cType =
"PHYSICS_GLOBAL";}
646 if( numtype == 14 ){cType =
"COSMICS_GLOBAL";}
647 if( numtype == 15 ){cType =
"HALO_GLOBAL";}
649 if( numtype == 16 ){cType =
"LASER_GAP";}
650 if( numtype == 17 ){cType =
"TESTPULSE_GAP";}
651 if( numtype == 18 ){cType =
"PEDESTAL_GAP";}
652 if( numtype == 19 ){cType =
"LED_GAP";}
654 if( numtype == 20 ){cType =
"PHYSICS_LOCAL";}
655 if( numtype == 21 ){cType =
"COSMICS_LOCAL";}
656 if( numtype == 22 ){cType =
"HALO_LOCAL";}
657 if( numtype == 23 ){cType =
"CALIB_LOCAL";}
659 if( numtype == 24 ){cType =
"PEDSIM";}
681 Bool_t ok_read = kFALSE;
710 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
711 <<
" ROOT file not found " <<
fTTBELL << endl;
717 cout <<
"!TEcnaRead::LookAtRootFile()> *** ERROR ***>"
718 <<
" GetReadyToReadRootFile not called " <<
fTTBELL << endl;
735 if( i_print == 1 ){
cout <<
"*TEcnaRead::ReadRootFileHeader> file_name = "
738 Bool_t ok_open = kFALSE;
739 Bool_t ok_read = kFALSE;
743 cout <<
"!TEcnaRead::ReadRootFileHeader(...)*** ERROR ***> "
744 <<
"Reading header on file already open." << endl;
795 cout <<
"!TEcnaRead::ReadRootFileHeader(...) *** ERROR ***> Open ROOT file failed for file: "
796 << file_name <<
fTTBELL << endl;
818 Bool_t ok_open = kFALSE;
825 cout <<
"!TEcnaRead::OpenRootFile> " << s_path.Data() <<
": file not found." << endl;
831 TString e_path; e_path.Append(name);
832 cout <<
"*TEcnaRead::OpenRootFile> Open ROOT file " << e_path.Data() <<
" OK " << endl;}
847 Bool_t ok_close = kFALSE;
854 TString e_path; e_path.Append(name);
855 cout <<
"*TEcnaRead::CloseRootFile> Close ROOT file " << e_path.Data() <<
" OK " << endl;}
863 cout <<
"*TEcnaRead::CloseRootFile(...)> no close since no file is open"
897 TVectorD vec(VecDim);
898 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
908 Bool_t ok_open = kFALSE;
909 Bool_t ok_read = kFALSE;
913 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> Reading on file already open."
923 if ( ok_read == kTRUE )
927 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
937 cout <<
"!TEcnaRead::ReadStinNumbers(...) *** ERROR ***> "
945 if( ok_read == kTRUE )
950 for(Int_t
i=0;
i < VecDim;
i++)
952 cout <<
"*TEcnaRead::ReadStinNumbers(...)> StinNumber[" <<
i <<
"] = "
961 for ( Int_t i_Stin = 0; i_Stin < VecDim; i_Stin++)
974 const Int_t& MatDimX,
const Int_t& MatDimY)
983 TMatrixD mat(MatDimX, MatDimY);
984 for(Int_t
i=0;
i<MatDimX;
i++)
985 {
for(Int_t
j=0;
j<MatDimY;
j++){mat(
i,
j)=(Double_t)0.;}}
988 if( Stin_index >= 0 )
995 Bool_t ok_open = kFALSE;
996 Bool_t ok_read = kFALSE;
1000 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1001 <<
" Reading on file already open." <<
fTTBELL << endl;
1010 if ( ok_read == kTRUE )
1013 for (Int_t i_crys=0; i_crys<MatDimX; i_crys++)
1015 Int_t j_cna_chan = Stin_index*MatDimX + i_crys;
1016 for ( Int_t i_samp=0; i_samp<MatDimY; i_samp++)
1025 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1035 cout <<
"!TEcnaRead::ReadNumberOfEventsForSamples(...) *** ERROR ***> "
1036 <<
"It is not possible to access the number of found events: the ROOT file has not been read."
1055 TVectorD vec(VecDim);
1056 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1062 Bool_t ok_open = kFALSE;
1063 Bool_t ok_read = kFALSE;
1067 cout <<
"!TEcnaRead::ReadSampleValues(...) *** ERROR ***> "
1068 <<
"Reading on file already open." <<
fTTBELL << endl;
1075 if ( ok_read == kTRUE )
1078 for ( Int_t i_bin=0; i_bin<VecDim; i_bin++)
1086 cout <<
"!TEcnaRead::ReadSampleValues(...) *** ERROR ***> "
1118 for(Int_t i0StexEcha = 0 ; i0StexEcha < DimX ; i0StexEcha++){
1120 for(Int_t j_samp = 0 ; j_samp < DimY ; j_samp++){
1122 DimZ*(DimY*i0StexEcha+j_samp);}}
1126 for (Int_t iza=0; iza<DimX; iza++)
1128 for (Int_t izb=0; izb<DimY; izb++)
1130 for (Int_t izc=0; izc<DimZ; izc++)
1145 Bool_t ok_open = kFALSE;
1146 Bool_t ok_read = kFALSE;
1149 Int_t i_entry_fail = 0;
1153 if( ok_open == kTRUE )
1155 for(Int_t i0StexEcha=0; i0StexEcha<DimX; i0StexEcha++)
1157 if( i0StexEcha == 0 )
1159 i_entry =
gCnaRootFile->ReadElementNextEntryNumber(typ, i0StexEcha);
1160 if( i_entry >= 0 ){ok_read = kTRUE;}
1166 if ( ok_read == kTRUE )
1169 for(Int_t sample=0; sample<DimY; sample++)
1171 for ( Int_t i_bin=0; i_bin<DimZ; i_bin++)
1181 cout <<
"!TEcnaRead::ReadSampleValuesSameFile(...) *** ERROR ***> "
1196 cout <<
"*TEcnaRead::ReadSampleValuesSameFile(...)> *ERROR* =====> "
1197 <<
" ROOT file not found" <<
fTTBELL << endl;
1200 if(i_entry_fail > 0 )
1202 cout <<
"*TEcnaRead::ReadSampleValuesSameFile(...)> *ERROR* =====> "
1203 <<
" Entry reading failure(s). i_entry_fail = "
1204 << i_entry_fail <<
fTTBELL << endl;
1216 const Int_t & i0StinEcha,
const Int_t & VecDim)
1226 TVectorD vec(VecDim);
1227 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1233 Bool_t ok_open = kFALSE;
1234 Bool_t ok_read = kFALSE;
1238 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1239 <<
" Reading on file already open." <<
fTTBELL << endl;
1248 if ( ok_read == kTRUE )
1251 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1259 cout <<
"!TEcnaRead::ReadSampleMeans(...) *** ERROR ***> "
1275 const Int_t & i0StinEcha,
const Int_t & VecDim)
1285 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1291 Bool_t ok_open = kFALSE;
1292 Bool_t ok_read = kFALSE;
1296 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1297 <<
"Reading on file already open." <<
fTTBELL << endl;
1306 if ( ok_read == kTRUE )
1309 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1317 cout <<
"!TEcnaRead::ReadSampleSigmas(...) *** ERROR ***> "
1334 TVectorD TEcnaRead::ReadSigmasOfSamples(
const Int_t & n1StexStin,
1335 const Int_t & i0StinEcha,
const Int_t & VecDim)
1345 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
1351 Bool_t ok_open = kFALSE;
1352 Bool_t ok_read = kFALSE;
1356 cout <<
"!TEcnaRead::ReadSigmasOfSamples(...) *** ERROR ***> "
1357 <<
"Reading on file already open." <<
fTTBELL << endl;
1366 if ( ok_read == kTRUE )
1369 for ( Int_t i_samp = 0; i_samp < VecDim; i_samp++)
1372 if( vec(i_samp) >= (Double_t)0. )
1374 vec(i_samp) = (Double_t)
sqrt((Double_t)vec(i_samp));
1378 vec(i_samp) = (Double_t)(-1.);
1379 cout <<
cout <<
"!TEcnaRead::ReadSigmasOfSamples(...) *** ERROR ***> "
1380 <<
"Negative variance! Sigma forced to -1" <<
fTTBELL << endl;
1387 cout <<
"!TEcnaRead::ReadSigmasOfSamples(...) *** ERROR ***> "
1404 const Int_t& MatDim)
1413 TMatrixD mat(MatDim, MatDim);
1414 for(Int_t
i=0;
i<MatDim;
i++)
1415 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1421 Bool_t ok_open = kFALSE;
1422 Bool_t ok_read = kFALSE;
1426 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples(...) *** ERROR ***> "
1427 <<
"Reading on file already open." <<
fTTBELL << endl;
1435 if ( ok_read == kTRUE )
1438 for( Int_t i_samp = 0; i_samp < MatDim; i_samp++ )
1440 for ( Int_t j_samp = 0; j_samp < MatDim; j_samp++)
1449 cout <<
"!TEcnaRead::ReadCovariancesBetweenSamples() *** ERROR ***> "
1467 const Int_t& MatDim)
1475 TMatrixD mat(MatDim, MatDim);
1476 for(Int_t
i=0;
i<MatDim;
i++)
1477 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1482 Bool_t ok_open = kFALSE;
1483 Bool_t ok_read = kFALSE;
1487 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples(...) *** ERROR ***> "
1488 <<
"Reading on file already open." <<
fTTBELL << endl;
1495 if ( ok_read == kTRUE )
1498 for ( Int_t i_samp = 0; i_samp < MatDim; i_samp++){
1499 for ( Int_t j_samp = 0; j_samp < MatDim; j_samp++){
1505 cout <<
"!TEcnaRead::ReadCorrelationsBetweenSamples() *** ERROR ***> "
1520 const Int_t & InPutMatDim )
1530 Int_t nb_of_relevant = InPutMatDim*(InPutMatDim-1)/2;
1531 TVectorD vec_rel(nb_of_relevant);
for(Int_t
i=0;
i<nb_of_relevant;
i++){vec_rel(
i)=(Double_t)0.;}
1535 Bool_t ok_open = kFALSE;
1536 Bool_t ok_read = kFALSE;
1540 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples(...) *** ERROR ***> "
1541 <<
"Reading on file already open." <<
fTTBELL << endl;
1548 if ( ok_read == kTRUE )
1552 for ( Int_t i_samp = 0; i_samp < InPutMatDim; i_samp++){
1553 for ( Int_t j_samp = 0; j_samp < i_samp; j_samp++){
1560 cout <<
"!TEcnaRead::ReadRelevantCorrelationsBetweenSamples() *** ERROR ***> "
1577 const Int_t& n1StexStin_b,
1578 const Int_t& MatDim)
1588 TMatrixD mat(MatDim, MatDim);
1589 for(Int_t
i=0;
i<MatDim;
i++)
1590 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1596 Bool_t ok_open = kFALSE;
1597 Bool_t ok_read = kFALSE;
1601 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***>"
1602 <<
" Reading on file already open." <<
fTTBELL << endl;
1611 if ( ok_read == kTRUE )
1614 for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
1616 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
1617 for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
1619 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
1627 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
1646 const Int_t & n1StexStin_b,
1647 const Int_t& MatDim)
1657 TMatrixD mat(MatDim, MatDim);
1658 for(Int_t
i=0;
i<MatDim;
i++)
1659 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1665 Bool_t ok_open = kFALSE;
1666 Bool_t ok_read = kFALSE;
1670 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>"
1671 <<
" Reading on file already open." <<
fTTBELL << endl;
1681 if ( ok_read == kTRUE )
1684 for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
1686 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
1687 for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
1689 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
1697 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
1716 const Int_t & n1StexStin_b,
1717 const Int_t& MatDim)
1727 TMatrixD mat(MatDim, MatDim);
1728 for(Int_t
i=0;
i<MatDim;
i++)
1729 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1735 Bool_t ok_open = kFALSE;
1736 Bool_t ok_read = kFALSE;
1740 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***>"
1741 <<
" Reading on file already open." <<
fTTBELL << endl;
1750 if ( ok_read == kTRUE )
1753 for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
1755 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
1756 for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
1758 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
1766 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels(...) *** ERROR ***> "
1785 const Int_t & n1StexStin_b,
1786 const Int_t& MatDim)
1796 TMatrixD mat(MatDim, MatDim);
1797 for(Int_t
i=0;
i<MatDim;
i++)
1798 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1804 Bool_t ok_open = kFALSE;
1805 Bool_t ok_read = kFALSE;
1809 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***>"
1810 <<
" Reading on file already open." <<
fTTBELL << endl;
1820 if ( ok_read == kTRUE )
1823 for ( Int_t i_crys = 0; i_crys < MatDim; i_crys++)
1825 Int_t i_cna_chan = index_Stin_a*MatDim + i_crys;
1826 for ( Int_t j_crys = 0; j_crys < MatDim; j_crys++)
1828 Int_t j_cna_chan = index_Stin_b*MatDim + j_crys;
1836 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels(...) *** ERROR ***> "
1862 TMatrixD mat(MatDim, MatDim);
1863 for(Int_t
i=0;
i<MatDim;
i++){
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1873 Bool_t ok_open = kFALSE;
1874 Bool_t ok_read = kFALSE;
1878 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***>"
1879 <<
" Reading on file already open." <<
fTTBELL << endl;
1888 if ( ok_read == kTRUE )
1907 mat(i_chan_sm, j_chan_sm) =
1919 cout <<
"!TEcnaRead::ReadLowFrequencyCovariancesBetweenChannels() *** ERROR ***> "
1945 TMatrixD mat(MatDim, MatDim);
1946 for(Int_t
i=0;
i<MatDim;
i++){
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
1956 Bool_t ok_open = kFALSE;
1957 Bool_t ok_read = kFALSE;
1961 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***>"
1962 <<
" Reading on file already open." <<
fTTBELL << endl;
1971 if ( ok_read == kTRUE )
1990 mat(i_chan_sm, j_chan_sm) =
2002 cout <<
"!TEcnaRead::ReadLowFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
2028 TMatrixD mat(MatDim, MatDim);
2029 for(Int_t
i=0;
i<MatDim;
i++){
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
2039 Bool_t ok_open = kFALSE;
2040 Bool_t ok_read = kFALSE;
2044 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***>"
2045 <<
" Reading on file already open." <<
fTTBELL << endl;
2054 if ( ok_read == kTRUE )
2073 mat(i_chan_sm, j_chan_sm) =
2085 cout <<
"!TEcnaRead::ReadHighFrequencyCovariancesBetweenChannels() *** ERROR ***> "
2111 TMatrixD mat(MatDim, MatDim);
2112 for(Int_t
i=0;
i<MatDim;
i++){
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
2122 Bool_t ok_open = kFALSE;
2123 Bool_t ok_read = kFALSE;
2127 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***>"
2128 <<
" Reading on file already open." <<
fTTBELL << endl;
2137 if ( ok_read == kTRUE )
2156 mat(i_chan_sm, j_chan_sm) =
2168 cout <<
"!TEcnaRead::ReadHighFrequencyCorrelationsBetweenChannels() *** ERROR ***> "
2194 TMatrixD mat(MatDim, MatDim);
2195 for(Int_t
i=0;
i<MatDim;
i++)
2196 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
2206 Bool_t ok_open = kFALSE;
2207 Bool_t ok_read = kFALSE;
2211 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>"
2212 <<
" Reading on file already open." <<
fTTBELL << endl;
2221 if( ok_read == kTRUE )
2224 for(Int_t index_Stin_a = 0; index_Stin_a < MatDim; index_Stin_a++)
2226 for(Int_t index_Stin_b = 0; index_Stin_b < MatDim; index_Stin_b++)
2228 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
2230 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
2232 mat((Int_t)vec(index_Stin_a)-1, (Int_t)vec(index_Stin_b)-1) =
2242 cout <<
"!TEcnaRead::ReadLowFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
2267 TMatrixD mat(MatDim, MatDim);
2268 for(Int_t
i=0;
i<MatDim;
i++)
2269 {
for(Int_t
j=0;
j<MatDim;
j++){mat(
i,
j)=(Double_t)0.;}}
2279 Bool_t ok_open = kFALSE;
2280 Bool_t ok_read = kFALSE;
2284 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***>"
2285 <<
" Reading on file already open." <<
fTTBELL << endl;
2294 if( ok_read == kTRUE )
2297 for(Int_t index_Stin_a = 0; index_Stin_a < MatDim; index_Stin_a++)
2299 for(Int_t index_Stin_b = 0; index_Stin_b < MatDim; index_Stin_b++)
2301 if( vec(index_Stin_a) > 0 && vec(index_Stin_a) <= MatDim)
2303 if( vec(index_Stin_b) > 0 && vec(index_Stin_b) <= MatDim)
2305 mat((Int_t)vec(index_Stin_a)-1, (Int_t)vec(index_Stin_b)-1) =
2315 cout <<
"!TEcnaRead::ReadHighFrequencyMeanCorrelationsBetweenStins() *** ERROR ***> "
2347 TVectorD vec(VecDim);
2348 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2363 vec(i0StexEcha) = 0;
2366 {vec(i0StexEcha) += mat(i0StinEcha, i_samp);}
2386 TVectorD vec(VecDim);
2387 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2392 Bool_t ok_open = kFALSE;
2393 Bool_t ok_read = kFALSE;
2397 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
2398 <<
"Reading on file already open." <<
fTTBELL << endl;
2407 if ( ok_read == kTRUE )
2410 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2418 cout <<
"!TEcnaRead::ReadPedestals(...) *** ERROR ***> "
2441 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2445 Bool_t ok_open = kFALSE;
2446 Bool_t ok_read = kFALSE;
2450 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
2451 <<
"Reading on file already open." <<
fTTBELL << endl;
2460 if ( ok_read == kTRUE )
2463 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2471 cout <<
"!TEcnaRead::ReadTotalNoise(...) *** ERROR ***> "
2493 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2497 Bool_t ok_open = kFALSE;
2498 Bool_t ok_read = kFALSE;
2502 cout <<
"!TEcnaRead::ReadMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2503 <<
"Reading on file already open." <<
fTTBELL << endl;
2512 if ( ok_read == kTRUE )
2515 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2523 cout <<
"!TEcnaRead::ReadMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2547 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2551 Bool_t ok_open = kFALSE;
2552 Bool_t ok_read = kFALSE;
2556 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
2557 <<
"Reading on file already open." <<
fTTBELL << endl;
2566 if ( ok_read == kTRUE )
2569 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2577 cout <<
"!TEcnaRead::ReadLowFrequencyNoise(...) *** ERROR ***> "
2601 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2605 Bool_t ok_open = kFALSE;
2606 Bool_t ok_read = kFALSE;
2610 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
2611 <<
"Reading on file already open." <<
fTTBELL << endl;
2620 if ( ok_read == kTRUE )
2623 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2631 cout <<
"!TEcnaRead::ReadHighFrequencyNoise(...) *** ERROR ***> "
2655 TVectorD vec(VecDim);
for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2659 Bool_t ok_open = kFALSE;
2660 Bool_t ok_read = kFALSE;
2664 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2665 <<
"Reading on file already open." <<
fTTBELL << endl;
2674 if ( ok_read == kTRUE )
2677 for ( Int_t i_StexCrys = 0; i_StexCrys < VecDim; i_StexCrys++)
2685 cout <<
"!TEcnaRead::ReadSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
2717 TVectorD vecAveraged(VecDim);
2718 for(Int_t
i=0;
i<VecDim;
i++){vecAveraged(
i)=(Double_t)0.;}
2725 for(Int_t i0StexStin=0; i0StexStin<VecDim; i0StexStin++)
2727 Int_t n1StexStin = i0StexStin+1;
2728 vecAveraged(i0StexStin) = 0;
2735 {vecAveraged(i0StexStin) += vecMean(i0StexEcha);}
2742 Int_t n1StinEcha = i0StinEcha+1;
2743 if( n1StexStin == 10 && n1StinEcha == 11 )
2745 if( n1StexStin == 11 && n1StinEcha == 11 )
2747 if( !( (n1StexStin == 29 || n1StexStin == 32) && n1StinEcha == 11 ) )
2748 {vecAveraged(i0StexStin) += vecMean(i0StexEcha);}
2752 Double_t xdivis = (Double_t)0.;
2758 vecAveraged(i0StexStin) = vecAveraged(i0StexStin)/xdivis;
2776 TVectorD vec(VecDim);
2777 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2782 Bool_t ok_open = kFALSE;
2783 Bool_t ok_read = kFALSE;
2787 cout <<
"!TEcnaRead::ReadAveragedPedestals(...) *** ERROR ***> "
2788 <<
"Reading on file already open." <<
fTTBELL << endl;
2797 if ( ok_read == kTRUE )
2800 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2808 cout <<
"!TEcnaRead::ReadAveragedPedestals(...) *** ERROR ***> "
2831 TVectorD vec(VecDim);
2832 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2837 Bool_t ok_open = kFALSE;
2838 Bool_t ok_read = kFALSE;
2842 cout <<
"!TEcnaRead::ReadAveragedTotalNoise(...) *** ERROR ***> "
2843 <<
"Reading on file already open." <<
fTTBELL << endl;
2852 if ( ok_read == kTRUE )
2855 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2863 cout <<
"!TEcnaRead::ReadAveragedTotalNoise(...) *** ERROR ***> "
2886 TVectorD vec(VecDim);
2887 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2892 Bool_t ok_open = kFALSE;
2893 Bool_t ok_read = kFALSE;
2897 cout <<
"!TEcnaRead::ReadAveragedLowFrequencyNoise(...) *** ERROR ***> "
2898 <<
"Reading on file already open." <<
fTTBELL << endl;
2907 if ( ok_read == kTRUE )
2910 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2918 cout <<
"!TEcnaRead::ReadAveragedLowFrequencyNoise(...) *** ERROR ***> "
2941 TVectorD vec(VecDim);
2942 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
2947 Bool_t ok_open = kFALSE;
2948 Bool_t ok_read = kFALSE;
2952 cout <<
"!TEcnaRead::ReadAveragedHighFrequencyNoise(...) *** ERROR ***> "
2953 <<
"Reading on file already open." <<
fTTBELL << endl;
2962 if ( ok_read == kTRUE )
2965 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
2973 cout <<
"!TEcnaRead::ReadAveragedHighFrequencyNoise(...) *** ERROR ***> "
2996 TVectorD vec(VecDim);
2997 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
3002 Bool_t ok_open = kFALSE;
3003 Bool_t ok_read = kFALSE;
3007 cout <<
"!TEcnaRead::ReadAveragedMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
3008 <<
"Reading on file already open." <<
fTTBELL << endl;
3017 if ( ok_read == kTRUE )
3020 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
3028 cout <<
"!TEcnaRead::ReadAveragedMeanOfCorrelationsBetweenSamples(...) *** ERROR ***> "
3051 TVectorD vec(VecDim);
3052 for(Int_t
i=0;
i<VecDim;
i++){vec(
i)=(Double_t)0.;}
3057 Bool_t ok_open = kFALSE;
3058 Bool_t ok_read = kFALSE;
3062 cout <<
"!TEcnaRead::ReadAveragedSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
3063 <<
"Reading on file already open." <<
fTTBELL << endl;
3072 if ( ok_read == kTRUE )
3075 for ( Int_t i0StexStin = 0; i0StexStin < VecDim; i0StexStin++)
3083 cout <<
"!TEcnaRead::ReadAveragedSigmaOfCorrelationsBetweenSamples(...) *** ERROR ***> "
3115 TString quantity_name =
"?";
3119 if(
fFlagSubDet ==
"EB" ){quantity_name =
"SM numbers";}
3120 if(
fFlagSubDet ==
"EE" ){quantity_name =
"Dee numbers";}
3122 if( arg_typ ==
cTypMSp ){quantity_name =
"Mean of samples";}
3123 if( arg_typ ==
cTypSSp ){quantity_name =
"Sigma of samples";}
3125 if( arg_typ ==
cTypNbOfEvts ){quantity_name =
"Number of events";}
3126 if( arg_typ ==
cTypPed ){quantity_name =
"Pedestals";}
3127 if( arg_typ ==
cTypTno ){quantity_name =
"Total noise";}
3128 if( arg_typ ==
cTypLfn ){quantity_name =
"LF noise";}
3129 if( arg_typ ==
cTypHfn ){quantity_name =
"HF noise";}
3130 if( arg_typ ==
cTypMeanCorss){quantity_name =
"Mean of cor(s,s')";}
3131 if( arg_typ ==
cTypSigCorss ){quantity_name =
"Sigma of cor(s,s')";}
3133 if( arg_typ ==
cTypAvPed ){quantity_name =
"Averaged pedestals";}
3134 if( arg_typ ==
cTypAvTno ){quantity_name =
"Averaged total noise";}
3135 if( arg_typ ==
cTypAvLfn ){quantity_name =
"Averaged LF noise";}
3136 if( arg_typ ==
cTypAvHfn ){quantity_name =
"Averaged HF noise";}
3137 if( arg_typ ==
cTypAvMeanCorss){quantity_name =
"Averaged mean of cor(s,s')";}
3138 if( arg_typ ==
cTypAvSigCorss ){quantity_name =
"Averaged sigma of cor(s,s')";}
3140 if( arg_typ ==
cTypAdcEvt ){quantity_name =
"Sample ADC a.f.o event number";}
3142 if( arg_typ ==
cTypCovCss ){quantity_name =
"Cov(s,s')";}
3143 if( arg_typ ==
cTypCorCss ){quantity_name =
"Cor(s,s')";}
3144 if( arg_typ ==
cTypLfCov ){quantity_name =
"LF Cov(c,c')";}
3145 if( arg_typ ==
cTypLfCor ){quantity_name =
"LF Cor(c,c')";}
3146 if( arg_typ ==
cTypHfCov ){quantity_name =
"HF Cov(c,c')";}
3147 if( arg_typ ==
cTypHfCor ){quantity_name =
"HF Cor(c,c')";}
3151 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (tow,tow')";}
3152 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (tow,tow')";}
3156 if( arg_typ ==
cTypLFccMoStins){quantity_name =
"Mean LF |Cor(c,c')| in (SC,SC')";}
3157 if( arg_typ ==
cTypHFccMoStins){quantity_name =
"Mean HF |Cor(c,c')| in (SC,SC')";}
3159 return quantity_name;
3184 number = (Int_t)vec(i0StexStinEcna);
3190 TString astring =
"?";
3192 else {
cout <<
"!TEcnaRead::GetAnalysisName()> fFileHeader pointer = "
3201 else {
cout <<
"!TEcnaRead::GetFirstReqEvtNumber()> fFileHeader pointer = "
3210 else {
cout <<
"!TEcnaRead::GetReqNbOfEvts()> fFileHeader pointer = "
3227 cout <<
"*TEcnaRead::GetStinIndex(...)> fEcal->MaxStinEcnaInStex() = "
3229 <<
" n1StexStin = " << n1StexStin
3232 Int_t Stin_index = n1StexStin-1;
3236 Int_t Stin_index = -1;
3246 cout <<
"*TEcnaRead::GetStinIndex(...)> StinNumber[" <<
i <<
"] = "
3248 if ( vec[
i] == n1StexStin ){Stin_index =
i;}
3252 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;
3253 cout <<
"*TEcnaRead::GetStinIndex> Stin number: " << n1StexStin << endl
3254 <<
" Stin index : " << Stin_index << endl;
3255 cout <<
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-" << endl;}
3257 if ( Stin_index < 0 )
3260 cout <<
"!TEcnaRead::GetStinIndex *** WARNING ***> n1StexStin" << n1StexStin <<
" : "
3261 <<
"index Stin not found"
3280 cout <<
"*TEcnaRead::PrintComments()> Warnings and some comments on init will be printed" << endl;
3288 cout <<
"*TEcnaRead::PrintWarnings()> Warnings will be printed" << endl;
3296 cout <<
"*TEcnaRead::PrintAllComments()> All the comments will be printed" << endl;
Double_t *** fT3d_distribs
TVectorD ReadLowFrequencyNoise(const Int_t &)
TCnaResultType * fCnaIndivResult
TEcnaRead & operator=(const TEcnaRead &)
TMatrixD ReadCovariancesBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAveragedMeanOfCorrelationsBetweenSamples(const Int_t &)
Double_t ** fT3d2_distribs
Double_t * fT3d1_distribs
TMatrixD ReadLowFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Int_t GetStinIndex(const Int_t &)
TVectorD ReadAveragedSigmaOfCorrelationsBetweenSamples(const Int_t &)
TVectorD ReadSigmaOfCorrelationsBetweenSamples(const Int_t &)
TString GetRootFileNameShort()
void GetReadyToReadRootFile(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, TString)
Int_t fReadyToReadRootFile
Int_t fCodePrintAllComments
TMatrixD ReadHighFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TVectorD ReadAveragedTotalNoise(const Int_t &)
Int_t GetNumberOfBinsSampleAsFunctionOfTime()
TVectorD ReadRelevantCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TMatrixD ReadLowFrequencyMeanCorrelationsBetweenStins(const Int_t &)
TString GetTypeOfQuantity(const CnaResultTyp)
TString fRootFileNameShort
Int_t GetFirstReqEvtNumber()
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)
Bool_t ReadRootFileHeader(const Int_t &)
Bool_t ReadElement(Int_t)
Int_t fCodePrintNoComment
Int_t GetCodePrint(const TString)
Int_t * fT1d_StexStinFromIndex
TVectorD ReadStinNumbers(const Int_t &)
TVectorD ReadSampleValues(const Int_t &, const Int_t &, 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 &)
void SetEcalSubDetector(const TString, const TEcnaNumbering *, const TEcnaWrite *)
TVectorD ReadAveragedPedestals(const Int_t &)
TEcnaParCout * fCnaParCout
TVectorD ReadPedestals(const Int_t &)
TString GetRootFileName()
TMatrixD ReadLowFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
TEcnaParPaths * fCnaParPaths
void fCopy(const TEcnaRead &)
TString GetAnalysisName()
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
TEcnaHeader * fFileHeader
TMatrixD ReadHighFrequencyCorrelationsBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadMeanOfCorrelationsBetweenSamples(const Int_t &)
TVectorD ReadHighFrequencyNoise(const Int_t &)
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Bool_t OpenW(const Text_t *="")
Int_t MaxCrysEcnaInStex()
Double_t *** ReadSampleValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
TEcnaNumbering * fEcalNumbering
TMatrixD ReadCorrelationsBetweenSamples(const Int_t &, const Int_t &, const Int_t &)
TVectorD ReadAveragedNumberOfEvents(const Int_t &)
TVectorD ReadAveragedHighFrequencyNoise(const Int_t &)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
R__EXTERN TCnaRootFile * gCnaRootFile
Int_t MaxStinEcnaInStex()
TString GetRootFileNameShort()
TMatrixD ReadHighFrequencyCovariancesBetweenChannels(const Int_t &, const Int_t &, const Int_t &)
Bool_t CloseRootFile(const Text_t *)
TString GetEcalSubDetector()
void fMakeResultsFileName()
TVectorD ReadAveragedLowFrequencyNoise(const Int_t &)
Bool_t OpenR(const Text_t *="")
TString GetRootFileName()
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
TVectorD ReadSampleMeans(const Int_t &, const Int_t &, const Int_t &)
Bool_t OpenRootFile(const Text_t *, TString)
TVectorD ReadNumberOfEvents(const Int_t &)
void Adelete(const TString)