CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
TEcnaRun Class Reference

#include <TEcnaRun.h>

Inheritance diagram for TEcnaRun:

Public Member Functions

void AveragedHighFrequencyNoise ()
 
void AveragedLowFrequencyNoise ()
 
void AveragedMeanOfCorrelationsBetweenSamples ()
 
void AveragedPedestals ()
 
void AveragedSigmaOfCorrelationsBetweenSamples ()
 
void AveragedTotalNoise ()
 
Bool_t BuildEventDistributions (const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Double_t &)
 
Bool_t CloseRootFile (const Text_t *)
 
void CorrelationsBetweenSamples ()
 
void CovariancesBetweenSamples ()
 
TString GetNewRootFileName ()
 
TString GetNewRootFileNameShort ()
 
void GetReadyToCompute ()
 
void GetReadyToReadData (TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
 
void GetReadyToReadData (TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
 
TString GetRootFileName ()
 
TString GetRootFileNameShort ()
 
void HighFrequencyCorrelationsBetweenChannels ()
 
void HighFrequencyCovariancesBetweenChannels ()
 
void HighFrequencyMeanCorrelationsBetweenSCs ()
 
void HighFrequencyMeanCorrelationsBetweenStins ()
 
void HighFrequencyMeanCorrelationsBetweenTowers ()
 
void HighFrequencyNoise ()
 
void Init ()
 
void LowFrequencyCorrelationsBetweenChannels ()
 
void LowFrequencyCovariancesBetweenChannels ()
 
void LowFrequencyMeanCorrelationsBetweenSCs ()
 
void LowFrequencyMeanCorrelationsBetweenStins ()
 
void LowFrequencyMeanCorrelationsBetweenTowers ()
 
void LowFrequencyNoise ()
 
void MeanOfCorrelationsBetweenSamples ()
 
Bool_t OpenRootFile (const Text_t *, TString)
 
void Pedestals ()
 
void PrintAllComments ()
 
void PrintComments ()
 
void PrintNoComment ()
 
void PrintWarnings ()
 
Bool_t ReadEventDistributions ()
 
Bool_t ReadEventDistributions (const Int_t &)
 
void SampleMeans ()
 
void SampleSigmas ()
 
void SampleValues ()
 
void SetEcalSubDetector (const TString)
 
void SigmaOfCorrelationsBetweenSamples ()
 
void StartStopDate (TString, TString)
 
void StartStopTime (time_t, time_t)
 
 TEcnaRun ()
 
 TEcnaRun (const TString)
 
 TEcnaRun (const TString, const Int_t &)
 
 TEcnaRun (const TEcnaRun &)
 
void TotalNoise ()
 
void TRootAdcEvt (const Int_t &, const Int_t &)
 
void TRootAvEvCorss ()
 
void TRootAvHfn ()
 
void TRootAvLfn ()
 
void TRootAvPed ()
 
void TRootAvSigCorss ()
 
void TRootAvTno ()
 
void TRootCorCss (const Int_t &, const Int_t &)
 
void TRootCovCss (const Int_t &, const Int_t &)
 
void TRootHFccMoStins ()
 
void TRootHfCor ()
 
void TRootHfCov ()
 
void TRootHfn ()
 
void TRootLFccMoStins ()
 
void TRootLfCor ()
 
void TRootLfCov ()
 
void TRootLfn ()
 
void TRootMeanCorss ()
 
void TRootMSp (const Int_t &)
 
void TRootNbOfEvts (const Int_t &)
 
void TRootPed ()
 
void TRootSigCorss ()
 
void TRootSSp (const Int_t &)
 
void TRootStinNumbers ()
 
void TRootTno ()
 
Bool_t WriteNewRootFile (const TString)
 
Bool_t WriteRootFile ()
 
Bool_t WriteRootFile (const Text_t *, Int_t &)
 
virtual ~TEcnaRun ()
 

Private Attributes

Int_t fBuildEvtNotSkipped
 
Int_t fCdelete
 
Int_t fCnaCommand
 
Int_t fCnaError
 
TEcnaParCoutfCnaParCout
 
TEcnaParPathsfCnaParPaths
 
TEcnaWritefCnaWrite
 
Int_t fCnew
 
Int_t fCodePrintAllComments
 
Int_t fCodePrintComments
 
Int_t fCodePrintNoComment
 
Int_t fCodePrintWarnings
 
TEcnaParEcalfEcal
 
TEcnaNumberingfEcalNumbering
 
ofstream fFcout_f
 
TEcnaHeaderfFileHeader
 
Int_t fFlagPrint
 
TString fFlagSubDet
 
Int_t fgMaxCar
 
Int_t fMaxMsgIndexForMiscDiag
 
Int_t * fMiscDiag
 
Int_t fNbOfMiscDiagCounters
 
Int_t fNbSampForCalc
 
Int_t fNbSampForFic
 
TString fNewRootFileName
 
TString fNewRootFileNameShort
 
Int_t fNumberOfEvents
 
Bool_t fOpenRootFile
 
Int_t fReadyToReadData
 
TString fRootFileName
 
TString fRootFileNameShort
 
Int_t fSpecialStexStinNotIndexed
 
TString fStexName
 
Int_t fStinIndexBuilt
 
TString fStinName
 
Double_t * fT1d_av_ev_corss
 
Double_t * fT1d_av_hifn
 
Double_t * fT1d_av_lofn
 
Double_t * fT1d_av_mped
 
Double_t * fT1d_av_sig_corss
 
Double_t * fT1d_av_totn
 
Double_t * fT1d_ev
 
Double_t * fT1d_ev_cor_ss
 
Double_t * fT1d_ev_ev
 
Double_t * fT1d_evevt_of_sigsamp
 
Double_t * fT1d_evsamp_of_sigevt
 
Int_t * fT1d_NbOfEvts
 
Double_t * fT1d_sig
 
Double_t * fT1d_sig_cor_ss
 
Double_t * fT1d_sigevt_of_evsamp
 
Int_t * fT1d_StexStinFromIndex
 
Int_t * fT1dCrysNumbersTable
 
Double_t * fT2d1_hf_cor
 
Double_t * fT2d1_hf_cov
 
Double_t * fT2d1_hfcc_mostins
 
Double_t * fT2d1_lf_cor
 
Double_t * fT2d1_lf_cov
 
Double_t * fT2d1_lfcc_mostins
 
Double_t ** fT2d_ev
 
Double_t ** fT2d_hf_cor
 
Double_t ** fT2d_hf_cov
 
Double_t ** fT2d_hfcc_mostins
 
Double_t ** fT2d_lf_cor
 
Double_t ** fT2d_lf_cov
 
Double_t ** fT2d_lfcc_mostins
 
Int_t ** fT2d_NbOfEvts
 
Double_t ** fT2d_sig
 
Int_t ** fT2dCrysNumbersTable
 
Double_t * fT3d1_cor_ss
 
Double_t * fT3d1_cov_ss
 
Double_t * fT3d1_distribs
 
Double_t ** fT3d2_cor_ss
 
Double_t ** fT3d2_cov_ss
 
Double_t ** fT3d2_distribs
 
Double_t *** fT3d_cor_ss
 
Double_t *** fT3d_cov_ss
 
Double_t *** fT3d_distribs
 
Int_t * fTagAdcEvt
 
Int_t * fTagAvHfn
 
Int_t * fTagAvLfn
 
Int_t * fTagAvMeanCorss
 
Int_t * fTagAvPed
 
Int_t * fTagAvSigCorss
 
Int_t * fTagAvTno
 
Int_t * fTagCorCss
 
Int_t * fTagCovCss
 
Int_t * fTagHFccMoStins
 
Int_t * fTagHfCor
 
Int_t * fTagHfCov
 
Int_t * fTagHfn
 
Int_t * fTagLFccMoStins
 
Int_t * fTagLfCor
 
Int_t * fTagLfCov
 
Int_t * fTagLfn
 
Int_t * fTagMeanCorss
 
Int_t * fTagMSp
 
Int_t * fTagNbOfEvts
 
Int_t * fTagPed
 
Int_t * fTagSigCorss
 
Int_t * fTagSSp
 
Int_t * fTagStinNumbers
 
Int_t * fTagTno
 
TString fTTBELL
 

Detailed Description

Definition at line 44 of file TEcnaRun.h.

Constructor & Destructor Documentation

TEcnaRun::TEcnaRun ( )

Definition at line 316 of file TEcnaRun.cc.

317 {
318 //Constructor without argument: nothing special done
319 
320  // cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << endl;
321 }
TEcnaRun::TEcnaRun ( const TString  SubDet)

Definition at line 323 of file TEcnaRun.cc.

References fEcal, fNbSampForFic, Init(), TEcnaParEcal::MaxSampADC(), and SetEcalSubDetector().

324 {
325 //Constructor with argument: call to Init() and declare fEcal according to SubDet value ("EB" or "EE")
326 
327  // cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << endl;
328 
329  Init();
330  SetEcalSubDetector(SubDet.Data());
331  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for ROOT file
332 }
void SetEcalSubDetector(const TString)
Definition: TEcnaRun.cc:498
Int_t fNbSampForFic
Definition: TEcnaRun.h:85
void Init()
Definition: TEcnaRun.cc:356
Int_t MaxSampADC()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
TEcnaRun::TEcnaRun ( const TString  SubDet,
const Int_t &  NbOfSamples 
)

Definition at line 334 of file TEcnaRun.cc.

References gather_cfg::cout, fEcal, fNbSampForFic, fTTBELL, Init(), TEcnaParEcal::MaxSampADC(), and SetEcalSubDetector().

335 {
336 //Constructor with arguments: call to Init(), declare fEcal according to SubDet value ("EB" or "EE")
337 // and set NbOfSamples according to the user's willing
338 
339  // cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << endl;
340 
341  Init();
342  SetEcalSubDetector(SubDet.Data());
343  if( NbOfSamples>0 && NbOfSamples<=fEcal->MaxSampADC() )
344  {
345  fNbSampForFic = NbOfSamples;
346  }
347  else
348  {
349  cout << "TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples
350  << ": OUT OF RANGE. Set to the default value (= " << fEcal->MaxSampADC() << ")."
351  << fTTBELL << endl;
352  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for file reading
353  }
354 }
void SetEcalSubDetector(const TString)
Definition: TEcnaRun.cc:498
Int_t fNbSampForFic
Definition: TEcnaRun.h:85
void Init()
Definition: TEcnaRun.cc:356
Int_t MaxSampADC()
tuple cout
Definition: gather_cfg.py:41
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
TEcnaRun::TEcnaRun ( const TEcnaRun dcop)

Definition at line 521 of file TEcnaRun.cc.

References gather_cfg::cout.

522 {
523  cout << "*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> "
524  << " Now is the time to write a copy constructor"
525  << endl;
526 
527  //{ Int_t cintoto; cin >> cintoto; }
528 
529 }
tuple cout
Definition: gather_cfg.py:41
TEcnaRun::~TEcnaRun ( )
virtual

Definition at line 550 of file TEcnaRun.cc.

References gather_cfg::cout, fBuildEvtNotSkipped, fCdelete, fCnew, fCodePrintAllComments, fCodePrintNoComment, fCodePrintWarnings, fFlagPrint, fMiscDiag, fNbOfMiscDiagCounters, fT1d_av_ev_corss, fT1d_av_hifn, fT1d_av_lofn, fT1d_av_mped, fT1d_av_sig_corss, fT1d_av_totn, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_evevt_of_sigsamp, fT1d_evsamp_of_sigevt, fT1d_NbOfEvts, fT1d_sig, fT1d_sig_cor_ss, fT1d_sigevt_of_evsamp, fT1d_StexStinFromIndex, fT1dCrysNumbersTable, fT2d1_hf_cor, fT2d1_hf_cov, fT2d1_hfcc_mostins, fT2d1_lf_cor, fT2d1_lf_cov, fT2d1_lfcc_mostins, fT2d_ev, fT2d_hf_cor, fT2d_hf_cov, fT2d_hfcc_mostins, fT2d_lf_cor, fT2d_lf_cov, fT2d_lfcc_mostins, fT2d_NbOfEvts, fT2d_sig, fT2dCrysNumbersTable, fT3d1_cor_ss, fT3d1_cov_ss, fT3d1_distribs, fT3d2_cor_ss, fT3d2_cov_ss, fT3d2_distribs, fT3d_cor_ss, fT3d_cov_ss, fT3d_distribs, fTagAdcEvt, fTagAvHfn, fTagAvLfn, fTagAvMeanCorss, fTagAvPed, fTagAvSigCorss, fTagAvTno, fTagCorCss, fTagCovCss, fTagHFccMoStins, fTagHfCor, fTagHfCov, fTagHfn, fTagLFccMoStins, fTagLfCor, fTagLfCov, fTagLfn, fTagMeanCorss, fTagMSp, fTagNbOfEvts, fTagPed, fTagSigCorss, fTagSSp, fTagStinNumbers, fTagTno, fTTBELL, and i.

551 {
552  //Destructor
553 
555  {
556  cout << "*TEcnaRun::~TEcnaRun()> Entering destructor." << endl;
557  }
558 
560  {
561  if( fBuildEvtNotSkipped > 0 )
562  {
563  cout << "************************************************************************************* "
564  << endl;
565  cout << "*TEcnaRun::~TEcnaRun()> Nb of calls to BuildEventsDistributions by cmsRun: "
566  << fBuildEvtNotSkipped << endl;
567  cout << "************************************************************************************* "
568  << endl;
569  }
570  }
571 
573  {
574  Int_t misc_czero = 0;
575  for(Int_t i = 0; i < fNbOfMiscDiagCounters; i++)
576  {
577  if( fMiscDiag[i] != 0 )
578  {
579  cout << " fMiscDiag Counter "
580  << setw(3) << i << " = " << setw(9) << fMiscDiag[i]
581  << " (INFO: alloc on non zero freed zone) " << endl;
582  }
583  else
584  {
585  misc_czero++;
586  }
587  }
588  cout << " Nb of fMiscDiag counters at zero: "
589  << misc_czero << " (total nb of counters: "
590  << fNbOfMiscDiagCounters << ")" << endl;
591  }
592 
593  if (fMiscDiag != 0){delete [] fMiscDiag; fCdelete++;}
594 
595  //if (fFileHeader != 0){delete fFileHeader; fCdelete++;}
596  //if (fEcal != 0){delete fEcal; fCdelete++;}
597  //if (fEcalNumbering != 0){delete fEcalNumbering; fCdelete++;}
598  //if (fCnaParCout != 0){delete fCnaParCout; fCdelete++;}
599  //if (fCnaParPaths != 0){delete fCnaParPaths; fCdelete++;}
600  //if (fCnaWrite != 0){delete fCnaWrite; fCdelete++;}
601 
603 
604  if (fT2d_NbOfEvts != 0){delete [] fT2d_NbOfEvts; fCdelete++;}
605  if (fT1d_NbOfEvts != 0){delete [] fT1d_NbOfEvts; fCdelete++;}
606 
607  if (fT3d_distribs != 0){delete [] fT3d_distribs; fCdelete++;}
608  if (fT3d2_distribs != 0){delete [] fT3d2_distribs; fCdelete++;}
609  if (fT3d1_distribs != 0){delete [] fT3d1_distribs; fCdelete++;}
610 
611  if (fT2d_ev != 0){delete [] fT2d_ev; fCdelete++;}
612  if (fT1d_ev != 0){delete [] fT1d_ev; fCdelete++;}
613 
614  if (fT2d_sig != 0){delete [] fT2d_sig; fCdelete++;}
615  if (fT1d_sig != 0){delete [] fT1d_sig; fCdelete++;}
616 
617  if (fT3d_cov_ss != 0){delete [] fT3d_cov_ss; fCdelete++;}
618  if (fT3d2_cov_ss != 0){delete [] fT3d2_cov_ss; fCdelete++;}
619  if (fT3d1_cov_ss != 0){delete [] fT3d1_cov_ss; fCdelete++;}
620 
621  if (fT3d_cor_ss != 0){delete [] fT3d_cor_ss; fCdelete++;}
622  if (fT3d2_cor_ss != 0){delete [] fT3d2_cor_ss; fCdelete++;}
623  if (fT3d1_cor_ss != 0){delete [] fT3d1_cor_ss; fCdelete++;}
624 
625  if (fT2d_lf_cov != 0){delete [] fT2d_lf_cov; fCdelete++;}
626  if (fT2d1_lf_cov != 0){delete [] fT2d1_lf_cov; fCdelete++;}
627 
628  if (fT2d_lf_cor != 0){delete [] fT2d_lf_cor; fCdelete++;}
629  if (fT2d1_lf_cor != 0){delete [] fT2d1_lf_cor; fCdelete++;}
630 
631  if (fT2d_hf_cov != 0){delete [] fT2d_hf_cov; fCdelete++;}
632  if (fT2d1_hf_cov != 0){delete [] fT2d1_hf_cov; fCdelete++;}
633 
634  if (fT2d_hf_cor != 0){delete [] fT2d_hf_cor; fCdelete++;}
635  if (fT2d1_hf_cor != 0){delete [] fT2d1_hf_cor; fCdelete++;}
636 
637  if (fT2d_lfcc_mostins != 0){delete [] fT2d_lfcc_mostins; fCdelete++;}
638  if (fT2d1_lfcc_mostins != 0){delete [] fT2d1_lfcc_mostins ; fCdelete++;}
639 
640  if (fT2d_hfcc_mostins != 0){delete [] fT2d_hfcc_mostins ; fCdelete++;}
641  if (fT2d1_hfcc_mostins != 0){delete [] fT2d1_hfcc_mostins; fCdelete++;}
642 
643  if (fT1d_ev_ev != 0){delete [] fT1d_ev_ev; fCdelete++;}
644  if (fT1d_evsamp_of_sigevt != 0){delete [] fT1d_evsamp_of_sigevt; fCdelete++;}
645  if (fT1d_ev_cor_ss != 0){delete [] fT1d_ev_cor_ss; fCdelete++;}
646  if (fT1d_av_mped != 0){delete [] fT1d_av_mped; fCdelete++;}
647  if (fT1d_av_totn != 0){delete [] fT1d_av_totn; fCdelete++;}
648  if (fT1d_av_lofn != 0){delete [] fT1d_av_lofn; fCdelete++;}
649  if (fT1d_av_hifn != 0){delete [] fT1d_av_hifn; fCdelete++;}
650  if (fT1d_av_ev_corss != 0){delete [] fT1d_av_ev_corss; fCdelete++;}
651  if (fT1d_av_sig_corss != 0){delete [] fT1d_av_sig_corss; fCdelete++;}
652 
653  if (fT1d_sigevt_of_evsamp != 0){delete [] fT1d_sigevt_of_evsamp; fCdelete++;}
654  if (fT1d_evevt_of_sigsamp != 0){delete [] fT1d_evevt_of_sigsamp; fCdelete++;}
655  if (fT1d_sig_cor_ss != 0){delete [] fT1d_sig_cor_ss; fCdelete++;}
656 
657  if (fT2dCrysNumbersTable != 0){delete [] fT2dCrysNumbersTable; fCdelete++;}
658  if (fT1dCrysNumbersTable != 0){delete [] fT1dCrysNumbersTable; fCdelete++;}
659 
660  if (fTagStinNumbers != 0){delete [] fTagStinNumbers; fCdelete++;}
661  if (fTagNbOfEvts != 0){delete [] fTagNbOfEvts; fCdelete++;}
662  if (fTagAdcEvt != 0){delete [] fTagAdcEvt; fCdelete++;}
663  if (fTagMSp != 0){delete [] fTagMSp; fCdelete++;}
664  if (fTagSSp != 0){delete [] fTagSSp; fCdelete++;}
665 
666  if (fTagCovCss != 0){delete [] fTagCovCss; fCdelete++;}
667  if (fTagCorCss != 0){delete [] fTagCorCss; fCdelete++;}
668 
669  if (fTagHfCov != 0){delete [] fTagHfCov; fCdelete++;}
670  if (fTagHfCor != 0){delete [] fTagHfCor; fCdelete++;}
671  if (fTagLfCov != 0){delete [] fTagLfCov; fCdelete++;}
672  if (fTagLfCor != 0){delete [] fTagLfCor; fCdelete++;}
673 
674  if (fTagLFccMoStins != 0){delete [] fTagLFccMoStins; fCdelete++;}
675  if (fTagHFccMoStins != 0){delete [] fTagHFccMoStins; fCdelete++;}
676 
677  if (fTagPed != 0){delete [] fTagPed; fCdelete++;}
678  if (fTagTno != 0){delete [] fTagTno; fCdelete++;}
679  if (fTagMeanCorss != 0){delete [] fTagMeanCorss; fCdelete++;}
680 
681  if (fTagLfn != 0){delete [] fTagLfn; fCdelete++;}
682  if (fTagHfn != 0){delete [] fTagHfn; fCdelete++;}
683  if (fTagSigCorss != 0){delete [] fTagSigCorss; fCdelete++;}
684 
685  if (fTagAvPed != 0){delete [] fTagAvPed; fCdelete++;}
686  if (fTagAvTno != 0){delete [] fTagAvTno; fCdelete++;}
687  if (fTagAvLfn != 0){delete [] fTagAvLfn; fCdelete++;}
688  if (fTagAvHfn != 0){delete [] fTagAvHfn; fCdelete++;}
689  if (fTagAvMeanCorss != 0){delete [] fTagAvMeanCorss; fCdelete++;}
690  if (fTagAvSigCorss != 0){delete [] fTagAvSigCorss; fCdelete++;}
691 
692  if ( fCnew != fCdelete )
693  {
694  cout << "!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = "
695  << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl;
696  }
697  else
698  {
699  // cout << "*TEcnaRun::~TEcnaRun()> Management of memory allocations: OK. fCnew = "
700  // << fCnew << ", fCdelete = " << fCdelete << endl;
701  }
702 
704  {
705  cout << "*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " << this << ")." << endl
706  << "~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#"
707  << endl;
708  }
709 
710  // cout << "[Info Management] CLASS: TEcnaRun. DESTROY OBJECT: this = " << this << endl;
711 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:148
int i
Definition: DBlmapReader.cc:9
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:123
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:117
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:136
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:83
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
Int_t fCdelete
Definition: TEcnaRun.h:55
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Double_t * fT3d1_distribs
Definition: TEcnaRun.h:92
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:146
Double_t ** fT3d2_distribs
Definition: TEcnaRun.h:91
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:153
Int_t * fTagPed
Definition: TEcnaRun.h:122
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:181
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:133
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:174
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:128
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:157
Double_t ** fT2d_sig
Definition: TEcnaRun.h:106
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:165
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:121
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:111
Int_t * fTagTno
Definition: TEcnaRun.h:127
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:116
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:143
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:161
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:112
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:96
Int_t * fTagLfn
Definition: TEcnaRun.h:137
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:162
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:110
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:175
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:156
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:186
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:166
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:126
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:171
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Double_t * fT1d_ev
Definition: TEcnaRun.h:103
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
tuple cout
Definition: gather_cfg.py:41
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:152
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:138
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:180
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:60
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TString fTTBELL
Definition: TEcnaRun.h:57
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:141
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Double_t * fT1d_sig
Definition: TEcnaRun.h:107
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:170

Member Function Documentation

void TEcnaRun::AveragedHighFrequencyNoise ( )

Definition at line 2289 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvHfnCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_hifn, fT1d_evevt_of_sigsamp, fTagAvHfn, fTagHfn, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), HighFrequencyNoise(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by TEcnaGui::Calculations().

2290 {
2291 // Calculation of the average
2292 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the High Frequency Noise
2293 
2294  //... preliminary calculation of the High Frequency Noise if not done yet
2295  if ( fTagHfn[0] != 1 ){HighFrequencyNoise(); fTagHfn[0]=0;}
2296  //................... Allocation av_hifn + init to zero (mandatory)
2297  if( fT1d_av_hifn == 0 ){fT1d_av_hifn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2298  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2299  {if( fT1d_av_hifn[i0StexStinEcna] != (Double_t)0 )
2300  {fMiscDiag[44]++; fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;}}
2301 
2302  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedHighFrequencyNoise()" << endl;}
2304  cout << " Calculation, for all the "
2305  << fStinName.Data() << "s, of the average of the High Frequency Noise" << endl;}
2306 
2307  //................... Calculation
2308  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2309  {
2310  Int_t n1StexStinEcna = i0StexStinEcna+1;
2311  fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2312  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2313  {
2314  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2315 
2316  if( fStexName == "SM " )
2317  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2318 
2319  if( fStexName == "Dee" )
2320  {
2321  //---------------- Special translation for mixed SCEcna (29 and 32)
2322  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2323  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2324  Int_t n1StinEcha = i0StinEcha+1;
2325  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2326  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2327  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2328  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2329  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2330  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2331  }
2332  }
2333  Double_t xdivis = (Double_t)0.;
2334  if( fStexName == "SM " )
2335  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2336  if( fStexName == "Dee" )
2337  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2338 
2339  fT1d_av_hifn[i0StexStinEcna] = fT1d_av_hifn[i0StexStinEcna]/xdivis;
2340  }
2341  fTagAvHfn[0] = 1; fFileHeader->fAvHfnCalc++;
2342 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:143
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:57
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1911
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:141
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::AveragedLowFrequencyNoise ( )

Definition at line 2229 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvLfnCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_lofn, fT1d_sigevt_of_evsamp, fTagAvLfn, fTagLfn, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), LowFrequencyNoise(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by TEcnaGui::Calculations().

2230 {
2231 // Calculation of the average
2232 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Low Frequency Noise
2233 
2234  //... preliminary calculation of the Low Frequency Noise if not done yet
2235  if ( fTagLfn[0] != 1 ){LowFrequencyNoise(); fTagLfn[0]=0;}
2236  //................... Allocation av_lofn + init to zero (mandatory)
2237  if( fT1d_av_lofn == 0 ){fT1d_av_lofn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2238  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2239  {if( fT1d_av_lofn[i0StexStinEcna] != (Double_t)0 )
2240  {fMiscDiag[43]++; fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;}}
2241 
2242  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedLowFrequencyNoise()" << endl;}
2244  cout << " Calculation, for all the "
2245  << fStinName.Data() << "s, of the average of the Low Frequency Noise" << endl;}
2246 
2247  //................... Calculation
2248  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2249  {
2250  Int_t n1StexStinEcna = i0StexStinEcna+1;
2251  fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2252  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2253  {
2254  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2255 
2256  if( fStexName == "SM " )
2257  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2258 
2259  if( fStexName == "Dee" )
2260  {
2261  //---------------- Special translation for mixed SCEcna (29 and 32)
2262  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2263  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2264  Int_t n1StinEcha = i0StinEcha+1;
2265  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2266  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2267  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2268  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2269  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2270  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2271  }
2272  }
2273  Double_t xdivis = (Double_t)0.;
2274  if( fStexName == "SM " )
2275  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2276  if( fStexName == "Dee" )
2277  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2278 
2279  fT1d_av_lofn[i0StexStinEcna] = fT1d_av_lofn[i0StexStinEcna]/xdivis;
2280  }
2281  fTagAvLfn[0] = 1; fFileHeader->fAvLfnCalc++;
2282 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:56
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:136
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
Int_t * fTagLfn
Definition: TEcnaRun.h:137
Int_t fFlagPrint
Definition: TEcnaRun.h:185
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1846
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:138
TString fStinName
Definition: TEcnaRun.h:71
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::AveragedMeanOfCorrelationsBetweenSamples ( )

Definition at line 2349 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvMeanCorssCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_ev_corss, fT1d_ev_cor_ss, fTagAvMeanCorss, fTagMeanCorss, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), TEcnaParEcal::MaxStinEcnaInStex(), and MeanOfCorrelationsBetweenSamples().

Referenced by TEcnaGui::Calculations().

2350 {
2351 // Calculation of the average
2352 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the mean of cor(s,s)
2353 
2354  //... preliminary calculation of the mean of cor(s,s) if not done yet
2356  //................... Allocation av_ev_corss + init to zero (mandatory)
2357  if( fT1d_av_ev_corss == 0 ){fT1d_av_ev_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2358  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2359  {if( fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0 )
2360  {fMiscDiag[45]++; fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;}}
2361 
2362  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedMeanOfCorrelationsBetweenSamples()" << endl;}
2364  cout << " Calculation, for all the "
2365  << fStinName.Data() << "s, of the average of the mean of cor(s,s)" << endl;}
2366 
2367  //................... Calculation
2368  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2369  {
2370  Int_t n1StexStinEcna = i0StexStinEcna+1;
2371  fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2372  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2373  {
2374  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2375 
2376  if( fStexName == "SM " )
2377  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2378 
2379  if( fStexName == "Dee" )
2380  {
2381  //---------------- Special translation for mixed SCEcna (29 and 32)
2382  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2383  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2384  Int_t n1StinEcha = i0StinEcha+1;
2385  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2386  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2387  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2388  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2389  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2390  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2391  }
2392  }
2393  Double_t xdivis = (Double_t)0.;
2394  if( fStexName == "SM " )
2395  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2396  if( fStexName == "Dee" )
2397  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2398 
2399  fT1d_av_ev_corss[i0StexStinEcna] = fT1d_av_ev_corss[i0StexStinEcna]/xdivis;
2400  }
2402 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:75
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:133
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
Int_t MaxCrysInStin()
void MeanOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1980
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::AveragedPedestals ( )

Definition at line 2108 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvPedCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_mped, fT1d_ev_ev, fTagAvPed, fTagPed, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), TEcnaParEcal::MaxStinEcnaInStex(), and Pedestals().

Referenced by TEcnaGui::Calculations().

2109 {
2110 // Calculation of the average
2111 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Pedestals
2112 
2113  //... preliminary calculation of the Pedestals if not done yet
2114  if ( fTagPed[0] != 1 ){Pedestals(); fTagPed[0]=0;}
2115  //................... Allocation av_mped + init to zero (mandatory)
2116  if( fT1d_av_mped == 0 ){fT1d_av_mped = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2117  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2118  {if( fT1d_av_mped[i0StexStinEcna] != (Double_t)0 )
2119  {fMiscDiag[41]++; fT1d_av_mped[i0StexStinEcna] = (Double_t)0;}}
2120 
2121  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedPedestals()" << endl;}
2123  cout << " Calculation, for all the "
2124  << fStinName.Data() << "s, of the average of the Pedestals" << endl;}
2125 
2126  //................... Calculation
2127  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2128  {
2129  Int_t n1StexStinEcna = i0StexStinEcna+1;
2130  fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
2131  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2132  {
2133  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2134 
2135  if( fStexName == "SM " )
2136  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
2137 
2138  if( fStexName == "Dee" )
2139  {
2140  //---------------- Special translation for mixed SCEcna (29 and 32)
2141  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2142  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2143  Int_t n1StinEcha = i0StinEcha+1;
2144  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2145  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2146  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2147  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2148  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2149  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
2150  }
2151  }
2152  Double_t xdivis = (Double_t)0.;
2153  if( fStexName == "SM " )
2154  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2155  if( fStexName == "Dee" )
2156  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2157 
2158  fT1d_av_mped[i0StexStinEcna] = fT1d_av_mped[i0StexStinEcna]/xdivis;
2159  }
2160 
2161  fTagAvPed[0] = 1; fFileHeader->fAvPedCalc++;
2162 }
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:123
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t * fTagPed
Definition: TEcnaRun.h:122
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:121
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Int_t fAvPedCalc
Definition: TEcnaHeader.h:74
void Pedestals()
Definition: TEcnaRun.cc:1758
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::AveragedSigmaOfCorrelationsBetweenSamples ( )

Definition at line 2409 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvSigCorssCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_sig_corss, fT1d_sig_cor_ss, fTagAvSigCorss, fTagSigCorss, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), TEcnaParEcal::MaxStinEcnaInStex(), and SigmaOfCorrelationsBetweenSamples().

Referenced by TEcnaGui::Calculations().

2410 {
2411 // Calculation of the average
2412 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the sigma of cor(s,s)
2413 
2414  //... preliminary calculation of the sigma of cor(s,s) if not done yet
2416  //................... Allocation av_sig_corss + init to zero (mandatory)
2417  if( fT1d_av_sig_corss == 0 ){fT1d_av_sig_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2418  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2419  {if( fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0 )
2420  {fMiscDiag[46]++; fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;}}
2421 
2422  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedSigmaOfCorrelationsBetweenSamples()" << endl;}
2424  cout << " Calculation, for all the "
2425  << fStinName.Data() << "s, of the average of the sigma of cor(s,s)" << endl;}
2426 
2427  //................... Calculation
2428  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2429  {
2430  Int_t n1StexStinEcna = i0StexStinEcna+1;
2431  fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2432  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2433  {
2434  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2435 
2436  if( fStexName == "SM " )
2437  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2438 
2439  if( fStexName == "Dee" )
2440  {
2441  //---------------- Special translation for mixed SCEcna (29 and 32)
2442  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2443  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2444  Int_t n1StinEcha = i0StinEcha+1;
2445  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2446  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2447  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2448  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2449  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2450  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2451  }
2452  }
2453  Double_t xdivis = (Double_t)0.;
2454  if( fStexName == "SM " )
2455  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2456  if( fStexName == "Dee" )
2457  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2458 
2459  fT1d_av_sig_corss[i0StexStinEcna] = fT1d_av_sig_corss[i0StexStinEcna]/xdivis;
2460  }
2462 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:148
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:146
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2043
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:76
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::AveragedTotalNoise ( )

Definition at line 2169 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAvTnoCalc, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fStex, fStexName, fStinName, fT1d_av_totn, fT1d_evsamp_of_sigevt, fTagAvTno, fTagTno, TEcnaNumbering::Get0StexEchaFrom1StexStinAnd0StinEcha(), TEcnaParEcal::MaxCrysInStin(), TEcnaNumbering::MaxCrysInStinEcna(), TEcnaParEcal::MaxStinEcnaInStex(), and TotalNoise().

Referenced by TEcnaGui::Calculations().

2170 {
2171 // Calculation of the average
2172 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Total Noise
2173 
2174  //... preliminary calculation of the averaged Total Noise if not done yet
2175  if ( fTagTno[0] != 1 ){TotalNoise(); fTagTno[0]=0;}
2176  //................... Allocation av_totn + init to zero (mandatory)
2177  if( fT1d_av_totn == 0 ){fT1d_av_totn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2178  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2179  {if( fT1d_av_totn[i0StexStinEcna] != (Double_t)0 )
2180  {fMiscDiag[42]++; fT1d_av_totn[i0StexStinEcna] = (Double_t)0;}}
2181 
2182  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragedTotalNoise()" << endl;}
2184  cout << " Calculation, for all the "
2185  << fStinName.Data() << "s, of the average of the Total Noise" << endl;}
2186 
2187  //................... Calculation
2188  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2189  {
2190  Int_t n1StexStinEcna = i0StexStinEcna+1;
2191  fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2192  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2193  {
2194  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2195 
2196  if( fStexName == "SM " )
2197  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2198 
2199  if( fStexName == "Dee" )
2200  {
2201  //---------------- Special translation for mixed SCEcna (29 and 32)
2202  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2203  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2204  Int_t n1StinEcha = i0StinEcha+1;
2205  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2206  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2207  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2208  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2209  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2210  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2211  }
2212  }
2213  Double_t xdivis = (Double_t)0.;
2214  if( fStexName == "SM " )
2215  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2216  if( fStexName == "Dee" )
2217  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2218 
2219  fT1d_av_totn[i0StexStinEcna] = fT1d_av_totn[i0StexStinEcna]/xdivis;
2220  }
2221  fTagAvTno[0] = 1; fFileHeader->fAvTnoCalc++;
2222 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
void TotalNoise()
Definition: TEcnaRun.cc:1798
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:128
Int_t * fTagTno
Definition: TEcnaRun.h:127
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:55
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString)
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:126
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::BuildEventDistributions ( const Int_t &  n1EventNumber,
const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  i0Sample,
const Double_t &  adcvalue 
)

Definition at line 1063 of file TEcnaRun.cc.

References gather_cfg::cout, fBuildEvtNotSkipped, fCodePrintAllComments, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fNbOfEvtsCalc, fNbSampForFic, fReadyToReadData, TEcnaHeader::fReqNbOfEvts, fSpecialStexStinNotIndexed, TEcnaHeader::fStex, fStexName, fStinIndexBuilt, fStinName, TEcnaHeader::fStinNumbersCalc, fT1d_StexStinFromIndex, fT2d_NbOfEvts, fT3d_distribs, fTagNbOfEvts, fTagStinNumbers, fTTBELL, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxSampADC(), and TEcnaParEcal::MaxStinEcnaInStex().

1066 {
1067  //Building of the arrays fT1d_StexStinFromIndex[] and fT3d_distribs[][][]
1068 
1069  fBuildEvtNotSkipped++; // event not skipped by cmsRun
1070 
1071  Bool_t ret_code = kFALSE;
1072 
1073  Int_t i0EventIndex = n1EventNumber - 1; // INDEX FOR Event number
1074  Int_t i0StexStinEcna = n1StexStin - 1; // INDEX FOR StexStin = Number_of_the_Stin_in_Stex - 1
1075 
1076  Int_t i_trouve = 0;
1077  //.................................................................. (BuildEventDistributions)
1078  if(fReadyToReadData == 1)
1079  {
1080  if( n1StexStin>= 1 && n1StexStin <= fEcal->MaxStinEcnaInStex() )
1081  {
1082  if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
1083  {
1084  if( i0Sample >= 0 && i0Sample < fNbSampForFic )
1085  {
1086  //..... Put the StexStin number in 1D array fT1d_StexStinFromIndex[] = Stin index + 1
1087  if( fT1d_StexStinFromIndex != 0 ) // table fT1d_StexStinFromIndex[index] already allocated
1088  {
1089  ret_code = kTRUE;
1090 
1091  // StexStin already indexed
1092  if( n1StexStin == fT1d_StexStinFromIndex[i0StexStinEcna] ){i_trouve = 1;}
1093 
1094  // StexStin index not found: new StexStin
1095  if (i_trouve != 1 )
1096  {
1097  if( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
1098  {
1099  fT1d_StexStinFromIndex[i0StexStinEcna] = n1StexStin;
1101  fTagStinNumbers[0] = 1;
1102  fStinIndexBuilt++; // number of found Stins
1103 
1105  {
1106  if( fStinIndexBuilt == 1 )
1107  {
1108  cout << endl << "*TEcnaRun::BuildEventDistributions(...)> event " << n1EventNumber
1109  << " : first event for " << fStexName.Data() << " " << fFileHeader->fStex
1110  << "; " << fStinName.Data() << "s : ";
1111  }
1112  if( fFlagSubDet == "EB" )
1113  {cout << fT1d_StexStinFromIndex[i0StexStinEcna] << ", ";}
1114  if( fFlagSubDet == "EE" )
1115  {cout << fEcalNumbering->
1116  GetDeeSCConsFrom1DeeSCEcna(fFileHeader->fStex, fT1d_StexStinFromIndex[i0StexStinEcna])
1117  << ", ";}
1118  }
1119  //.................................................... (BuildEventDistributions)
1121  {
1122  cout << " (" << fStinIndexBuilt << " " << fStinName.Data()
1123  << " found), channel " << i0StinEcha << ", i0Sample " << i0Sample << endl;
1124  }
1125  ret_code = kTRUE;
1126  } // if ( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
1127  else
1128  {
1129  cout << "!TEcnaRun::BuildEventDistributions(...)> *** ERROR ***> NOT ALLOWED if RESULT. "
1130  << " n1StexStin = " << n1StexStin << ", fT1d_StexStinFromIndex["
1131  << i0StexStinEcna << "] = "
1132  << fT1d_StexStinFromIndex[i0StexStinEcna]
1133  << ", fStinIndexBuilt = " << fStinIndexBuilt
1134  << fTTBELL << endl;
1135  ret_code = kFALSE;
1136  }
1137  } // if (i_trouve != 1 )
1138  } // if( fT1d_StexStinFromIndex != 0 )
1139  else
1140  {
1141  cout << "!TEcnaRun, BuildEventDistributions *** ERROR ***> "
1142  << " fT1d_StexStinFromIndex = " << fT1d_StexStinFromIndex
1143  << " fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << endl;
1144  ret_code = kFALSE;
1145  } //.................................................................. (BuildEventDistributions)
1146  } // if( i0Sample >= 0 && i0Sample < fNbSampForFic )
1147  else
1148  {
1149  //.......Reading data => Message and error only if sample >= fEcal->MaxSampADC()
1150  // (not fNbSampForFic, the later is used only for calculations)
1151  if( i0Sample >= fEcal->MaxSampADC() )
1152  {
1153  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> "
1154  << " sample number = " << i0Sample << ". OUT OF BOUNDS"
1155  << " (max = " << fEcal->MaxSampADC() << ")"
1156  << fTTBELL << endl;
1157  ret_code = kFALSE;
1158  }
1159  else
1160  {
1161  ret_code = kTRUE;
1162  }
1163  }
1164  }
1165  else
1166  {
1167  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> "
1168  << " channel number in " << fStinName.Data() << " = " << i0StinEcha << ". OUT OF BOUNDS"
1169  << " (max = " << fEcal->MaxCrysInStin() << ")"
1170  << fTTBELL << endl;
1171  ret_code = kFALSE;
1172  }
1173  }
1174  else
1175  {
1176  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> "
1177  << fStinName.Data() << " number in " << fStexName.Data() << " = " << n1StexStin << ". OUT OF BOUNDS"
1178  << " (max = " << fEcal->MaxStinEcnaInStex() << ")"
1179  << fTTBELL << endl;
1180  ret_code = kFALSE;
1181  }
1182  //.................................................................. (BuildEventDistributions)
1183  //........ Filling of the 2D array of the event numbers in the data reading loop and
1184  // filling of the 3D array of the ADC sample values
1185 
1186  if( ret_code == kTRUE )
1187  {
1188  if( i0Sample < fNbSampForFic )
1189  {
1190  //............ 1) Conversion (Stin,i0StinEcha) -> i0StexEcha (same numbering for EB and EE)
1191  //=========================================================================================
1192  // n1StexStin (Tower or SC): 1 2 3
1193  // iStexStin 0 1 2
1194  //
1195  // i0StinEcha: 0......24 0......24 0......24
1196  //
1197  // i0StexEcha : 0......24 25......49 50......74 grouped by StexStin's
1198  // i0StexEcha+1 (Xtal): 1......25 26......50 51......75
1199  //
1200  //=========================================================================================
1201 
1202  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinEcha;
1203 
1204  //--------------------------------------------------------- (BuildEventDistributions)
1205  if( i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex() )
1206  {
1207  //............ 2) Increase of the nb of evts for (StexEcha,sample) (events found in the data)
1208  (fT2d_NbOfEvts[i0StexEcha][i0Sample])++; // value after first incrementation = 1
1209  fTagNbOfEvts[0] = 1;
1211 
1212  //............ 3) Filling of the 3D array of the ADC values
1213  if ( i0EventIndex >= 0 && i0EventIndex < fFileHeader->fReqNbOfEvts )
1214  {
1215  fT3d_distribs[i0StexEcha][i0Sample][i0EventIndex] = adcvalue;
1216  }
1217  else
1218  {
1219  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> "
1220  << " event number = " << n1EventNumber << ". OUT OF BOUNDS"
1221  << " (max = " << fFileHeader->fReqNbOfEvts << ")"
1222  << fTTBELL << endl;
1223  ret_code = kFALSE;
1224  }
1225  }
1226  else
1227  {
1228  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> "
1229  << " CHANNEL NUMBER OUT OF BOUNDS" << endl
1230  << " i0StexEcha number = " << i0StexEcha
1231  << " , n1StexStin = " << n1StexStin
1232  << " , i0StinEcha = " << i0StinEcha
1233  << " , fEcal->MaxCrysEcnaInStex() = " << fEcal->MaxCrysEcnaInStex()
1234  << fTTBELL << endl;
1235  ret_code = kFALSE;
1236  // {Int_t cintoto; cout << "TAPER 0 POUR CONTINUER" << endl; cin >> cintoto;}
1237  }
1238  }
1239  else
1240  {
1241  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> Nb of required samples = "
1242  << i0Sample << " (Max = " << fNbSampForFic << ")" << fTTBELL << endl;
1243  }
1244  }
1245  else
1246  {
1247  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> ret_code = kFALSE "
1248  << fTTBELL << endl;
1249  }
1250  }
1251  else
1252  {
1253  cout << "!TEcnaRun::BuildEventDistributions(...) *** ERROR ***> GetReadyToReadData(...) not called."
1254  << fTTBELL << endl;
1255  ret_code = kFALSE;
1256  }
1257  //.................................................................. (BuildEventDistributions)
1258  if (ret_code == kFALSE)
1259  {
1260  cout << "!TEcnaRun::BuildEventDistributions(...) > ret_code = " << ret_code << ". event: " << n1EventNumber
1261  << ", n1StexStin: " << n1StexStin
1262  << ", i0StinEcha: " << i0StinEcha
1263  << ", i0Sample: " << i0Sample
1264  << ", adcvalue: " << adcvalue << endl;
1265  }
1266  return ret_code;
1267 }
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:83
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
Int_t fReadyToReadData
Definition: TEcnaRun.h:74
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:50
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Int_t fNbSampForFic
Definition: TEcnaRun.h:85
TString fFlagSubDet
Definition: TEcnaRun.h:70
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:82
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:81
Int_t MaxCrysInStin()
Int_t MaxCrysEcnaInStex()
Int_t MaxSampADC()
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:49
TString fStinName
Definition: TEcnaRun.h:71
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::CloseRootFile ( const Text_t *  name)

Definition at line 3087 of file TEcnaRun.cc.

References TCnaRootFile::CloseFile(), gather_cfg::cout, fCdelete, fCodePrintAllComments, fFlagPrint, fOpenRootFile, fTTBELL, and gCnaRootFile.

Referenced by WriteRootFile().

3087  {
3088 //Close the Root file
3089 
3090  Bool_t ok_close = kFALSE;
3091 
3092  if (fOpenRootFile == kTRUE )
3093  {
3095 
3097  cout << "*TEcnaRun::CloseRootFile> Close ROOT file." << endl;}
3098 
3099  delete gCnaRootFile; fCdelete++;
3100  fOpenRootFile = kFALSE;
3101  ok_close = kTRUE;
3102  }
3103  else
3104  {
3105  cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open."
3106  << fTTBELL << endl;
3107  }
3108  return ok_close;
3109 }
Bool_t fOpenRootFile
Definition: TEcnaRun.h:73
Int_t fCdelete
Definition: TEcnaRun.h:55
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Int_t fFlagPrint
Definition: TEcnaRun.h:185
void CloseFile()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
tuple cout
Definition: gather_cfg.py:41
TString fTTBELL
Definition: TEcnaRun.h:57
void TEcnaRun::CorrelationsBetweenSamples ( )

Definition at line 1688 of file TEcnaRun.cc.

References gather_cfg::cout, CovariancesBetweenSamples(), fCnew, fCodePrintAllComments, fCodePrintNoComment, TEcnaHeader::fCorCssCalc, fEcal, fFileHeader, fFlagPrint, fNbSampForCalc, fT3d1_cor_ss, fT3d2_cor_ss, fT3d_cor_ss, fT3d_cov_ss, fTagCorCss, fTagCovCss, i, j, TEcnaParEcal::MaxCrysEcnaInStex(), and mathSSE::sqrt().

Referenced by TEcnaGui::Calculations(), and MeanOfCorrelationsBetweenSamples().

1689 {
1690 //Calculation of the correlations between samples for all the StexEchas
1691 
1692  //... preliminary calculation of the covariances if not done yet.
1693  // Test only the first tag since the cov are computed globaly
1694  // but set all the tags to 0 because we don't want to write
1695  // the covariances in the result ROOT file
1696  if ( fTagCovCss[0] != 1 ){CovariancesBetweenSamples();
1697  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1698  {fTagCovCss[j0StexEcha] = 0;}}
1699 
1700  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CorrelationsBetweenSamples()" << endl;}
1702  cout << " Calculation: correlations between samples"
1703  << " for each channel." << endl;}
1704 
1705  //................... Allocations cor_ss
1706  if( fT3d_cor_ss == 0){
1707  const Int_t n_samp = fNbSampForCalc;
1708  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1709  fT3d_cor_ss = new Double_t**[n_StexEcha]; fCnew++;
1710  fT3d2_cor_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1711  fT3d1_cor_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1712  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1713  fT3d_cor_ss[i] = &fT3d2_cor_ss[0] + i*n_samp;
1714  for(Int_t j = 0 ; j < n_samp ; j++){
1715  fT3d2_cor_ss[n_samp*i+j] = &fT3d1_cor_ss[0]+n_samp*(n_samp*i+j);}}
1716  }
1717 
1718  //..................... calculation of the correlations (=init)
1719  //......................computation of half of the matrix, diagonal included (verif = 1)
1720 
1721  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1722  {
1723  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1724  {
1725  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample ; j0Sample++)
1726  {
1727  if( (fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample] > 0) &&
1728  (fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample] > 0) )
1729  {
1730  fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample]/
1731  ( sqrt(fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample])*sqrt(fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample]) );
1732  }
1733  else
1734  {
1735  (fT3d_cor_ss)[j0StexEcha][i0Sample][j0Sample] = (Double_t)0; // prevoir compteur + fTTBELL
1736  }
1737  fT3d_cor_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample];
1738  }
1739  }
1740  fTagCorCss[j0StexEcha] = 1; fFileHeader->fCorCssCalc++;
1741  }
1742 }
int i
Definition: DBlmapReader.cc:9
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:117
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
void CovariancesBetweenSamples()
Definition: TEcnaRun.cc:1628
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:116
Int_t fCorCssCalc
Definition: TEcnaHeader.h:60
T sqrt(T t)
Definition: SSEVec.h:28
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:110
int j
Definition: DBlmapReader.cc:9
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::CovariancesBetweenSamples ( )

Definition at line 1628 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, TEcnaHeader::fCovCssCalc, fEcal, fFileHeader, fFlagPrint, fNbSampForCalc, fNumberOfEvents, fT2d_ev, fT3d1_cov_ss, fT3d2_cov_ss, fT3d_cov_ss, fT3d_distribs, fTagCovCss, fTagMSp, i, j, TEcnaParEcal::MaxCrysEcnaInStex(), and SampleMeans().

Referenced by CorrelationsBetweenSamples().

1629 {
1630  //Calculation of the covariances between samples for all the StexEchas
1631 
1632  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CovariancesBetweenSamples()" << endl;}
1634  cout << " Calculation: covariances between samples"
1635  << " for each channel." << endl;}
1636 
1637  //................... Allocations cov_ss
1638  if( fT3d_cov_ss == 0 ){
1639  const Int_t n_samp = fNbSampForCalc;
1640  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1641  fT3d_cov_ss = new Double_t**[n_StexEcha]; fCnew++;
1642  fT3d2_cov_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1643  fT3d1_cov_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1644  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1645  fT3d_cov_ss[i] = &fT3d2_cov_ss[0] + i*n_samp;
1646  for(Int_t j = 0 ; j < n_samp ; j++){
1647  fT3d2_cov_ss[n_samp*i+j] = &fT3d1_cov_ss[0]+n_samp*(n_samp*i+j);}}
1648  }
1649 
1650  //.................. Calculation (= init)
1651  //.................. computation of half of the matrix, diagonal included)
1652 
1653  //... preliminary calculation of the expectation values if not done yet.
1654  // The tag is set to 1 after call to the method. It is reset to 0
1655  // because the expectation values must not be written in the result ROOT file
1656  // (since the tag was equal to 0)
1657  // Results in array fT2d_ev[j0StexEcha][i0Sample]
1658  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1659 
1660 
1661  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1662  {
1663  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1664  {
1665  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample; j0Sample++)
1666  {
1667  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1668  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1669  {
1670  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] +=
1671  (fT3d_distribs[j0StexEcha][i0Sample][i_event] - fT2d_ev[j0StexEcha][i0Sample])
1672  *(fT3d_distribs[j0StexEcha][j0Sample][i_event] - fT2d_ev[j0StexEcha][j0Sample]);
1673  }
1674  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /= (Double_t)fNumberOfEvents;
1675  fT3d_cov_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample];
1676  }
1677  }
1678  fTagCovCss[j0StexEcha] = 1; fFileHeader->fCovCssCalc++;
1679  }
1680 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:111
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:112
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:110
int j
Definition: DBlmapReader.cc:9
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
void SampleMeans()
Definition: TEcnaRun.cc:1513
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
Int_t fCovCssCalc
Definition: TEcnaHeader.h:59
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
TString TEcnaRun::GetNewRootFileName ( )

Definition at line 3216 of file TEcnaRun.cc.

References fNewRootFileName.

3216 {return fNewRootFileName;}
TString fNewRootFileName
Definition: TEcnaRun.h:78
TString TEcnaRun::GetNewRootFileNameShort ( )

Definition at line 3217 of file TEcnaRun.cc.

References fNewRootFileNameShort.

Referenced by TEcnaGui::Calculations().

3217 {return fNewRootFileNameShort;}
TString fNewRootFileNameShort
Definition: TEcnaRun.h:79
void TEcnaRun::GetReadyToCompute ( )

Definition at line 1471 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaWrite, fEcal, fFileHeader, fNbSampForFic, fNumberOfEvents, TEcnaHeader::fReqNbOfEvts, fT2d_NbOfEvts, TEcnaParEcal::MaxCrysEcnaInStex(), and TEcnaWrite::NumberOfEvents().

Referenced by EcnaAnalyzer::analyze(), TEcnaGui::Calculations(), and EcnaAnalyzer::~EcnaAnalyzer().

1472 {
1473 //
1474  // CHECK OF THE NUMBER OF FOUND EVENTS AND init of fNumberOfEvents
1475  // (number used to compute the average values over the events)
1476  // The number of events fNumberOfEvents is extracted from the array fT2d_NbOfEvts[]
1477  // which has been built by the BuildEventDistribution(...) method
1478 
1479  if( fT2d_NbOfEvts != 0 )
1480  {
1483  }
1484  else
1485  {
1486  cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << endl;
1487  }
1488 
1489 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Int_t fNbSampForFic
Definition: TEcnaRun.h:85
Int_t NumberOfEvents(Int_t **, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaWrite.cc:361
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:68
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::GetReadyToReadData ( TString  typ_ana,
const Int_t &  run_number,
const Int_t &  nfirst,
const Int_t &  nlast,
const Int_t &  nbevts,
const Int_t &  Stex 
)

Definition at line 728 of file TEcnaRun.cc.

Referenced by EcnaAnalyzer::analyze(), and TEcnaGui::Calculations().

731 {
732 //Preparation of the data reading. Set part of the header. No RunType as argument.
733 //Use default value = 99999999 and call method with all the arguments (see below)
734 
735  Int_t RunType = 99999999;
736  GetReadyToReadData(typ_ana, run_number, nfirst, nlast, nbevts, Stex, RunType);
737 }
void GetReadyToReadData(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:728
int nlast
Definition: AMPTWrapper.h:47
void TEcnaRun::GetReadyToReadData ( TString  typ_ana,
const Int_t &  run_number,
const Int_t &  nfirst,
const Int_t &  nlast,
const Int_t &  nbevts,
const Int_t &  Stex,
const Int_t &  run_type 
)

Definition at line 739 of file TEcnaRun.cc.

References benchmark_cfg::cerr, gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagPrint, TEcnaHeader::fLastReqEvtNumber, fMiscDiag, fNbOfMiscDiagCounters, fNbSampForFic, fReadyToReadData, TEcnaHeader::fReqNbOfEvts, TEcnaHeader::fRunNumber, TEcnaHeader::fRunType, fSpecialStexStinNotIndexed, TEcnaHeader::fStex, fStexName, fStinName, fT1d_NbOfEvts, fT1d_StexStinFromIndex, fT2d_NbOfEvts, fT3d1_distribs, fT3d2_distribs, fT3d_distribs, fTagAdcEvt, fTagAvHfn, fTagAvLfn, fTagAvMeanCorss, fTagAvPed, fTagAvSigCorss, fTagAvTno, fTagCorCss, fTagCovCss, fTagHFccMoStins, fTagHfCor, fTagHfCov, fTagHfn, fTagLFccMoStins, fTagLfCor, fTagLfCov, fTagLfn, fTagMeanCorss, fTagMSp, fTagNbOfEvts, fTagPed, fTagSigCorss, fTagSSp, fTagStinNumbers, fTagTno, fTTBELL, TEcnaHeader::fTypAna, TEcnaHeader::HeaderParameters(), TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), and TEcnaParEcal::MaxStinEcnaInStex().

742 {
743 //Preparation of the data reading. Set part of the header
744 //
745 // [nfirst, nlast] = [1,50] (50 events) or [151,300] (150 events) or etc...
746 
747  Int_t nrangeevts = nlast - nfirst + 1; // number of events in range
748 
749  if( nrangeevts < nbevts )
750  {
751  if( nlast >= nfirst )
752  {
753  cout << "*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts
754  << ", out of range (range = " << nfirst << "," << nlast << ")" << endl
755  << " The number of found events will be less " << endl
756  << " than the number of requested events." << endl;
757  }
758  if( nlast < nfirst )
759  {
760  cout << "*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast
761  << ", less than first requested event number (= " << nfirst << ")" << endl
762  << " File will be read until EOF if the number of found events" << endl
763  << " remains less than the number of requested events." << endl;
764  }
765 
766  }
767 
768  Int_t ifirst = nfirst - 1;
769 
770  //............. allocation for counters
771  fMiscDiag = new Int_t[fNbOfMiscDiagCounters]; fCnew++;
772  for (Int_t iz=0; iz<fNbOfMiscDiagCounters; iz++){fMiscDiag[iz] = (Int_t)0;}
773 
774  //************** CHECK OF ARGUMENTS: nfirst_arg and nbevts_arg
775  Int_t nentries = 99999999; // => to be reintroduced as argument (like run_type) (?)
776  if ( nfirst <= nentries )
777  {
778  //--------------------- test positivity of nfirst_arg (GetReadyToReadData)
779  if ( nfirst > 0 )
780  {
781  //-------- test compatibility between the last requested event number
782  // and the number of entries
783  if( nlast <= nentries )
784  {
785  const Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
786  const Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
787  //fFileHeader->HeaderParameters(h_name, h_title ,
788  // typ_ana, fNbSampForFic,
789  // run_number, nfirst, nlast, nbevts,
790  // Stex, nentries); fCnew++;
791 
792  if ( fEcal->MaxStinEcnaInStex() > 0 && fEcal->MaxCrysInStin() > 0 && fNbSampForFic > 0 )
793  {
794  if( fFileHeader == 0 ){fFileHeader = new TEcnaHeader(h_name, h_title);} // fCnew++;
795 
797  run_number, nfirst, nlast, nbevts,
798  Stex, run_type);
799 
800  // After this call to TEcnaHeader, we have: (GetReadyToReadData)
801  // fFileHeader->fTypAna = typ_ana
802  // fFileHeader->fNbOfSamples = fNbSampForFic
803  // fFileHeader->fRunNumber = run_number
804  // fFileHeader->fFirstReqEvtNumber = nfirst
805  // fFileHeader->fLastReqEvtNumber = nlast
806  // fFileHeader->fReqNbOfEvts = nbevts
807  // fFileHeader->fStex = Stex number
808  // fFileHeader->fRunType = run_type
809 
810  // fFileHeader->Print();
811 
812  // {Int_t cintoto; cout << "taper 0 pour continuer" << endl; cin >> cintoto;}
813 
814  // fFileHeader->SetName("CnaHeader"); *======> voir FXG
815  // fFileHeader->SetTitle("CnaHeader");
816 
817  //......................................... allocation tags + init of them (GetReadyToReadData)
818 
819  fTagStinNumbers = new Int_t[1]; fCnew++; fTagStinNumbers[0] = (Int_t)0;
820  fTagNbOfEvts = new Int_t[1]; fCnew++; fTagNbOfEvts[0] = (Int_t)0;
821 
822  fTagAdcEvt = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
823  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagAdcEvt[iz] = (Int_t)0;}
824 
825  fTagMSp = new Int_t[1]; fCnew++; fTagMSp[0] = (Int_t)0;
826  fTagSSp = new Int_t[1]; fCnew++; fTagSSp[0] = (Int_t)0;
827 
828  fTagCovCss = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
829  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCovCss[iz] = (Int_t)0;}
830 
831  fTagCorCss = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
832  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCorCss[iz] = (Int_t)0;}
833 
834  fTagLfCov = new Int_t[1]; fCnew++; fTagLfCov[0] = (Int_t)0;
835  fTagLfCor = new Int_t[1]; fCnew++; fTagLfCor[0] = (Int_t)0;
836 
837  fTagHfCov = new Int_t[1]; fCnew++; fTagHfCov[0] = (Int_t)0;
838  fTagHfCor = new Int_t[1]; fCnew++; fTagHfCor[0] = (Int_t)0;
839 
840  fTagLFccMoStins = new Int_t[1]; fCnew++; fTagLFccMoStins[0] = (Int_t)0;
841  fTagHFccMoStins = new Int_t[1]; fCnew++; fTagHFccMoStins[0] = (Int_t)0;
842 
843  fTagPed = new Int_t[1]; fCnew++; fTagPed[0] = (Int_t)0;
844  fTagTno = new Int_t[1]; fCnew++; fTagTno[0] = (Int_t)0;
845  fTagMeanCorss = new Int_t[1]; fCnew++; fTagMeanCorss[0] = (Int_t)0;
846 
847  fTagLfn = new Int_t[1]; fCnew++; fTagLfn[0] = (Int_t)0;
848  fTagHfn = new Int_t[1]; fCnew++; fTagHfn[0] = (Int_t)0;
849  fTagSigCorss = new Int_t[1]; fCnew++; fTagSigCorss[0] = (Int_t)0;
850 
851  fTagAvPed = new Int_t[1]; fCnew++; fTagAvPed[0] = (Int_t)0;
852  fTagAvTno = new Int_t[1]; fCnew++; fTagAvTno[0] = (Int_t)0;
853  fTagAvLfn = new Int_t[1]; fCnew++; fTagAvLfn[0] = (Int_t)0;
854  fTagAvHfn = new Int_t[1]; fCnew++; fTagAvHfn[0] = (Int_t)0;
855  fTagAvMeanCorss = new Int_t[1]; fCnew++; fTagAvMeanCorss[0] = (Int_t)0;
856  fTagAvSigCorss = new Int_t[1]; fCnew++; fTagAvSigCorss[0] = (Int_t)0;
857 
858  //====================================================================================
859  //
860  // allocation for fT1d_StexStinFromIndex[] and init to fSpecialStexStinNotIndexed
861  //
862  //====================================================================================
863 
864  if(fT1d_StexStinFromIndex == 0)
865  {
867  }
868  for ( Int_t i0_Stin = 0; i0_Stin < fEcal->MaxStinEcnaInStex(); i0_Stin++ )
869  {
871  }
872 
873  //------------------------------------------------------------- (GetReadyToReadData)
874 
875  //====================================================================================
876  //
877  // allocation of the 3D array fT3d_distribs[channel][sample][events] (ADC values)
878  //
879  // This array is filled in the BuildEventDistributions(...) method
880  //
881  //====================================================================================
882 
883  if(fT3d_distribs == 0)
884  {
885  //............ Allocation for the 3d array
886  cout << "*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions."
887  << " Nb of requested evts = " << fFileHeader->fReqNbOfEvts << endl
888  << " This number must not be too large"
889  << " (no failure after this message means alloc OK)." << endl;
890 
891  fT3d_distribs = new Double_t**[fEcal->MaxCrysEcnaInStex()]; fCnew++;
892 
894  new Double_t*[fEcal->MaxCrysEcnaInStex()*
895  fNbSampForFic]; fCnew++;
896 
898  new Double_t[fEcal->MaxCrysEcnaInStex()*
901 
902  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++){
903  fT3d_distribs[i0StexEcha] = &fT3d2_distribs[0] + i0StexEcha*fNbSampForFic;
904  for(Int_t j0Sample=0; j0Sample<fNbSampForFic; j0Sample++){
905  fT3d2_distribs[fNbSampForFic*i0StexEcha + j0Sample] = &fT3d1_distribs[0]+
906  fFileHeader->fReqNbOfEvts*(fNbSampForFic*i0StexEcha+j0Sample);}}
907  }
908 
909  //................................. Init to zero
910  for (Int_t iza=0; iza<fEcal->MaxCrysEcnaInStex(); iza++)
911  {
912  for (Int_t izb=0; izb<fNbSampForFic; izb++)
913  {
914  for (Int_t izc=0; izc<fFileHeader->fReqNbOfEvts; izc++)
915  {
916  if( fT3d_distribs[iza][izb][izc] != (Double_t)0 )
917  {
918  fMiscDiag[0]++;
919  fT3d_distribs[iza][izb][izc] = (Double_t)0;
920  }
921  }
922  }
923  }
924 
925  //--------------------------------------------------------- (GetReadyToReadData)
926  //====================================================================================
927  //
928  // allocation of the 2D array fT2d_NbOfEvts[channel][sample] (Max nb of evts)
929  //
930  //====================================================================================
931 
932  if (fT2d_NbOfEvts == 0)
933  {
934  fT2d_NbOfEvts = new Int_t*[fEcal->MaxCrysEcnaInStex()]; fCnew++;
935  fT1d_NbOfEvts = new Int_t[fEcal->MaxCrysEcnaInStex()*
936  fNbSampForFic]; fCnew++;
937 
938  for(Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
939  {
940  fT2d_NbOfEvts[i0StexEcha] =
941  &fT1d_NbOfEvts[0] + i0StexEcha*fNbSampForFic;
942  }
943 
944  //................ Init the array to 0
945  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
946  {
947  for(Int_t i0Sample=0; i0Sample<fNbSampForFic; i0Sample++)
948  {
949  fT2d_NbOfEvts[i0StexEcha][i0Sample] = 0;
950  }
951  }
952  }
953  else
954  {
955  cerr << "!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!"
956  << " Pointer already not NULL " << fTTBELL << endl;
957  // {Int_t cintoto; cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"
958  // << endl; cin >> cintoto;}
959  }
960  }
961  else
962  {
963  cerr << endl
964  << "!TEcnaRun::GetReadyToReadData(...)> "
965  << " *** ERROR *** " << endl
966  << " --------------------------------------------------"
967  << endl
968  << " NULL or NEGATIVE values for arguments" << endl
969  << " with expected positive values:" << endl
970  << " Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << endl
971  << " Number of crystals in Stin = " << fEcal->MaxCrysInStin() << endl
972  << " Number of samples by channel = " << fNbSampForFic << endl
973  << endl
974  << endl
975  << " hence, no memory allocation for array member has been performed." << endl;
976 
977  cout << "Enter: 0 and RETURN to continue or: CTRL C to exit";
978  Int_t toto;
979  cin >> toto;
980  }
981  //----------------------------------------------------------- (GetReadyToReadData)
983  cout << endl;
984  cout << "*TEcnaRun::GetReadyToReadData(...)>" << endl
985  << " The method has been called with the following argument values:" << endl
986  << " Analysis name = "
987  << fFileHeader->fTypAna << endl
988  << " Run number = "
989  << fFileHeader->fRunNumber << endl
990  << " Run type = "
991  << fFileHeader->fRunType << endl
992  << " First requested event number = "
993  << fFileHeader->fFirstReqEvtNumber << endl
994  << " Last requested event number = "
995  << fFileHeader->fLastReqEvtNumber << endl
996  << " " << fStexName.Data() << " number = "
997  << fFileHeader->fStex << endl
998  << " Number of " << fStinName.Data()
999  << " in " << fStexName.Data() << " = "
1000  << fEcal->MaxStinEcnaInStex() << endl
1001  << " Number of crystals in " << fStinName.Data() << " = "
1002  << fEcal->MaxCrysInStin() << endl
1003  << " Number of samples by channel = "
1004  << fNbSampForFic << endl
1005  << endl;}
1006 
1007  fReadyToReadData = 1; // set flag
1008  }
1009  else
1010  {
1012  cout << "!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << endl
1013  << "! The fisrt requested event number is not positive (nfirst = " << nfirst << ") "
1014  << fTTBELL << endl;}
1015  ifirst = 0;
1016  }
1017  }
1018  else
1019  {
1021  cout << endl << "!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << endl
1022  << "! The number of requested events (nbevts = " << nbevts << ") is too large." << endl
1023  << "! Last event number = " << nlast << " > number of entries = " << nentries << ". "
1024  << fTTBELL << endl << endl;}
1025  }
1026  }
1027  else
1028  {
1029  cout << "!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> "
1030  << " The first requested event number is greater than the number of entries."
1031  << fTTBELL << endl;
1032  }
1034  cout << "*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = "
1035  << fReadyToReadData << endl; }
1036 
1037 } // end of GetReadyToReadData
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Double_t * fT3d1_distribs
Definition: TEcnaRun.h:92
Int_t fReadyToReadData
Definition: TEcnaRun.h:74
Int_t fRunType
Definition: TEcnaHeader.h:46
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Double_t ** fT3d2_distribs
Definition: TEcnaRun.h:91
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStexName
Definition: TEcnaRun.h:71
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Int_t * fTagPed
Definition: TEcnaRun.h:122
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Int_t fNbSampForFic
Definition: TEcnaRun.h:85
Int_t * fTagTno
Definition: TEcnaRun.h:127
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:96
Int_t * fTagLfn
Definition: TEcnaRun.h:137
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:81
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
Int_t MaxCrysInStin()
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fCnew
Definition: TEcnaRun.h:54
TString fTypAna
Definition: TEcnaHeader.h:33
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:36
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:37
int nlast
Definition: AMPTWrapper.h:47
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
void HeaderParameters(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaHeader.cc:114
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
Int_t fRunNumber
Definition: TEcnaHeader.h:35
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
TString fStinName
Definition: TEcnaRun.h:71
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:60
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TString fTTBELL
Definition: TEcnaRun.h:57
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
TString TEcnaRun::GetRootFileName ( )

Definition at line 1404 of file TEcnaRun.cc.

References fRootFileName.

1404 {return fRootFileName;}
TString fRootFileName
Definition: TEcnaRun.h:76
TString TEcnaRun::GetRootFileNameShort ( )

Definition at line 1405 of file TEcnaRun.cc.

References fRootFileNameShort.

Referenced by TEcnaGui::Calculations().

1405 {return fRootFileNameShort;}
TString fRootFileNameShort
Definition: TEcnaRun.h:77
void TEcnaRun::HighFrequencyCorrelationsBetweenChannels ( )

Definition at line 2767 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fHfCorCalc, fMiscDiag, TEcnaHeader::fStex, fT2d1_hf_cor, fT2d_hf_cor, fT2d_hf_cov, fTagHfCor, fTagHfCov, HighFrequencyCovariancesBetweenChannels(), TEcnaParEcal::MaxCrysEcnaInStex(), mathSSE::sqrt(), and TEcnaNumbering::StexEchaForCons().

Referenced by TEcnaGui::Calculations(), and HighFrequencyMeanCorrelationsBetweenStins().

2768 {
2769 //Calculation of the High Frequency Correlations between channels
2770 
2771  //... preliminary calculation of the covariances if not done yet.
2772  if ( fTagHfCov[0] != 1 )
2774 
2775  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << endl;}
2777  cout << " Calculation of the High Frequency Correlations between channels" << endl
2778  << " Starting allocation. "
2779  << endl;}
2780 
2781  //................. allocation fT2d_hf_cor + init to zero (mandatory)
2782  if( fT2d_hf_cor == 0 ){
2783  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2784  fT2d_hf_cor = new Double_t*[n_StexEcha]; fCnew++;
2785  fT2d1_hf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2786  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2787  fT2d_hf_cor[i0StexEcha] = &fT2d1_hf_cor[0] + i0StexEcha*n_StexEcha;}
2788  }
2789 
2790  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2791  {
2792  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2793  {
2794  if( fT2d_hf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2795  {fMiscDiag[24]++; fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2796  }
2797  }
2798 
2799  //................. calculation
2800  //........................... computation of half of the matrix, diagonal included
2801 
2802  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2803  {
2804  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2805  || ( fFlagSubDet == "EB") )
2806  {
2807  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2808  {
2809  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2810  || ( fFlagSubDet == "EB") )
2811  {
2812  if( fT2d_hf_cov[i0StexEcha][i0StexEcha] > 0
2813  && fT2d_hf_cov[j0StexEcha][j0StexEcha] > 0 )
2814  {
2815  fT2d_hf_cor[i0StexEcha][j0StexEcha] =
2816  fT2d_hf_cov[i0StexEcha][j0StexEcha]/
2817  ( (Double_t)sqrt(fT2d_hf_cov[i0StexEcha][i0StexEcha]) *
2818  (Double_t)sqrt(fT2d_hf_cov[j0StexEcha][j0StexEcha]) );
2819  }
2820  else
2821  {
2822  fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2823  }
2824 
2825  fT2d_hf_cor[j0StexEcha][i0StexEcha] = fT2d_hf_cor[i0StexEcha][j0StexEcha];
2826  }
2827  }
2828  }
2829  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFN Cor], ";}
2830  }
2831  cout << endl;
2832 
2833  fTagHfCor[0] = 1; fFileHeader->fHfCorCalc++;
2834 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fHfCorCalc
Definition: TEcnaHeader.h:62
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:165
TString fFlagSubDet
Definition: TEcnaRun.h:70
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:161
T sqrt(T t)
Definition: SSEVec.h:28
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:54
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:166
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
void HighFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2652
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::HighFrequencyCovariancesBetweenChannels ( )

Definition at line 2652 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fHfCovCalc, fMiscDiag, fNbSampForCalc, fNumberOfEvents, TEcnaHeader::fStex, fT2d1_hf_cov, fT2d_hf_cov, fT3d_distribs, fTagHfCov, TEcnaParEcal::MaxCrysEcnaInStex(), and TEcnaNumbering::StexEchaForCons().

Referenced by HighFrequencyCorrelationsBetweenChannels().

2653 {
2654 //Calculation of the High Frequency Covariances between channels
2655 
2656  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << endl;}
2658  cout << " Calculation of the High Frequency Covariances between channels" << endl;}
2659 
2660  //................. allocation fT2d_hf_cov + init to zero (mandatory)
2661  if( fT2d_hf_cov == 0 ){
2662  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2663  fT2d_hf_cov = new Double_t*[n_StexEcha]; fCnew++;
2664  fT2d1_hf_cov = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2665  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2666  fT2d_hf_cov[i0StexEcha] = &fT2d1_hf_cov[0] + i0StexEcha*n_StexEcha;}
2667  }
2668 
2669  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2670  {
2671  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2672  {
2673  if( fT2d_hf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2674  {fMiscDiag[23]++; fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2675  }
2676  }
2677 
2678  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2679  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2680  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2681  {for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2682  {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2683  //................... Allocation cov_over_samp(i0StexEcha,j0StexEcha)
2684  TMatrixD cov_over_samp(fEcal->MaxCrysEcnaInStex(), fEcal->MaxCrysEcnaInStex());
2685  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2686  {for(Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
2687  {cov_over_samp(i0StexEcha, j0StexEcha)=(Double_t)0.;}}
2688 
2689  //........................................... Calculation (HighFrequencyCovariancesBetweenChannels)
2691  cout << " Calculation of the mean (over the events)" << endl
2692  << " of the covariances between the channels (over the samples 1 to "
2693  << fNbSampForCalc << ")." << endl;}
2694 
2695  cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl;
2696 
2697  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2698  {
2699  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2700  || ( fFlagSubDet == "EB") )
2701  {
2702  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2703  {
2704  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2705  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2706  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2707  {mean_over_samples(i0StexEcha, n_event) += fT3d_distribs[i0StexEcha][i0Sample][n_event];}
2708  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2709  }
2710  }
2711  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFNa Cov], ";}
2712  }
2713  cout << endl;
2714 
2715  cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl;
2716 
2717  //... Calculation of half of the matrix, diagonal included (HighFrequencyCovariancesBetweenChannels)
2718  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2719  {
2720  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2721  || ( fFlagSubDet == "EB") )
2722  {
2723  for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2724  {
2725  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2726  || ( fFlagSubDet == "EB") )
2727  {
2728  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2729  {
2730  // Calculation, for each event, of the covariance over the samples
2731  cov_over_samp(i0StexEcha,j0StexEcha) = (Double_t)0;
2732  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2733  {
2734  cov_over_samp(i0StexEcha,j0StexEcha) +=
2735  ( fT3d_distribs[i0StexEcha][i0Sample][n_event] - mean_over_samples(i0StexEcha, n_event) )*
2736  ( fT3d_distribs[j0StexEcha][i0Sample][n_event] - mean_over_samples(j0StexEcha, n_event) );
2737  }
2738  cov_over_samp(i0StexEcha,j0StexEcha) /= (Double_t)fNbSampForCalc;
2739 
2740  }
2741  //....... Calculation of the mean over the events of Cov_s[A(c_i,s*,e*),A(c_j,s*,e*)]
2742  //......... Calculation of half of the matrix, diagonal included
2743  fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2744  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2745  {
2746  fT2d_hf_cov[i0StexEcha][j0StexEcha] += cov_over_samp(i0StexEcha,j0StexEcha);
2747  }
2748  fT2d_hf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2749 
2750  fT2d_hf_cov[j0StexEcha][i0StexEcha] = fT2d_hf_cov[i0StexEcha][j0StexEcha];
2751  }
2752  }
2753  }
2754  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFNb Cov], ";}
2755  }
2756  cout << endl;
2757 
2758  fTagHfCov[0] = 1; fFileHeader->fHfCovCalc++;
2759 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Int_t fHfCovCalc
Definition: TEcnaHeader.h:61
TString fFlagSubDet
Definition: TEcnaRun.h:70
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:161
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:162
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::HighFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 2948 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2951
void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins ( )

Definition at line 2951 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fHFccMoStinsCalc, fMiscDiag, fT2d1_hfcc_mostins, fT2d_hf_cor, fT2d_hfcc_mostins, fTagHFccMoStins, fTagHfCor, fTTBELL, HighFrequencyCorrelationsBetweenChannels(), i, TEcnaParEcal::MaxCrysInStin(), and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by TEcnaGui::Calculations(), HighFrequencyMeanCorrelationsBetweenSCs(), and HighFrequencyMeanCorrelationsBetweenTowers().

2952 {
2953 //Calculation of the mean of the High Frequency Correlations
2954 //between channels for each Stin
2955 
2956  //... preliminary calculation of the High Frequency Cor(c,c) if not done yet
2957  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
2959 
2960  //..... mean of the fT2d_hfcc_mostins for each pair (Stin_X,Stin_Y)
2961  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << endl;}
2963  cout << " Calculation of the mean, for each "
2964  << fFlagSubDet.Data() << ", of the" << endl
2965  << " High Frequency Correlations between channels." << endl;}
2966 
2967  //................. allocation fT2d_hfcc_mostins + init to zero (mandatory)
2968  if( fT2d_hfcc_mostins == 0 ){
2969  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2970  fT2d_hfcc_mostins = new Double_t*[n_Stin]; fCnew++;
2971  fT2d1_hfcc_mostins = new Double_t[n_Stin*n_Stin]; fCnew++;
2972  for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2973  fT2d_hfcc_mostins[i0StexStinEcna] = &fT2d1_hfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2974  }
2975 
2976  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2977  {
2978  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2979  {
2980  if( fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2981  {fMiscDiag[32]++; fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2982  }
2983  }
2984 
2985  //..... Calculation of the mean of the HF Cor(c,c) for each pair (Stin_X,Stin_Y)
2986  //
2987  // ! => Warning: this matrix is NOT symmetric => take N*N elements
2988  // Only (Stin,Stin) matrix is symmetric.
2989  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
2990  // (except for the (Stin,Stin) DIAGONAL elements)
2991  // Then:
2992  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
2993 
2994  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2995 
2996  TVectorD half_HFccMos(ndim); for(Int_t i=0; i<ndim; i++){half_HFccMos(i)=(Double_t)0.;}
2997 
2998  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << endl;}
3000  cout << " Calculation, for each "
3001  << fFlagSubDet.Data() << ", of the mean of the" << endl
3002  << " High Frequency cor(c,c)." << endl;}
3003 
3004  //..................... Calculation
3005  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
3006  {
3007  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
3008  {
3009  //.................... Copy the relevant Mean Correlations(c,c') in 1D vector half_HFccMos()
3010  Int_t i_count = 0;
3011  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
3012  {
3013  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
3014  for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
3015  {
3016  Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
3017  if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
3018  (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
3019  {half_HFccMos(i_count) = fT2d_hf_cor[i0StexEcha][j0StexEcha]; i_count++;}
3020  else
3021  {cout << "!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
3022  << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << endl; }
3023  }
3024  }
3025  //..... Calculation of the mean of the absolute values of the HF mean Correlations(c,c')
3026  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
3027  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
3028  {
3029  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_HFccMos(i_rcor));
3030  }
3031  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
3032  }
3033  if( i0StexStinEcna%10 == 0 ){cout << i0StexStinEcna << "[HFN MCtt], ";}
3034  }
3035  cout << endl;
3036 
3038 } // ------- end of HighFrequencyMeanCorrelationsBetweenStins() -------
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:66
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:174
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:165
TString fFlagSubDet
Definition: TEcnaRun.h:70
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:175
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2767
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:54
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::HighFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 2946 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2951
void TEcnaRun::HighFrequencyNoise ( )

Definition at line 1911 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, TEcnaHeader::fHfnCalc, fMiscDiag, fNbSampForCalc, fNumberOfEvents, fT1d_evevt_of_sigsamp, fT3d_distribs, fTagHfn, fTTBELL, i, TEcnaParEcal::MaxCrysEcnaInStex(), and mathSSE::sqrt().

Referenced by AveragedHighFrequencyNoise(), and TEcnaGui::Calculations().

1912 {
1913 // Calculation, for each channel, of the mean (over the events)
1914 // of the ADC sigmas (over the samples 0 to fNbSampForCalc-1)
1915 
1916  //................... Allocation fT1d_evevt_of_sigsamp + init to zero (mandatory)
1917  if( fT1d_evevt_of_sigsamp == 0 ){
1918  fT1d_evevt_of_sigsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1919  }
1920  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1921  {
1922  if( fT1d_evevt_of_sigsamp[i0StexEcha] != (Double_t)0 )
1923  {fMiscDiag[14]++; fT1d_evevt_of_sigsamp[i0StexEcha] = (Double_t)0;}
1924  }
1925 
1926  //................... Allocations mean_over_samples, sigma_over_sample
1927  TVectorD mean_over_samples(fNumberOfEvents);
1928  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1929  TVectorD sigma_over_samples(fNumberOfEvents);
1930  for(Int_t i=0; i<fNumberOfEvents; i++){sigma_over_samples(i)=(Double_t)0.;}
1931 
1932  //..................... Calculation
1933  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyNoise()" << endl;}
1935  cout << " Calculation, for each channel, of the sigma (over the events)" << endl
1936  << " of the ADC expectation values (over the samples 1 to "
1937  << fNbSampForCalc << ")." << endl;}
1938 
1939  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1940  {
1941  //..................... Calculation of the sigma over samples
1942  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1943  {
1944  // Calculation, for each event, of the mean over the samples
1945  mean_over_samples(n_event) = (Double_t)0.;
1946  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1947  {mean_over_samples(n_event) += fT3d_distribs[i0StexEcha][i0Sample][n_event];}
1948  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1949 
1950  // Calculation, for each event, of the sigma over the samples
1951  Double_t var_over_samples = (Double_t)0;
1952  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1953  {Double_t deviation = fT3d_distribs[i0StexEcha][i0Sample][n_event] - mean_over_samples(n_event);
1954  var_over_samples += deviation*deviation;}
1955  var_over_samples /= (Double_t)fNbSampForCalc;
1956 
1957  if( var_over_samples < 0)
1958  {cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << endl;}
1959  else
1960  {sigma_over_samples(n_event) = sqrt(var_over_samples);}
1961  }
1962 
1963  //....... Calculation of the mean over the events of the sigma over samples
1964  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1965  {fT1d_evevt_of_sigsamp[i0StexEcha] += sigma_over_samples(n_event);}
1966 
1967  fT1d_evevt_of_sigsamp[i0StexEcha] /= (Double_t)fNumberOfEvents;
1968  }
1969  fTagHfn[0] = 1; fFileHeader->fHfnCalc++;
1970 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Int_t fHfnCalc
Definition: TEcnaHeader.h:71
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
T sqrt(T t)
Definition: SSEVec.h:28
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TString fTTBELL
Definition: TEcnaRun.h:57
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:141
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::Init ( void  )

Definition at line 356 of file TEcnaRun.cc.

References fBuildEvtNotSkipped, fCdelete, fCnaCommand, fCnaError, fCnaParCout, fCnaParPaths, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fFileHeader, fFlagPrint, fgMaxCar, fMaxMsgIndexForMiscDiag, fMiscDiag, fNbOfMiscDiagCounters, fNumberOfEvents, fOpenRootFile, fReadyToReadData, fSpecialStexStinNotIndexed, fStinIndexBuilt, fT1d_av_ev_corss, fT1d_av_hifn, fT1d_av_lofn, fT1d_av_mped, fT1d_av_sig_corss, fT1d_av_totn, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_evevt_of_sigsamp, fT1d_evsamp_of_sigevt, fT1d_NbOfEvts, fT1d_sig, fT1d_sig_cor_ss, fT1d_sigevt_of_evsamp, fT1d_StexStinFromIndex, fT1dCrysNumbersTable, fT2d1_hf_cor, fT2d1_hf_cov, fT2d1_hfcc_mostins, fT2d1_lf_cor, fT2d1_lf_cov, fT2d1_lfcc_mostins, fT2d_ev, fT2d_hf_cor, fT2d_hf_cov, fT2d_hfcc_mostins, fT2d_lf_cor, fT2d_lf_cov, fT2d_lfcc_mostins, fT2d_NbOfEvts, fT2d_sig, fT2dCrysNumbersTable, fT3d1_cor_ss, fT3d1_cov_ss, fT3d1_distribs, fT3d2_cor_ss, fT3d2_cov_ss, fT3d2_distribs, fT3d_cor_ss, fT3d_cov_ss, fT3d_distribs, fTagAdcEvt, fTagAvHfn, fTagAvLfn, fTagAvMeanCorss, fTagAvPed, fTagAvSigCorss, fTagAvTno, fTagCorCss, fTagCovCss, fTagHFccMoStins, fTagHfCor, fTagHfCov, fTagHfn, fTagLFccMoStins, fTagLfCor, fTagLfCov, fTagLfn, fTagMeanCorss, fTagMSp, fTagNbOfEvts, fTagPed, fTagSigCorss, fTagSSp, fTagStinNumbers, fTagTno, fTTBELL, and TEcnaParCout::GetCodePrint().

Referenced by TEcnaRun().

357 {
358 //Initialisation
359 
360  fCnew = 0;
361  fCdelete = 0;
362  fCnaCommand = 0;
363  fCnaError = 0;
364 
365  fTTBELL = '\007';
366 
367  //........................... TString file names init
368  fgMaxCar = (Int_t)512;
369 
370  //................ MiscDiag counters .................
371  fMaxMsgIndexForMiscDiag = (Int_t)10;
372  fNbOfMiscDiagCounters = (Int_t)50;
373  fMiscDiag = 0;
374 
375  fNumberOfEvents = 0;
376  //............................. init pointers ( Init() )
377  fT3d_distribs = 0;
378  fT3d2_distribs = 0;
379  fT3d1_distribs = 0;
380 
382 
383  fT2d_NbOfEvts = 0;
384  fT1d_NbOfEvts = 0;
385 
386  fT2d_ev = 0;
387  fT1d_ev = 0;
388  fT2d_sig = 0;
389  fT1d_sig = 0;
390 
391  fT3d_cov_ss = 0;
392  fT3d2_cov_ss = 0;
393  fT3d1_cov_ss = 0;
394 
395  fT3d_cor_ss = 0;
396  fT3d2_cor_ss = 0;
397  fT3d1_cor_ss = 0;
398 
399  fT2d_lf_cov = 0;
400  fT2d1_lf_cov = 0;
401 
402  fT2d_lf_cor = 0;
403  fT2d1_lf_cor = 0;
404 
405  fT2d_hf_cov = 0;
406  fT2d1_hf_cov = 0;
407 
408  fT2d_hf_cor = 0;
409  fT2d1_hf_cor = 0;
410 
411  fT2d_lfcc_mostins = 0;
412  fT2d1_lfcc_mostins = 0;
413 
414  fT2d_hfcc_mostins = 0;
415  fT2d1_hfcc_mostins = 0;
416 
417  fT1d_ev_ev = 0;
419  fT1d_ev_cor_ss = 0;
420  fT1d_av_mped = 0;
421  fT1d_av_totn = 0;
422  fT1d_av_lofn = 0;
423  fT1d_av_hifn = 0;
424  fT1d_av_ev_corss = 0;
425  fT1d_av_sig_corss = 0;
426 
429  fT1d_sig_cor_ss = 0;
430 
433 
434  //................................ tags ( Init() )
435  fTagStinNumbers = 0;
436 
437  fTagNbOfEvts = 0;
438 
439  fTagAdcEvt = 0;
440 
441  fTagMSp = 0;
442  fTagSSp = 0;
443 
444  fTagCovCss = 0;
445  fTagCorCss = 0;
446 
447  fTagHfCov = 0;
448  fTagHfCor = 0;
449  fTagLfCov = 0;
450  fTagLfCor = 0;
451 
452  fTagLFccMoStins = 0;
453  fTagHFccMoStins = 0;
454 
455  fTagPed = 0;
456  fTagTno = 0;
457  fTagMeanCorss = 0;
458 
459  fTagLfn = 0;
460  fTagHfn = 0;
461  fTagSigCorss = 0;
462 
463  fTagAvPed = 0;
464  fTagAvTno = 0;
465  fTagAvLfn = 0;
466  fTagAvHfn = 0;
467 
468  fTagAvMeanCorss = 0;
469  fTagAvSigCorss = 0;
470 
471  //................................................... Code Print ( Init() )
473  fCnaParCout = 0; fCnaParCout = new TEcnaParCout(); //fCnew++;
475  fCodePrintWarnings = fCnaParCout->GetCodePrint("Warnings "); // => default value
478 
479  //................................................... Paths
480  fCnaParPaths = 0; fCnaParPaths = new TEcnaParPaths(); //fCnew++;
481  fOpenRootFile = kFALSE;
482 
483  fReadyToReadData = 0;
484 
485  //.............................................. Miscellaneous
486  fFileHeader = 0;
487  const Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
488  const Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
489  fFileHeader = new TEcnaHeader(h_name, h_title); //fCnew++;
490 
492 
493  fStinIndexBuilt = 0;
495 }// end of Init()
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:148
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:123
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:117
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:136
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:83
Bool_t fOpenRootFile
Definition: TEcnaRun.h:73
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
Int_t fCdelete
Definition: TEcnaRun.h:55
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Double_t * fT3d1_distribs
Definition: TEcnaRun.h:92
Int_t fReadyToReadData
Definition: TEcnaRun.h:74
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:66
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:146
Double_t ** fT3d2_distribs
Definition: TEcnaRun.h:91
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:153
Int_t * fTagPed
Definition: TEcnaRun.h:122
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:181
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:133
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:174
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:128
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:157
Double_t ** fT2d_sig
Definition: TEcnaRun.h:106
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:165
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:121
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:111
Int_t fCnaError
Definition: TEcnaRun.h:52
Int_t * fTagTno
Definition: TEcnaRun.h:127
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:116
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:143
Int_t GetCodePrint(const TString)
Definition: TEcnaParCout.cc:77
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:161
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:112
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:96
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:82
Int_t * fTagLfn
Definition: TEcnaRun.h:137
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:162
Int_t fCodePrintComments
Definition: TEcnaRun.h:186
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:110
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:67
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fMaxMsgIndexForMiscDiag
Definition: TEcnaRun.h:61
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:175
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:81
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:156
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:186
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:166
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:126
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:171
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Double_t * fT1d_ev
Definition: TEcnaRun.h:103
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
Int_t fgMaxCar
Definition: TEcnaRun.h:50
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:152
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:138
Int_t fCnaCommand
Definition: TEcnaRun.h:52
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:180
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:60
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TString fTTBELL
Definition: TEcnaRun.h:57
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:141
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Double_t * fT1d_sig
Definition: TEcnaRun.h:107
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:170
void TEcnaRun::LowFrequencyCorrelationsBetweenChannels ( )

Definition at line 2579 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fLfCorCalc, fMiscDiag, TEcnaHeader::fStex, fT2d1_lf_cor, fT2d_lf_cor, fT2d_lf_cov, fTagLfCor, fTagLfCov, LowFrequencyCovariancesBetweenChannels(), TEcnaParEcal::MaxCrysEcnaInStex(), mathSSE::sqrt(), and TEcnaNumbering::StexEchaForCons().

Referenced by TEcnaGui::Calculations(), and LowFrequencyMeanCorrelationsBetweenStins().

2580 {
2581 //Calculation of the Low Frequency Correlations between channels
2582 
2583  //... preliminary calculation of the covariances if not done yet.
2584  if ( fTagLfCov[0] != 1 )
2586 
2587  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << endl;}
2589  cout << " Calculation of the Low Frequency Correlations between channels" << endl
2590  << " Starting allocation. "
2591  << endl;}
2592 
2593  //................. allocation fT2d_lf_cor + init to zero (mandatory)
2594  if( fT2d_lf_cor == 0 ){
2595  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2596  fT2d_lf_cor = new Double_t*[n_StexEcha]; fCnew++;
2597  fT2d1_lf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2598  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2599  fT2d_lf_cor[i0StexEcha] = &fT2d1_lf_cor[0] + i0StexEcha*n_StexEcha;}
2600  }
2601 
2602  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2603  {
2604  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2605  {
2606  if( fT2d_lf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2607  {fMiscDiag[22]++; fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2608  }
2609  }
2610 
2611  //................. calculation
2612  //........................... computation of half of the matrix, diagonal included
2613  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2614  {
2615  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2616  || ( fFlagSubDet == "EB") )
2617  {
2618  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2619  {
2620  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2621  || ( fFlagSubDet == "EB") )
2622  {
2623  if( fT2d_lf_cov[i0StexEcha][i0StexEcha] > 0
2624  && fT2d_lf_cov[j0StexEcha][j0StexEcha] > 0 )
2625  {
2626  fT2d_lf_cor[i0StexEcha][j0StexEcha] =
2627  fT2d_lf_cov[i0StexEcha][j0StexEcha]/
2628  ( (Double_t)sqrt( fT2d_lf_cov[i0StexEcha][i0StexEcha]*
2629  fT2d_lf_cov[j0StexEcha][j0StexEcha] ) );
2630  }
2631  else
2632  {
2633  fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2634  }
2635  fT2d_lf_cor[j0StexEcha][i0StexEcha] = fT2d_lf_cor[i0StexEcha][j0StexEcha];
2636  }
2637  }
2638  }
2639  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[LFN Cor], ";}
2640  }
2641  cout << endl;
2642 
2643  fTagLfCor[0] = 1; fFileHeader->fLfCorCalc++;
2644 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:157
TString fFlagSubDet
Definition: TEcnaRun.h:70
T sqrt(T t)
Definition: SSEVec.h:28
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:156
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t fLfCorCalc
Definition: TEcnaHeader.h:64
Int_t MaxCrysEcnaInStex()
void LowFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2476
tuple cout
Definition: gather_cfg.py:41
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:152
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::LowFrequencyCovariancesBetweenChannels ( )

Definition at line 2476 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fEcalNumbering, fFileHeader, fFlagPrint, fFlagSubDet, TEcnaHeader::fLfCovCalc, fMiscDiag, fNbSampForCalc, fNumberOfEvents, TEcnaHeader::fStex, fT2d1_lf_cov, fT2d_lf_cov, fT3d_distribs, fTagLfCov, TEcnaParEcal::MaxCrysEcnaInStex(), and TEcnaNumbering::StexEchaForCons().

Referenced by LowFrequencyCorrelationsBetweenChannels().

2477 {
2478 //Calculation of the Low Frequency Covariances between channels
2479 
2480  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << endl;}
2482  cout << " Calculation of the Low Frequency Covariances between channels" << endl;}
2483 
2484  //................. allocation fT2d_lf_cov + init to zero (mandatory)
2485  if( fT2d_lf_cov == 0 ){
2486  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2487  fT2d_lf_cov = new Double_t*[n_StexEcha]; fCnew++;
2488  fT2d1_lf_cov = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2489  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2490  fT2d_lf_cov[i0StexEcha] = &fT2d1_lf_cov[0] + i0StexEcha*n_StexEcha;}}
2491 
2492  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2493  {
2494  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2495  {
2496  if( fT2d_lf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2497  {fMiscDiag[21]++; fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2498  }
2499  }
2500  //........................................... Calculation (LowFrequencyCovariancesBetweenChannels)
2501  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2502  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2503  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2504  {for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2505  {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2506  //................... Allocation MoeOfMos(i0StexEcha)
2507  TVectorD MoeOfMos(fEcal->MaxCrysEcnaInStex());
2508  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2509  { MoeOfMos(i0StexEcha)=(Double_t)0.;}
2510 
2511  //................... Calculation
2513  cout << " Calculation, for each pair of channels, of the covariance (over the events)" << endl
2514  << " between the ADC expectation values (over the samples 1 to "
2515  << fNbSampForCalc << ")." << endl;}
2516 
2517  cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << endl;
2518 
2519  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2520  {
2521  MoeOfMos(i0StexEcha) = (Double_t)0;
2522 
2523  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2524  || ( fFlagSubDet == "EB") )
2525  {
2526  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2527  {
2528  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2529  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2530  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2531  {
2532  mean_over_samples(i0StexEcha, n_event) += fT3d_distribs[i0StexEcha][i0Sample][n_event];
2533  }
2534  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2535  }
2536  //Calculation of the mean over the events of E_s[A(c_i,s*,e_n] ( = E_e[E_s[A(c_i,s*,e*]] )
2537  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2538  {MoeOfMos(i0StexEcha) += mean_over_samples(i0StexEcha, n_event);}
2539  MoeOfMos(i0StexEcha) /= (Double_t)fNumberOfEvents;
2540  }
2541  }
2542 
2543  //... Calculation of half of the matrix, diagonal included (LowFrequencyCovariancesBetweenChannels)
2544  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2545  {
2546  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2547  || ( fFlagSubDet == "EB") )
2548  {
2549  for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2550  {
2551  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2552  || ( fFlagSubDet == "EB") )
2553  {
2554  fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2555  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2556  {
2557  fT2d_lf_cov[i0StexEcha][j0StexEcha] +=
2558  ( mean_over_samples(i0StexEcha, n_event) - MoeOfMos(i0StexEcha) )
2559  *( mean_over_samples(j0StexEcha, n_event) - MoeOfMos(j0StexEcha) );
2560  }
2561  fT2d_lf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2562 
2563  fT2d_lf_cov[j0StexEcha][i0StexEcha] = fT2d_lf_cov[i0StexEcha][j0StexEcha];
2564  }
2565  }
2566  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[LFN Cov], ";}
2567  }
2568  }
2569  cout << endl;
2570  fTagLfCov[0] = 1; fFileHeader->fLfCovCalc++;
2571 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:153
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
TString fFlagSubDet
Definition: TEcnaRun.h:70
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysEcnaInStex()
Int_t fLfCovCalc
Definition: TEcnaHeader.h:63
tuple cout
Definition: gather_cfg.py:41
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:152
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::LowFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 2850 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2853
void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins ( )

Definition at line 2853 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, TEcnaHeader::fLFccMoStinsCalc, fMiscDiag, fStinName, fT2d1_lfcc_mostins, fT2d_lf_cor, fT2d_lfcc_mostins, fTagLFccMoStins, fTagLfCor, fTTBELL, i, LowFrequencyCorrelationsBetweenChannels(), TEcnaParEcal::MaxCrysInStin(), and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by TEcnaGui::Calculations(), LowFrequencyMeanCorrelationsBetweenSCs(), and LowFrequencyMeanCorrelationsBetweenTowers().

2854 {
2855 //Calculation of the mean of the Low Frequency Correlations
2856 //between channels for each Stin
2857 
2858  //... preliminary calculation of the Low Frequency Cor(c,c) if not done yet
2859  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
2861 
2862  //..... mean of the fT2d_lfcc_mostins for each pair (Stin_X,Stin_Y)
2863  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2865  cout << " Calculation of the mean, for each "
2866  << fStinName.Data() << ", of the" << endl
2867  << " Low Frequency Correlations between channels." << endl;}
2868 
2869  //................. allocation fT2d_lfcc_mostins + init to zero (mandatory)
2870  if( fT2d_lfcc_mostins == 0 ){
2871  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2872  fT2d_lfcc_mostins = new Double_t*[n_Stin]; fCnew++;
2873  fT2d1_lfcc_mostins = new Double_t[n_Stin*n_Stin]; fCnew++;
2874  for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2875  fT2d_lfcc_mostins[i0StexStinEcna] = &fT2d1_lfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2876  }
2877 
2878  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2879  {
2880  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2881  {
2882  if( fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2883  {fMiscDiag[31]++; fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2884  }
2885  }
2886 
2887  //..... Calculation of the mean of the LF Cor(c,c) for each pair (Stin_X,Stin_Y)
2888  //
2889  // ! => Warning: this matrix is NOT symmetric => take N*N elements
2890  // Only (Stin,Stin) matrix is symmetric.
2891  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
2892  // (except for the (Stin,Stin) DIAGONAL elements)
2893  // Then:
2894  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
2895 
2896  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2897 
2898  TVectorD half_LFccMos(ndim); for(Int_t i=0; i<ndim; i++){half_LFccMos(i)=(Double_t)0.;}
2899 
2900  //..................... Calculation
2901  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2903  cout << " Calculation, for each "
2904  << fStinName.Data() << ", of the mean of the" << endl
2905  << " Low Frequency cor(c,c)." << endl;}
2906 
2907  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2908  {
2909  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2910  {
2911  //................... .Copy the Mean Correlations(c,c') in 1D vector half_LFccMos()
2912  Int_t i_count = 0;
2913  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2914  {
2915  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2916  for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2917  {
2918  Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2919  if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2920  (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2921  {half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2922  else
2923  {cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2924  << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << endl; }
2925  }
2926  }
2927  //...... Calculation of the mean of the absolute values of the LF mean Correlations(c,c')
2928  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2929  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2930  {
2931  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_LFccMos(i_rcor));
2932  }
2933  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2934  }
2935  if( i0StexStinEcna%10 == 0 ){cout << i0StexStinEcna << "[LFN MCtt], ";}
2936  }
2937  cout << endl;
2938 
2940 } // ------- end of LowFrequencyMeanCorrelationsBetweenStins() -------
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t MaxCrysInStin()
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:156
Int_t fCnew
Definition: TEcnaRun.h:54
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:171
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:65
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2579
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:71
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:170
void TEcnaRun::LowFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 2848 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2853
void TEcnaRun::LowFrequencyNoise ( )

Definition at line 1846 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, TEcnaHeader::fLfnCalc, fMiscDiag, fNbSampForCalc, fNumberOfEvents, fT1d_sigevt_of_evsamp, fT3d_distribs, fTagLfn, i, TEcnaParEcal::MaxCrysEcnaInStex(), and mathSSE::sqrt().

Referenced by AveragedLowFrequencyNoise(), and TEcnaGui::Calculations().

1847 {
1848 // Calculation, for each channel, of the sigma (over the events)
1849 // of the ADC expectation values (over the samples 0 to fNbSampForCalc-1)
1850 
1851  //................... Allocation fT1d_sigevt_of_evsamp + init to zero (mandatory)
1852  if( fT1d_sigevt_of_evsamp == 0 ){
1853  fT1d_sigevt_of_evsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1854  }
1855  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1856  {
1857  if( fT1d_sigevt_of_evsamp[i0StexEcha] != (Double_t)0 )
1858  {fMiscDiag[13]++; fT1d_sigevt_of_evsamp[i0StexEcha] = (Double_t)0;}
1859  }
1860 
1861  //................... Allocation mean_over_samples
1862  TVectorD mean_over_samples(fNumberOfEvents);
1863  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1864 
1865  //..................... Calculation
1866  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyNoise()" << endl;}
1868  cout << " Calculation, for each channel, of the sigma (over the events)" << endl
1869  << " of the ADC expectation values (over the samples 1 to "
1870  << fNbSampForCalc << ")." << endl;}
1871 
1872  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1873  {
1874  // Calculation of the mean over the events of the mean over the samples
1875  Double_t mean_over_events = (Double_t)0;
1876  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1877  {
1878  // Calculation, for each event, of the mean over the samples
1879  mean_over_samples(n_event) = (Double_t)0.;
1880  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1881  {
1882  mean_over_samples(n_event) += fT3d_distribs[i0StexEcha][i0Sample][n_event];
1883  }
1884  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1885 
1886  mean_over_events += mean_over_samples(n_event);
1887  }
1888  mean_over_events /= (Double_t)fNumberOfEvents;
1889 
1890  // Calculation of the sigma over the events of the mean over the samples
1891  Double_t var = (Double_t)0;
1892  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1893  {
1894  Double_t ecart = mean_over_samples(n_event) - mean_over_events;
1895  var += ecart*ecart;
1896  }
1897  var /= (Double_t)fNumberOfEvents;
1898 
1899  fT1d_sigevt_of_evsamp[i0StexEcha] = sqrt(var);
1900  }
1901  fTagLfn[0] = 1; fFileHeader->fLfnCalc++;
1902 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:136
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Int_t * fTagLfn
Definition: TEcnaRun.h:137
T sqrt(T t)
Definition: SSEVec.h:28
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
Int_t fLfnCalc
Definition: TEcnaHeader.h:70
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::MeanOfCorrelationsBetweenSamples ( )

Definition at line 1980 of file TEcnaRun.cc.

References CorrelationsBetweenSamples(), gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, TEcnaHeader::fMeanCorssCalc, fMiscDiag, fNbSampForCalc, fT1d_ev_cor_ss, fT3d_cor_ss, fTagCorCss, fTagMeanCorss, i, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by AveragedMeanOfCorrelationsBetweenSamples(), TEcnaGui::Calculations(), and SigmaOfCorrelationsBetweenSamples().

1981 {
1982  // Calculation, for all the channels, of the expectation values
1983  // of the correlations between the first fNbSampForCalc samples
1984 
1985  //... preliminary calculation of the correlations if not done yet
1986  // (test only the first element since the cor are computed globaly)
1987  if ( fTagCorCss[0] != 1 ){CorrelationsBetweenSamples(); fTagCorCss[0]=0;}
1988 
1989  //................... Allocations ev_cor_ss + init to zero (mandatory)
1990  if( fT1d_ev_cor_ss == 0 ){
1991  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1992  fT1d_ev_cor_ss = new Double_t[n_StexEcha]; fCnew++;
1993  }
1994  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1995  {
1996  if( fT1d_ev_cor_ss[i0StexEcha] != (Double_t)0 )
1997  {fMiscDiag[15]++; fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;}
1998  }
1999 
2000  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
2001  // ( half of (them minus the diagonal) )
2002  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
2003 
2004  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
2005 
2006  //..................... Calculation
2007  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::MeanOfCorrelationsBetweenSamples()" << endl;}
2009  cout << " Calculation, for all the channels, of the expectation values of the" << endl
2010  << " correlations between the first " << fNbSampForCalc << " samples." << endl;}
2011 
2012  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2013  {
2014  //..................... half_cor_ss() array filling
2015  Int_t i_count = 0;
2016  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
2017  {
2018  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
2019  {
2020  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
2021  i_count++;
2022  }
2023  }
2024  //...................... mean of cor(s,s') calculation
2025  fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
2026  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2027  {
2028  fT1d_ev_cor_ss[i0StexEcha] += half_cor_ss(i_rcor);
2029  }
2030  fT1d_ev_cor_ss[i0StexEcha] /= (Double_t)ndim;
2031  }
2033 }
int i
Definition: DBlmapReader.cc:9
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:69
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1688
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::OpenRootFile ( const Text_t *  name,
TString  status 
)

Definition at line 3056 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaParPaths, fCnew, fCodePrintAllComments, fFlagPrint, fOpenRootFile, TCnaRootFile::fRootFileStatus, gCnaRootFile, TCnaRootFile::OpenR(), TCnaRootFile::OpenW(), TEcnaParPaths::ResultsRootFilePath(), and ntuplemaker::status.

Referenced by WriteRootFile().

3056  {
3057 //Open the Root file
3058 
3059  TString s_path;
3060  s_path = fCnaParPaths->ResultsRootFilePath();
3061  s_path.Append('/');
3062  s_path.Append(name);
3063 
3064  gCnaRootFile = new TEcnaRootFile(s_path.Data(), status); fCnew++;
3065  Bool_t ok_open = kFALSE;
3066 
3067  if ( gCnaRootFile->fRootFileStatus == "RECREATE" ){ok_open = gCnaRootFile->OpenW();}
3068  if ( gCnaRootFile->fRootFileStatus == "READ" ){ok_open = gCnaRootFile->OpenR();}
3069 
3070  if (!ok_open) // unable to open file
3071  {
3072  cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_path.Data() << endl;
3073  }
3074  else
3075  {
3077  {cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_path.Data() << endl;}
3078  fOpenRootFile = kTRUE;
3079  }
3080  return ok_open;
3081 }
TString fRootFileStatus
Definition: TCnaRootFile.h:19
Bool_t fOpenRootFile
Definition: TEcnaRun.h:73
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:67
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fCnew
Definition: TEcnaRun.h:54
Bool_t OpenW(const Text_t *="")
TString ResultsRootFilePath()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
tuple cout
Definition: gather_cfg.py:41
Bool_t OpenR(const Text_t *="")
tuple status
Definition: ntuplemaker.py:245
void TEcnaRun::Pedestals ( )

Definition at line 1758 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fMiscDiag, fNbSampForCalc, TEcnaHeader::fPedCalc, fT1d_ev_ev, fT2d_ev, fTagMSp, fTagPed, TEcnaParEcal::MaxCrysEcnaInStex(), and SampleMeans().

Referenced by AveragedPedestals(), and TEcnaGui::Calculations().

1759 {
1760 // Calculation, for each channel, of the expectation values
1761 // (over the samples 0 to fNbSampForCalc-1) of the ADC expectation values
1762 // (over the events)
1763 
1764  //... preliminary calculation of the expectation values if not done yet
1765  if ( fTagMSp[0] != 1 ){SampleMeans(); fTagMSp[0]=0;}
1766 
1767  //................... Allocation ev_ev + init to zero (mandatory)
1768  if( fT1d_ev_ev == 0 ){fT1d_ev_ev = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1769  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1770  {if( fT1d_ev_ev[i0StexEcha] != (Double_t)0 )
1771  {fMiscDiag[11]++; fT1d_ev_ev[i0StexEcha] = (Double_t)0;}}
1772 
1773  //..................... Calculation
1774  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::Pedestals()" << endl;}
1776  cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1777  << fNbSampForCalc << ")" << endl
1778  << " of the ADC expectation values (over the events)." << endl;}
1779 
1780  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1781  {
1782  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1783  {
1784  fT1d_ev_ev[i0StexEcha] += fT2d_ev[i0StexEcha][i0Sample];
1785  }
1786  fT1d_ev_ev[i0StexEcha] /= fNbSampForCalc;
1787  }
1788  fTagPed[0] = 1; fFileHeader->fPedCalc++;
1789 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagPed
Definition: TEcnaRun.h:122
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:121
Int_t fPedCalc
Definition: TEcnaHeader.h:67
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
void SampleMeans()
Definition: TEcnaRun.cc:1513
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::PrintAllComments ( )

Definition at line 4658 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintAllComments, and fFlagPrint.

4659 {
4660 // Set flags to authorize printing of the comments of all the methods
4661 
4663  cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << endl;
4664 }
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Int_t fFlagPrint
Definition: TEcnaRun.h:185
tuple cout
Definition: gather_cfg.py:41
void TEcnaRun::PrintComments ( )

Definition at line 4642 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintComments, and fFlagPrint.

4643 {
4644 // Set flags to authorize printing of some comments concerning initialisations (default)
4645 
4647  cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << endl;
4648 }
Int_t fCodePrintComments
Definition: TEcnaRun.h:186
Int_t fFlagPrint
Definition: TEcnaRun.h:185
tuple cout
Definition: gather_cfg.py:41
void TEcnaRun::PrintNoComment ( )

Definition at line 4666 of file TEcnaRun.cc.

References fCodePrintNoComment, and fFlagPrint.

4667 {
4668 // Set flags to forbid the printing of all the comments
4669 
4671 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fFlagPrint
Definition: TEcnaRun.h:185
void TEcnaRun::PrintWarnings ( )

Definition at line 4650 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintWarnings, and fFlagPrint.

4651 {
4652 // Set flags to authorize printing of warnings
4653 
4655  cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << endl;
4656 }
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:186
tuple cout
Definition: gather_cfg.py:41
Bool_t TEcnaRun::ReadEventDistributions ( )

Definition at line 1275 of file TEcnaRun.cc.

References fEcal, and TEcnaParEcal::MaxSampADC().

Referenced by TEcnaGui::Calculations().

1276 {
1278 }
Bool_t ReadEventDistributions()
Definition: TEcnaRun.cc:1275
Int_t MaxSampADC()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::ReadEventDistributions ( const Int_t &  nb_samp_for_calc)

Definition at line 1280 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaRead::DataExist(), fCnaParCout, fCnaParPaths, fCnaWrite, fEcal, fEcalNumbering, fFileHeader, fFlagSubDet, fNbSampForCalc, fRootFileName, fRootFileNameShort, fT1d_StexStinFromIndex, fT2d_NbOfEvts, fT3d_distribs, fTagNbOfEvts, fTagStinNumbers, fTTBELL, TEcnaRead::GetReadyToReadRootFile(), TEcnaRead::GetRootFileName(), TEcnaRead::GetRootFileNameShort(), TEcnaRead::GetStartDate(), TEcnaRead::GetStartTime(), TEcnaRead::GetStexStinFromIndex(), TEcnaRead::GetStopDate(), TEcnaRead::GetStopTime(), i, j, TEcnaRead::LookAtRootFile(), TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), TEcnaRead::PrintNoComment(), TEcnaRead::ReadNumberOfEventsForSamples(), TEcnaRead::ReadSampleValuesSameFile(), TEcnaRead::ReadStinNumbers(), and TEcnaParPaths::ResultsRootFilePath().

1281 {
1282  // read the Sample ADC values from "ADC" result root files (ReadEventDistributions)
1283 
1284  // put the number of sample for calculations in attribute fNbSampForCalc
1285  // and call the method without arguments
1286  // We must have: nb_samp_for_calc <= fFileHeader->fNbOfSamples (= nb of samples in ROOT file)
1287 
1288  fNbSampForCalc = nb_samp_for_calc;
1289 
1290  TEcnaRead* MyRootFile = new TEcnaRead(fFlagSubDet.Data(), fCnaParPaths, fCnaParCout,
1291  fFileHeader, fEcalNumbering, fCnaWrite); // fCnew++;
1292 
1293  MyRootFile->PrintNoComment();
1294 
1295  MyRootFile->GetReadyToReadRootFile(fFileHeader->fTypAna, fFileHeader->fNbOfSamples, fFileHeader->fRunNumber,
1296  fFileHeader->fFirstReqEvtNumber, fFileHeader->fLastReqEvtNumber,
1297  fFileHeader->fReqNbOfEvts, fFileHeader->fStex,
1298  fCnaParPaths->ResultsRootFilePath().Data());
1299 
1300  Bool_t ok_read = MyRootFile->LookAtRootFile();
1301 
1302  fFileHeader->fStartTime = MyRootFile->GetStartTime();
1303  fFileHeader->fStopTime = MyRootFile->GetStopTime();
1304  fFileHeader->fStartDate = MyRootFile->GetStartDate();
1305  fFileHeader->fStopDate = MyRootFile->GetStopDate();
1306 
1307  if ( ok_read == kTRUE )
1308  {
1309  fRootFileName = MyRootFile->GetRootFileName();
1310  fRootFileNameShort = MyRootFile->GetRootFileNameShort();
1311  cout << "*TEcnaRun::ReadEventDistributions> Reading sample ADC values from file: " << endl
1312  << " " << fRootFileName << endl;
1313 
1314  Int_t i_no_data = 0;
1315 
1316  //.......... Read the StinNumbers in the old file (ReadEventDistributions)
1317  TVectorD vec(fEcal->MaxStinEcnaInStex());
1318  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
1319  vec = MyRootFile->ReadStinNumbers(fEcal->MaxStinEcnaInStex());
1320  if( MyRootFile->DataExist() == kTRUE )
1321  {
1322  fTagStinNumbers[0] = 1;
1323  fFileHeader->fStinNumbersCalc = 1;
1324  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1325  {fT1d_StexStinFromIndex[i0StexStinEcna] = (Int_t)vec(i0StexStinEcna);}
1326  }
1327  else
1328  {
1329  i_no_data++;
1330  }
1331  //.......... Read the Numbers of Events in the old file (ReadEventDistributions)
1332  TMatrixD partial_matrix(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1333  for(Int_t i=0; i<fEcal->MaxCrysInStin(); i++)
1334  {for(Int_t j=0; j<fFileHeader->fNbOfSamples; j++){partial_matrix(i,j)=(Double_t)0.;}}
1335 
1336  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1337  {
1338  Int_t n1StexStin = MyRootFile->GetStexStinFromIndex(i0StexStinEcna);
1339  if(n1StexStin != -1)
1340  {
1341  partial_matrix =
1342  MyRootFile->ReadNumberOfEventsForSamples
1343  (n1StexStin, fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1344 
1345  if( MyRootFile->DataExist() == kTRUE )
1346  {
1347  fTagNbOfEvts[0] = 1;
1348  fFileHeader->fNbOfEvtsCalc = 1;
1349  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
1350  {
1351  Int_t i0StexEcha = (n1StexStin-1)*fEcal->MaxCrysInStin() + i0StinCrys;
1352  for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
1353  {fT2d_NbOfEvts[i0StexEcha][i0Sample] = (Int_t)partial_matrix(i0StinCrys,i0Sample);}
1354  }
1355  }
1356  else
1357  {
1358  i_no_data++;
1359  }
1360  }
1361  }
1362 
1363  //.......... Read the Sample ADC values in the old file (ReadEventDistributions)
1364  Double_t*** fT3d_read_distribs =
1365  MyRootFile->ReadSampleValuesSameFile
1366  (fEcal->MaxCrysEcnaInStex(), fFileHeader->fNbOfSamples, fFileHeader->fReqNbOfEvts);
1367 
1368  if( MyRootFile->DataExist() == kTRUE )
1369  {
1370  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1371  {
1372  for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples;i0Sample++)
1373  {
1374  for(Int_t i_event=0; i_event<fFileHeader->fReqNbOfEvts; i_event++)
1375  {fT3d_distribs[i0StexEcha][i0Sample][i_event] =
1376  fT3d_read_distribs[i0StexEcha][i0Sample][i_event];}
1377  }
1378  }
1379  }
1380  else
1381  {
1382  i_no_data++;
1383  }
1384  if( i_no_data != 0 )
1385  {
1386  cout << "!TEcnaRun::ReadEventDistributions(...)> *ERROR* =====> "
1387  << " Read failure. i_no_data = " << i_no_data << fTTBELL << endl;
1388  }
1389  }
1390  else
1391  {
1392  cout << "!TEcnaRun::ReadEventDistributions(...)> *ERROR* =====> "
1393  << " ROOT file not found" << fTTBELL << endl;
1394  }
1395  delete MyRootFile; // fCdelete++;
1396  return ok_read;
1397 }
int i
Definition: DBlmapReader.cc:9
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:66
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString GetStartDate()
Definition: TEcnaRead.cc:623
TString GetRootFileNameShort()
Definition: TEcnaRead.cc:3168
time_t GetStopTime()
Definition: TEcnaRead.cc:622
void GetReadyToReadRootFile(TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, TString)
Definition: TEcnaRead.cc:532
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
TString fFlagSubDet
Definition: TEcnaRun.h:70
TVectorD ReadStinNumbers(const Int_t &)
Definition: TEcnaRead.cc:888
Int_t GetStexStinFromIndex(const Int_t &)
Definition: TEcnaRead.cc:3176
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:67
int j
Definition: DBlmapReader.cc:9
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
TString GetStopDate()
Definition: TEcnaRead.cc:624
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
void PrintNoComment()
Definition: TEcnaRead.cc:3299
Int_t MaxCrysInStin()
TString GetRootFileName()
Definition: TEcnaRead.cc:3167
Bool_t DataExist()
Definition: TEcnaRead.cc:876
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:973
TString ResultsRootFilePath()
Int_t MaxCrysEcnaInStex()
Double_t *** ReadSampleValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:1104
Bool_t LookAtRootFile()
Definition: TEcnaRead.cc:675
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
TString fRootFileName
Definition: TEcnaRun.h:76
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:68
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
time_t GetStartTime()
Definition: TEcnaRead.cc:621
TString fRootFileNameShort
Definition: TEcnaRun.h:77
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::SampleMeans ( )

Definition at line 1513 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fMiscDiag, TEcnaHeader::fMSpCalc, fNbSampForCalc, fNumberOfEvents, fT1d_ev, fT2d_ev, fT3d_distribs, fTagMSp, i, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by TEcnaGui::Calculations(), CovariancesBetweenSamples(), Pedestals(), and SampleSigmas().

1514 {
1515 // Calculation of the expectation values over events
1516 // for the samples 0 to fNbSampForCalc and for all the StexEchas
1517 
1518  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleMeans() " << endl;}
1520  cout << " Calculation: sample expectation values over the events"
1521  << " for each channel." << endl;}
1522 
1523  //................... Allocation fT2d_ev
1524  if ( fT2d_ev == 0 ){
1525  Int_t n_samp = fNbSampForCalc;
1526  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1527  fT2d_ev = new Double_t*[n_StexEcha]; fCnew++;
1528  fT1d_ev = new Double_t[n_StexEcha*n_samp]; fCnew++;
1529  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1530  fT2d_ev[i] = &fT1d_ev[0] + i*n_samp;}
1531  }
1532  //................... init fT2d_ev to zero
1533  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1534  {
1535  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1536  {
1537  if( fT2d_ev[i0StexEcha][i0Sample] != (Double_t)0 )
1538  {fMiscDiag[1]++; fT2d_ev[i0StexEcha][i0Sample] = (Double_t)0;}
1539  }
1540  }
1541 
1542  //................... Calculation
1543  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1544  {
1545  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1546  {
1547  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1548  {
1549  fT2d_ev[i0StexEcha][i0Sample] += fT3d_distribs[i0StexEcha][i0Sample][i_event];
1550  }
1551  fT2d_ev[i0StexEcha][i0Sample] /= fNumberOfEvents;
1552  }
1553  }
1554  fTagMSp[0] = 1; fFileHeader->fMSpCalc++;
1555 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fMSpCalc
Definition: TEcnaHeader.h:53
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_ev
Definition: TEcnaRun.h:103
tuple cout
Definition: gather_cfg.py:41
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::SampleSigmas ( )

Definition at line 1563 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fMiscDiag, fNbSampForCalc, fNumberOfEvents, TEcnaHeader::fSSpCalc, fT1d_sig, fT2d_ev, fT2d_sig, fT3d_distribs, fTagMSp, fTagSSp, TEcnaParEcal::MaxCrysEcnaInStex(), SampleMeans(), and mathSSE::sqrt().

Referenced by TEcnaGui::Calculations(), and TotalNoise().

1564 {
1565 //Calculation of the sigmas of the samples for all the StexEchas
1566 
1567  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleSigmas()" << endl;}
1569  cout << " Calculation: sample ADC sigmas over the events "
1570  << " for each channel." << endl;}
1571 
1572  //... preliminary calculation of the expectation values if not done yet.
1573  // The tag is set to 1 after call to the method. It is reset to 0
1574  // because the expectation values must not be written in the result ROOT file
1575  // (since the tag was equal to 0)
1576  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1577 
1578  //................... Allocation fT2d_sig
1579  if( fT2d_sig == 0){
1580  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1581  Int_t n_samp = fNbSampForCalc;
1582  fT2d_sig = new Double_t*[n_StexEcha]; fCnew++;
1583  fT1d_sig = new Double_t[n_StexEcha*n_samp]; fCnew++;
1584  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
1585  fT2d_sig[i0StexEcha] = &fT1d_sig[0] + i0StexEcha*n_samp;}
1586  }
1587  // ................... init fT2d_sig to zero
1588  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1589  {
1590  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1591  {
1592  if( fT2d_sig[i0StexEcha][i0Sample] != (Double_t)0 )
1593  {fMiscDiag[2]++; fT2d_sig[i0StexEcha][i0Sample] = (Double_t)0;}
1594  }
1595  }
1596 
1597  //................... Calculation
1598  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1599  {
1600  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1601  {
1602  Double_t variance = (Double_t)0.;
1603  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1604  {
1605  Double_t ecart = fT3d_distribs[i0StexEcha][i0Sample][i_event] - fT2d_ev[i0StexEcha][i0Sample];
1606  variance += ecart*ecart;
1607  }
1608  variance /= fNumberOfEvents;
1609  fT2d_sig[i0StexEcha][i0Sample] = sqrt(variance);
1610  }
1611  }
1612  fTagSSp[0] = 1; fFileHeader->fSSpCalc++;
1613 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fSSpCalc
Definition: TEcnaHeader.h:54
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t ** fT2d_sig
Definition: TEcnaRun.h:106
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
T sqrt(T t)
Definition: SSEVec.h:28
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fNumberOfEvents
Definition: TEcnaRun.h:88
void SampleMeans()
Definition: TEcnaRun.cc:1513
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
Double_t * fT1d_sig
Definition: TEcnaRun.h:107
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::SampleValues ( )

Definition at line 1448 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaHeader::fAdcEvtCalc, fCodePrintAllComments, fEcal, fFileHeader, fFlagPrint, fTagAdcEvt, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by EcnaAnalyzer::analyze(), and EcnaAnalyzer::~EcnaAnalyzer().

1449 {
1450 //3D histo of the sample ADC values for all the triples (StexEcha, sample, event)
1451 
1453  cout << "*TEcnaRun::SampleValues()>"
1454  << " Sample ADC values 3D histo"
1455  << " (channel, sample, event number):" << endl
1456  << " registration for writing in results .root file."
1457  << endl;}
1458 
1459  // The histo is already in fT3d_distribs[][][]
1460  // this method sets the "Tag", increment the "Calc" (and must be kept for that)
1461 
1462  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1463  {fTagAdcEvt[i0StexEcha] = 1; fFileHeader->fAdcEvtCalc++;}
1464 }
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:52
Int_t MaxCrysEcnaInStex()
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
tuple cout
Definition: gather_cfg.py:41
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::SetEcalSubDetector ( const TString  SubDet)

Definition at line 498 of file TEcnaRun.cc.

References fCnaParCout, fCnaParPaths, fCnaWrite, fEcal, fEcalNumbering, fFlagSubDet, fgMaxCar, fStexName, and fStinName.

Referenced by TEcnaRun().

499 {
500  // Set Subdetector (EB or EE)
501 
502  Int_t MaxCar = fgMaxCar;
503  fFlagSubDet.Resize(MaxCar);
504  fFlagSubDet = SubDet.Data();
505 
506  fEcal = 0; fEcal = new TEcnaParEcal(fFlagSubDet.Data()); //fCnew++;
507  fEcalNumbering = 0; fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); //fCnew++;
508  fCnaWrite = 0;
509  fCnaWrite =
511 
512  if( fFlagSubDet == "EB" ){fStexName = "SM "; fStinName = "tower";}
513  if( fFlagSubDet == "EE" ){fStexName = "Dee"; fStinName = " SC ";}
514 }
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:66
TString fStexName
Definition: TEcnaRun.h:71
TString fFlagSubDet
Definition: TEcnaRun.h:70
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:67
Int_t fgMaxCar
Definition: TEcnaRun.h:50
TString fStinName
Definition: TEcnaRun.h:71
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:68
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:65
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::SigmaOfCorrelationsBetweenSamples ( )

Definition at line 2043 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fMiscDiag, fNbSampForCalc, TEcnaHeader::fSigCorssCalc, fT1d_ev_cor_ss, fT1d_sig_cor_ss, fT3d_cor_ss, fTagMeanCorss, fTagSigCorss, i, TEcnaParEcal::MaxCrysEcnaInStex(), MeanOfCorrelationsBetweenSamples(), and mathSSE::sqrt().

Referenced by AveragedSigmaOfCorrelationsBetweenSamples(), and TEcnaGui::Calculations().

2044 {
2045  //Calculation of the sigmas of the (sample,sample) correlations for all the StexEchas
2046 
2047  //... preliminary calculation of the mean of cor(s,s') if not done yet
2048  // (test only the first element since the cor are computed globaly)
2049  // Results available in array fT1d_ev_cor_ss[i0StexEcha]
2051 
2052  //................... Allocations sig_cor_ss + init to zero
2053  if( fT1d_sig_cor_ss == 0 ){
2054  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2055  fT1d_sig_cor_ss = new Double_t[n_StexEcha]; fCnew++;
2056  }
2057  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2058  {
2059  if( fT1d_sig_cor_ss[i0StexEcha] != (Double_t)0 )
2060  {fMiscDiag[16]++; fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;}
2061  }
2062 
2063  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << endl;}
2065  cout << " Calculation of the sigmas of the (sample,sample)" << endl
2066  << " correlations for all the channels." << endl;}
2067 
2068  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
2069  // (half of them minus the diagonal)
2070  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
2071 
2072  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
2073 
2074  //.................. Calculation
2075  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2076  {
2077  //..................... half_cor_ss() array filling
2078  Int_t i_count = 0;
2079  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
2080  {
2081  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
2082  {
2083  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
2084  i_count++;
2085  }
2086  }
2087 
2088  //...................... sigma of cor(s,s') calculation
2089  Double_t var = (Double_t)0;
2090  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2091  {
2092  Double_t ecart = half_cor_ss(i_rcor) - fT1d_ev_cor_ss[i0StexEcha];
2093  var += ecart*ecart;
2094  }
2095  var /= (Double_t)ndim;
2096  fT1d_sig_cor_ss[i0StexEcha] = sqrt(var);
2097  }
2099 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:146
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
T sqrt(T t)
Definition: SSEVec.h:28
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
void MeanOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1980
Int_t fCnew
Definition: TEcnaRun.h:54
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:72
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::StartStopDate ( TString  c_startdate,
TString  c_stopdate 
)

Definition at line 1427 of file TEcnaRun.cc.

References fFileHeader, TEcnaHeader::fStartDate, and TEcnaHeader::fStopDate.

Referenced by EcnaAnalyzer::analyze(), and EcnaAnalyzer::~EcnaAnalyzer().

1428 {
1429 // Put the start an stop date (if they exist) in fFileHeader class attributes.
1430 
1431  fFileHeader->fStartDate = c_startdate;
1432  fFileHeader->fStopDate = c_stopdate;
1433 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
TString fStopDate
Definition: TEcnaHeader.h:44
TString fStartDate
Definition: TEcnaHeader.h:43
void TEcnaRun::StartStopTime ( time_t  t_startime,
time_t  t_stoptime 
)

Definition at line 1419 of file TEcnaRun.cc.

References fFileHeader, TEcnaHeader::fStartTime, and TEcnaHeader::fStopTime.

Referenced by EcnaAnalyzer::analyze(), and EcnaAnalyzer::~EcnaAnalyzer().

1420 {
1421 // Put the start an stop time (if they exist) in fFileHeader class attributes.
1422 
1423  fFileHeader->fStartTime = t_startime;
1424  fFileHeader->fStopTime = t_stoptime;
1425 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
time_t fStartTime
Definition: TEcnaHeader.h:41
time_t fStopTime
Definition: TEcnaHeader.h:42
void TEcnaRun::TotalNoise ( )

Definition at line 1798 of file TEcnaRun.cc.

References gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, fMiscDiag, fNbSampForCalc, fT1d_evsamp_of_sigevt, fT2d_sig, fTagSSp, fTagTno, TEcnaHeader::fTnoCalc, fTTBELL, TEcnaParEcal::MaxCrysEcnaInStex(), and SampleSigmas().

Referenced by AveragedTotalNoise(), and TEcnaGui::Calculations().

1799 {
1800 // Calculation, for each channel, of the expectation values
1801 // (over the samples 0 to fNbSampForCalc-1) of the sigmas
1802 // (over the events)
1803 
1804  //... preliminary calculation of the sigmas if not done yet
1805  if ( fTagSSp[0] != 1 ){SampleSigmas(); fTagSSp[0]=0;}
1806 
1807  //................... Allocation ev_ev + init to zero (mandatory)
1808  if( fT1d_evsamp_of_sigevt == 0 ){fT1d_evsamp_of_sigevt = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1809  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1810  {if( fT1d_evsamp_of_sigevt[i0StexEcha] != (Double_t)0 )
1811  {fMiscDiag[12]++; fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;}}
1812 
1813  //..................... Calculation
1814  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::TotalNoise()" << endl;}
1816  cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1817  << fNbSampForCalc << ")" << endl
1818  << " of the ADC expectation values (over the events)." << endl;}
1819 
1820  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1821  {
1822  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1823  {
1824  if( fT2d_sig[i0StexEcha][i0Sample] < 0)
1825  {
1826  cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!"
1827  << fTTBELL << endl;
1828  }
1829  else
1830  {
1831  fT1d_evsamp_of_sigevt[i0StexEcha] += fT2d_sig[i0StexEcha][i0Sample];
1832  }
1833  }
1834  fT1d_evsamp_of_sigevt[i0StexEcha] /= fNbSampForCalc;
1835  }
1836  fTagTno[0] = 1; fFileHeader->fTnoCalc++;
1837 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t * fMiscDiag
Definition: TEcnaRun.h:59
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Double_t ** fT2d_sig
Definition: TEcnaRun.h:106
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Int_t * fTagTno
Definition: TEcnaRun.h:127
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fCnew
Definition: TEcnaRun.h:54
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:126
void SampleSigmas()
Definition: TEcnaRun.cc:1563
Int_t fTnoCalc
Definition: TEcnaHeader.h:68
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:41
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAdcEvt ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4179 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TEcnaHeader::fReqNbOfEvts, fT3d_distribs, fTagAdcEvt, and gCnaRootFile.

Referenced by WriteRootFile().

4180 {
4181  if (fTagAdcEvt[user_StexEcha] == 1 )
4182  {
4183  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4184  {
4185  //...................... all the bins set to zero
4186  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4187  {
4188  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) = (Double_t)0.;
4189  }
4190  //...................... fill the non-zero bins
4191  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4192  {
4193  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) =
4194  fT3d_distribs[user_StexEcha][i0Sample][j_bin];
4195  }
4196  }
4197  }
4198 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Double_t *** fT3d_distribs
Definition: TEcnaRun.h:90
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
void TEcnaRun::TRootAvEvCorss ( )

Definition at line 4605 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_ev_corss, fTagAvMeanCorss, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4606 {
4607  if (fTagAvMeanCorss[0] == 1 ) // test 1st elt only since global calc
4608  {
4609  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4610  {
4611  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4612  fT1d_av_ev_corss[j0StexStinEcna];
4613  }
4614  }
4615 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:133
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAvHfn ( )

Definition at line 4327 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_hifn, fTagAvHfn, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4328 {
4329  if (fTagAvHfn[0] == 1 )
4330  {
4331  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4332  {
4333  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4334  fT1d_av_hifn[j0StexStinEcna];
4335  }
4336  }
4337 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:143
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAvLfn ( )

Definition at line 4309 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_lofn, fTagAvLfn, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4310 {
4311  if (fTagAvLfn[0] == 1 )
4312  {
4313  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4314  {
4315  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4316  fT1d_av_lofn[j0StexStinEcna];
4317  }
4318  }
4319 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:138
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAvPed ( )

Definition at line 4586 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_mped, fTagAvPed, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4587 {
4588  if (fTagAvPed[0] == 1 )
4589  {
4590  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4591  {
4592  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4593  fT1d_av_mped[j0StexStinEcna];
4594  }
4595  }
4596 }
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:123
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAvSigCorss ( )

Definition at line 4624 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_sig_corss, fTagAvSigCorss, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4625 {
4626  if (fTagAvSigCorss[0] == 1 ) // test 1st elt only since global calc
4627  {
4628  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4629  {
4630  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4631  fT1d_av_sig_corss[j0StexStinEcna];
4632  }
4633  }
4634 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:148
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootAvTno ( )

Definition at line 4292 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_av_totn, fTagAvTno, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4293 {
4294  if (fTagAvTno[0] == 1 )
4295  {
4296  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4297  {
4298  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4299  fT1d_av_totn[j0StexStinEcna];
4300  }
4301  }
4302 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:128
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootCorCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4451 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fT3d_cor_ss, fTagCorCss, and gCnaRootFile.

Referenced by WriteRootFile().

4452 {
4453  if (fTagCorCss[user_StexEcha] == 1 )
4454  {
4455  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4456  {
4457  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4458  {
4459  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4460  fT3d_cor_ss[user_StexEcha][i0Sample][j0Sample];
4461  }
4462  }
4463  }
4464 }
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:115
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
void TEcnaRun::TRootCovCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4430 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fT3d_cov_ss, fTagCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

4431 {
4432  if (fTagCovCss[user_StexEcha] == 1 )
4433  {
4434  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4435  {
4436  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4437  {
4438  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4439  fT3d_cov_ss[user_StexEcha][i0Sample][j0Sample];
4440  }
4441  }
4442  }
4443 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:110
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
void TEcnaRun::TRootHFccMoStins ( )

Definition at line 4271 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_hfcc_mostins, fTagHFccMoStins, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4272 {
4273  if (fTagHFccMoStins[0] == 1 )
4274  {
4275  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4276  {
4277  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4278  {
4279  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4280  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4281  }
4282  }
4283  }
4284 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:174
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootHfCor ( )

Definition at line 4408 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_hf_cor, fTagHfCor, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4409 {
4410  if (fTagHfCor[0] == 1 )
4411  {
4412  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4413  {
4414  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4415  {
4416  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4417  fT2d_hf_cor[i0StexEcha][j0StexEcha];
4418  }
4419  }
4420  }
4421 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:165
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootHfCov ( )

Definition at line 4387 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_hf_cov, fTagHfCov, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4388 {
4389  if (fTagHfCov[0] == 1 )
4390  {
4391  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4392  {
4393  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4394  {
4395  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4396  fT2d_hf_cov[i0StexEcha][j0StexEcha];
4397  }
4398  }
4399  }
4400 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:161
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootHfn ( )

Definition at line 4548 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_evevt_of_sigsamp, fTagHfn, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4549 {
4550  if (fTagHfn[0] == 1 )
4551  {
4552  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4553  {
4554  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4555  fT1d_evevt_of_sigsamp[j0StexEcha];
4556  }
4557  }
4558 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagHfn
Definition: TEcnaRun.h:142
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:141
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootLFccMoStins ( )

Definition at line 4249 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_lfcc_mostins, fTagLFccMoStins, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4250 {
4251  if (fTagLFccMoStins[0] == 1 )
4252  {
4253  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4254  {
4255  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4256  {
4257  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4258  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4259  }
4260  }
4261  }
4262 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:170
void TEcnaRun::TRootLfCor ( )

Definition at line 4366 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_lf_cor, fTagLfCor, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4367 {
4368  if (fTagLfCor[0] == 1 )
4369  {
4370  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4371  {
4372  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4373  {
4374  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4375  fT2d_lf_cor[i0StexEcha][j0StexEcha];
4376  }
4377  }
4378  }
4379 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:156
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootLfCov ( )

Definition at line 4345 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_lf_cov, fTagLfCov, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4346 {
4347  if (fTagLfCov[0] == 1 )
4348  {
4349  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4350  {
4351  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4352  {
4353  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4354  fT2d_lf_cov[i0StexEcha][j0StexEcha];
4355  }
4356  }
4357  }
4358 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:152
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootLfn ( )

Definition at line 4529 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_sigevt_of_evsamp, fTagLfn, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4530 {
4531  if (fTagLfn[0] == 1 )
4532  {
4533  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4534  {
4535  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4536  fT1d_sigevt_of_evsamp[j0StexEcha];
4537  }
4538  }
4539 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:136
Int_t * fTagLfn
Definition: TEcnaRun.h:137
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootMeanCorss ( )

Definition at line 4510 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_ev_cor_ss, fTagMeanCorss, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4511 {
4512  if (fTagMeanCorss[0] == 1 )
4513  {
4514  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4515  {
4516  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4517  fT1d_ev_cor_ss[j0StexEcha];
4518  }
4519  }
4520 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:131
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootMSp ( const Int_t &  argNbSampWrite)

Definition at line 4206 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_ev, fTagMSp, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4207 {
4208  if (fTagMSp[0] == 1 )
4209  {
4210  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4211  {
4212  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4213  {
4214  gCnaRootFile->fCnaIndivResult->fMatHis( j0StexEcha, i0Sample) =
4215  fT2d_ev[j0StexEcha][i0Sample];
4216  }
4217  }
4218  }
4219 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t ** fT2d_ev
Definition: TEcnaRun.h:102
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootNbOfEvts ( const Int_t &  argNbSampWrite)

Definition at line 4158 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_NbOfEvts, fTagNbOfEvts, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4159 {
4160  if (fTagNbOfEvts[0] == 1 )
4161  {
4162  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4163  {
4164  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4165  {
4166  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4167  fT2d_NbOfEvts[j0StexEcha][i0Sample];
4168  }
4169  }
4170  }
4171 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootPed ( )

Definition at line 4473 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_ev_ev, fTagPed, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4474 {
4475  if (fTagPed[0] == 1 )
4476  {
4477  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4478  {
4479  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4480  fT1d_ev_ev[j0StexEcha];
4481  }
4482  }
4483 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagPed
Definition: TEcnaRun.h:122
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:121
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootSigCorss ( )

Definition at line 4567 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_sig_cor_ss, fTagSigCorss, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4568 {
4569  if (fTagSigCorss[0] == 1 )
4570  {
4571  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4572  {
4573  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4574  fT1d_sig_cor_ss[j0StexEcha];
4575  }
4576  }
4577 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:146
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootSSp ( const Int_t &  argNbSampWrite)

Definition at line 4227 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT2d_sig, fTagSSp, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4228 {
4229  if (fTagSSp[0] == 1 )
4230  {
4231  for (Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4232  {
4233  for (Int_t i0Sample=0; i0Sample<argNbSampWrite; i0Sample++)
4234  {
4235  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4236  fT2d_sig[j0StexEcha][i0Sample];
4237  }
4238  }
4239  }
4240 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Double_t ** fT2d_sig
Definition: TEcnaRun.h:106
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootStinNumbers ( )

Definition at line 4140 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_StexStinFromIndex, fTagStinNumbers, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4141 {
4142  if (fTagStinNumbers[0] == 1 )
4143  {
4144  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4145  {
4146  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4147  fT1d_StexStinFromIndex[j0StexStinEcna];
4148  }
4149  }
4150 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
Int_t MaxStinEcnaInStex()
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:99
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TEcnaRun::TRootTno ( )

Definition at line 4491 of file TEcnaRun.cc.

References TCnaRootFile::fCnaIndivResult, fEcal, fT1d_evsamp_of_sigevt, fTagTno, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4492 {
4493  if (fTagTno[0] == 1 )
4494  {
4495  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4496  {
4497  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4498  fT1d_evsamp_of_sigevt[j0StexEcha];
4499  }
4500  }
4501 }
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t * fTagTno
Definition: TEcnaRun.h:127
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:126
Int_t MaxCrysEcnaInStex()
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::WriteNewRootFile ( const TString  TypAna)

Definition at line 3184 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaWrite, fCodePrintAllComments, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagPrint, TEcnaHeader::fLastReqEvtNumber, TEcnaWrite::fMakeResultsFileName(), fNbSampForCalc, fNewRootFileName, fNewRootFileNameShort, TEcnaHeader::fReqNbOfEvts, TEcnaHeader::fRunNumber, TEcnaHeader::fStartDate, TEcnaHeader::fStartTime, TEcnaHeader::fStex, TEcnaHeader::fStopDate, TEcnaHeader::fStopTime, TEcnaWrite::GetRootFileName(), TEcnaWrite::GetRootFileNameShort(), TEcnaWrite::RegisterFileParameters(), and WriteRootFile().

Referenced by TEcnaGui::Calculations().

3184  {
3185 //Write a new Root file. File name automatically generated in fMakeResultsFileName.
3186  Bool_t ok_write = kFALSE;
3187 
3193 
3194  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
3197 
3198  // const Text_t *FileShortName = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3199  const Text_t *FileShortName = (const Text_t *)fNewRootFileNameShort.Data();
3200 
3202  cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << endl
3203  << " " << fNewRootFileNameShort.Data() << endl;}
3204 
3205  ok_write = WriteRootFile(FileShortName, fNbSampForCalc);
3206 
3207  return ok_write;
3208 }
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
TString fStopDate
Definition: TEcnaHeader.h:44
void RegisterFileParameters(const TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString, const TString, const time_t, const time_t)
Definition: TEcnaWrite.cc:446
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3127
Int_t fNbSampForCalc
Definition: TEcnaRun.h:86
Int_t fFlagPrint
Definition: TEcnaRun.h:185
TString fStartDate
Definition: TEcnaHeader.h:43
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:36
TString fNewRootFileNameShort
Definition: TEcnaRun.h:79
time_t fStartTime
Definition: TEcnaHeader.h:41
time_t fStopTime
Definition: TEcnaHeader.h:42
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:37
tuple cout
Definition: gather_cfg.py:41
Int_t fRunNumber
Definition: TEcnaHeader.h:35
TString GetRootFileNameShort()
Definition: TEcnaWrite.cc:270
TString fNewRootFileName
Definition: TEcnaRun.h:78
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:476
TString GetRootFileName()
Definition: TEcnaWrite.cc:269
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:68
Bool_t TEcnaRun::WriteRootFile ( )

Definition at line 3127 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaWrite, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagPrint, TEcnaHeader::fLastReqEvtNumber, TEcnaWrite::fMakeResultsFileName(), TEcnaHeader::fNbOfSamples, TEcnaHeader::fReqNbOfEvts, TEcnaWrite::fRootFileName, TEcnaWrite::fRootFileNameShort, TEcnaHeader::fRunNumber, TEcnaHeader::fStex, fT2d_NbOfEvts, fTTBELL, TEcnaHeader::fTypAna, TEcnaParEcal::MaxCrysEcnaInStex(), and TEcnaWrite::RegisterFileParameters().

Referenced by WriteNewRootFile().

3127  {
3128 //Write the Root file. File name automatically generated in fMakeResultsFileName.
3129  Bool_t ok_write = kFALSE;
3130 
3135 
3136  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
3137 
3138  const Text_t *FileShortName = (const Text_t *)fCnaWrite->fRootFileNameShort.Data();
3139 
3140  //============================= check number of found events
3141  Int_t nCountEvts = 0;
3142 
3143  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
3144  {for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
3145  {nCountEvts += fT2d_NbOfEvts[i0StexEcha][i0Sample];}}
3146 
3147  if ( nCountEvts <= 0 )
3148  {
3149  //============== no write if no event found
3150  cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->fRootFileNameShort.Data()
3151  << ". File will not be written." << endl;
3152  ok_write = kTRUE;
3153  }
3154  else
3155  {
3157  cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << endl
3158  << " " << fCnaWrite->fRootFileName.Data() << endl;}
3159 
3160  ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples);
3161 
3162  if( ok_write == kTRUE )
3163  {
3165  {cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->fRootFileNameShort.Data()
3166  << endl;}
3167  }
3168  else
3169  {
3170  cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->fRootFileNameShort.Data()
3171  << fTTBELL << endl;
3172  }
3173  }
3174  return ok_write;
3175 } // end of WriteRootFile()
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:186
Int_t fStex
Definition: TEcnaHeader.h:39
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
Int_t fNbOfSamples
Definition: TEcnaHeader.h:34
TString fRootFileNameShort
Definition: TEcnaWrite.h:138
void RegisterFileParameters(const TString, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString, const TString, const time_t, const time_t)
Definition: TEcnaWrite.cc:446
TString fRootFileName
Definition: TEcnaWrite.h:139
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3127
Int_t fFlagPrint
Definition: TEcnaRun.h:185
TString fTypAna
Definition: TEcnaHeader.h:33
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:36
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:37
tuple cout
Definition: gather_cfg.py:41
Int_t fRunNumber
Definition: TEcnaHeader.h:35
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:476
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:95
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:68
TString fTTBELL
Definition: TEcnaRun.h:57
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
Bool_t TEcnaRun::WriteRootFile ( const Text_t *  name,
Int_t &  argNbSampWrite 
)

Definition at line 3224 of file TEcnaRun.cc.

References CloseRootFile(), gather_cfg::cout, cTypAdcEvt, cTypAvHfn, cTypAvLfn, cTypAvMeanCorss, cTypAvPed, cTypAvSigCorss, cTypAvTno, cTypCorCss, cTypCovCss, cTypHFccMoStins, cTypHfCor, cTypHfCov, cTypHfn, cTypLFccMoStins, cTypLfCor, cTypLfCov, cTypLfn, cTypMeanCorss, cTypMSp, cTypNbOfEvts, cTypNumbers, cTypPed, cTypSigCorss, cTypSSp, cTypTno, TEcnaHeader::fAdcEvtCalc, TEcnaHeader::fAvHfnCalc, TEcnaHeader::fAvLfnCalc, TEcnaHeader::fAvMeanCorssCalc, TEcnaHeader::fAvPedCalc, TEcnaHeader::fAvSigCorssCalc, TEcnaHeader::fAvTnoCalc, TCnaRootFile::fCnaIndivResult, fCnaParPaths, TCnaRootFile::fCnaResultsTree, fCodePrintAllComments, TEcnaHeader::fCorCssCalc, TEcnaHeader::fCovCssCalc, fEcal, fFileHeader, fFlagPrint, fgMaxCar, TEcnaHeader::fHFccMoStinsCalc, TEcnaHeader::fHfCorCalc, TEcnaHeader::fHfCovCalc, TEcnaHeader::fHfnCalc, cmsPerfSuiteHarvest::file_name, TEcnaHeader::fLFccMoStinsCalc, TEcnaHeader::fLfCorCalc, TEcnaHeader::fLfCovCalc, TEcnaHeader::fLfnCalc, TEcnaHeader::fMeanCorssCalc, TEcnaHeader::fMSpCalc, TEcnaHeader::fNbOfEvtsCalc, fOpenRootFile, TEcnaHeader::fPedCalc, TEcnaHeader::fReqNbOfEvts, TCnaRootFile::fRootFile, TEcnaHeader::fSigCorssCalc, TEcnaHeader::fSSpCalc, TEcnaHeader::fStinNumbersCalc, fTagAdcEvt, fTagAvHfn, fTagAvLfn, fTagAvMeanCorss, fTagAvPed, fTagAvSigCorss, fTagAvTno, fTagCorCss, fTagCovCss, fTagHFccMoStins, fTagHfCor, fTagHfCov, fTagHfn, fTagLFccMoStins, fTagLfCor, fTagLfCov, fTagLfn, fTagMeanCorss, fTagMSp, fTagNbOfEvts, fTagPed, fTagSigCorss, fTagSSp, fTagStinNumbers, fTagTno, TEcnaHeader::fTnoCalc, fTTBELL, gCnaRootFile, i, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxStinEcnaInStex(), mergeVDriftHistosByStation::name, OpenRootFile(), TEcnaParPaths::ResultsRootFilePath(), TRootAdcEvt(), TRootAvEvCorss(), TRootAvHfn(), TRootAvLfn(), TRootAvPed(), TRootAvSigCorss(), TRootAvTno(), TRootCorCss(), TRootCovCss(), TRootHFccMoStins(), TRootHfCor(), TRootHfCov(), TRootHfn(), TRootLFccMoStins(), TRootLfCor(), TRootLfCov(), TRootLfn(), TRootMeanCorss(), TRootMSp(), TRootNbOfEvts(), TRootPed(), TRootSigCorss(), TRootSSp(), TRootStinNumbers(), and TRootTno().

3225 {
3226 //Write the Root file
3227 
3228  const Text_t* file_name = name;
3229 
3230  Bool_t ok_open = kFALSE;
3231  Bool_t ok_write = kFALSE;
3232 
3233  if ( fOpenRootFile )
3234  {
3235  cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open."
3236  << fTTBELL << endl;
3237  }
3238  else
3239  {
3240  //..... List of the different element types and associated parameters as ordered in the ROOT file
3241  // ==========
3242  //
3243  // WARNING *** SIZES ARE THESE FOR THE BARREL (1700 Xtals) and for 10 samples ***
3244  //
3245  // Nb of Type of element Type Type Size Comment
3246  // elements Number Name
3247  //
3248  // 1 fMatHis(1,StexStin) ( 0) cTypNumbers 1*( 1, 68) = 68
3249 
3250  // 1 fMatHis(1,StexStin) (12) cTypAvPed 1*( 1, 68) = 68
3251  // 1 fMatHis(1, StexStin) ( 3) cTypAvTno 1*( 1, 68) = 68
3252  // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*( 1, 68) = 68
3253  // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*( 1, 68) = 68
3254  // 1 fMatHis(1,StexStin) (13) cTypAvMeanCorss 1*( 1, 68) = 68
3255  // 1 fMatHis(1,StexStin) (14) cTypAvSigCorss 1*( 1, 68) = 68
3256 
3257  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3258  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3259  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3260  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3261  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3262  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3263 
3264  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3265  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3266 
3267  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3268  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3269  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3270 
3271  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3272  // StexEcha fMatMat(sample, sample ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3273 
3274  // StexEcha fMatHis(sample, bin_evt) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3275 
3276  // 1 fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3277  // 1 fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3278 
3279  // 1 fMatMat(StexEcha, StexEcha) ( 6) cTypHfCov 1*(1700,1700) = 2 890 000 // (06/05/08)
3280  // 1 fMatMat(StexEcha, StexEcha) ( 7) cTypHfCor 1*(1700,1700) = 2 890 000 // (06/05/08)
3281 
3282 
3283  //......................................................................................................
3284 
3285  ok_open = OpenRootFile(file_name, "RECREATE");
3286 
3287  TString typ_name = "?";
3288  Int_t v_nb_times = 0;
3289  Int_t v_dim_one = 0;
3290  Int_t v_dim_two = 0;
3291  Int_t v_size = 0;
3292  Int_t v_tot = 0;
3293  Int_t v_tot_writ = 0;
3294 
3295  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3296  //
3297  // ===> no general method and no translation to TEcnaWrite
3298  // because the fT1d.. and fT2d... arrays
3299  // are attributes of TEcnaRun (calls to the "TRootXXXX" methods)
3300  //
3301  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3302 
3303  //-------------------------- Stin numbers
3304  // 1 fMatHis(1,Stin) ( 0) cTypNumbers 1*( 1, 68) = 68
3305 
3306  Int_t MaxCar = fgMaxCar;
3307  typ_name.Resize(MaxCar);
3308  typ_name = "StinNumbers";
3309  v_nb_times = fFileHeader->fStinNumbersCalc;
3310  v_dim_one = 1;
3311  v_dim_two = fEcal->MaxStinEcnaInStex();
3312  v_size = v_nb_times*v_dim_one*v_dim_two;
3313  v_tot += v_size;
3314 
3316  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3317  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3318  << setw(9) << v_size;}
3319 
3320  for (Int_t i = 0; i < v_nb_times; i++)
3321  {
3322  if ( fTagStinNumbers[0] == 1 )
3323  {
3324  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypNumbers;
3325  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3326  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3327  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3328  TRootStinNumbers();
3329  gCnaRootFile->fCnaResultsTree->Fill();
3330  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3331  }
3332  }
3333  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3334 
3335  //-------------------------- Averaged Pedestals (1 value per Stin)
3336  // 1 fMatHis(1, StexStin) (12) cTypAvPed 1*(1, 68) = 68
3337 
3338  MaxCar = fgMaxCar;
3339  typ_name.Resize(MaxCar);
3340  typ_name = "AvPed";
3341  v_nb_times = fFileHeader->fAvPedCalc;
3342  v_dim_one = 1;
3343  v_dim_two = fEcal->MaxStinEcnaInStex();
3344  v_size = v_nb_times*v_dim_one*v_dim_two;
3345  v_tot += v_size;
3346 
3348  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3349  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3350  << setw(9) << v_size;}
3351 
3352  for (Int_t i = 0; i < v_nb_times; i++)
3353  {
3354  if ( fTagAvPed[0] == 1 )
3355  {
3356  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvPed;
3357  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3358  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3359  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3360  TRootAvPed();
3361  gCnaRootFile->fCnaResultsTree->Fill();
3362  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3363  }
3364  }
3365  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3366 
3367  //-------------------------- Averaged Total noise
3368  // StexEcha fMatHis(1, StexStin) ( 3) cTypAvTno 1*(1, 68) = 68
3369 
3370  MaxCar = fgMaxCar;
3371  typ_name.Resize(MaxCar);
3372  typ_name = "AvTno";
3373  v_nb_times = fFileHeader->fAvTnoCalc;
3374  v_dim_one = 1;
3375  v_dim_two = fEcal->MaxStinEcnaInStex();
3376  v_size = v_nb_times*v_dim_one*v_dim_two;
3377  v_tot += v_size;
3378 
3380  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3381  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3382  << setw(9) << v_size;}
3383 
3384  for (Int_t i = 0; i < v_nb_times; i++)
3385  {
3386  if ( fTagAvTno[0] == 1 )
3387  {
3388  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvTno;
3389  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3390  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3391  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3392  TRootAvTno();
3393  gCnaRootFile->fCnaResultsTree->Fill();
3394  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3395  }
3396  }
3397  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3398 
3399  //-------------------------- Averaged Low frequency noise
3400  // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*(1, 68) = 68
3401 
3402  MaxCar = fgMaxCar;
3403  typ_name.Resize(MaxCar);
3404  typ_name = "AvLfn";
3405  v_nb_times = fFileHeader->fAvLfnCalc;
3406  v_dim_one = 1;
3407  v_dim_two = fEcal->MaxStinEcnaInStex();
3408  v_size = v_nb_times*v_dim_one*v_dim_two;
3409  v_tot += v_size;
3410 
3412  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3413  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3414  << setw(9) << v_size;}
3415 
3416  for (Int_t i = 0; i < v_nb_times; i++)
3417  {
3418  if ( fTagAvLfn[0] == 1 )
3419  {
3420  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvLfn;
3421  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3422  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3423  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3424  TRootAvLfn();
3425  gCnaRootFile->fCnaResultsTree->Fill();
3426  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3427  }
3428  }
3429  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3430 
3431  //-------------------------- Averaged High frequency noise
3432  // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*(1, 68) = 68
3433 
3434  MaxCar = fgMaxCar;
3435  typ_name.Resize(MaxCar);
3436  typ_name = "AvHfn";
3437  v_nb_times = fFileHeader->fAvHfnCalc;
3438  v_dim_one = 1;
3439  v_dim_two = fEcal->MaxStinEcnaInStex();
3440  v_size = v_nb_times*v_dim_one*v_dim_two;
3441  v_tot += v_size;
3442 
3444  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3445  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3446  << setw(9) << v_size;}
3447 
3448  for (Int_t i = 0; i < v_nb_times; i++)
3449  {
3450  if ( fTagAvHfn[0] == 1 )
3451  {
3452  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvHfn;
3453  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3454  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3455  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3456  TRootAvHfn();
3457  gCnaRootFile->fCnaResultsTree->Fill();
3458  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3459  }
3460  }
3461  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3462 
3463  //-------------------------- Averaged mean of cor(s,s)
3464  // 1 fMatHis(1, StexStin) (13) cTypAvMeanCorss 1*(1, 68) = 68
3465 
3466  MaxCar = fgMaxCar;
3467  typ_name.Resize(MaxCar);
3468  typ_name = "AvMeanCorss";
3469  v_nb_times = fFileHeader->fAvMeanCorssCalc;
3470  v_dim_one = 1;
3471  v_dim_two = fEcal->MaxStinEcnaInStex();
3472  v_size = v_nb_times*v_dim_one*v_dim_two;
3473  v_tot += v_size;
3474 
3476  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3477  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3478  << setw(9) << v_size;}
3479 
3480  for (Int_t i = 0; i < v_nb_times; i++)
3481  {
3482  if ( fTagAvMeanCorss[0] == 1 )
3483  {
3484  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvMeanCorss;
3485  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3486  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3487  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3488  TRootAvEvCorss();
3489  gCnaRootFile->fCnaResultsTree->Fill();
3490  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3491  }
3492  }
3493  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3494 
3495  //-------------------------- Averaged sigma of cor(s,s)
3496  // 1 fMatHis(1, StexStin) (14) cTypAvSigCorss 1*(1, 68) = 68
3497 
3498  MaxCar = fgMaxCar;
3499  typ_name.Resize(MaxCar);
3500  typ_name = "AvSigCorss";
3501  v_nb_times = fFileHeader->fAvSigCorssCalc;
3502  v_dim_one = 1;
3503  v_dim_two = fEcal->MaxStinEcnaInStex();
3504  v_size = v_nb_times*v_dim_one*v_dim_two;
3505  v_tot += v_size;
3506 
3508  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3509  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3510  << setw(9) << v_size;}
3511 
3512  for (Int_t i = 0; i < v_nb_times; i++)
3513  {
3514  if ( fTagAvSigCorss[0] == 1 )
3515  {
3516  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAvSigCorss;
3517  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3518  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3519  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3520  TRootAvSigCorss();
3521  gCnaRootFile->fCnaResultsTree->Fill();
3522  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3523  }
3524  }
3525  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3526 
3527  //-------------------------- Expectation values of the expectation values of the samples (pedestals)
3528  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3529 
3530  MaxCar = fgMaxCar;
3531  typ_name.Resize(MaxCar);
3532  typ_name = "Ped";
3533  v_nb_times = fFileHeader->fPedCalc;
3534  v_dim_one = 1;
3535  v_dim_two = fEcal->MaxCrysEcnaInStex();
3536  v_size = v_nb_times*v_dim_one*v_dim_two;
3537  v_tot += v_size;
3538 
3540  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3541  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3542  << setw(9) << v_size;}
3543 
3544  for (Int_t i = 0; i < v_nb_times; i++)
3545  {
3546  if ( fTagPed[0] == 1 )
3547  {
3548  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypPed;
3549  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3550  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3551  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3552  TRootPed();
3553  gCnaRootFile->fCnaResultsTree->Fill();
3554  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3555  }
3556  }
3557  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3558 
3559  //-------------------------- Expectation values of the sigmas the samples
3560  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3561 
3562  MaxCar = fgMaxCar;
3563  typ_name.Resize(MaxCar);
3564  typ_name = "Tno";
3565  v_nb_times = fFileHeader->fTnoCalc;
3566  v_dim_one = 1;
3567  v_dim_two = fEcal->MaxCrysEcnaInStex();
3568  v_size = v_nb_times*v_dim_one*v_dim_two;
3569  v_tot += v_size;
3570 
3572  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3573  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3574  << setw(9) << v_size;}
3575 
3576  for (Int_t i = 0; i < v_nb_times; i++)
3577  {
3578  if ( fTagTno[0] == 1 )
3579  {
3580  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypTno;
3581  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3582  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3583  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3584  TRootTno();
3585  gCnaRootFile->fCnaResultsTree->Fill();
3586  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3587  }
3588  }
3589  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3590 
3591  //-------------------------- Expectation values of the correlations between the samples
3592  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3593 
3594  MaxCar = fgMaxCar;
3595  typ_name.Resize(MaxCar);
3596  typ_name = "MeanCorss";
3597  v_nb_times = fFileHeader->fMeanCorssCalc;
3598  v_dim_one = 1;
3599  v_dim_two = fEcal->MaxCrysEcnaInStex();
3600  v_size = v_nb_times*v_dim_one*v_dim_two;
3601  v_tot += v_size;
3602 
3604  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3605  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3606  << setw(9) << v_size;}
3607 
3608  for (Int_t i = 0; i < v_nb_times; i++)
3609  {
3610  if ( fTagMeanCorss[0] == 1 )
3611  {
3612  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypMeanCorss;
3613  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3614  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3615  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3616  TRootMeanCorss();
3617  gCnaRootFile->fCnaResultsTree->Fill();
3618  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3619  }
3620  }
3621  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3622 
3623  //-------------------------- Sigmas of the expectation values of the samples
3624  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3625 
3626  MaxCar = fgMaxCar;
3627  typ_name.Resize(MaxCar);
3628  typ_name = "Lfn";
3629  v_nb_times = fFileHeader->fLfnCalc;
3630  v_dim_one = 1;
3631  v_dim_two = fEcal->MaxCrysEcnaInStex();
3632  v_size = v_nb_times*v_dim_one*v_dim_two;
3633  v_tot += v_size;
3634 
3636  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3637  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3638  << setw(9) << v_size;}
3639 
3640  for (Int_t i = 0; i < v_nb_times; i++)
3641  {
3642  if ( fTagLfn[0] == 1 )
3643  {
3644  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypLfn;
3645  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3646  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3647  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3648  TRootLfn();
3649  gCnaRootFile->fCnaResultsTree->Fill();
3650  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3651  }
3652  }
3653  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3654 
3655  //-------------------------- Sigmas of the sigmas of the samples
3656  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3657 
3658  MaxCar = fgMaxCar;
3659  typ_name.Resize(MaxCar);
3660  typ_name = "Hfn";
3661  v_nb_times = fFileHeader->fHfnCalc;
3662  v_dim_one = 1;
3663  v_dim_two = fEcal->MaxCrysEcnaInStex();
3664  v_size = v_nb_times*v_dim_one*v_dim_two;
3665  v_tot += v_size;
3666 
3668  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3669  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3670  << setw(9) << v_size;}
3671 
3672  for (Int_t i = 0; i < v_nb_times; i++)
3673  {
3674  if ( fTagHfn[0] == 1 )
3675  {
3676  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypHfn;
3677  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3678  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3679  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3680  TRootHfn();
3681  gCnaRootFile->fCnaResultsTree->Fill();
3682  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3683  }
3684  }
3685  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3686 
3687  //-------------------------- Sigmas of the correlations between the samples
3688  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3689 
3690  MaxCar = fgMaxCar;
3691  typ_name.Resize(MaxCar);
3692  typ_name = "SigCorss";
3693  v_nb_times = fFileHeader->fSigCorssCalc;
3694  v_dim_one = 1;
3695  v_dim_two = fEcal->MaxCrysEcnaInStex();
3696  v_size = v_nb_times*v_dim_one*v_dim_two;
3697  v_tot += v_size;
3698 
3700  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3701  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3702  << setw(9) << v_size;}
3703 
3704  for (Int_t i = 0; i < v_nb_times; i++)
3705  {
3706  if ( fTagSigCorss[0] == 1 )
3707  {
3708  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSigCorss;
3709  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3710  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3711  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3712  TRootSigCorss();
3713  gCnaRootFile->fCnaResultsTree->Fill();
3714  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3715  }
3716  }
3717  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3718 
3719  //----- Mean Covariances between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3720  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3721 
3722  MaxCar = fgMaxCar;
3723  typ_name.Resize(MaxCar);
3724  typ_name = "LFccMoStins";
3725  v_nb_times = fFileHeader->fLFccMoStinsCalc;
3726  v_dim_one = fEcal->MaxStinEcnaInStex();
3727  v_dim_two = fEcal->MaxStinEcnaInStex();
3728  v_size = v_nb_times*v_dim_one*v_dim_two;
3729  v_tot += v_size;
3730 
3732  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3733  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3734  << setw(9) << v_size;}
3735 
3736  for (Int_t i = 0; i < v_nb_times; i++)
3737  {
3738  if ( fTagLFccMoStins[0] == 1 )
3739  {
3740  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypLFccMoStins;
3741  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3742  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3743  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
3744  TRootLFccMoStins();
3745  gCnaRootFile->fCnaResultsTree->Fill();
3746  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3747  }
3748  }
3749  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3750 
3751  //----- Mean Correlations between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3752  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3753 
3754  MaxCar = fgMaxCar;
3755  typ_name.Resize(MaxCar);
3756  typ_name = "HFccMoStins";
3757  v_nb_times = fFileHeader->fHFccMoStinsCalc;
3758  v_dim_one = fEcal->MaxStinEcnaInStex();
3759  v_dim_two = fEcal->MaxStinEcnaInStex();
3760  v_size = v_nb_times*v_dim_one*v_dim_two;
3761  v_tot += v_size;
3762 
3764  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3765  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3766  << setw(9) << v_size;}
3767 
3768  for (Int_t i = 0; i < v_nb_times; i++)
3769  {
3770  if ( fTagHFccMoStins[0] == 1 )
3771  {
3772  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypHFccMoStins;
3773  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3774  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3775  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
3776  TRootHFccMoStins();
3777  gCnaRootFile->fCnaResultsTree->Fill();
3778  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3779  }
3780  }
3781  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3782 
3783  //-------------------------- Numbers of found events (NbOfEvts)
3784  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3785 
3786  MaxCar = fgMaxCar;
3787  typ_name.Resize(MaxCar);
3788  typ_name = "NbOfEvts";
3789  v_nb_times = fFileHeader->fNbOfEvtsCalc;
3790  v_dim_one = fEcal->MaxCrysEcnaInStex();
3791  v_dim_two = argNbSampWrite;
3792  v_size = v_nb_times*v_dim_one*v_dim_two;
3793  v_tot += v_size;
3794 
3796  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3797  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3798  << setw(9) << v_size;}
3799 
3800  for (Int_t i = 0; i < v_nb_times; i++)
3801  {
3802  if ( fTagNbOfEvts[0] == 1 )
3803  {
3804  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypNbOfEvts;
3805  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3806  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3807  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3808  TRootNbOfEvts(argNbSampWrite);
3809  gCnaRootFile->fCnaResultsTree->Fill();
3810  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3811  }
3812  }
3813  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3814 
3815  //-------------------------- Expectation values of the samples
3816  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3817 
3818  MaxCar = fgMaxCar;
3819  typ_name.Resize(MaxCar);
3820  typ_name = "MSp";
3821  v_nb_times = fFileHeader->fMSpCalc;
3822  v_dim_one = fEcal->MaxCrysEcnaInStex();
3823  v_dim_two = argNbSampWrite;
3824  v_size = v_nb_times*v_dim_one*v_dim_two;
3825  v_tot += v_size;
3826 
3828  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3829  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3830  << setw(9) << v_size;}
3831 
3832  for (Int_t i = 0; i < v_nb_times; i++)
3833  {
3834  if ( fTagMSp[0] == 1 )
3835  {
3836  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypMSp;
3837  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3838  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3839  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3840  TRootMSp(argNbSampWrite);
3841  gCnaRootFile->fCnaResultsTree->Fill();
3842  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3843  }
3844  }
3845  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3846 
3847  //-------------------------- Sigmas of the samples
3848  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3849 
3850  MaxCar = fgMaxCar;
3851  typ_name.Resize(MaxCar);
3852  typ_name = "SSp";
3853  v_nb_times = fFileHeader->fSSpCalc;
3854  v_dim_one = fEcal->MaxCrysEcnaInStex();
3855  v_dim_two = argNbSampWrite;
3856  v_size = v_nb_times*v_dim_one*v_dim_two;
3857  v_tot += v_size;
3858 
3860  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3861  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3862  << setw(9) << v_size;}
3863 
3864  for (Int_t i = 0; i < v_nb_times; i++)
3865  {
3866  if ( fTagSSp[0] == 1 )
3867  {
3868  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSSp;
3869  gCnaRootFile->fCnaIndivResult->fIthElement = i;
3870  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3871  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3872  TRootSSp(argNbSampWrite);
3873  gCnaRootFile->fCnaResultsTree->Fill();
3874  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3875  }
3876  }
3877  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3878 
3879  //-------------------------- Covariances between samples
3880 
3881  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3882 
3883  MaxCar = fgMaxCar;
3884  typ_name.Resize(MaxCar);
3885  typ_name = "CovCss";
3886  v_nb_times = fFileHeader->fCovCssCalc;
3887  v_dim_one = argNbSampWrite;
3888  v_dim_two = argNbSampWrite;
3889  v_size = v_nb_times*v_dim_one*v_dim_two;
3890  v_tot += v_size;
3891 
3893  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3894  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3895  << setw(9) << v_size;}
3896 
3897  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3898  {
3899  if ( fTagCovCss[i0StexEcha] == 1 )
3900  {
3901  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCovCss;
3902  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3903  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3904  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
3905  TRootCovCss(i0StexEcha, argNbSampWrite);
3906  gCnaRootFile->fCnaResultsTree->Fill();
3907  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3908  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3909  }
3910  }
3911  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3912 
3913  //-------------------------- Correlations between samples
3914  // StexEcha fMatMat(sample, sample) ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3915 
3916  MaxCar = fgMaxCar;
3917  typ_name.Resize(MaxCar);
3918  typ_name = "CorCss";
3919  v_nb_times = fFileHeader->fCorCssCalc;
3920  v_dim_one = argNbSampWrite;
3921  v_dim_two = argNbSampWrite;
3922  v_size = v_nb_times*v_dim_one*v_dim_two;
3923  v_tot += v_size;
3924 
3926  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3927  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3928  << setw(9) << v_size;}
3929 
3930  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3931  {
3932  if ( fTagCorCss[i0StexEcha] == 1 )
3933  {
3934  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCorCss;
3935  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3936  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3937  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
3938  TRootCorCss(i0StexEcha, argNbSampWrite);
3939  gCnaRootFile->fCnaResultsTree->Fill();
3940  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3941  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3942  }
3943  }
3944  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3945 
3946  //-------------------------- Samples as a function of event = events distributions
3947  // StexEcha fMatHis(sample, bins) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3948 
3949  MaxCar = fgMaxCar;
3950  typ_name.Resize(MaxCar);
3951  typ_name = "AdcEvt";
3952  v_nb_times = fFileHeader->fAdcEvtCalc;
3953  v_dim_one = argNbSampWrite;
3954  v_dim_two = fFileHeader->fReqNbOfEvts;
3955  v_size = v_nb_times*v_dim_one*v_dim_two;
3956  v_tot += v_size;
3957 
3959  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3960  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3961  << setw(9) << v_size;}
3962 
3963  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3964  {
3965  if ( fTagAdcEvt[i0StexEcha] == 1 )
3966  {
3967  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypAdcEvt;
3968  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3969  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3970  gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
3971  TRootAdcEvt(i0StexEcha, argNbSampWrite);
3972  gCnaRootFile->fCnaResultsTree->Fill();
3973  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3974  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3975  }
3976  }
3977  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3978 
3979  //-------------------------- Low Frequency Covariances between StexEchas
3980  // sample fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3981 
3982  MaxCar = fgMaxCar;
3983  typ_name.Resize(MaxCar);
3984  typ_name = "LfCov";
3985  v_nb_times = fFileHeader->fLfCovCalc;
3986  v_dim_one = fEcal->MaxCrysEcnaInStex();
3987  v_dim_two = fEcal->MaxCrysEcnaInStex();
3988  v_size = v_nb_times*v_dim_one*v_dim_two;
3989  v_tot += v_size;
3990 
3992  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3993  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3994  << setw(9) << v_size;}
3995 
3996  for (Int_t i = 0; i < v_nb_times; i++)
3997  { //=================================== Record type EB
3998  if ( fTagLfCov[0] == 1 )
3999  {
4000  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypLfCov;
4001  gCnaRootFile->fCnaIndivResult->fIthElement = i;
4002  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
4003  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
4004  TRootLfCov();
4005  gCnaRootFile->fCnaResultsTree->Fill();
4006  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
4007  }
4008  }
4009  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
4010 
4011  //-------------------------- Low Frequency Correlations between StexEchas
4012  // sample fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
4013 
4014  MaxCar = fgMaxCar;
4015  typ_name.Resize(MaxCar);
4016  typ_name = "LfCor";
4017  v_nb_times = fFileHeader->fLfCorCalc;
4018  v_dim_one = fEcal->MaxCrysEcnaInStex();
4019  v_dim_two = fEcal->MaxCrysEcnaInStex();
4020  v_size = v_nb_times*v_dim_one*v_dim_two;
4021  v_tot += v_size;
4022 
4024  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
4025  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
4026  << setw(9) << v_size;}
4027 
4028  for (Int_t i = 0; i < v_nb_times; i++)
4029  {
4030  if ( fTagLfCor[0] == 1 )
4031  {
4032  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypLfCor;
4033  gCnaRootFile->fCnaIndivResult->fIthElement = i;
4034  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
4035  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
4036  TRootLfCor();
4037  gCnaRootFile->fCnaResultsTree->Fill();
4038  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
4039  }
4040  }
4041  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
4042 
4043  //-------------------------- High Frequency Covariances between StexEchas
4044  // sample fMatMat(StexEcha, StexEcha) (6) cTypHfCov 1*(1700,1700) = 2 890 000
4045 
4046  MaxCar = fgMaxCar;
4047  typ_name.Resize(MaxCar);
4048  typ_name = "HfCov";
4049  v_nb_times = fFileHeader->fHfCovCalc;
4050  v_dim_one = fEcal->MaxCrysEcnaInStex();
4051  v_dim_two = fEcal->MaxCrysEcnaInStex();
4052  v_size = v_nb_times*v_dim_one*v_dim_two;
4053  v_tot += v_size;
4054 
4056  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
4057  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
4058  << setw(9) << v_size;}
4059 
4060  for (Int_t i = 0; i < v_nb_times; i++)
4061  {
4062  if ( fTagHfCov[0] == 1 )
4063  {
4064  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypHfCov;
4065  gCnaRootFile->fCnaIndivResult->fIthElement = i;
4066  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
4067  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
4068  TRootHfCov();
4069  gCnaRootFile->fCnaResultsTree->Fill();
4070  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
4071  }
4072  }
4073  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
4074 
4075  //-------------------------- High Frequency Correlations between StexEchas
4076  // sample fMatMat(StexEcha, StexEcha) (7) cTypHfCor 1*(1700,1700) = 2 890 000
4077 
4078  MaxCar = fgMaxCar;
4079  typ_name.Resize(MaxCar);
4080  typ_name = "HfCor";
4081  v_nb_times = fFileHeader->fHfCorCalc;
4082  v_dim_one = fEcal->MaxCrysEcnaInStex();
4083  v_dim_two = fEcal->MaxCrysEcnaInStex();
4084  v_size = v_nb_times*v_dim_one*v_dim_two;
4085  v_tot += v_size;
4086 
4088  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
4089  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
4090  << setw(9) << v_size;}
4091 
4092  for (Int_t i = 0; i < v_nb_times; i++)
4093  {
4094  if ( fTagHfCor[0] == 1 )
4095  {
4096  gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypHfCor;
4097  gCnaRootFile->fCnaIndivResult->fIthElement = i;
4098  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
4099  gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
4100  TRootHfCor();
4101  gCnaRootFile->fCnaResultsTree->Fill();
4102  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
4103  }
4104  }
4105  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
4106 
4107  //---------------------------------------------- WRITING
4108  //...................................... file
4109  gCnaRootFile->fRootFile->Write();
4110  //...................................... header
4111  fFileHeader->Write();
4112 
4113  //...................................... status message
4115  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(20) << "TOTAL: "
4116  << setw(21) << "CALCULATED = " << setw(9) << v_tot
4117  << " => WRITTEN ON FILE = " << setw(9) << v_tot_writ << endl;}
4118 
4120  cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << endl
4121  << " " << fCnaParPaths->ResultsRootFilePath().Data()
4122  << endl;}
4123 
4124  ok_write = kTRUE;
4125 
4126  //...................................... close
4127  CloseRootFile(file_name);
4128  }
4129  return ok_write;
4130 } //-------------- End of WriteRootFile(...) -----------------------
void TRootAdcEvt(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4179
int i
Definition: DBlmapReader.cc:9
Int_t * fTagCorCss
Definition: TEcnaRun.h:118
TCnaResultType * fCnaIndivResult
Definition: TCnaRootFile.h:28
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:66
void TRootHfn()
Definition: TEcnaRun.cc:4548
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:172
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:56
Int_t fSSpCalc
Definition: TEcnaHeader.h:54
Bool_t fOpenRootFile
Definition: TEcnaRun.h:73
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:100
Int_t * fTagLfCor
Definition: TEcnaRun.h:158
Bool_t OpenRootFile(const Text_t *, TString)
Definition: TEcnaRun.cc:3056
void TRootSigCorss()
Definition: TEcnaRun.cc:4567
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:186
void TRootSSp(const Int_t &)
Definition: TEcnaRun.cc:4227
Int_t fHfnCalc
Definition: TEcnaHeader.h:71
void TRootLfCor()
Definition: TEcnaRun.cc:4366
void TRootLFccMoStins()
Definition: TEcnaRun.cc:4249
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:63
Int_t * fTagCovCss
Definition: TEcnaRun.h:113
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:75
void TRootCovCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4430
Int_t * fTagPed
Definition: TEcnaRun.h:122
void TRootAvTno()
Definition: TEcnaRun.cc:4292
Int_t fHfCorCalc
Definition: TEcnaHeader.h:62
void TRootAvLfn()
Definition: TEcnaRun.cc:4309
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:38
TFile * fRootFile
Definition: TCnaRootFile.h:20
Int_t * fTagAvTno
Definition: TEcnaRun.h:129
Int_t * fTagHfn
Definition: TEcnaRun.h:142
void TRootHfCor()
Definition: TEcnaRun.cc:4408
Int_t fMSpCalc
Definition: TEcnaHeader.h:53
void TRootAvEvCorss()
Definition: TEcnaRun.cc:4605
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:50
Int_t * fTagSSp
Definition: TEcnaRun.h:108
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:69
Bool_t CloseRootFile(const Text_t *)
Definition: TEcnaRun.cc:3087
void TRootStinNumbers()
Definition: TEcnaRun.cc:4140
void TRootHFccMoStins()
Definition: TEcnaRun.cc:4271
void TRootMSp(const Int_t &)
Definition: TEcnaRun.cc:4206
Int_t fHfCovCalc
Definition: TEcnaHeader.h:61
Int_t * fTagTno
Definition: TEcnaRun.h:127
Int_t * fTagAvLfn
Definition: TEcnaRun.h:139
Int_t * fTagLfn
Definition: TEcnaRun.h:137
void TRootAvHfn()
Definition: TEcnaRun.cc:4327
Int_t fCorCssCalc
Definition: TEcnaHeader.h:60
void TRootPed()
Definition: TEcnaRun.cc:4473
void TRootTno()
Definition: TEcnaRun.cc:4491
void TRootCorCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4451
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:55
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:67
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:149
Int_t fPedCalc
Definition: TEcnaHeader.h:67
Int_t * fTagHfCor
Definition: TEcnaRun.h:167
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:97
Int_t * fTagAvPed
Definition: TEcnaRun.h:124
void TRootLfn()
Definition: TEcnaRun.cc:4529
void TRootLfCov()
Definition: TEcnaRun.cc:4345
Int_t fFlagPrint
Definition: TEcnaRun.h:185
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:57
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:176
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:134
Int_t * fTagLfCov
Definition: TEcnaRun.h:154
Int_t fAvPedCalc
Definition: TEcnaHeader.h:74
void TRootAvSigCorss()
Definition: TEcnaRun.cc:4624
Int_t * fTagHfCov
Definition: TEcnaRun.h:163
Int_t * fTagAvHfn
Definition: TEcnaRun.h:144
Int_t * fTagSigCorss
Definition: TEcnaRun.h:147
TString ResultsRootFilePath()
Int_t fLfCorCalc
Definition: TEcnaHeader.h:64
Int_t * fTagMSp
Definition: TEcnaRun.h:104
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:52
Int_t fTnoCalc
Definition: TEcnaHeader.h:68
Int_t MaxCrysEcnaInStex()
void TRootNbOfEvts(const Int_t &)
Definition: TEcnaRun.cc:4158
Int_t fLfCovCalc
Definition: TEcnaHeader.h:63
TTree * fCnaResultsTree
Definition: TCnaRootFile.h:23
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:65
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:93
void TRootMeanCorss()
Definition: TEcnaRun.cc:4510
Int_t fgMaxCar
Definition: TEcnaRun.h:50
R__EXTERN TCnaRootFile * gCnaRootFile
Definition: TCnaRootFile.h:43
tuple cout
Definition: gather_cfg.py:41
Int_t MaxStinEcnaInStex()
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:72
Int_t fLfnCalc
Definition: TEcnaHeader.h:70
void TRootHfCov()
Definition: TEcnaRun.cc:4387
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:49
TString fTTBELL
Definition: TEcnaRun.h:57
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:132
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:76
Int_t fCovCssCalc
Definition: TEcnaHeader.h:59
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:64
void TRootAvPed()
Definition: TEcnaRun.cc:4586

Member Data Documentation

Int_t TEcnaRun::fBuildEvtNotSkipped
private

Definition at line 83 of file TEcnaRun.h.

Referenced by BuildEventDistributions(), Init(), and ~TEcnaRun().

Int_t TEcnaRun::fCdelete
private

Definition at line 55 of file TEcnaRun.h.

Referenced by CloseRootFile(), Init(), and ~TEcnaRun().

Int_t TEcnaRun::fCnaCommand
private

Definition at line 52 of file TEcnaRun.h.

Referenced by Init().

Int_t TEcnaRun::fCnaError
private

Definition at line 52 of file TEcnaRun.h.

Referenced by Init().

TEcnaParCout* TEcnaRun::fCnaParCout
private

Definition at line 66 of file TEcnaRun.h.

Referenced by Init(), ReadEventDistributions(), and SetEcalSubDetector().

TEcnaParPaths* TEcnaRun::fCnaParPaths
private
TEcnaWrite* TEcnaRun::fCnaWrite
private
Int_t TEcnaRun::fCnew
private
Int_t TEcnaRun::fCodePrintAllComments
private
Int_t TEcnaRun::fCodePrintComments
private

Definition at line 186 of file TEcnaRun.h.

Referenced by Init(), and PrintComments().

Int_t TEcnaRun::fCodePrintNoComment
private
Int_t TEcnaRun::fCodePrintWarnings
private

Definition at line 186 of file TEcnaRun.h.

Referenced by Init(), PrintWarnings(), and ~TEcnaRun().

TEcnaParEcal* TEcnaRun::fEcal
private
TEcnaNumbering* TEcnaRun::fEcalNumbering
private
ofstream TEcnaRun::fFcout_f
private

Definition at line 183 of file TEcnaRun.h.

TEcnaHeader* TEcnaRun::fFileHeader
private
Int_t TEcnaRun::fFlagPrint
private
TString TEcnaRun::fFlagSubDet
private
Int_t TEcnaRun::fgMaxCar
private

Definition at line 50 of file TEcnaRun.h.

Referenced by Init(), SetEcalSubDetector(), and WriteRootFile().

Int_t TEcnaRun::fMaxMsgIndexForMiscDiag
private

Definition at line 61 of file TEcnaRun.h.

Referenced by Init().

Int_t* TEcnaRun::fMiscDiag
private
Int_t TEcnaRun::fNbOfMiscDiagCounters
private

Definition at line 60 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), and ~TEcnaRun().

Int_t TEcnaRun::fNbSampForCalc
private
Int_t TEcnaRun::fNbSampForFic
private
TString TEcnaRun::fNewRootFileName
private

Definition at line 78 of file TEcnaRun.h.

Referenced by GetNewRootFileName(), and WriteNewRootFile().

TString TEcnaRun::fNewRootFileNameShort
private

Definition at line 79 of file TEcnaRun.h.

Referenced by GetNewRootFileNameShort(), and WriteNewRootFile().

Int_t TEcnaRun::fNumberOfEvents
private
Bool_t TEcnaRun::fOpenRootFile
private

Definition at line 73 of file TEcnaRun.h.

Referenced by CloseRootFile(), Init(), OpenRootFile(), and WriteRootFile().

Int_t TEcnaRun::fReadyToReadData
private

Definition at line 74 of file TEcnaRun.h.

Referenced by BuildEventDistributions(), GetReadyToReadData(), and Init().

TString TEcnaRun::fRootFileName
private

Definition at line 76 of file TEcnaRun.h.

Referenced by GetRootFileName(), and ReadEventDistributions().

TString TEcnaRun::fRootFileNameShort
private

Definition at line 77 of file TEcnaRun.h.

Referenced by GetRootFileNameShort(), and ReadEventDistributions().

Int_t TEcnaRun::fSpecialStexStinNotIndexed
private

Definition at line 81 of file TEcnaRun.h.

Referenced by BuildEventDistributions(), GetReadyToReadData(), and Init().

TString TEcnaRun::fStexName
private
Int_t TEcnaRun::fStinIndexBuilt
private

Definition at line 82 of file TEcnaRun.h.

Referenced by BuildEventDistributions(), and Init().

TString TEcnaRun::fStinName
private
Double_t* TEcnaRun::fT1d_av_ev_corss
private
Double_t* TEcnaRun::fT1d_av_hifn
private

Definition at line 143 of file TEcnaRun.h.

Referenced by AveragedHighFrequencyNoise(), Init(), TRootAvHfn(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_av_lofn
private

Definition at line 138 of file TEcnaRun.h.

Referenced by AveragedLowFrequencyNoise(), Init(), TRootAvLfn(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_av_mped
private

Definition at line 123 of file TEcnaRun.h.

Referenced by AveragedPedestals(), Init(), TRootAvPed(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_av_sig_corss
private
Double_t* TEcnaRun::fT1d_av_totn
private

Definition at line 128 of file TEcnaRun.h.

Referenced by AveragedTotalNoise(), Init(), TRootAvTno(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_ev
private

Definition at line 103 of file TEcnaRun.h.

Referenced by Init(), SampleMeans(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_ev_cor_ss
private
Double_t* TEcnaRun::fT1d_ev_ev
private

Definition at line 121 of file TEcnaRun.h.

Referenced by AveragedPedestals(), Init(), Pedestals(), TRootPed(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_evevt_of_sigsamp
private

Definition at line 141 of file TEcnaRun.h.

Referenced by AveragedHighFrequencyNoise(), HighFrequencyNoise(), Init(), TRootHfn(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_evsamp_of_sigevt
private

Definition at line 126 of file TEcnaRun.h.

Referenced by AveragedTotalNoise(), Init(), TotalNoise(), TRootTno(), and ~TEcnaRun().

Int_t* TEcnaRun::fT1d_NbOfEvts
private

Definition at line 96 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_sig
private

Definition at line 107 of file TEcnaRun.h.

Referenced by Init(), SampleSigmas(), and ~TEcnaRun().

Double_t* TEcnaRun::fT1d_sig_cor_ss
private
Double_t* TEcnaRun::fT1d_sigevt_of_evsamp
private

Definition at line 136 of file TEcnaRun.h.

Referenced by AveragedLowFrequencyNoise(), Init(), LowFrequencyNoise(), TRootLfn(), and ~TEcnaRun().

Int_t* TEcnaRun::fT1d_StexStinFromIndex
private
Int_t* TEcnaRun::fT1dCrysNumbersTable
private

Definition at line 181 of file TEcnaRun.h.

Referenced by Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_hf_cor
private

Definition at line 166 of file TEcnaRun.h.

Referenced by HighFrequencyCorrelationsBetweenChannels(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_hf_cov
private

Definition at line 162 of file TEcnaRun.h.

Referenced by HighFrequencyCovariancesBetweenChannels(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_hfcc_mostins
private

Definition at line 175 of file TEcnaRun.h.

Referenced by HighFrequencyMeanCorrelationsBetweenStins(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_lf_cor
private

Definition at line 157 of file TEcnaRun.h.

Referenced by Init(), LowFrequencyCorrelationsBetweenChannels(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_lf_cov
private

Definition at line 153 of file TEcnaRun.h.

Referenced by Init(), LowFrequencyCovariancesBetweenChannels(), and ~TEcnaRun().

Double_t* TEcnaRun::fT2d1_lfcc_mostins
private

Definition at line 171 of file TEcnaRun.h.

Referenced by Init(), LowFrequencyMeanCorrelationsBetweenStins(), and ~TEcnaRun().

Double_t** TEcnaRun::fT2d_ev
private
Double_t** TEcnaRun::fT2d_hf_cor
private
Double_t** TEcnaRun::fT2d_hf_cov
private
Double_t** TEcnaRun::fT2d_hfcc_mostins
private
Double_t** TEcnaRun::fT2d_lf_cor
private
Double_t** TEcnaRun::fT2d_lf_cov
private
Double_t** TEcnaRun::fT2d_lfcc_mostins
private
Int_t** TEcnaRun::fT2d_NbOfEvts
private
Double_t** TEcnaRun::fT2d_sig
private

Definition at line 106 of file TEcnaRun.h.

Referenced by Init(), SampleSigmas(), TotalNoise(), TRootSSp(), and ~TEcnaRun().

Int_t** TEcnaRun::fT2dCrysNumbersTable
private

Definition at line 180 of file TEcnaRun.h.

Referenced by Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT3d1_cor_ss
private

Definition at line 117 of file TEcnaRun.h.

Referenced by CorrelationsBetweenSamples(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT3d1_cov_ss
private

Definition at line 112 of file TEcnaRun.h.

Referenced by CovariancesBetweenSamples(), Init(), and ~TEcnaRun().

Double_t* TEcnaRun::fT3d1_distribs
private

Definition at line 92 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), and ~TEcnaRun().

Double_t** TEcnaRun::fT3d2_cor_ss
private

Definition at line 116 of file TEcnaRun.h.

Referenced by CorrelationsBetweenSamples(), Init(), and ~TEcnaRun().

Double_t** TEcnaRun::fT3d2_cov_ss
private

Definition at line 111 of file TEcnaRun.h.

Referenced by CovariancesBetweenSamples(), Init(), and ~TEcnaRun().

Double_t** TEcnaRun::fT3d2_distribs
private

Definition at line 91 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), and ~TEcnaRun().

Double_t*** TEcnaRun::fT3d_cor_ss
private
Double_t*** TEcnaRun::fT3d_cov_ss
private
Double_t*** TEcnaRun::fT3d_distribs
private
Int_t* TEcnaRun::fTagAdcEvt
private

Definition at line 93 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), SampleValues(), TRootAdcEvt(), WriteRootFile(), and ~TEcnaRun().

Int_t* TEcnaRun::fTagAvHfn
private
Int_t* TEcnaRun::fTagAvLfn
private
Int_t* TEcnaRun::fTagAvMeanCorss
private
Int_t* TEcnaRun::fTagAvPed
private
Int_t* TEcnaRun::fTagAvSigCorss
private
Int_t* TEcnaRun::fTagAvTno
private
Int_t* TEcnaRun::fTagCorCss
private
Int_t* TEcnaRun::fTagCovCss
private
Int_t* TEcnaRun::fTagHFccMoStins
private
Int_t* TEcnaRun::fTagHfCor
private
Int_t* TEcnaRun::fTagHfCov
private
Int_t* TEcnaRun::fTagHfn
private
Int_t* TEcnaRun::fTagLFccMoStins
private
Int_t* TEcnaRun::fTagLfCor
private
Int_t* TEcnaRun::fTagLfCov
private
Int_t* TEcnaRun::fTagLfn
private
Int_t* TEcnaRun::fTagMeanCorss
private
Int_t* TEcnaRun::fTagMSp
private
Int_t* TEcnaRun::fTagNbOfEvts
private
Int_t* TEcnaRun::fTagPed
private
Int_t* TEcnaRun::fTagSigCorss
private
Int_t* TEcnaRun::fTagSSp
private
Int_t* TEcnaRun::fTagStinNumbers
private
Int_t* TEcnaRun::fTagTno
private
TString TEcnaRun::fTTBELL
private