35 Long_t i_this = (Long_t)
this;
41 if( iCnaParCout == 0 )
49 if( iCnaParPaths == 0 )
63 const Text_t *h_name =
"CnaHeader";
64 const Text_t *h_title =
"CnaHeader";
68 Long_t iFileHeader = 0;
69 if( iFileHeader == 0 )
70 {fFileHeader =
new TEcnaHeader(pObjectManager, h_name, h_title); }
74 SetEcalSubDetector(SubDet.Data());
75 fNbSampForFic = fEcal->MaxSampADC();
85 Long_t i_this = (Long_t)
this;
91 if( iCnaParCout == 0 )
99 if( iCnaParPaths == 0 )
108 const Text_t *h_name =
"CnaHeader";
109 const Text_t *h_title =
"CnaHeader";
113 Long_t iFileHeader = 0;
114 if( iFileHeader == 0 )
115 {fFileHeader =
new TEcnaHeader(pObjectManager, h_name, h_title); }
119 SetEcalSubDetector(SubDet.Data());
120 if( NbOfSamples>0 && NbOfSamples<=fEcal->MaxSampADC() )
122 fNbSampForFic = NbOfSamples;
126 cout <<
"TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples
127 <<
": OUT OF RANGE. Set to the default value (= " << fEcal->MaxSampADC() <<
")."
129 fNbSampForFic = fEcal->MaxSampADC();
148 fgMaxCar = (Int_t)512;
151 fMaxMsgIndexForMiscDiag = (Int_t)10;
152 fNbOfMiscDiagCounters = (Int_t)50;
161 fT1d_StexStinFromIndex = 0;
191 fT2d_lfcc_mostins = 0;
192 fT2d1_lfcc_mostins = 0;
194 fT2d_hfcc_mostins = 0;
195 fT2d1_hfcc_mostins = 0;
198 fT1d_evsamp_of_sigevt = 0;
204 fT1d_av_ev_corss = 0;
205 fT1d_av_sig_corss = 0;
207 fT1d_sigevt_of_evsamp = 0;
208 fT1d_evevt_of_sigsamp = 0;
211 fT2dCrysNumbersTable = 0;
212 fT1dCrysNumbersTable = 0;
252 fCodePrintNoComment = fCnaParCout->GetCodePrint(
"NoComment");
253 fCodePrintWarnings = fCnaParCout->GetCodePrint(
"Warnings ");
254 fCodePrintComments = fCnaParCout->GetCodePrint(
"Comments");
255 fCodePrintAllComments = fCnaParCout->GetCodePrint(
"AllComments");
257 fFlagPrint = fCodePrintWarnings;
261 fOpenRootFile = kFALSE;
262 fReadyToReadData = 0;
265 fSpecialStexStinNotIndexed = -1;
268 fBuildEvtNotSkipped = 0;
270 fMemoReadNumberOfEventsforSamples = 0;
279 Int_t MaxCar = fgMaxCar;
280 fFlagSubDet.Resize(MaxCar);
281 fFlagSubDet = SubDet.Data();
283 fEcal = 0; fEcal =
new TEcnaParEcal(fFlagSubDet.Data());
284 fEcalNumbering = 0; fEcalNumbering =
new TEcnaNumbering(fFlagSubDet.Data(), fEcal);
287 new TEcnaWrite(fFlagSubDet.Data(), fCnaParPaths, fCnaParCout, fEcal, fEcalNumbering);
289 if( fFlagSubDet ==
"EB" ){fStexName =
"SM "; fStinName =
"tower";}
290 if( fFlagSubDet ==
"EE" ){fStexName =
"Dee"; fStinName =
" SC ";}
300 cout <<
"*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> "
301 <<
" Now is the time to write a copy constructor"
331 if(fFlagPrint == fCodePrintAllComments)
333 cout <<
"*TEcnaRun::~TEcnaRun()> Entering destructor." << endl;
336 if(fFlagPrint != fCodePrintNoComment || fFlagPrint == fCodePrintWarnings )
338 if( fBuildEvtNotSkipped > 0 )
340 cout <<
"************************************************************************************* "
342 cout <<
"*TEcnaRun::~TEcnaRun()> Nb of calls to GetSampleAdcValues by cmsRun: "
343 << fBuildEvtNotSkipped << endl;
344 cout <<
"************************************************************************************* "
349 if(fFlagPrint == fCodePrintAllComments)
351 Int_t misc_czero = 0;
352 for(Int_t
i = 0;
i < fNbOfMiscDiagCounters;
i++)
354 if( fMiscDiag[
i] != 0 )
356 cout <<
" fMiscDiag Counter "
357 << setw(3) <<
i <<
" = " << setw(9) << fMiscDiag[
i]
358 <<
" (INFO: alloc on non zero freed zone) " << endl;
365 cout <<
" Nb of fMiscDiag counters at zero: "
366 << misc_czero <<
" (total nb of counters: "
367 << fNbOfMiscDiagCounters <<
")" << endl;
370 if (fMiscDiag != 0){
delete [] fMiscDiag; fCdelete++;}
379 if (fT1d_StexStinFromIndex != 0){
delete [] fT1d_StexStinFromIndex; fCdelete++;}
381 if (fT2d_NbOfEvts != 0){
delete [] fT2d_NbOfEvts; fCdelete++;}
382 if (fT1d_NbOfEvts != 0){
delete [] fT1d_NbOfEvts; fCdelete++;}
384 if (fT3d_AdcValues != 0){
delete [] fT3d_AdcValues; fCdelete++;}
385 if (fT3d2_AdcValues != 0){
delete [] fT3d2_AdcValues; fCdelete++;}
386 if (fT3d1_AdcValues != 0){
delete [] fT3d1_AdcValues; fCdelete++;}
388 if (fT2d_ev != 0){
delete [] fT2d_ev; fCdelete++;}
389 if (fT1d_ev != 0){
delete [] fT1d_ev; fCdelete++;}
391 if (fT2d_sig != 0){
delete [] fT2d_sig; fCdelete++;}
392 if (fT1d_sig != 0){
delete [] fT1d_sig; fCdelete++;}
394 if (fT3d_cov_ss != 0){
delete [] fT3d_cov_ss; fCdelete++;}
395 if (fT3d2_cov_ss != 0){
delete [] fT3d2_cov_ss; fCdelete++;}
396 if (fT3d1_cov_ss != 0){
delete [] fT3d1_cov_ss; fCdelete++;}
398 if (fT3d_cor_ss != 0){
delete [] fT3d_cor_ss; fCdelete++;}
399 if (fT3d2_cor_ss != 0){
delete [] fT3d2_cor_ss; fCdelete++;}
400 if (fT3d1_cor_ss != 0){
delete [] fT3d1_cor_ss; fCdelete++;}
402 if (fT2d_lf_cov != 0){
delete [] fT2d_lf_cov; fCdelete++;}
403 if (fT2d1_lf_cov != 0){
delete [] fT2d1_lf_cov; fCdelete++;}
405 if (fT2d_lf_cor != 0){
delete [] fT2d_lf_cor; fCdelete++;}
406 if (fT2d1_lf_cor != 0){
delete [] fT2d1_lf_cor; fCdelete++;}
408 if (fT2d_hf_cov != 0){
delete [] fT2d_hf_cov; fCdelete++;}
409 if (fT2d1_hf_cov != 0){
delete [] fT2d1_hf_cov; fCdelete++;}
411 if (fT2d_hf_cor != 0){
delete [] fT2d_hf_cor; fCdelete++;}
412 if (fT2d1_hf_cor != 0){
delete [] fT2d1_hf_cor; fCdelete++;}
414 if (fT2d_lfcc_mostins != 0){
delete [] fT2d_lfcc_mostins; fCdelete++;}
415 if (fT2d1_lfcc_mostins != 0){
delete [] fT2d1_lfcc_mostins ; fCdelete++;}
417 if (fT2d_hfcc_mostins != 0){
delete [] fT2d_hfcc_mostins ; fCdelete++;}
418 if (fT2d1_hfcc_mostins != 0){
delete [] fT2d1_hfcc_mostins; fCdelete++;}
420 if (fT1d_ev_ev != 0){
delete [] fT1d_ev_ev; fCdelete++;}
421 if (fT1d_evsamp_of_sigevt != 0){
delete [] fT1d_evsamp_of_sigevt; fCdelete++;}
422 if (fT1d_ev_cor_ss != 0){
delete [] fT1d_ev_cor_ss; fCdelete++;}
423 if (fT1d_av_mped != 0){
delete [] fT1d_av_mped; fCdelete++;}
424 if (fT1d_av_totn != 0){
delete [] fT1d_av_totn; fCdelete++;}
425 if (fT1d_av_lofn != 0){
delete [] fT1d_av_lofn; fCdelete++;}
426 if (fT1d_av_hifn != 0){
delete [] fT1d_av_hifn; fCdelete++;}
427 if (fT1d_av_ev_corss != 0){
delete [] fT1d_av_ev_corss; fCdelete++;}
428 if (fT1d_av_sig_corss != 0){
delete [] fT1d_av_sig_corss; fCdelete++;}
430 if (fT1d_sigevt_of_evsamp != 0){
delete [] fT1d_sigevt_of_evsamp; fCdelete++;}
431 if (fT1d_evevt_of_sigsamp != 0){
delete [] fT1d_evevt_of_sigsamp; fCdelete++;}
432 if (fT1d_sig_cor_ss != 0){
delete [] fT1d_sig_cor_ss; fCdelete++;}
434 if (fT2dCrysNumbersTable != 0){
delete [] fT2dCrysNumbersTable; fCdelete++;}
435 if (fT1dCrysNumbersTable != 0){
delete [] fT1dCrysNumbersTable; fCdelete++;}
437 if (fTagStinNumbers != 0){
delete [] fTagStinNumbers; fCdelete++;}
438 if (fTagNbOfEvts != 0){
delete [] fTagNbOfEvts; fCdelete++;}
439 if (fTagAdcEvt != 0){
delete [] fTagAdcEvt; fCdelete++;}
440 if (fTagMSp != 0){
delete [] fTagMSp; fCdelete++;}
441 if (fTagSSp != 0){
delete [] fTagSSp; fCdelete++;}
443 if (fTagCovCss != 0){
delete [] fTagCovCss; fCdelete++;}
444 if (fTagCorCss != 0){
delete [] fTagCorCss; fCdelete++;}
446 if (fTagHfCov != 0){
delete [] fTagHfCov; fCdelete++;}
447 if (fTagHfCor != 0){
delete [] fTagHfCor; fCdelete++;}
448 if (fTagLfCov != 0){
delete [] fTagLfCov; fCdelete++;}
449 if (fTagLfCor != 0){
delete [] fTagLfCor; fCdelete++;}
451 if (fTagLFccMoStins != 0){
delete [] fTagLFccMoStins; fCdelete++;}
452 if (fTagHFccMoStins != 0){
delete [] fTagHFccMoStins; fCdelete++;}
454 if (fTagPed != 0){
delete [] fTagPed; fCdelete++;}
455 if (fTagTno != 0){
delete [] fTagTno; fCdelete++;}
456 if (fTagMeanCorss != 0){
delete [] fTagMeanCorss; fCdelete++;}
458 if (fTagLfn != 0){
delete [] fTagLfn; fCdelete++;}
459 if (fTagHfn != 0){
delete [] fTagHfn; fCdelete++;}
460 if (fTagSigCorss != 0){
delete [] fTagSigCorss; fCdelete++;}
462 if (fTagAvPed != 0){
delete [] fTagAvPed; fCdelete++;}
463 if (fTagAvTno != 0){
delete [] fTagAvTno; fCdelete++;}
464 if (fTagAvLfn != 0){
delete [] fTagAvLfn; fCdelete++;}
465 if (fTagAvHfn != 0){
delete [] fTagAvHfn; fCdelete++;}
466 if (fTagAvMeanCorss != 0){
delete [] fTagAvMeanCorss; fCdelete++;}
467 if (fTagAvSigCorss != 0){
delete [] fTagAvSigCorss; fCdelete++;}
469 if ( fCnew != fCdelete )
471 cout <<
"!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = "
472 << fCnew <<
", fCdelete = " << fCdelete << fTTBELL << endl;
480 if(fFlagPrint == fCodePrintAllComments)
482 cout <<
"*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " <<
this <<
")." << endl
483 <<
"~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#"
506 const Int_t& nfirst,
const Int_t&
nlast,
const Int_t& nbevts,
513 GetReadyToReadData(typ_ana, run_number, nfirst, nlast, nbevts, Stex, RunType);
517 const Int_t& nfirst,
const Int_t&
nlast,
const Int_t& nbevts,
518 const Int_t& Stex,
const Int_t& run_type)
524 Int_t nrangeevts = nlast - nfirst + 1;
526 if( nrangeevts < nbevts )
528 if( nlast >= nfirst )
530 cout <<
"*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts
531 <<
", out of range (range = " << nfirst <<
"," << nlast <<
")" << endl
532 <<
" The number of found events will be less " << endl
533 <<
" than the number of requested events." << endl;
537 cout <<
"*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast
538 <<
", less than first requested event number (= " << nfirst <<
")" << endl
539 <<
" File will be read until EOF if the number of found events" << endl
540 <<
" remains less than the number of requested events." << endl;
546 fMiscDiag =
new Int_t[fNbOfMiscDiagCounters]; fCnew++;
547 for (Int_t iz=0; iz<fNbOfMiscDiagCounters; iz++){fMiscDiag[iz] = (Int_t)0;}
550 Int_t nentries = 99999999;
551 if ( nfirst <= nentries )
558 if( nlast <= nentries )
560 const Text_t *h_name =
"CnaHeader";
561 const Text_t *h_title =
"CnaHeader";
567 if ( fEcal->MaxStinEcnaInStex() > 0 && fEcal->MaxCrysInStin() > 0 && fNbSampForFic > 0 )
569 if( fFileHeader == 0 ){fFileHeader =
new TEcnaHeader(fObjectManager, h_name, h_title);}
571 fFileHeader->HeaderParameters(typ_ana, fNbSampForFic,
572 run_number, nfirst, nlast, nbevts,
594 fTagStinNumbers =
new Int_t[1]; fCnew++; fTagStinNumbers[0] = (Int_t)0;
595 fTagNbOfEvts =
new Int_t[1]; fCnew++; fTagNbOfEvts[0] = (Int_t)0;
597 fTagAdcEvt =
new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
598 for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagAdcEvt[iz] = (Int_t)0;}
600 fTagMSp =
new Int_t[1]; fCnew++; fTagMSp[0] = (Int_t)0;
601 fTagSSp =
new Int_t[1]; fCnew++; fTagSSp[0] = (Int_t)0;
603 fTagCovCss =
new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
604 for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCovCss[iz] = (Int_t)0;}
606 fTagCorCss =
new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
607 for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCorCss[iz] = (Int_t)0;}
609 fTagLfCov =
new Int_t[1]; fCnew++; fTagLfCov[0] = (Int_t)0;
610 fTagLfCor =
new Int_t[1]; fCnew++; fTagLfCor[0] = (Int_t)0;
612 fTagHfCov =
new Int_t[1]; fCnew++; fTagHfCov[0] = (Int_t)0;
613 fTagHfCor =
new Int_t[1]; fCnew++; fTagHfCor[0] = (Int_t)0;
615 fTagLFccMoStins =
new Int_t[1]; fCnew++; fTagLFccMoStins[0] = (Int_t)0;
616 fTagHFccMoStins =
new Int_t[1]; fCnew++; fTagHFccMoStins[0] = (Int_t)0;
618 fTagPed =
new Int_t[1]; fCnew++; fTagPed[0] = (Int_t)0;
619 fTagTno =
new Int_t[1]; fCnew++; fTagTno[0] = (Int_t)0;
620 fTagMeanCorss =
new Int_t[1]; fCnew++; fTagMeanCorss[0] = (Int_t)0;
622 fTagLfn =
new Int_t[1]; fCnew++; fTagLfn[0] = (Int_t)0;
623 fTagHfn =
new Int_t[1]; fCnew++; fTagHfn[0] = (Int_t)0;
624 fTagSigCorss =
new Int_t[1]; fCnew++; fTagSigCorss[0] = (Int_t)0;
626 fTagAvPed =
new Int_t[1]; fCnew++; fTagAvPed[0] = (Int_t)0;
627 fTagAvTno =
new Int_t[1]; fCnew++; fTagAvTno[0] = (Int_t)0;
628 fTagAvLfn =
new Int_t[1]; fCnew++; fTagAvLfn[0] = (Int_t)0;
629 fTagAvHfn =
new Int_t[1]; fCnew++; fTagAvHfn[0] = (Int_t)0;
630 fTagAvMeanCorss =
new Int_t[1]; fCnew++; fTagAvMeanCorss[0] = (Int_t)0;
631 fTagAvSigCorss =
new Int_t[1]; fCnew++; fTagAvSigCorss[0] = (Int_t)0;
639 if(fT1d_StexStinFromIndex == 0)
641 fT1d_StexStinFromIndex =
new Int_t[fEcal->MaxStinEcnaInStex()]; fCnew++;
643 for ( Int_t i0_Stin = 0; i0_Stin < fEcal->MaxStinEcnaInStex(); i0_Stin++ )
645 fT1d_StexStinFromIndex[i0_Stin] = fSpecialStexStinNotIndexed;
658 if(fT3d_AdcValues == 0)
661 cout <<
"*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions."
662 <<
" Nb of requested evts = " << fFileHeader->fReqNbOfEvts << endl
663 <<
" This number must not be too large"
664 <<
" (no failure after this message means alloc OK)." << endl;
666 fT3d_AdcValues =
new Double_t**[fEcal->MaxCrysEcnaInStex()]; fCnew++;
669 new Double_t*[fEcal->MaxCrysEcnaInStex()*
670 fNbSampForFic]; fCnew++;
673 new Double_t[fEcal->MaxCrysEcnaInStex()*
675 fFileHeader->fReqNbOfEvts]; fCnew++;
677 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++){
678 fT3d_AdcValues[i0StexEcha] = &fT3d2_AdcValues[0] + i0StexEcha*fNbSampForFic;
679 for(Int_t j0Sample=0; j0Sample<fNbSampForFic; j0Sample++){
680 fT3d2_AdcValues[fNbSampForFic*i0StexEcha + j0Sample] = &fT3d1_AdcValues[0]+
681 fFileHeader->fReqNbOfEvts*(fNbSampForFic*i0StexEcha+j0Sample);}}
684 for (Int_t iza=0; iza<fEcal->MaxCrysEcnaInStex(); iza++)
686 for (Int_t izb=0; izb<fNbSampForFic; izb++)
688 for (Int_t izc=0; izc<fFileHeader->fReqNbOfEvts; izc++)
690 if( fT3d_AdcValues[iza][izb][izc] != (Double_t)0 )
693 fT3d_AdcValues[iza][izb][izc] = (Double_t)0;
706 if (fT2d_NbOfEvts == 0)
708 fT2d_NbOfEvts =
new Int_t*[fEcal->MaxCrysEcnaInStex()]; fCnew++;
709 fT1d_NbOfEvts =
new Int_t[fEcal->MaxCrysEcnaInStex()*
710 fNbSampForFic]; fCnew++;
712 for(Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
714 fT2d_NbOfEvts[i0StexEcha] =
715 &fT1d_NbOfEvts[0] + i0StexEcha*fNbSampForFic;
719 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
721 for(Int_t i0Sample=0; i0Sample<fNbSampForFic; i0Sample++)
723 fT2d_NbOfEvts[i0StexEcha][i0Sample] = 0;
729 cerr <<
"!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!"
730 <<
" Pointer already not NULL " << fTTBELL << endl;
738 <<
"!TEcnaRun::GetReadyToReadData(...)> "
739 <<
" *** ERROR *** " << endl
740 <<
" --------------------------------------------------"
742 <<
" NULL or NEGATIVE values for arguments" << endl
743 <<
" with expected positive values:" << endl
744 <<
" Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << endl
745 <<
" Number of crystals in Stin = " << fEcal->MaxCrysInStin() << endl
746 <<
" Number of samples by channel = " << fNbSampForFic << endl
749 <<
" hence, no memory allocation for array member has been performed." << endl;
751 cout <<
"Enter: 0 and RETURN to continue or: CTRL C to exit";
756 if(fFlagPrint == fCodePrintAllComments ){
758 cout <<
"*TEcnaRun::GetReadyToReadData(...)>" << endl
759 <<
" The method has been called with the following argument values:" << endl
760 <<
" Analysis name = "
761 << fFileHeader->fTypAna << endl
763 << fFileHeader->fRunNumber << endl
765 << fFileHeader->fRunType << endl
766 <<
" First requested event number = "
767 << fFileHeader->fFirstReqEvtNumber << endl
768 <<
" Last requested event number = "
769 << fFileHeader->fLastReqEvtNumber << endl
770 <<
" " << fStexName.Data() <<
" number = "
771 << fFileHeader->fStex << endl
772 <<
" Number of " << fStinName.Data()
773 <<
" in " << fStexName.Data() <<
" = "
774 << fEcal->MaxStinEcnaInStex() << endl
775 <<
" Number of crystals in " << fStinName.Data() <<
" = "
776 << fEcal->MaxCrysInStin() << endl
777 <<
" Number of samples by channel = "
778 << fNbSampForFic << endl
781 fReadyToReadData = 1;
785 if (fFlagPrint != fCodePrintNoComment){
786 cout <<
"!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << endl
787 <<
"! The fisrt requested event number is not positive (nfirst = " << nfirst <<
") "
793 if (fFlagPrint != fCodePrintNoComment){
794 cout << endl <<
"!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << endl
795 <<
"! The number of requested events (nbevts = " << nbevts <<
") is too large." << endl
796 <<
"! Last event number = " << nlast <<
" > number of entries = " << nentries <<
". "
797 << fTTBELL << endl << endl;}
802 cout <<
"!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> "
803 <<
" The first requested event number is greater than the number of entries."
806 if(fFlagPrint == fCodePrintAllComments){
807 cout <<
"*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = "
808 << fReadyToReadData << endl; }
837 const Int_t& i0StinEcha,
const Int_t& i0Sample,
838 const Double_t& adcvalue)
842 fBuildEvtNotSkipped++;
844 Bool_t ret_code = kFALSE;
846 Int_t i0EventIndex = n1EventNumber - 1;
847 Int_t i0StexStinEcna = n1StexStin - 1;
851 if(fReadyToReadData == 1)
853 if( n1StexStin>= 1 && n1StexStin <= fEcal->MaxStinEcnaInStex() )
855 if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
857 if( i0Sample >= 0 && i0Sample < fEcal->MaxSampADC() )
860 if( fT1d_StexStinFromIndex != 0 )
865 if( n1StexStin == fT1d_StexStinFromIndex[i0StexStinEcna] ){i_trouve = 1;}
870 if( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
872 fT1d_StexStinFromIndex[i0StexStinEcna] = n1StexStin;
873 fFileHeader->fStinNumbersCalc = 1;
874 fTagStinNumbers[0] = 1;
877 if(fFlagPrint == fCodePrintAllComments)
879 if( fStinIndexBuilt == 1 )
881 cout << endl <<
"*TEcnaRun::GetSampleAdcValues(...)> event " << n1EventNumber
882 <<
" : first event for " << fStexName.Data() <<
" " << fFileHeader->fStex
883 <<
"; " << fStinName.Data() <<
"s : ";
885 if( fFlagSubDet ==
"EB" )
886 {
cout << fT1d_StexStinFromIndex[i0StexStinEcna] <<
", ";}
887 if( fFlagSubDet ==
"EE" )
888 {
cout << fEcalNumbering->
889 GetDeeSCConsFrom1DeeSCEcna(fFileHeader->fStex, fT1d_StexStinFromIndex[i0StexStinEcna])
893 if(fFlagPrint == fCodePrintAllComments)
895 cout <<
" (" << fStinIndexBuilt <<
" " << fStinName.Data()
896 <<
" found), channel " << i0StinEcha <<
", i0Sample " << i0Sample << endl;
902 cout <<
"!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> NOT ALLOWED if RESULT. "
903 <<
" n1StexStin = " << n1StexStin <<
", fT1d_StexStinFromIndex["
904 << i0StexStinEcna <<
"] = "
905 << fT1d_StexStinFromIndex[i0StexStinEcna]
906 <<
", fStinIndexBuilt = " << fStinIndexBuilt
915 cout <<
"!TEcnaRun, GetSampleAdcValues *** ERROR ***> "
916 <<
" fT1d_StexStinFromIndex = " << fT1d_StexStinFromIndex
917 <<
" fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << endl;
925 if( i0Sample >= fEcal->MaxSampADC() )
927 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
928 <<
" sample number = " << i0Sample <<
". OUT OF BOUNDS"
929 <<
" (max = " << fNbSampForFic <<
")"
941 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
942 <<
" channel number in " << fStinName.Data() <<
" = " << i0StinEcha <<
". OUT OF BOUNDS"
943 <<
" (max = " << fEcal->MaxCrysInStin() <<
")"
950 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
951 << fStinName.Data() <<
" number in " << fStexName.Data() <<
" = " << n1StexStin <<
". OUT OF BOUNDS"
952 <<
" (max = " << fEcal->MaxStinEcnaInStex() <<
")"
963 if( ret_code == kTRUE )
977 Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinEcha;
980 if( i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex() )
983 (fT2d_NbOfEvts[i0StexEcha][i0Sample])++;
985 fFileHeader->fNbOfEvtsCalc = 1;
988 if ( i0EventIndex >= 0 && i0EventIndex < fFileHeader->fReqNbOfEvts )
990 if( i0Sample >= 0 && i0Sample < fNbSampForFic )
992 fT3d_AdcValues[i0StexEcha][i0Sample][i0EventIndex] = adcvalue;
996 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
997 <<
" sample index = " << i0Sample <<
". OUT OF BOUNDS"
998 <<
" (max = " << fNbSampForFic <<
")"
1004 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1005 <<
" event number = " << n1EventNumber <<
". OUT OF BOUNDS"
1006 <<
" (max = " << fFileHeader->fReqNbOfEvts <<
")"
1013 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1014 <<
" CHANNEL NUMBER OUT OF BOUNDS" << endl
1015 <<
" i0StexEcha number = " << i0StexEcha
1016 <<
" , n1StexStin = " << n1StexStin
1017 <<
" , i0StinEcha = " << i0StinEcha
1018 <<
" , fEcal->MaxCrysEcnaInStex() = " << fEcal->MaxCrysEcnaInStex()
1026 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> ret_code = kFALSE "
1032 cout <<
"!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> GetReadyToReadData(...) not called."
1037 if (ret_code == kFALSE)
1039 cout <<
"!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> ret_code = " << ret_code
1040 <<
" (FALSE). Event: " << n1EventNumber
1041 <<
", " << fStexName.Data() <<
": " << fFileHeader->fStex
1042 <<
", " << fStinName.Data() <<
": " << n1StexStin
1043 <<
", channel: " << i0StinEcha
1044 <<
", Sample: " << i0Sample
1045 <<
", ADC value: " << adcvalue << endl;
1065 fNbSampForCalc = nb_samp_for_calc;
1074 MyRootFile->
FileParameters(fFileHeader->fTypAna, fFileHeader->fNbOfSamples, fFileHeader->fRunNumber,
1075 fFileHeader->fFirstReqEvtNumber, fFileHeader->fLastReqEvtNumber,
1076 fFileHeader->fReqNbOfEvts, fFileHeader->fStex,
1077 fCnaParPaths->ResultsRootFilePath().Data());
1082 fFileHeader->fStopTime = MyRootFile->
GetStopTime();
1084 fFileHeader->fStopDate = MyRootFile->
GetStopDate();
1086 if ( ok_read == kTRUE )
1090 cout <<
"*TEcnaRun::ReadSampleAdcValues> Reading sample ADC values from file: " << endl
1091 <<
" " << fRootFileName << endl;
1093 size_t i_no_data = 0;
1096 TVectorD vec(fEcal->MaxStinEcnaInStex());
1097 for(Int_t
i=0;
i<fEcal->MaxStinEcnaInStex();
i++){vec(
i)=(Double_t)0.;}
1101 fTagStinNumbers[0] = 1;
1102 fFileHeader->fStinNumbersCalc = 1;
1103 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1104 {fT1d_StexStinFromIndex[i0StexStinEcna] = (Int_t)vec(i0StexStinEcna);}
1111 TMatrixD partial_matrix(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1112 for(Int_t
i=0;
i<fEcal->MaxCrysInStin();
i++)
1113 {
for(Int_t
j=0;
j<fFileHeader->fNbOfSamples;
j++){partial_matrix(
i,
j)=(Double_t)0.;}}
1115 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1118 if(n1StexStin != -1)
1122 (n1StexStin, fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1126 fTagNbOfEvts[0] = 1;
1127 fFileHeader->fNbOfEvtsCalc = 1;
1128 for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
1130 Int_t i0StexEcha = (n1StexStin-1)*fEcal->MaxCrysInStin() + i0StinCrys;
1131 for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
1132 {fT2d_NbOfEvts[i0StexEcha][i0Sample] = (Int_t)partial_matrix(i0StinCrys,i0Sample);}
1143 Double_t*** fT3d_read_AdcValues =
1145 (fEcal->MaxCrysEcnaInStex(), fFileHeader->fNbOfSamples, fFileHeader->fReqNbOfEvts);
1149 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1151 for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples;i0Sample++)
1153 for(Int_t i_event=0; i_event<fFileHeader->fReqNbOfEvts; i_event++)
1154 {fT3d_AdcValues[i0StexEcha][i0Sample][i_event] =
1155 fT3d_read_AdcValues[i0StexEcha][i0Sample][i_event];}
1165 cout <<
"!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1166 <<
" Read failure. i_no_data = " << i_no_data << fTTBELL << endl;
1171 cout <<
"!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1172 <<
" ROOT file not found" << fTTBELL << endl;
1200 fFileHeader->fStartTime = t_startime;
1201 fFileHeader->fStopTime = t_stoptime;
1208 fFileHeader->fStartDate = c_startdate;
1209 fFileHeader->fStopDate = c_stopdate;
1227 fCnaWrite->RegisterFileParameters(fFileHeader->fTypAna.Data(), fFileHeader->fNbOfSamples,
1228 fFileHeader->fRunNumber,
1229 fFileHeader->fFirstReqEvtNumber, fFileHeader->fLastReqEvtNumber,
1230 fFileHeader->fReqNbOfEvts, fFileHeader->fStex);
1232 fCnaWrite->fMakeResultsFileName();
1235 if( fT2d_NbOfEvts != 0 )
1237 fNumberOfEvents = fCnaWrite->NumberOfEventsAnalysis(fT2d_NbOfEvts, fEcal->MaxCrysEcnaInStex(),
1238 fNbSampForFic, fFileHeader->fReqNbOfEvts);
1242 cout <<
"*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << endl;
1263 if( fFileHeader->fAdcEvtCalc > 0 ){fFileHeader->fAdcEvtCalc = 0;}
1264 for( Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1265 {fTagAdcEvt[i0StexEcha] = 1; fFileHeader->fAdcEvtCalc++;}
1280 CorrelationsBetweenSamples();
1284 LowFrequencyNoise();
1285 HighFrequencyNoise();
1286 MeanCorrelationsBetweenSamples();
1287 SigmaOfCorrelationsBetweenSamples();
1290 AverageTotalNoise();
1291 AverageLowFrequencyNoise();
1292 AverageHighFrequencyNoise();
1293 AverageMeanCorrelationsBetweenSamples();
1294 AverageSigmaOfCorrelationsBetweenSamples();
1301 LowFrequencyCorrelationsBetweenChannels();
1302 HighFrequencyCorrelationsBetweenChannels();
1311 LowFrequencyMeanCorrelationsBetweenStins();
1312 HighFrequencyMeanCorrelationsBetweenStins();
1332 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::SampleMeans() " << endl;}
1333 if(fFlagPrint == fCodePrintAllComments){
1334 cout <<
" Calculation: sample expectation values over the events"
1335 <<
" for each channel." << endl;}
1338 if ( fT2d_ev == 0 ){
1339 Int_t n_samp = fNbSampForCalc;
1340 Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1341 fT2d_ev =
new Double_t*[n_StexEcha]; fCnew++;
1342 fT1d_ev =
new Double_t[n_StexEcha*n_samp]; fCnew++;
1343 for(Int_t
i = 0 ;
i < n_StexEcha ;
i++){
1344 fT2d_ev[
i] = &fT1d_ev[0] +
i*n_samp;}
1347 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1349 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1351 if( fT2d_ev[i0StexEcha][i0Sample] != (Double_t)0 )
1352 {fMiscDiag[1]++; fT2d_ev[i0StexEcha][i0Sample] = (Double_t)0;}
1357 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1359 for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1361 for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1363 fT2d_ev[i0StexEcha][i0Sample] += fT3d_AdcValues[i0StexEcha][i0Sample][i_event];
1365 fT2d_ev[i0StexEcha][i0Sample] /= fNumberOfEvents;
1368 fTagMSp[0] = 1; fFileHeader->fMSpCalc++;
1383 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::SampleSigmas()" << endl;}
1384 if(fFlagPrint == fCodePrintAllComments){
1385 cout <<
" Calculation: sample ADC sigmas over the events "
1386 <<
" for each channel." << endl;}
1392 if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1396 Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1397 Int_t n_samp = fNbSampForCalc;
1398 fT2d_sig =
new Double_t*[n_StexEcha]; fCnew++;
1399 fT1d_sig =
new Double_t[n_StexEcha*n_samp]; fCnew++;
1400 for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
1401 fT2d_sig[i0StexEcha] = &fT1d_sig[0] + i0StexEcha*n_samp;}
1404 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1406 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1408 if( fT2d_sig[i0StexEcha][i0Sample] != (Double_t)0 )
1409 {fMiscDiag[2]++; fT2d_sig[i0StexEcha][i0Sample] = (Double_t)0;}
1414 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1416 for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1418 Double_t variance = (Double_t)0.;
1419 for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1421 Double_t ecart = fT3d_AdcValues[i0StexEcha][i0Sample][i_event] - fT2d_ev[i0StexEcha][i0Sample];
1422 variance += ecart*ecart;
1424 variance /= fNumberOfEvents;
1425 fT2d_sig[i0StexEcha][i0Sample] =
sqrt(variance);
1428 fTagSSp[0] = 1; fFileHeader->fSSpCalc++;
1451 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::CovariancesBetweenSamples()" << endl;}
1452 if(fFlagPrint == fCodePrintAllComments){
1453 cout <<
" Calculation: covariances between samples"
1454 <<
" for each channel." << endl;}
1457 if( fT3d_cov_ss == 0 ){
1458 const Int_t n_samp = fNbSampForCalc;
1459 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1460 fT3d_cov_ss =
new Double_t**[n_StexEcha]; fCnew++;
1461 fT3d2_cov_ss =
new Double_t*[n_StexEcha*n_samp]; fCnew++;
1462 fT3d1_cov_ss =
new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1463 for(Int_t
i = 0 ;
i < n_StexEcha ;
i++){
1464 fT3d_cov_ss[
i] = &fT3d2_cov_ss[0] +
i*n_samp;
1465 for(Int_t
j = 0 ;
j < n_samp ;
j++){
1466 fT3d2_cov_ss[n_samp*
i+
j] = &fT3d1_cov_ss[0]+n_samp*(n_samp*
i+
j);}}
1477 if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1480 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1482 for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1484 for (Int_t j0Sample = 0 ; j0Sample <= i0Sample; j0Sample++)
1486 fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1487 for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1489 fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] +=
1490 (fT3d_AdcValues[j0StexEcha][i0Sample][i_event] - fT2d_ev[j0StexEcha][i0Sample])
1491 *(fT3d_AdcValues[j0StexEcha][j0Sample][i_event] - fT2d_ev[j0StexEcha][j0Sample]);
1493 fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /= (Double_t)fNumberOfEvents;
1494 fT3d_cov_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample];
1497 fTagCovCss[j0StexEcha] = 1; fFileHeader->fCovCssCalc++;
1515 if ( fTagCovCss[0] != 1 ){CovariancesBetweenSamples();
1516 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1517 {fTagCovCss[j0StexEcha] = 0;}}
1519 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::CorrelationsBetweenSamples()" << endl;}
1520 if(fFlagPrint == fCodePrintAllComments){
1521 cout <<
" Calculation: correlations between samples"
1522 <<
" for each channel." << endl;}
1525 if( fT3d_cor_ss == 0){
1526 const Int_t n_samp = fNbSampForCalc;
1527 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1528 fT3d_cor_ss =
new Double_t**[n_StexEcha]; fCnew++;
1529 fT3d2_cor_ss =
new Double_t*[n_StexEcha*n_samp]; fCnew++;
1530 fT3d1_cor_ss =
new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1531 for(Int_t
i = 0 ;
i < n_StexEcha ;
i++){
1532 fT3d_cor_ss[
i] = &fT3d2_cor_ss[0] +
i*n_samp;
1533 for(Int_t
j = 0 ;
j < n_samp ;
j++){
1534 fT3d2_cor_ss[n_samp*
i+
j] = &fT3d1_cor_ss[0]+n_samp*(n_samp*
i+
j);}}
1540 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1542 for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1544 for (Int_t j0Sample = 0 ; j0Sample <= i0Sample ; j0Sample++)
1546 if( (fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample] > 0) &&
1547 (fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample] > 0) )
1549 fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample]/
1550 (
sqrt(fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample])*
sqrt(fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample]) );
1554 (fT3d_cor_ss)[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1556 fT3d_cor_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample];
1559 fTagCorCss[j0StexEcha] = 1; fFileHeader->fCorCssCalc++;
1588 if ( fTagMSp[0] != 1 ){SampleMeans(); fTagMSp[0]=0;}
1591 if( fT1d_ev_ev == 0 ){fT1d_ev_ev =
new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1592 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1593 {
if( fT1d_ev_ev[i0StexEcha] != (Double_t)0 )
1594 {fMiscDiag[11]++; fT1d_ev_ev[i0StexEcha] = (Double_t)0;}}
1597 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::Pedestals()" << endl;}
1598 if(fFlagPrint == fCodePrintAllComments){
1599 cout <<
" Calculation, for all the channels, of the expectation values (over the samples 1 to "
1600 << fNbSampForCalc <<
")" << endl
1601 <<
" of the ADC expectation values (over the events)." << endl;}
1603 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1605 for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1607 fT1d_ev_ev[i0StexEcha] += fT2d_ev[i0StexEcha][i0Sample];
1609 fT1d_ev_ev[i0StexEcha] /= fNbSampForCalc;
1611 fTagPed[0] = 1; fFileHeader->fPedCalc++;
1633 if ( fTagSSp[0] != 1 ){SampleSigmas(); fTagSSp[0]=0;}
1636 if( fT1d_evsamp_of_sigevt == 0 ){fT1d_evsamp_of_sigevt =
new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1637 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1638 {
if( fT1d_evsamp_of_sigevt[i0StexEcha] != (Double_t)0 )
1639 {fMiscDiag[12]++; fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;}}
1642 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::TotalNoise()" << endl;}
1643 if(fFlagPrint == fCodePrintAllComments){
1644 cout <<
" Calculation, for all the channels, of the expectation values (over the samples 1 to "
1645 << fNbSampForCalc <<
")" << endl
1646 <<
" of the ADC expectation values (over the events)." << endl;}
1648 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1650 for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1652 if( fT2d_sig[i0StexEcha][i0Sample] < 0)
1654 cout <<
"!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!"
1659 fT1d_evsamp_of_sigevt[i0StexEcha] += fT2d_sig[i0StexEcha][i0Sample];
1662 fT1d_evsamp_of_sigevt[i0StexEcha] /= fNbSampForCalc;
1664 fTagTno[0] = 1; fFileHeader->fTnoCalc++;
1685 if( fT1d_sigevt_of_evsamp == 0 ){
1686 fT1d_sigevt_of_evsamp =
new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1688 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1690 if( fT1d_sigevt_of_evsamp[i0StexEcha] != (Double_t)0 )
1691 {fMiscDiag[13]++; fT1d_sigevt_of_evsamp[i0StexEcha] = (Double_t)0;}
1695 TVectorD mean_over_samples(fNumberOfEvents);
1696 for(Int_t
i=0;
i<fNumberOfEvents;
i++){mean_over_samples(
i)=(Double_t)0.;}
1699 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::LowFrequencyNoise()" << endl;}
1700 if(fFlagPrint == fCodePrintAllComments){
1701 cout <<
" Calculation, for each channel, of the sigma (over the events)" << endl
1702 <<
" of the ADC expectation values (over the samples 1 to "
1703 << fNbSampForCalc <<
")." << endl;}
1705 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1708 Double_t mean_over_events = (Double_t)0;
1709 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1712 mean_over_samples(n_event) = (Double_t)0.;
1713 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1715 mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
1717 mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1719 mean_over_events += mean_over_samples(n_event);
1721 mean_over_events /= (Double_t)fNumberOfEvents;
1724 Double_t var = (Double_t)0;
1725 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1727 Double_t ecart = mean_over_samples(n_event) - mean_over_events;
1730 var /= (Double_t)fNumberOfEvents;
1732 fT1d_sigevt_of_evsamp[i0StexEcha] =
sqrt(var);
1734 fTagLfn[0] = 1; fFileHeader->fLfnCalc++;
1755 if( fT1d_evevt_of_sigsamp == 0 ){
1756 fT1d_evevt_of_sigsamp =
new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1758 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1760 if( fT1d_evevt_of_sigsamp[i0StexEcha] != (Double_t)0 )
1761 {fMiscDiag[14]++; fT1d_evevt_of_sigsamp[i0StexEcha] = (Double_t)0;}
1765 TVectorD mean_over_samples(fNumberOfEvents);
1766 for(Int_t
i=0;
i<fNumberOfEvents;
i++){mean_over_samples(
i)=(Double_t)0.;}
1767 TVectorD sigma_over_samples(fNumberOfEvents);
1768 for(Int_t
i=0;
i<fNumberOfEvents;
i++){sigma_over_samples(
i)=(Double_t)0.;}
1771 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::HighFrequencyNoise()" << endl;}
1772 if(fFlagPrint == fCodePrintAllComments){
1773 cout <<
" Calculation, for each channel, of the sigma (over the events)" << endl
1774 <<
" of the ADC expectation values (over the samples 1 to "
1775 << fNbSampForCalc <<
")." << endl;}
1777 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1780 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1783 mean_over_samples(n_event) = (Double_t)0.;
1784 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1785 {mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];}
1786 mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1789 Double_t var_over_samples = (Double_t)0;
1790 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1791 {Double_t deviation = fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(n_event);
1792 var_over_samples += deviation*deviation;}
1793 var_over_samples /= (Double_t)fNbSampForCalc;
1795 if( var_over_samples < 0)
1796 {
cout <<
"!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << endl;}
1798 {sigma_over_samples(n_event) =
sqrt(var_over_samples);}
1802 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1803 {fT1d_evevt_of_sigsamp[i0StexEcha] += sigma_over_samples(n_event);}
1805 fT1d_evevt_of_sigsamp[i0StexEcha] /= (Double_t)fNumberOfEvents;
1807 fTagHfn[0] = 1; fFileHeader->fHfnCalc++;
1828 if ( fTagCorCss[0] != 1 ){CorrelationsBetweenSamples(); fTagCorCss[0]=0;}
1831 if( fT1d_ev_cor_ss == 0 ){
1832 Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1833 fT1d_ev_cor_ss =
new Double_t[n_StexEcha]; fCnew++;
1835 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1837 if( fT1d_ev_cor_ss[i0StexEcha] != (Double_t)0 )
1838 {fMiscDiag[15]++; fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;}
1843 Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1845 TVectorD half_cor_ss(ndim);
for(Int_t
i=0;
i<ndim;
i++){half_cor_ss(
i)=(Double_t)0.;}
1848 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::MeanCorrelationsBetweenSamples()" << endl;}
1849 if(fFlagPrint == fCodePrintAllComments){
1850 cout <<
" Calculation, for all the channels, of the expectation values of the" << endl
1851 <<
" correlations between the first " << fNbSampForCalc <<
" samples." << endl;}
1853 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1857 for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1859 for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1861 half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1866 fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
1867 for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1869 fT1d_ev_cor_ss[i0StexEcha] += half_cor_ss(i_rcor);
1871 fT1d_ev_cor_ss[i0StexEcha] /= (Double_t)ndim;
1873 fTagMeanCorss[0] = 1; fFileHeader->fMeanCorssCalc++;
1894 if ( fTagMeanCorss[0] != 1 ){MeanCorrelationsBetweenSamples(); fTagMeanCorss[0]=0;}
1897 if( fT1d_sig_cor_ss == 0 ){
1898 Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1899 fT1d_sig_cor_ss =
new Double_t[n_StexEcha]; fCnew++;
1901 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1903 if( fT1d_sig_cor_ss[i0StexEcha] != (Double_t)0 )
1904 {fMiscDiag[16]++; fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;}
1907 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << endl;}
1908 if(fFlagPrint == fCodePrintAllComments){
1909 cout <<
" Calculation of the sigmas of the (sample,sample)" << endl
1910 <<
" correlations for all the channels." << endl;}
1914 Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1916 TVectorD half_cor_ss(ndim);
for(Int_t
i=0;
i<ndim;
i++){half_cor_ss(
i)=(Double_t)0.;}
1919 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1923 for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1925 for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1927 half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1933 Double_t var = (Double_t)0;
1934 for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1936 Double_t ecart = half_cor_ss(i_rcor) - fT1d_ev_cor_ss[i0StexEcha];
1939 var /= (Double_t)ndim;
1940 fT1d_sig_cor_ss[i0StexEcha] =
sqrt(var);
1942 fTagSigCorss[0] = 1; fFileHeader->fSigCorssCalc++;
1958 if ( fTagPed[0] != 1 ){
Pedestals(); fTagPed[0]=0;}
1960 if( fT1d_av_mped == 0 ){fT1d_av_mped =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
1961 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1962 {
if( fT1d_av_mped[i0StexStinEcna] != (Double_t)0 )
1963 {fMiscDiag[41]++; fT1d_av_mped[i0StexStinEcna] = (Double_t)0;}}
1965 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AveragePedestals()" << endl;}
1966 if(fFlagPrint == fCodePrintAllComments){
1967 cout <<
" Calculation, for all the "
1968 << fStinName.Data() <<
"s, of the average Pedestals" << endl;}
1971 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1973 Int_t n1StexStinEcna = i0StexStinEcna+1;
1974 fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
1975 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
1977 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
1979 if( fStexName ==
"SM " )
1980 {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1982 if( fStexName ==
"Dee" )
1987 Int_t n1StinEcha = i0StinEcha+1;
1988 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
1989 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
1990 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
1991 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
1992 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
1993 {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1996 Double_t xdivis = (Double_t)0.;
1997 if( fStexName ==
"SM " )
1998 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
1999 if( fStexName ==
"Dee" )
2000 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2002 fT1d_av_mped[i0StexStinEcna] = fT1d_av_mped[i0StexStinEcna]/xdivis;
2005 fTagAvPed[0] = 1; fFileHeader->fAvPedCalc++;
2019 if ( fTagTno[0] != 1 ){TotalNoise(); fTagTno[0]=0;}
2021 if( fT1d_av_totn == 0 ){fT1d_av_totn =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2022 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2023 {
if( fT1d_av_totn[i0StexStinEcna] != (Double_t)0 )
2024 {fMiscDiag[42]++; fT1d_av_totn[i0StexStinEcna] = (Double_t)0;}}
2026 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AverageTotalNoise()" << endl;}
2027 if(fFlagPrint == fCodePrintAllComments){
2028 cout <<
" Calculation, for all the "
2029 << fStinName.Data() <<
"s, of the average total Noise" << endl;}
2032 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2034 Int_t n1StexStinEcna = i0StexStinEcna+1;
2035 fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2036 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2038 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2040 if( fStexName ==
"SM " )
2041 {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2043 if( fStexName ==
"Dee" )
2048 Int_t n1StinEcha = i0StinEcha+1;
2049 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2050 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2051 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2052 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2053 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2054 {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2057 Double_t xdivis = (Double_t)0.;
2058 if( fStexName ==
"SM " )
2059 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2060 if( fStexName ==
"Dee" )
2061 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2063 fT1d_av_totn[i0StexStinEcna] = fT1d_av_totn[i0StexStinEcna]/xdivis;
2065 fTagAvTno[0] = 1; fFileHeader->fAvTnoCalc++;
2079 if ( fTagLfn[0] != 1 ){LowFrequencyNoise(); fTagLfn[0]=0;}
2081 if( fT1d_av_lofn == 0 ){fT1d_av_lofn =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2082 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2083 {
if( fT1d_av_lofn[i0StexStinEcna] != (Double_t)0 )
2084 {fMiscDiag[43]++; fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;}}
2086 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AverageLowFrequencyNoise()" << endl;}
2087 if(fFlagPrint == fCodePrintAllComments){
2088 cout <<
" Calculation, for all the "
2089 << fStinName.Data() <<
"s, of the average Low Frequency Noise" << endl;}
2092 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2094 Int_t n1StexStinEcna = i0StexStinEcna+1;
2095 fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2096 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2098 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2100 if( fStexName ==
"SM " )
2101 {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2103 if( fStexName ==
"Dee" )
2108 Int_t n1StinEcha = i0StinEcha+1;
2109 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2110 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2111 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2112 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2113 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2114 {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2117 Double_t xdivis = (Double_t)0.;
2118 if( fStexName ==
"SM " )
2119 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2120 if( fStexName ==
"Dee" )
2121 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2123 fT1d_av_lofn[i0StexStinEcna] = fT1d_av_lofn[i0StexStinEcna]/xdivis;
2125 fTagAvLfn[0] = 1; fFileHeader->fAvLfnCalc++;
2139 if ( fTagHfn[0] != 1 ){HighFrequencyNoise(); fTagHfn[0]=0;}
2141 if( fT1d_av_hifn == 0 ){fT1d_av_hifn =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2142 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2143 {
if( fT1d_av_hifn[i0StexStinEcna] != (Double_t)0 )
2144 {fMiscDiag[44]++; fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;}}
2146 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AverageHighFrequencyNoise()" << endl;}
2147 if(fFlagPrint == fCodePrintAllComments){
2148 cout <<
" Calculation, for all the "
2149 << fStinName.Data() <<
"s, of the average High Frequency Noise" << endl;}
2152 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2154 Int_t n1StexStinEcna = i0StexStinEcna+1;
2155 fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2156 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2158 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2160 if( fStexName ==
"SM " )
2161 {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2163 if( fStexName ==
"Dee" )
2168 Int_t n1StinEcha = i0StinEcha+1;
2169 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2170 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2171 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2172 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2173 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2174 {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2177 Double_t xdivis = (Double_t)0.;
2178 if( fStexName ==
"SM " )
2179 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2180 if( fStexName ==
"Dee" )
2181 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2183 fT1d_av_hifn[i0StexStinEcna] = fT1d_av_hifn[i0StexStinEcna]/xdivis;
2185 fTagAvHfn[0] = 1; fFileHeader->fAvHfnCalc++;
2199 if ( fTagMeanCorss[0] != 1 ){MeanCorrelationsBetweenSamples(); fTagMeanCorss[0]=0;}
2201 if( fT1d_av_ev_corss == 0 ){fT1d_av_ev_corss =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2202 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2203 {
if( fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0 )
2204 {fMiscDiag[45]++; fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;}}
2206 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << endl;}
2207 if(fFlagPrint == fCodePrintAllComments){
2208 cout <<
" Calculation, for all the "
2209 << fStinName.Data() <<
"s, of the average mean cor(s,s)" << endl;}
2212 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2214 Int_t n1StexStinEcna = i0StexStinEcna+1;
2215 fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2216 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2218 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2220 if( fStexName ==
"SM " )
2221 {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2223 if( fStexName ==
"Dee" )
2228 Int_t n1StinEcha = i0StinEcha+1;
2229 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2230 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2231 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2232 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2233 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2234 {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2237 Double_t xdivis = (Double_t)0.;
2238 if( fStexName ==
"SM " )
2239 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2240 if( fStexName ==
"Dee" )
2241 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2243 fT1d_av_ev_corss[i0StexStinEcna] = fT1d_av_ev_corss[i0StexStinEcna]/xdivis;
2245 fTagAvMeanCorss[0] = 1; fFileHeader->fAvMeanCorssCalc++;
2259 if ( fTagSigCorss[0] != 1 ){SigmaOfCorrelationsBetweenSamples(); fTagSigCorss[0]=0;}
2261 if( fT1d_av_sig_corss == 0 ){fT1d_av_sig_corss =
new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2262 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2263 {
if( fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0 )
2264 {fMiscDiag[46]++; fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;}}
2266 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << endl;}
2267 if(fFlagPrint == fCodePrintAllComments){
2268 cout <<
" Calculation, for all the "
2269 << fStinName.Data() <<
"s, of the average sigma of cor(s,s)" << endl;}
2272 for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2274 Int_t n1StexStinEcna = i0StexStinEcna+1;
2275 fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2276 for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2278 Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2280 if( fStexName ==
"SM " )
2281 {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2283 if( fStexName ==
"Dee" )
2288 Int_t n1StinEcha = i0StinEcha+1;
2289 if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2290 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2291 if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2292 {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2293 if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2294 {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2297 Double_t xdivis = (Double_t)0.;
2298 if( fStexName ==
"SM " )
2299 {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2300 if( fStexName ==
"Dee" )
2301 {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna,
"TEcnaRun");}
2303 fT1d_av_sig_corss[i0StexStinEcna] = fT1d_av_sig_corss[i0StexStinEcna]/xdivis;
2305 fTagAvSigCorss[0] = 1; fFileHeader->fAvSigCorssCalc++;
2337 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << endl;}
2338 if(fFlagPrint == fCodePrintAllComments){
2339 cout <<
" Calculation of the Low Frequency Covariances between channels" << endl;}
2342 if( fT2d_lf_cov == 0 ){
2343 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2344 fT2d_lf_cov =
new Double_t*[n_StexEcha]; fCnew++;
2345 fT2d1_lf_cov =
new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2346 for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2347 fT2d_lf_cov[i0StexEcha] = &fT2d1_lf_cov[0] + i0StexEcha*n_StexEcha;}}
2349 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2351 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2353 if( fT2d_lf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2354 {fMiscDiag[21]++; fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2359 TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2360 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2361 {
for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2362 {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2364 TVectorD MoeOfMos(fEcal->MaxCrysEcnaInStex());
2365 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2366 { MoeOfMos(i0StexEcha)=(Double_t)0.;}
2369 if(fFlagPrint != fCodePrintNoComment){
2370 cout <<
" Calculation, for each pair of channels, of the covariance (over the events)" << endl
2371 <<
" between the ADC expectation values (over the samples 1 to "
2372 << fNbSampForCalc <<
")." << endl;}
2374 cout <<
" Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() <<
"): " << endl;
2376 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2378 MoeOfMos(i0StexEcha) = (Double_t)0;
2380 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2381 || ( fFlagSubDet ==
"EB") )
2383 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2386 mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2387 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2389 mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
2391 mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2394 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2395 {MoeOfMos(i0StexEcha) += mean_over_samples(i0StexEcha, n_event);}
2396 MoeOfMos(i0StexEcha) /= (Double_t)fNumberOfEvents;
2401 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2403 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2404 || ( fFlagSubDet ==
"EB") )
2406 for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2408 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2409 || ( fFlagSubDet ==
"EB") )
2411 fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2412 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2414 fT2d_lf_cov[i0StexEcha][j0StexEcha] +=
2415 ( mean_over_samples(i0StexEcha, n_event) - MoeOfMos(i0StexEcha) )
2416 *( mean_over_samples(j0StexEcha, n_event) - MoeOfMos(j0StexEcha) );
2418 fT2d_lf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2420 fT2d_lf_cov[j0StexEcha][i0StexEcha] = fT2d_lf_cov[i0StexEcha][j0StexEcha];
2423 if( i0StexEcha%100 == 0 ){
cout << i0StexEcha <<
"[LFN Cov], ";}
2427 fTagLfCov[0] = 1; fFileHeader->fLfCovCalc++;
2443 if ( fTagLfCov[0] != 1 )
2444 {LowFrequencyCovariancesBetweenChannels(); fTagLfCov[0] = 0;}
2446 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << endl;}
2447 if(fFlagPrint == fCodePrintAllComments){
2448 cout <<
" Calculation of the Low Frequency Correlations between channels" << endl
2449 <<
" Starting allocation. "
2453 if( fT2d_lf_cor == 0 ){
2454 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2455 fT2d_lf_cor =
new Double_t*[n_StexEcha]; fCnew++;
2456 fT2d1_lf_cor =
new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2457 for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2458 fT2d_lf_cor[i0StexEcha] = &fT2d1_lf_cor[0] + i0StexEcha*n_StexEcha;}
2461 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2463 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2465 if( fT2d_lf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2466 {fMiscDiag[22]++; fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2472 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2474 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2475 || ( fFlagSubDet ==
"EB") )
2477 for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2479 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2480 || ( fFlagSubDet ==
"EB") )
2482 if( fT2d_lf_cov[i0StexEcha][i0StexEcha] > 0
2483 && fT2d_lf_cov[j0StexEcha][j0StexEcha] > 0 )
2485 fT2d_lf_cor[i0StexEcha][j0StexEcha] =
2486 fT2d_lf_cov[i0StexEcha][j0StexEcha]/
2487 ( (Double_t)
sqrt( fT2d_lf_cov[i0StexEcha][i0StexEcha]*
2488 fT2d_lf_cov[j0StexEcha][j0StexEcha] ) );
2492 fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2494 fT2d_lf_cor[j0StexEcha][i0StexEcha] = fT2d_lf_cor[i0StexEcha][j0StexEcha];
2498 if( i0StexEcha%100 == 0 ){
cout << i0StexEcha <<
"[LFN Cor], ";}
2502 fTagLfCor[0] = 1; fFileHeader->fLfCorCalc++;
2525 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << endl;}
2526 if(fFlagPrint == fCodePrintAllComments){
2527 cout <<
" Calculation of the High Frequency Covariances between channels" << endl;}
2530 if( fT2d_hf_cov == 0 ){
2531 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2532 fT2d_hf_cov =
new Double_t*[n_StexEcha]; fCnew++;
2533 fT2d1_hf_cov =
new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2534 for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2535 fT2d_hf_cov[i0StexEcha] = &fT2d1_hf_cov[0] + i0StexEcha*n_StexEcha;}
2538 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2540 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2542 if( fT2d_hf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2543 {fMiscDiag[23]++; fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2548 TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2549 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2550 {
for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2551 {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2553 TMatrixD cov_over_samp(fEcal->MaxCrysEcnaInStex(), fEcal->MaxCrysEcnaInStex());
2554 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2555 {
for(Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
2556 {cov_over_samp(i0StexEcha, j0StexEcha)=(Double_t)0.;}}
2559 if(fFlagPrint != fCodePrintNoComment){
2560 cout <<
" Calculation of the mean (over the events)" << endl
2561 <<
" of the covariances between the channels (over the samples 1 to "
2562 << fNbSampForCalc <<
")." << endl;}
2564 cout <<
" Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() <<
"): " << endl;
2566 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2568 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2569 || ( fFlagSubDet ==
"EB") )
2571 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2574 mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2575 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2576 {mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];}
2577 mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2580 if( i0StexEcha%100 == 0 ){
cout << i0StexEcha <<
"[HFNa Cov], ";}
2584 cout <<
" Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() <<
"): " << endl;
2587 for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2589 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2590 || ( fFlagSubDet ==
"EB") )
2592 for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2594 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2595 || ( fFlagSubDet ==
"EB") )
2597 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2600 cov_over_samp(i0StexEcha,j0StexEcha) = (Double_t)0;
2601 for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2603 cov_over_samp(i0StexEcha,j0StexEcha) +=
2604 ( fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(i0StexEcha, n_event) )*
2605 ( fT3d_AdcValues[j0StexEcha][i0Sample][n_event] - mean_over_samples(j0StexEcha, n_event) );
2607 cov_over_samp(i0StexEcha,j0StexEcha) /= (Double_t)fNbSampForCalc;
2612 fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2613 for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2615 fT2d_hf_cov[i0StexEcha][j0StexEcha] += cov_over_samp(i0StexEcha,j0StexEcha);
2617 fT2d_hf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2619 fT2d_hf_cov[j0StexEcha][i0StexEcha] = fT2d_hf_cov[i0StexEcha][j0StexEcha];
2623 if( i0StexEcha%100 == 0 ){
cout << i0StexEcha <<
"[HFNb Cov], ";}
2627 fTagHfCov[0] = 1; fFileHeader->fHfCovCalc++;
2643 if ( fTagHfCov[0] != 1 )
2644 {HighFrequencyCovariancesBetweenChannels(); fTagHfCov[0] = 0;}
2646 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << endl;}
2647 if(fFlagPrint == fCodePrintAllComments){
2648 cout <<
" Calculation of the High Frequency Correlations between channels" << endl
2649 <<
" Starting allocation. "
2653 if( fT2d_hf_cor == 0 ){
2654 const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2655 fT2d_hf_cor =
new Double_t*[n_StexEcha]; fCnew++;
2656 fT2d1_hf_cor =
new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2657 for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2658 fT2d_hf_cor[i0StexEcha] = &fT2d1_hf_cor[0] + i0StexEcha*n_StexEcha;}
2661 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2663 for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2665 if( fT2d_hf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2666 {fMiscDiag[24]++; fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2673 for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2675 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2676 || ( fFlagSubDet ==
"EB") )
2678 for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2680 if( (fFlagSubDet ==
"EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2681 || ( fFlagSubDet ==
"EB") )
2683 if( fT2d_hf_cov[i0StexEcha][i0StexEcha] > 0
2684 && fT2d_hf_cov[j0StexEcha][j0StexEcha] > 0 )
2686 fT2d_hf_cor[i0StexEcha][j0StexEcha] =
2687 fT2d_hf_cov[i0StexEcha][j0StexEcha]/
2688 ( (Double_t)
sqrt(fT2d_hf_cov[i0StexEcha][i0StexEcha]) *
2689 (Double_t)
sqrt(fT2d_hf_cov[j0StexEcha][j0StexEcha]) );
2693 fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2696 fT2d_hf_cor[j0StexEcha][i0StexEcha] = fT2d_hf_cor[i0StexEcha][j0StexEcha];
2700 if( i0StexEcha%100 == 0 ){
cout << i0StexEcha <<
"[HFN Cor], ";}
2704 fTagHfCor[0] = 1; fFileHeader->fHfCorCalc++;
2720 {LowFrequencyMeanCorrelationsBetweenStins();}
2722 {LowFrequencyMeanCorrelationsBetweenStins();}
2731 if(fTagLfCor[0] != 1){LowFrequencyCorrelationsBetweenChannels(); fTagLfCor[0]=0;}
2734 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2735 if(fFlagPrint == fCodePrintAllComments){
2736 cout <<
" Calculation of the mean, for each "
2737 << fStinName.Data() <<
", of the" << endl
2738 <<
" Low Frequency Correlations between channels." << endl;}
2741 if( fT2d_lfcc_mostins == 0 ){
2742 const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2743 fT2d_lfcc_mostins =
new Double_t*[n_Stin]; fCnew++;
2744 fT2d1_lfcc_mostins =
new Double_t[n_Stin*n_Stin]; fCnew++;
2745 for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2746 fT2d_lfcc_mostins[i0StexStinEcna] = &fT2d1_lfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2749 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2751 for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2753 if( fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2754 {fMiscDiag[31]++; fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2767 Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2769 TVectorD half_LFccMos(ndim);
for(Int_t
i=0;
i<ndim;
i++){half_LFccMos(
i)=(Double_t)0.;}
2772 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2773 if(fFlagPrint == fCodePrintAllComments){
2774 cout <<
" Calculation, for each "
2775 << fStinName.Data() <<
", of the mean " << endl
2776 <<
" Low Frequency cor(c,c)." << endl;}
2778 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2780 for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2784 for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2786 Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2787 for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2789 Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2790 if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2791 (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2792 {half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2794 {
cout <<
"!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2795 <<
"i0StexEcha = " << i0StexEcha <<
", j0StexEcha = " << j0StexEcha << fTTBELL << endl; }
2799 fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2800 for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2802 fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_LFccMos(i_rcor));
2804 fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2806 if( i0StexStinEcna%10 == 0 ){
cout << i0StexStinEcna <<
"[LFN MCtt], ";}
2810 fTagLFccMoStins[0] = 1; fFileHeader->fLFccMoStinsCalc++;
2818 {HighFrequencyMeanCorrelationsBetweenStins();}
2820 {HighFrequencyMeanCorrelationsBetweenStins();}
2829 if(fTagHfCor[0] != 1){HighFrequencyCorrelationsBetweenChannels();fTagHfCor[0]=0;}
2832 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << endl;}
2833 if(fFlagPrint == fCodePrintAllComments){
2834 cout <<
" Calculation of the mean, for each "
2835 << fFlagSubDet.Data() <<
", of the" << endl
2836 <<
" High Frequency Correlations between channels." << endl;}
2839 if( fT2d_hfcc_mostins == 0 ){
2840 const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2841 fT2d_hfcc_mostins =
new Double_t*[n_Stin]; fCnew++;
2842 fT2d1_hfcc_mostins =
new Double_t[n_Stin*n_Stin]; fCnew++;
2843 for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2844 fT2d_hfcc_mostins[i0StexStinEcna] = &fT2d1_hfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2847 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2849 for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2851 if( fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2852 {fMiscDiag[32]++; fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2865 Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2867 TVectorD half_HFccMos(ndim);
for(Int_t
i=0;
i<ndim;
i++){half_HFccMos(
i)=(Double_t)0.;}
2869 if(fFlagPrint != fCodePrintNoComment){
cout <<
"*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << endl;}
2870 if(fFlagPrint == fCodePrintAllComments){
2871 cout <<
" Calculation, for each "
2872 << fFlagSubDet.Data() <<
", of the mean " << endl
2873 <<
" High Frequency cor(c,c)." << endl;}
2876 for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2878 for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2882 for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2884 Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2885 for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2887 Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2888 if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2889 (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2890 {half_HFccMos(i_count) = fT2d_hf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2892 {
cout <<
"!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2893 <<
"i0StexEcha = " << i0StexEcha <<
", j0StexEcha = " << j0StexEcha << fTTBELL << endl; }
2897 fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2898 for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2900 fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_HFccMos(i_rcor));
2902 fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2904 if( i0StexStinEcna%10 == 0 ){
cout << i0StexStinEcna <<
"[HFN MCtt], ";}
2908 fTagHFccMoStins[0] = 1; fFileHeader->fHFccMoStinsCalc++;
2930 Bool_t ok_open = kFALSE;
2933 s_name = fCnaParPaths->ResultsRootFilePath();
2935 s_name.Append(name);
2939 Long_t iCnaRootFile = fObjectManager->GetPointerValue(
"TEcnaRootFile");
2940 if( iCnaRootFile == 0 )
2955 cout <<
"TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << endl;
2959 if(fFlagPrint == fCodePrintAllComments)
2960 {
cout <<
"*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << endl;}
2961 fOpenRootFile = kTRUE;
2974 s_name = fCnaParPaths->ResultsRootFilePath();
2976 s_name.Append(name);
2978 Bool_t ok_close = kFALSE;
2980 if (fOpenRootFile == kTRUE )
2984 if(fFlagPrint != fCodePrintAllComments){
2985 cout <<
"*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() <<
" closed." << endl;}
2989 fOpenRootFile = kFALSE;
2994 cout <<
"*TEcnaRun::CloseRootFile(...)> No close since no file is open."
3021 Bool_t ok_write = kFALSE;
3024 Int_t nCountEvts = 0;
3026 for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
3027 {
for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
3028 {nCountEvts += fT2d_NbOfEvts[i0StexEcha][i0Sample];}}
3030 if ( nCountEvts <= 0 )
3033 cout <<
"!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data()
3034 <<
". File will not be written." << endl;
3039 if(fFlagPrint == fCodePrintAllComments){
3040 cout <<
"*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << endl
3041 <<
" " << fCnaWrite->GetRootFileName().Data() << endl;}
3043 const Text_t *FileShortName = (
const Text_t *)fCnaWrite->GetRootFileNameShort().Data();
3044 ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples);
3046 if( ok_write == kTRUE )
3048 if(fFlagPrint != fCodePrintNoComment)
3049 {
cout <<
"*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data()
3054 cout <<
"!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data()
3072 Bool_t ok_write = kFALSE;
3074 fCnaWrite->RegisterFileParameters(TypAna.Data(), fNbSampForCalc, fFileHeader->fRunNumber,
3075 fFileHeader->fFirstReqEvtNumber, fFileHeader->fLastReqEvtNumber,
3076 fFileHeader->fReqNbOfEvts, fFileHeader->fStex,
3077 fFileHeader->fStartDate, fFileHeader->fStopDate,
3078 fFileHeader->fStartTime, fFileHeader->fStopTime);
3080 fCnaWrite->fMakeResultsFileName();
3081 fNewRootFileName = fCnaWrite->GetRootFileName();
3082 fNewRootFileNameShort = fCnaWrite->GetRootFileNameShort();
3084 const Text_t *FileShortName = (
const Text_t *)fNewRootFileNameShort.Data();
3086 if(fFlagPrint == fCodePrintAllComments){
3087 cout <<
"*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << endl
3088 <<
" " << fNewRootFileNameShort.Data() << endl;}
3090 ok_write = WriteRootFile(FileShortName, fNbSampForCalc);
3115 Bool_t ok_write = kFALSE;
3117 if ( fOpenRootFile )
3119 cout <<
"!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open."
3169 OpenRootFile(file_name,
"RECREATE");
3171 TString typ_name =
"?";
3172 Int_t v_nb_times = 0;
3173 Int_t v_dim_one = 0;
3174 Int_t v_dim_two = 0;
3177 Int_t v_tot_writ = 0;
3190 Int_t MaxCar = fgMaxCar;
3191 typ_name.Resize(MaxCar);
3192 typ_name =
"StinNumbers";
3193 v_nb_times = fFileHeader->fStinNumbersCalc;
3195 v_dim_two = fEcal->MaxStinEcnaInStex();
3196 v_size = v_nb_times*v_dim_one*v_dim_two;
3199 if(fFlagPrint == fCodePrintAllComments){
3200 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3201 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3202 << setw(9) << v_size;}
3204 for (Int_t
i = 0;
i < v_nb_times;
i++)
3206 if ( fTagStinNumbers[0] == 1 )
3214 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3217 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3223 typ_name.Resize(MaxCar);
3225 v_nb_times = fFileHeader->fAvPedCalc;
3227 v_dim_two = fEcal->MaxStinEcnaInStex();
3228 v_size = v_nb_times*v_dim_one*v_dim_two;
3231 if(fFlagPrint == fCodePrintAllComments){
3232 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3233 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3234 << setw(9) << v_size;}
3236 for (Int_t
i = 0;
i < v_nb_times;
i++)
3238 if ( fTagAvPed[0] == 1 )
3246 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3249 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3255 typ_name.Resize(MaxCar);
3257 v_nb_times = fFileHeader->fAvTnoCalc;
3259 v_dim_two = fEcal->MaxStinEcnaInStex();
3260 v_size = v_nb_times*v_dim_one*v_dim_two;
3263 if(fFlagPrint == fCodePrintAllComments){
3264 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3265 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3266 << setw(9) << v_size;}
3268 for (Int_t
i = 0;
i < v_nb_times;
i++)
3270 if ( fTagAvTno[0] == 1 )
3278 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3281 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3287 typ_name.Resize(MaxCar);
3289 v_nb_times = fFileHeader->fAvLfnCalc;
3291 v_dim_two = fEcal->MaxStinEcnaInStex();
3292 v_size = v_nb_times*v_dim_one*v_dim_two;
3295 if(fFlagPrint == fCodePrintAllComments){
3296 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3297 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3298 << setw(9) << v_size;}
3300 for (Int_t
i = 0;
i < v_nb_times;
i++)
3302 if ( fTagAvLfn[0] == 1 )
3310 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3313 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3319 typ_name.Resize(MaxCar);
3321 v_nb_times = fFileHeader->fAvHfnCalc;
3323 v_dim_two = fEcal->MaxStinEcnaInStex();
3324 v_size = v_nb_times*v_dim_one*v_dim_two;
3327 if(fFlagPrint == fCodePrintAllComments){
3328 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3329 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3330 << setw(9) << v_size;}
3332 for (Int_t
i = 0;
i < v_nb_times;
i++)
3334 if ( fTagAvHfn[0] == 1 )
3342 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3345 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3351 typ_name.Resize(MaxCar);
3352 typ_name =
"AvMeanCorss";
3353 v_nb_times = fFileHeader->fAvMeanCorssCalc;
3355 v_dim_two = fEcal->MaxStinEcnaInStex();
3356 v_size = v_nb_times*v_dim_one*v_dim_two;
3359 if(fFlagPrint == fCodePrintAllComments){
3360 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3361 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3362 << setw(9) << v_size;}
3364 for (Int_t
i = 0;
i < v_nb_times;
i++)
3366 if ( fTagAvMeanCorss[0] == 1 )
3374 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3377 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3383 typ_name.Resize(MaxCar);
3384 typ_name =
"AvSigCorss";
3385 v_nb_times = fFileHeader->fAvSigCorssCalc;
3387 v_dim_two = fEcal->MaxStinEcnaInStex();
3388 v_size = v_nb_times*v_dim_one*v_dim_two;
3391 if(fFlagPrint == fCodePrintAllComments){
3392 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3393 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3394 << setw(9) << v_size;}
3396 for (Int_t
i = 0;
i < v_nb_times;
i++)
3398 if ( fTagAvSigCorss[0] == 1 )
3406 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3409 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3415 typ_name.Resize(MaxCar);
3417 v_nb_times = fFileHeader->fPedCalc;
3419 v_dim_two = fEcal->MaxCrysEcnaInStex();
3420 v_size = v_nb_times*v_dim_one*v_dim_two;
3423 if(fFlagPrint == fCodePrintAllComments){
3424 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3425 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3426 << setw(9) << v_size;}
3428 for (Int_t
i = 0;
i < v_nb_times;
i++)
3430 if ( fTagPed[0] == 1 )
3438 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3441 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3447 typ_name.Resize(MaxCar);
3449 v_nb_times = fFileHeader->fTnoCalc;
3451 v_dim_two = fEcal->MaxCrysEcnaInStex();
3452 v_size = v_nb_times*v_dim_one*v_dim_two;
3455 if(fFlagPrint == fCodePrintAllComments){
3456 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3457 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3458 << setw(9) << v_size;}
3460 for (Int_t
i = 0;
i < v_nb_times;
i++)
3462 if ( fTagTno[0] == 1 )
3470 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3473 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3479 typ_name.Resize(MaxCar);
3480 typ_name =
"MeanCorss";
3481 v_nb_times = fFileHeader->fMeanCorssCalc;
3483 v_dim_two = fEcal->MaxCrysEcnaInStex();
3484 v_size = v_nb_times*v_dim_one*v_dim_two;
3487 if(fFlagPrint == fCodePrintAllComments){
3488 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3489 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3490 << setw(9) << v_size;}
3492 for (Int_t
i = 0;
i < v_nb_times;
i++)
3494 if ( fTagMeanCorss[0] == 1 )
3502 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3505 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3511 typ_name.Resize(MaxCar);
3513 v_nb_times = fFileHeader->fLfnCalc;
3515 v_dim_two = fEcal->MaxCrysEcnaInStex();
3516 v_size = v_nb_times*v_dim_one*v_dim_two;
3519 if(fFlagPrint == fCodePrintAllComments){
3520 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3521 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3522 << setw(9) << v_size;}
3524 for (Int_t
i = 0;
i < v_nb_times;
i++)
3526 if ( fTagLfn[0] == 1 )
3534 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3537 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3543 typ_name.Resize(MaxCar);
3545 v_nb_times = fFileHeader->fHfnCalc;
3547 v_dim_two = fEcal->MaxCrysEcnaInStex();
3548 v_size = v_nb_times*v_dim_one*v_dim_two;
3551 if(fFlagPrint == fCodePrintAllComments){
3552 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3553 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3554 << setw(9) << v_size;}
3556 for (Int_t
i = 0;
i < v_nb_times;
i++)
3558 if ( fTagHfn[0] == 1 )
3566 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3569 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3575 typ_name.Resize(MaxCar);
3576 typ_name =
"SigCorss";
3577 v_nb_times = fFileHeader->fSigCorssCalc;
3579 v_dim_two = fEcal->MaxCrysEcnaInStex();
3580 v_size = v_nb_times*v_dim_one*v_dim_two;
3583 if(fFlagPrint == fCodePrintAllComments){
3584 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3585 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3586 << setw(9) << v_size;}
3588 for (Int_t
i = 0;
i < v_nb_times;
i++)
3590 if ( fTagSigCorss[0] == 1 )
3598 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3601 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3607 typ_name.Resize(MaxCar);
3608 typ_name =
"LFccMoStins";
3609 v_nb_times = fFileHeader->fLFccMoStinsCalc;
3610 v_dim_one = fEcal->MaxStinEcnaInStex();
3611 v_dim_two = fEcal->MaxStinEcnaInStex();
3612 v_size = v_nb_times*v_dim_one*v_dim_two;
3615 if(fFlagPrint == fCodePrintAllComments){
3616 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3617 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3618 << setw(9) << v_size;}
3620 for (Int_t
i = 0;
i < v_nb_times;
i++)
3622 if ( fTagLFccMoStins[0] == 1 )
3630 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3633 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3639 typ_name.Resize(MaxCar);
3640 typ_name =
"HFccMoStins";
3641 v_nb_times = fFileHeader->fHFccMoStinsCalc;
3642 v_dim_one = fEcal->MaxStinEcnaInStex();
3643 v_dim_two = fEcal->MaxStinEcnaInStex();
3644 v_size = v_nb_times*v_dim_one*v_dim_two;
3647 if(fFlagPrint == fCodePrintAllComments){
3648 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3649 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3650 << setw(9) << v_size;}
3652 for (Int_t
i = 0;
i < v_nb_times;
i++)
3654 if ( fTagHFccMoStins[0] == 1 )
3662 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3665 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3671 typ_name.Resize(MaxCar);
3672 typ_name =
"NbOfEvts";
3673 v_nb_times = fFileHeader->fNbOfEvtsCalc;
3674 v_dim_one = fEcal->MaxCrysEcnaInStex();
3675 v_dim_two = argNbSampWrite;
3676 v_size = v_nb_times*v_dim_one*v_dim_two;
3679 if(fFlagPrint == fCodePrintAllComments){
3680 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3681 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3682 << setw(9) << v_size;}
3684 for (Int_t
i = 0;
i < v_nb_times;
i++)
3686 if ( fTagNbOfEvts[0] == 1 )
3692 TRootNbOfEvts(argNbSampWrite);
3694 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3697 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3703 typ_name.Resize(MaxCar);
3705 v_nb_times = fFileHeader->fMSpCalc;
3706 v_dim_one = fEcal->MaxCrysEcnaInStex();
3707 v_dim_two = argNbSampWrite;
3708 v_size = v_nb_times*v_dim_one*v_dim_two;
3711 if(fFlagPrint == fCodePrintAllComments){
3712 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3713 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3714 << setw(9) << v_size;}
3716 for (Int_t
i = 0;
i < v_nb_times;
i++)
3718 if ( fTagMSp[0] == 1 )
3724 TRootMSp(argNbSampWrite);
3726 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3729 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3735 typ_name.Resize(MaxCar);
3737 v_nb_times = fFileHeader->fSSpCalc;
3738 v_dim_one = fEcal->MaxCrysEcnaInStex();
3739 v_dim_two = argNbSampWrite;
3740 v_size = v_nb_times*v_dim_one*v_dim_two;
3743 if(fFlagPrint == fCodePrintAllComments){
3744 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3745 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3746 << setw(9) << v_size;}
3748 for (Int_t
i = 0;
i < v_nb_times;
i++)
3750 if ( fTagSSp[0] == 1 )
3756 TRootSSp(argNbSampWrite);
3758 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3761 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3768 typ_name.Resize(MaxCar);
3769 typ_name =
"CovCss";
3770 v_nb_times = fFileHeader->fCovCssCalc;
3771 v_dim_one = argNbSampWrite;
3772 v_dim_two = argNbSampWrite;
3773 v_size = v_nb_times*v_dim_one*v_dim_two;
3776 if(fFlagPrint == fCodePrintAllComments){
3777 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3778 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3779 << setw(9) << v_size;}
3781 for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3783 if ( fTagCovCss[i0StexEcha] == 1 )
3789 TRootCovCss(i0StexEcha, argNbSampWrite);
3791 if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3792 {
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3795 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3801 typ_name.Resize(MaxCar);
3802 typ_name =
"CorCss";
3803 v_nb_times = fFileHeader->fCorCssCalc;
3804 v_dim_one = argNbSampWrite;
3805 v_dim_two = argNbSampWrite;
3806 v_size = v_nb_times*v_dim_one*v_dim_two;
3809 if(fFlagPrint == fCodePrintAllComments){
3810 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3811 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3812 << setw(9) << v_size;}
3814 for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3816 if ( fTagCorCss[i0StexEcha] == 1 )
3822 TRootCorCss(i0StexEcha, argNbSampWrite);
3824 if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3825 {
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3828 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3834 typ_name.Resize(MaxCar);
3835 typ_name =
"AdcEvt";
3836 v_nb_times = fFileHeader->fAdcEvtCalc;
3837 v_dim_one = argNbSampWrite;
3838 v_dim_two = fFileHeader->fReqNbOfEvts;
3839 v_size = v_nb_times*v_dim_one*v_dim_two;
3842 if(fFlagPrint == fCodePrintAllComments){
3843 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3844 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3845 << setw(9) << v_size;}
3847 for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3849 if ( fTagAdcEvt[i0StexEcha] == 1 )
3855 TRootAdcEvt(i0StexEcha, argNbSampWrite);
3857 if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments )
3858 {
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3861 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3867 typ_name.Resize(MaxCar);
3869 v_nb_times = fFileHeader->fLfCovCalc;
3870 v_dim_one = fEcal->MaxCrysEcnaInStex();
3871 v_dim_two = fEcal->MaxCrysEcnaInStex();
3872 v_size = v_nb_times*v_dim_one*v_dim_two;
3875 if(fFlagPrint == fCodePrintAllComments){
3876 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3877 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3878 << setw(9) << v_size;}
3880 for (Int_t
i = 0;
i < v_nb_times;
i++)
3882 if ( fTagLfCov[0] == 1 )
3890 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3893 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3899 typ_name.Resize(MaxCar);
3901 v_nb_times = fFileHeader->fLfCorCalc;
3902 v_dim_one = fEcal->MaxCrysEcnaInStex();
3903 v_dim_two = fEcal->MaxCrysEcnaInStex();
3904 v_size = v_nb_times*v_dim_one*v_dim_two;
3907 if(fFlagPrint == fCodePrintAllComments){
3908 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3909 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3910 << setw(9) << v_size;}
3912 for (Int_t
i = 0;
i < v_nb_times;
i++)
3914 if ( fTagLfCor[0] == 1 )
3922 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3925 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3931 typ_name.Resize(MaxCar);
3933 v_nb_times = fFileHeader->fHfCovCalc;
3934 v_dim_one = fEcal->MaxCrysEcnaInStex();
3935 v_dim_two = fEcal->MaxCrysEcnaInStex();
3936 v_size = v_nb_times*v_dim_one*v_dim_two;
3939 if(fFlagPrint == fCodePrintAllComments){
3940 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3941 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3942 << setw(9) << v_size;}
3944 for (Int_t
i = 0;
i < v_nb_times;
i++)
3946 if ( fTagHfCov[0] == 1 )
3954 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3957 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3963 typ_name.Resize(MaxCar);
3965 v_nb_times = fFileHeader->fHfCorCalc;
3966 v_dim_one = fEcal->MaxCrysEcnaInStex();
3967 v_dim_two = fEcal->MaxCrysEcnaInStex();
3968 v_size = v_nb_times*v_dim_one*v_dim_two;
3971 if(fFlagPrint == fCodePrintAllComments){
3972 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name <<
": " << setw(4) << v_nb_times
3973 <<
" * (" << setw(4) << v_dim_one <<
"," << setw(4) << v_dim_two <<
") = "
3974 << setw(9) << v_size;}
3976 for (Int_t
i = 0;
i < v_nb_times;
i++)
3978 if ( fTagHfCor[0] == 1 )
3986 if(
i == 0 && fFlagPrint == fCodePrintAllComments ){
cout <<
" => WRITTEN ON FILE "; v_tot_writ += v_size;}
3989 if(fFlagPrint == fCodePrintAllComments){
cout << endl;}
3995 fFileHeader->Write();
3998 if(fFlagPrint == fCodePrintAllComments){
3999 cout <<
"*TEcnaRun::WriteRootFile(...)> " << setw(20) <<
"TOTAL: "
4000 << setw(21) <<
"CALCULATED = " << setw(9) << v_tot
4001 <<
" => WRITTEN ON FILE = " << setw(9) << v_tot_writ << endl;}
4003 if(fFlagPrint == fCodePrintAllComments){
4004 cout <<
"*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name <<
" in directory:" << endl
4005 <<
" " << fCnaParPaths->ResultsRootFilePath().Data()
4011 CloseRootFile(file_name);
4026 if (fTagStinNumbers[0] == 1 )
4028 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4031 fT1d_StexStinFromIndex[j0StexStinEcna];
4044 if (fTagNbOfEvts[0] == 1 )
4046 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4048 for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4051 fT2d_NbOfEvts[j0StexEcha][i0Sample];
4065 if (fTagAdcEvt[user_StexEcha] == 1 )
4067 for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4070 for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4075 for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4078 fT3d_AdcValues[user_StexEcha][i0Sample][j_bin];
4092 if (fTagMSp[0] == 1 )
4094 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4096 for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4099 fT2d_ev[j0StexEcha][i0Sample];
4113 if (fTagSSp[0] == 1 )
4115 for (Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4117 for (Int_t i0Sample=0; i0Sample<argNbSampWrite; i0Sample++)
4120 fT2d_sig[j0StexEcha][i0Sample];
4135 if (fTagLFccMoStins[0] == 1 )
4137 for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4139 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4142 fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4157 if (fTagHFccMoStins[0] == 1 )
4159 for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4161 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4164 fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4178 if (fTagAvTno[0] == 1 )
4180 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4183 fT1d_av_totn[j0StexStinEcna];
4195 if (fTagAvLfn[0] == 1 )
4197 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4200 fT1d_av_lofn[j0StexStinEcna];
4213 if (fTagAvHfn[0] == 1 )
4215 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4218 fT1d_av_hifn[j0StexStinEcna];
4231 if (fTagLfCov[0] == 1 )
4233 for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4235 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4238 fT2d_lf_cov[i0StexEcha][j0StexEcha];
4252 if (fTagLfCor[0] == 1 )
4254 for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4256 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4259 fT2d_lf_cor[i0StexEcha][j0StexEcha];
4273 if (fTagHfCov[0] == 1 )
4275 for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4277 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4280 fT2d_hf_cov[i0StexEcha][j0StexEcha];
4294 if (fTagHfCor[0] == 1 )
4296 for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4298 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4301 fT2d_hf_cor[i0StexEcha][j0StexEcha];
4316 if (fTagCovCss[user_StexEcha] == 1 )
4318 for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4320 for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4323 fT3d_cov_ss[user_StexEcha][i0Sample][j0Sample];
4337 if (fTagCorCss[user_StexEcha] == 1 )
4339 for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4341 for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4344 fT3d_cor_ss[user_StexEcha][i0Sample][j0Sample];
4359 if (fTagPed[0] == 1 )
4361 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4364 fT1d_ev_ev[j0StexEcha];
4377 if (fTagTno[0] == 1 )
4379 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4382 fT1d_evsamp_of_sigevt[j0StexEcha];
4396 if (fTagMeanCorss[0] == 1 )
4398 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4401 fT1d_ev_cor_ss[j0StexEcha];
4415 if (fTagLfn[0] == 1 )
4417 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4420 fT1d_sigevt_of_evsamp[j0StexEcha];
4434 if (fTagHfn[0] == 1 )
4436 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4439 fT1d_evevt_of_sigsamp[j0StexEcha];
4453 if (fTagSigCorss[0] == 1 )
4455 for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4458 fT1d_sig_cor_ss[j0StexEcha];
4472 if (fTagAvPed[0] == 1 )
4474 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4477 fT1d_av_mped[j0StexStinEcna];
4491 if (fTagAvMeanCorss[0] == 1 )
4493 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4496 fT1d_av_ev_corss[j0StexStinEcna];
4510 if (fTagAvSigCorss[0] == 1 )
4512 for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4515 fT1d_av_sig_corss[j0StexStinEcna];
4530 fFlagPrint = fCodePrintComments;
4531 cout <<
"*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << endl;
4538 fFlagPrint = fCodePrintWarnings;
4539 cout <<
"*TEcnaRun::PrintWarnings()> Warnings will be printed" << endl;
4546 fFlagPrint = fCodePrintAllComments;
4547 cout <<
"*TEcnaRun::PrintAllComments()> All the comments will be printed" << endl;
4554 fFlagPrint = fCodePrintNoComment;
TEcnaResultType * fCnaIndivResult
void TRootAdcEvt(const Int_t &, const Int_t &)
Bool_t OpenR(const Text_t *="")
void LowFrequencyMeanCorrelationsBetweenSCs()
void HighFrequencyMeanCorrelationsBetweenStins()
void Expert1Calculations()
void HighFrequencyMeanCorrelationsBetweenTowers()
void CovariancesBetweenSamples()
void GetReadyToReadData(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
void TRootSSp(const Int_t &)
void LowFrequencyMeanCorrelationsBetweenTowers()
void TRootCovCss(const Int_t &, const Int_t &)
TString GetRootFileNameShort()
void Expert2Calculations()
void SetSizeHis(Int_t, Int_t)
void SigmaOfCorrelationsBetweenSamples()
R__EXTERN TEcnaRootFile * gCnaRootFile
Bool_t RegisterPointer(const TString &, const Long_t &)
Bool_t CloseRootFile(const Text_t *)
TString GetRootFileNameShort()
void TRootMSp(const Int_t &)
CnaResultTyp fTypOfCnaResult
TVectorD ReadStinNumbers(const Int_t &)
void AverageMeanCorrelationsBetweenSamples()
Bool_t GetPathForResults()
void TRootCorCss(const Int_t &, const Int_t &)
Int_t GetStexStinFromIndex(const Int_t &)
void AverageLowFrequencyNoise()
Bool_t ReadSampleAdcValues()
Bool_t OpenRootFile(const Text_t *, const TString &)
void HighFrequencyCorrelationsBetweenChannels()
TString GetRootFileName()
void StandardCalculations()
TString GetRootFileName()
void AverageSigmaOfCorrelationsBetweenSamples()
void LowFrequencyMeanCorrelationsBetweenStins()
TString GetNewRootFileNameShort()
Bool_t GetSampleAdcValues(const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Double_t &)
void SetEcalSubDetector(const TString &)
void SetSizeMat(Int_t, Int_t)
Bool_t WriteNewRootFile(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 &)
void HighFrequencyMeanCorrelationsBetweenSCs()
void HighFrequencyCovariancesBetweenChannels()
void FileParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString &)
void MeanCorrelationsBetweenSamples()
TString GetNewRootFileName()
void TRootNbOfEvts(const Int_t &)
void HighFrequencyNoise()
void AverageHighFrequencyNoise()
void LowFrequencyCovariancesBetweenChannels()
void ReStart(const Text_t *)
void LowFrequencyCorrelationsBetweenChannels()
void CorrelationsBetweenSamples()
Bool_t OpenW(const Text_t *="")
Long_t GetPointerValue(const TString &)
void StartStopTime(time_t, time_t)
void StartStopDate(const TString &, const TString &)