CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TEcnaRun Class Reference

#include <TEcnaRun.h>

Inheritance diagram for TEcnaRun:

Public Member Functions

void AverageHighFrequencyNoise ()
 
void AverageLowFrequencyNoise ()
 
void AverageMeanCorrelationsBetweenSamples ()
 
void AveragePedestals ()
 
void AverageSigmaOfCorrelationsBetweenSamples ()
 
void AverageTotalNoise ()
 
Bool_t CloseRootFile (const Text_t *)
 
void CorrelationsBetweenSamples ()
 
void CovariancesBetweenSamples ()
 
void Expert1Calculations ()
 
void Expert2Calculations ()
 
const TString & GetNewRootFileName () const
 
const TString & GetNewRootFileNameShort () const
 
Bool_t GetPathForResults ()
 
void GetReadyToCompute ()
 
void GetReadyToReadData (const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
 
void GetReadyToReadData (const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
 
const TString & GetRootFileName () const
 
const TString & GetRootFileNameShort () const
 
Bool_t GetSampleAdcValues (const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Double_t &)
 
void HighFrequencyCorrelationsBetweenChannels ()
 
void HighFrequencyCovariancesBetweenChannels ()
 
void HighFrequencyMeanCorrelationsBetweenSCs ()
 
void HighFrequencyMeanCorrelationsBetweenStins ()
 
void HighFrequencyMeanCorrelationsBetweenTowers ()
 
void HighFrequencyNoise ()
 
void Init (TEcnaObject *)
 
void LowFrequencyCorrelationsBetweenChannels ()
 
void LowFrequencyCovariancesBetweenChannels ()
 
void LowFrequencyMeanCorrelationsBetweenSCs ()
 
void LowFrequencyMeanCorrelationsBetweenStins ()
 
void LowFrequencyMeanCorrelationsBetweenTowers ()
 
void LowFrequencyNoise ()
 
void MeanCorrelationsBetweenSamples ()
 
Bool_t OpenRootFile (const Text_t *, const TString &)
 
void Pedestals ()
 
void PrintAllComments ()
 
void PrintComments ()
 
void PrintNoComment ()
 
void PrintWarnings ()
 
Bool_t ReadSampleAdcValues ()
 
Bool_t ReadSampleAdcValues (const Int_t &)
 
void SampleMeans ()
 
void SampleSigmas ()
 
void SampleValues ()
 
void SetEcalSubDetector (const TString &)
 
void SigmaOfCorrelationsBetweenSamples ()
 
void StandardCalculations ()
 
void StartStopDate (const TString &, const TString &)
 
void StartStopTime (time_t, time_t)
 
 TEcnaRun ()
 
 TEcnaRun (TEcnaObject *, const TString &)
 
 TEcnaRun (TEcnaObject *, 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 &)
 
 ~TEcnaRun () override
 

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
 
std::ofstream fFcout_f
 
TEcnaHeaderfFileHeader
 
Int_t fFlagPrint
 
TString fFlagSubDet
 
Int_t fgMaxCar
 
Int_t fMaxMsgIndexForMiscDiag
 
Int_t fMemoReadNumberOfEventsforSamples
 
Int_t * fMiscDiag
 
Int_t fNbOfMiscDiagCounters
 
Int_t fNbSampForCalc
 
Int_t fNbSampForFic
 
TString fNewRootFileName
 
TString fNewRootFileNameShort
 
Int_t fNumberOfEvents
 
TEcnaObjectfObjectManager
 
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_AdcValues
 
Double_t * fT3d1_cor_ss
 
Double_t * fT3d1_cov_ss
 
Double_t ** fT3d2_AdcValues
 
Double_t ** fT3d2_cor_ss
 
Double_t ** fT3d2_cov_ss
 
Double_t *** fT3d_AdcValues
 
Double_t *** fT3d_cor_ss
 
Double_t *** fT3d_cov_ss
 
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


TEcnaRun.h Update: 05/10/2012 Authors: B.Fabbro (berna.nosp@m.rd.f.nosp@m.abbro.nosp@m.@cea.nosp@m..fr), FX Gentit DSM/IRFU/SPP CEA-Saclay Copyright: Those valid for CEA sofware

ECNA web page: http://cms-fabbro.web.cern.ch/cms-fabbro/

cna_new/Correlated_Noise_Analysis/ECNA_main_page.htm

TEcnaRun + ECNA (Ecal Correlated Noise Analysis) instructions for use in the framework of CMSSW.

==============> INTRODUCTION

The present documentation contains:

[1] a brief description of the ECNA package with instructions for use
    in the framework of the CMS Software

[2] the documentation for the class TEcnaRun

==[1]=====================================================================================

     DOCUMENTATION FOR THE INTERFACE: ECNA package / CMSSW / SCRAM

==========================================================================================

ECNA consists in 2 packages named: EcalCorrelatedNoiseAnalysisModules and EcalCorrelatedNoiseAnalysisAlgos.

The directory tree is the following:

<local path>/CMSSW_a_b_c/src/----CalibCalorimetry/---EcalCorrelatedNoiseAnalysisModules/BuildFile
                        |   |                    |                                     |---interface/
                        |   |                    |                                     |---src/
                            |                    |                                     |---data/
                            |                    |
                            |                    |---EcalCorrelatedNoiseAnalysisAlgos/BuildFile
                            |                    |                                   |---interface/
                            |                    |                                   |---src/
                            |                    |                                   |---test/
                            |                    |
                            |                    |
                            |                    \--- <other packages of CalibCalorimetry>
                            |
                            \----<other subsystems...>

The package EcalCorrelatedNoiseAnalysisModules contains one standard analyzer (EcnaAnalyzer). The user can edit its own analyzer. A detailed description is given here after in the class TEcnaRun documentation. The package EcalCorrelatedNoiseAnalysisAlgos contains the basic ECNA classes (in src and interface) and standalone executables (in directory test).

==[2]======================================================================================

                     CLASS TEcnaRun DOCUMENTATION

=========================================================================================== TEcnaRun.

Brief and general description

This class allows the user to calculate pedestals, noises, correlations and other quantities of interest for correlated noise studies on the CMS/ECAL (EB and EE).

Three main operations are performed by the class TEcnaRun. Each of them is associated with a specific method of the analyzer EcnaAnalyzer:

(1) Initialization and calls to "preparation methods". This task is done in the constructor of the analyzer: EcnaAnalyzer::EcnaAnalyzer(const edm::ParameterSet& pSet)

(2) Building of the event distributions (distributions of the sample ADC values for each sample, each channel, etc...) This task is done in the method "analyze" of the analyzer: EcnaAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)

(3) Calculation of the different quantities (correlations, pedestals, noises, etc...) from the distributions obtained in (2) and writing of these quantities in results ROOT files and also in ASCII files. This task is done in the destructor of the analyzer: EcnaAnalyzer::~EcnaAnalyzer()

Use of the class TEcnaRun by the analyzer EcnaAnalyzer

      see files EcnaAnalyzer.h and EcnaAnalyzer.cc
      in package EcalCorrelatedNoiseAnalysisModules

More detailled description of the class TEcnaRun

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

                 Declaration and Print Methods

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

 Just after the declaration with the constructor,
 you can set a "Print Flag" by means of the following "Print Methods":

 TEcnaRun* MyCnaRun = new TEcnaRun(...); // declaration of the object MyCnaRun

// Print Methods:

MyCnaRun->PrintNoComment(); // Set flag to forbid printing of all the comments // except ERRORS.

MyCnaRun->PrintWarnings(); // (DEFAULT) // Set flag to authorize printing of some warnings. // WARNING/INFO: information on something unusual // in the data. // WARNING/CORRECTION: something wrong (but not too serious) // in the value of some argument. // Automatically modified to a correct value.

MyCnaRun->PrintComments(); // Set flag to authorize printing of infos // and some comments concerning initialisations

MyCnaRun->PrintAllComments(); // Set flag to authorize printing of all the comments

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

       Method GetReadyToReadData(...) and associated methods

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

  MyCnaRun->GetReadyToReadData(AnalysisName,      NbOfSamples,       RunNumber,
                          FirstReqEvtNumber, LastReqEvtNumber,  ReqNbOfEvts,
                               StexNumber,        [RunType]);

Explanations for the arguments (all of them are input arguments):

TString AnalysisName: code for the analysis. According to this code, the analyzer EcnaAnalyser selects the event type (PEDESTAL_STD, PEDESTAL_GAP, LASER_STD, etc...) and some other event characteristics (example: the gain in pedestal runs: AnalysisName = "Ped1" or "Ped6" or "Ped12") See EcnaAnalyser.h for a list of available codes. The string AnalysisName is automatically included in the name of the results files (see below: results files paragraph).

Int_t NbOfSamples number of samples (=10 maximum) Int_t RunNumber: run number Int_t FirstReqEvtNumber: first requested event number (numbering starting from 1) Int_t LastReqEvtNumber: last requested event number Int_t ReqNbOfEvts: requested number of events Int_t StexNumber: Stex number (Stex = SM if EB, Dee if EE)

The different quantities (correlations, etc...) will be calculated for ReqNbOfEvts events between event# FirstReqEvtNumber and event# LastReqEvtNumber. If LastReqEvtNumber = 0, the calculations will be performed from event# FirstReqEvtNumber until EOF if necessary (i.e. if the number of treated events is < ReqNbOfEvts)

Int_t RunType [optional]: run type

                PEDESTAL_STD =  9
                LASER_STD    =  4
                PEDESTAL_GAP = 18, etc...

(see CMSSSW/DataFormats/EcalRawData/interface/EcalDCCHeaderBlock.h)

if RunType is specified, the run type will be displayed on the plots

==============> Method to set the start and stop times of the analysis (optional)

A method can be used to set the fStartDate and fStopDate attributes of the class TEcnaHeader from start and stop time given by the user provided these values have been recovered from the event reading:

void  MyCnaRun->StartStopDate(const TString& StartDate, const TString& StopDate);

// TString StartDate, StopDate: start and stop time of the run // in "date" format. Example: // Wed Oct 8 04:14:23 2003

If the method is not called, the values of the attributes fStartDate and fStopDate are set to: "!Start date> no info" and "!Stop date> no info" at the level of Init() method of the class TEcnaHeader. The values of StartDate and StopDate are written in the header of the .root result file.

PS: another similar method exists, with time_t type arguments:

void MyCnaRun->StartStopTime(time_t StartTime, time_t StopTime);

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

                   Calculation methods

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

The "calculation methods" are methods which compute the different
quantities of interest. They use the ADC sample values which can be
recovered by the method void SampleValues():

void SampleValues(); // 3D histo of the sample ADC value // for each triple (channel,sample,event)

List of the calculation methods with associated formulae:

.......... Calculation methods ( need previous call to GetReadyToReadData(...) )

// A(t,c,s,e) : ADC value for Stin t channel c, sample s, event e (Stin = tower if EB, SC if EE)

// E_e , Cov_e : average, covariance over the events // E_s , Cov_s : average, covariance over the samples // E_s,s' : average over couples of samples (half correlation matrix)

// e* : random variable associated to events // s* : random variable associated to samples

void SampleMeans(); // Expectation values for each couple (channel,sample) // SMean(t,c,s) = E_e[A(t,c,s,e*)]

void SampleSigmas(); // Sigmas for each couple (channel,sample) // SSigma(t,c,s) = sqrt{ Cov_e[A(t,c,s,e*),A(t,c,s,e*)] }

//........................................... void CovariancesBetweenSamples(); // (s,s') covariances for each channel // Cov(t,c;s,s') = Cov_e[ A(t,c,s,e*) , A(t,c,s',e*) ] // = E_e[ ( A(t,c,s,e*) - E_e[A(t,c,s,e*)] )*( A(t,c,s',e*) - E_e[A(t,c,s',e*)] ) ]

void CorrelationsBetweenSamples(); // (s,s') correlations for each channel // Cor(t,c;s,s') = Cov(t,c;s,s')/sqrt{ Cov(t,c;s,s)*Cov(t,c;s',s') }

//.............................................. *==> Stin = tower if EB, SuperCrystal if EE void LowFrequencyCovariancesBetweenChannels(); // LF (t;c,c') covariances for each Stin void HighFrequencyCovariancesBetweenChannels(); // HF (t;c,c') covariances for each Stin void LowFrequencyCorrelationsBetweenChannels(); // LF (t;c,c') correlations for each Stin void HighFrequencyCorrelationsBetweenChannels(); // HF (t;c,c') correlations for each Stin

// LFCov(t;c,c') = Cov_e[ E_s[A(t,c,s*,e*)] , E_s[A(t,c',s*,e*) ] // // = E_e[ ( E_s[A(t,c ,s*,e*)] - E_e[ E_s[A(t,c ,s*,e*)] ] )* // ( E_s[A(t,c',s*,e*)] - E_e[ E_s[A(t,c',s*,e*)] ] ) ] // // HFCov(t;c,c') = E_e[ Cov_s[ A(t,c,s*,e*) , A(t,c',s*,e*) ] ] // // = E_e[ E_s[ ( A(t,c ,s*,e*) - E_s[A(t,c ,s*,e*)] )* // ( A(t,c',s*,e*) - E_s[A(t,c',s*,e*)] ) ] ] // // LFCor(t;c,c') = LFCov(t;c,c')/sqrt{ LFCov(t;c,c)*LFCov(t;c',c') } // // HFCor(t;c,c') = HFCov(t;c,c')/sqrt{ HFCov(t;c,c)*HFCov(t;c',c') }

//.............................................. . *==> Stex = SM if EB, Dee if EE void LowFrequencyMeanCorrelationsBetweenTowers(); // LF (tow,tow') correlations for each SM void HighFrequencyMeanCorrelationsBetweenTowers(); // HF (tow,tow') correlations for each SM

void LowFrequencyMeanCorrelationsBetweenSCs(); // LF (sc,sc') correlations for each Dee void HighFrequencyMeanCorrelationsBetweenSCs(); // HF (sc,sc') correlations for each Dee

//.................................................... Quantities as a function of Xtal# void Pedestals(); void TotalNoise(); void LowFrequencyNoise(); void HighFrequencyNoise(); void MeanCorrelationsBetweenSamples(); void SigmaOfCorrelationsBetweenSamples();

// Pedestal(t,c) = E_e[ E_s[A(t,c,s*,e*)] ] // TotalNoise(t,c) = E_s[ sqrt{ E_e[ ( A(t,c,s*,e*) - E_e[A(t,c,s*,e*)] )^2 ] } ] // LowFqNoise(t,c) = sqrt{ E_e[ ( E_s[A(t,c,s*,e*)] - E_e[ E_s[A(t,c,s*,e*)] ] )^2 ] } // HighFqNoise(t,c) = E_e[ sqrt{ E_s[ (A(t,c,s*,e*) - E_s[A(t,c,s*,e*)] )^2 ] } ] // MeanCorss(t,c) = E_s,s'[ Cor(t,c;s,s') ] // SigmaCorss(t,c) = E_s,s'[ Cor(t,c;s,s') - E_s,s'[ Cor(t,c;s,s') ] ]

//............ Quantities as a function of tower# (EB) or SC# (EE), average over the Xtals void AveragePedestals(); void AverageTotalNoise(); void AverageLowFrequencyNoise(); void AverageHighFrequencyNoise(); void AverageMeanCorrelationsBetweenSamples(); void AverageSigmaOfCorrelationsBetweenSamples();

// t = tower if EB , SC if EE , c = channel (Xtal) // AveragePedestal(t) = E_c[Pedestal(t,c*)] // TotalNoise(t) = E_c[TotalNoise(t,c*)] // LowFqNoise(t) = E_c[LowFqNoise(t,c*)] // HighFqNoise(t) = E_c[HighFqNoise(t,c*)] // MeanCorss(t) = E_c[MeanCorss(t,c*)] // SigmaCorss(t) = E_c[SigmaCorss(t,c*)]

==============> RESULTS FILES

The calculation methods above provide results which can be used directly in the user's code. However, these results can also be written in results files by appropriate methods. The names of the results files are automaticaly generated.

It is also possible to write results in ASCII files => See TEcnaWrite and TEcnaGui It is also possible to plot results in ROOT canvases => See TEcnaHistos and TEcnaGui

*--------—> Codification for the name of the ROOT file:

The name of the ROOT file is the following:

 aaa_S1_sss_Rrrr_fff_lll_SMnnn.root     for EB
 aaa_S1_sss_Rrrr_fff_lll_Deennn.root    for EE

with: aaa = Analysis name sss = number of samples rrr = Run number fff = First requested event number lll = Last requested events mmm = Requested number of events nnn = SM number or Dee number

This name is automatically generated from the values of the arguments of the method "GetReadyToReadData".

*--------—> Method which writes the results in the ROOT file:

  Bool_t  MyCnaRun->WriteRootFile();

===================================================================================================

Definition at line 363 of file TEcnaRun.h.

Constructor & Destructor Documentation

◆ TEcnaRun() [1/4]

TEcnaRun::TEcnaRun ( )

Definition at line 19 of file TEcnaRun.cc.

19  {
20  //Constructor without argument: nothing special done
21 
22  // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl;
23 }

◆ TEcnaRun() [2/4]

TEcnaRun::TEcnaRun ( TEcnaObject pObjectManager,
const TString &  SubDet 
)

Definition at line 25 of file TEcnaRun.cc.

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

25  {
26  //Constructor with argument: call to Init() and declare fEcal according to SubDet value ("EB" or "EE")
27 
28  // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl;
29 
30  Init(pObjectManager);
31 
32  //fCfgResultsRootFilePath = fCnaParPaths->ResultsRootFilePath();
33  //fCfgHistoryRunListFilePath = fCnaParPaths->HistoryRunListFilePath();
34 
35  //ffFileHeader = 0;
36  //fconst Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
37  //fconst Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
38  //ffFileHeader = new TEcnaHeader(h_name, h_title); //fCnew++;
39 
40  //............................ fFileHeader
41  const Text_t* h_name = "CnaHeader"; //==> voir cette question avec FXG
42  const Text_t* h_title = "CnaHeader"; //==> voir cette question avec FXG
43 
44  fFileHeader = nullptr;
45  //Int_t iFileHeader = pObjectManager->GetPointerValue("TEcnaHeader");
46  Long_t iFileHeader = 0; // one TEcnaHeader object for each file since they can be open simultaneously
47  if (iFileHeader == 0) {
48  fFileHeader = new TEcnaHeader(pObjectManager, h_name, h_title); /*fCnew++*/
49  } else {
50  fFileHeader = (TEcnaHeader*)iFileHeader;
51  }
52 
53  SetEcalSubDetector(SubDet.Data());
54  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for ROOT file
55 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
void Init(TEcnaObject *)
Definition: TEcnaRun.cc:89
Int_t fNbSampForFic
Definition: TEcnaRun.h:405
SubDet
Definition: ModulesSoA.h:11
void SetEcalSubDetector(const TString &)
Definition: TEcnaRun.cc:246
Int_t MaxSampADC()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TEcnaRun() [3/4]

TEcnaRun::TEcnaRun ( TEcnaObject pObjectManager,
const TString &  SubDet,
const Int_t &  NbOfSamples 
)

Definition at line 57 of file TEcnaRun.cc.

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

57  {
58  Init(pObjectManager);
59 
60  //fCfgResultsRootFilePath = fCnaParPaths->ResultsRootFilePath();
61  //fCfgHistoryRunListFilePath = fCnaParPaths->HistoryRunListFilePath();
62 
63  //............................ fFileHeader
64  const Text_t* h_name = "CnaHeader"; //==> voir cette question avec FXG
65  const Text_t* h_title = "CnaHeader"; //==> voir cette question avec FXG
66 
67  fFileHeader = nullptr;
68  //Long_t iFileHeader = pObjectManager->GetPointerValue("TEcnaHeader");
69  Long_t iFileHeader = 0; // one TEcnaHeader object for each file since they can be open simultaneously
70  if (iFileHeader == 0) {
71  fFileHeader = new TEcnaHeader(pObjectManager, h_name, h_title); /*fCnew++*/
72  } else {
73  fFileHeader = (TEcnaHeader*)iFileHeader;
74  }
75 
76  SetEcalSubDetector(SubDet.Data());
77  if (NbOfSamples > 0 && NbOfSamples <= fEcal->MaxSampADC()) {
78  fNbSampForFic = NbOfSamples;
79  } else {
80  std::cout << "TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples
81  << ": OUT OF RANGE. Set to the default value (= " << fEcal->MaxSampADC() << ")." << fTTBELL << std::endl;
82  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for file reading
83  }
84 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
void Init(TEcnaObject *)
Definition: TEcnaRun.cc:89
Int_t fNbSampForFic
Definition: TEcnaRun.h:405
SubDet
Definition: ModulesSoA.h:11
void SetEcalSubDetector(const TString &)
Definition: TEcnaRun.cc:246
Int_t MaxSampADC()
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TEcnaRun() [4/4]

TEcnaRun::TEcnaRun ( const TEcnaRun dcop)

Definition at line 276 of file TEcnaRun.cc.

References gather_cfg::cout.

276  : TObject::TObject(dcop) {
277  std::cout << "*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> "
278  << " Now is the time to write a copy constructor" << std::endl;
279 
280  //{ Int_t cintoto; cin >> cintoto; }
281 }

◆ ~TEcnaRun()

TEcnaRun::~TEcnaRun ( )
override

Definition at line 302 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_AdcValues, fT3d1_cor_ss, fT3d1_cov_ss, fT3d2_AdcValues, fT3d2_cor_ss, fT3d2_cov_ss, fT3d_AdcValues, fT3d_cor_ss, fT3d_cov_ss, 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 mps_fire::i.

302  {
303  //Destructor
304 
306  std::cout << "*TEcnaRun::~TEcnaRun()> Entering destructor." << std::endl;
307  }
308 
310  if (fBuildEvtNotSkipped > 0) {
311  std::cout << "************************************************************************************* "
312  << std::endl;
313  std::cout << "*TEcnaRun::~TEcnaRun()> Nb of calls to GetSampleAdcValues by cmsRun: " << fBuildEvtNotSkipped
314  << std::endl;
315  std::cout << "************************************************************************************* "
316  << std::endl;
317  }
318  }
319 
321  Int_t misc_czero = 0;
322  for (Int_t i = 0; i < fNbOfMiscDiagCounters; i++) {
323  if (fMiscDiag[i] != 0) {
324  std::cout << " fMiscDiag Counter " << std::setw(3) << i << " = " << std::setw(9)
325  << fMiscDiag[i] << " (INFO: alloc on non zero freed zone) " << std::endl;
326  } else {
327  misc_czero++;
328  }
329  }
330  std::cout << " Nb of fMiscDiag counters at zero: " << misc_czero
331  << " (total nb of counters: " << fNbOfMiscDiagCounters << ")" << std::endl;
332  }
333 
334  if (fMiscDiag != nullptr) {
335  delete[] fMiscDiag;
336  fCdelete++;
337  }
338 
339  //if (fFileHeader != 0){delete fFileHeader; fCdelete++;}
340  //if (fEcal != 0){delete fEcal; fCdelete++;}
341  //if (fEcalNumbering != 0){delete fEcalNumbering; fCdelete++;}
342  //if (fCnaParCout != 0){delete fCnaParCout; fCdelete++;}
343  //if (fCnaParPaths != 0){delete fCnaParPaths; fCdelete++;}
344  //if (fCnaWrite != 0){delete fCnaWrite; fCdelete++;}
345 
346  if (fT1d_StexStinFromIndex != nullptr) {
347  delete[] fT1d_StexStinFromIndex;
348  fCdelete++;
349  }
350 
351  if (fT2d_NbOfEvts != nullptr) {
352  delete[] fT2d_NbOfEvts;
353  fCdelete++;
354  }
355  if (fT1d_NbOfEvts != nullptr) {
356  delete[] fT1d_NbOfEvts;
357  fCdelete++;
358  }
359 
360  if (fT3d_AdcValues != nullptr) {
361  delete[] fT3d_AdcValues;
362  fCdelete++;
363  }
364  if (fT3d2_AdcValues != nullptr) {
365  delete[] fT3d2_AdcValues;
366  fCdelete++;
367  }
368  if (fT3d1_AdcValues != nullptr) {
369  delete[] fT3d1_AdcValues;
370  fCdelete++;
371  }
372 
373  if (fT2d_ev != nullptr) {
374  delete[] fT2d_ev;
375  fCdelete++;
376  }
377  if (fT1d_ev != nullptr) {
378  delete[] fT1d_ev;
379  fCdelete++;
380  }
381 
382  if (fT2d_sig != nullptr) {
383  delete[] fT2d_sig;
384  fCdelete++;
385  }
386  if (fT1d_sig != nullptr) {
387  delete[] fT1d_sig;
388  fCdelete++;
389  }
390 
391  if (fT3d_cov_ss != nullptr) {
392  delete[] fT3d_cov_ss;
393  fCdelete++;
394  }
395  if (fT3d2_cov_ss != nullptr) {
396  delete[] fT3d2_cov_ss;
397  fCdelete++;
398  }
399  if (fT3d1_cov_ss != nullptr) {
400  delete[] fT3d1_cov_ss;
401  fCdelete++;
402  }
403 
404  if (fT3d_cor_ss != nullptr) {
405  delete[] fT3d_cor_ss;
406  fCdelete++;
407  }
408  if (fT3d2_cor_ss != nullptr) {
409  delete[] fT3d2_cor_ss;
410  fCdelete++;
411  }
412  if (fT3d1_cor_ss != nullptr) {
413  delete[] fT3d1_cor_ss;
414  fCdelete++;
415  }
416 
417  if (fT2d_lf_cov != nullptr) {
418  delete[] fT2d_lf_cov;
419  fCdelete++;
420  }
421  if (fT2d1_lf_cov != nullptr) {
422  delete[] fT2d1_lf_cov;
423  fCdelete++;
424  }
425 
426  if (fT2d_lf_cor != nullptr) {
427  delete[] fT2d_lf_cor;
428  fCdelete++;
429  }
430  if (fT2d1_lf_cor != nullptr) {
431  delete[] fT2d1_lf_cor;
432  fCdelete++;
433  }
434 
435  if (fT2d_hf_cov != nullptr) {
436  delete[] fT2d_hf_cov;
437  fCdelete++;
438  }
439  if (fT2d1_hf_cov != nullptr) {
440  delete[] fT2d1_hf_cov;
441  fCdelete++;
442  }
443 
444  if (fT2d_hf_cor != nullptr) {
445  delete[] fT2d_hf_cor;
446  fCdelete++;
447  }
448  if (fT2d1_hf_cor != nullptr) {
449  delete[] fT2d1_hf_cor;
450  fCdelete++;
451  }
452 
453  if (fT2d_lfcc_mostins != nullptr) {
454  delete[] fT2d_lfcc_mostins;
455  fCdelete++;
456  }
457  if (fT2d1_lfcc_mostins != nullptr) {
458  delete[] fT2d1_lfcc_mostins;
459  fCdelete++;
460  }
461 
462  if (fT2d_hfcc_mostins != nullptr) {
463  delete[] fT2d_hfcc_mostins;
464  fCdelete++;
465  }
466  if (fT2d1_hfcc_mostins != nullptr) {
467  delete[] fT2d1_hfcc_mostins;
468  fCdelete++;
469  }
470 
471  if (fT1d_ev_ev != nullptr) {
472  delete[] fT1d_ev_ev;
473  fCdelete++;
474  }
475  if (fT1d_evsamp_of_sigevt != nullptr) {
476  delete[] fT1d_evsamp_of_sigevt;
477  fCdelete++;
478  }
479  if (fT1d_ev_cor_ss != nullptr) {
480  delete[] fT1d_ev_cor_ss;
481  fCdelete++;
482  }
483  if (fT1d_av_mped != nullptr) {
484  delete[] fT1d_av_mped;
485  fCdelete++;
486  }
487  if (fT1d_av_totn != nullptr) {
488  delete[] fT1d_av_totn;
489  fCdelete++;
490  }
491  if (fT1d_av_lofn != nullptr) {
492  delete[] fT1d_av_lofn;
493  fCdelete++;
494  }
495  if (fT1d_av_hifn != nullptr) {
496  delete[] fT1d_av_hifn;
497  fCdelete++;
498  }
499  if (fT1d_av_ev_corss != nullptr) {
500  delete[] fT1d_av_ev_corss;
501  fCdelete++;
502  }
503  if (fT1d_av_sig_corss != nullptr) {
504  delete[] fT1d_av_sig_corss;
505  fCdelete++;
506  }
507 
508  if (fT1d_sigevt_of_evsamp != nullptr) {
509  delete[] fT1d_sigevt_of_evsamp;
510  fCdelete++;
511  }
512  if (fT1d_evevt_of_sigsamp != nullptr) {
513  delete[] fT1d_evevt_of_sigsamp;
514  fCdelete++;
515  }
516  if (fT1d_sig_cor_ss != nullptr) {
517  delete[] fT1d_sig_cor_ss;
518  fCdelete++;
519  }
520 
521  if (fT2dCrysNumbersTable != nullptr) {
522  delete[] fT2dCrysNumbersTable;
523  fCdelete++;
524  }
525  if (fT1dCrysNumbersTable != nullptr) {
526  delete[] fT1dCrysNumbersTable;
527  fCdelete++;
528  }
529 
530  if (fTagStinNumbers != nullptr) {
531  delete[] fTagStinNumbers;
532  fCdelete++;
533  }
534  if (fTagNbOfEvts != nullptr) {
535  delete[] fTagNbOfEvts;
536  fCdelete++;
537  }
538  if (fTagAdcEvt != nullptr) {
539  delete[] fTagAdcEvt;
540  fCdelete++;
541  }
542  if (fTagMSp != nullptr) {
543  delete[] fTagMSp;
544  fCdelete++;
545  }
546  if (fTagSSp != nullptr) {
547  delete[] fTagSSp;
548  fCdelete++;
549  }
550 
551  if (fTagCovCss != nullptr) {
552  delete[] fTagCovCss;
553  fCdelete++;
554  }
555  if (fTagCorCss != nullptr) {
556  delete[] fTagCorCss;
557  fCdelete++;
558  }
559 
560  if (fTagHfCov != nullptr) {
561  delete[] fTagHfCov;
562  fCdelete++;
563  }
564  if (fTagHfCor != nullptr) {
565  delete[] fTagHfCor;
566  fCdelete++;
567  }
568  if (fTagLfCov != nullptr) {
569  delete[] fTagLfCov;
570  fCdelete++;
571  }
572  if (fTagLfCor != nullptr) {
573  delete[] fTagLfCor;
574  fCdelete++;
575  }
576 
577  if (fTagLFccMoStins != nullptr) {
578  delete[] fTagLFccMoStins;
579  fCdelete++;
580  }
581  if (fTagHFccMoStins != nullptr) {
582  delete[] fTagHFccMoStins;
583  fCdelete++;
584  }
585 
586  if (fTagPed != nullptr) {
587  delete[] fTagPed;
588  fCdelete++;
589  }
590  if (fTagTno != nullptr) {
591  delete[] fTagTno;
592  fCdelete++;
593  }
594  if (fTagMeanCorss != nullptr) {
595  delete[] fTagMeanCorss;
596  fCdelete++;
597  }
598 
599  if (fTagLfn != nullptr) {
600  delete[] fTagLfn;
601  fCdelete++;
602  }
603  if (fTagHfn != nullptr) {
604  delete[] fTagHfn;
605  fCdelete++;
606  }
607  if (fTagSigCorss != nullptr) {
608  delete[] fTagSigCorss;
609  fCdelete++;
610  }
611 
612  if (fTagAvPed != nullptr) {
613  delete[] fTagAvPed;
614  fCdelete++;
615  }
616  if (fTagAvTno != nullptr) {
617  delete[] fTagAvTno;
618  fCdelete++;
619  }
620  if (fTagAvLfn != nullptr) {
621  delete[] fTagAvLfn;
622  fCdelete++;
623  }
624  if (fTagAvHfn != nullptr) {
625  delete[] fTagAvHfn;
626  fCdelete++;
627  }
628  if (fTagAvMeanCorss != nullptr) {
629  delete[] fTagAvMeanCorss;
630  fCdelete++;
631  }
632  if (fTagAvSigCorss != nullptr) {
633  delete[] fTagAvSigCorss;
634  fCdelete++;
635  }
636 
637  if (fCnew != fCdelete) {
638  std::cout << "!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = " << fCnew
639  << ", fCdelete = " << fCdelete << fTTBELL << std::endl;
640  } else {
641  // std::cout << "*TEcnaRun::~TEcnaRun()> Management of memory allocations: OK. fCnew = "
642  // << fCnew << ", fCdelete = " << fCdelete << std::endl;
643  }
644 
646  std::cout << "*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " << this << ")." << std::endl
647  << "~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#"
648  << std::endl;
649  }
650 
651  // std::cout << "[Info Management] CLASS: TEcnaRun. DESTROY OBJECT: this = " << this << std::endl;
652 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:470
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:445
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:439
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:458
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:403
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
Int_t fCdelete
Definition: TEcnaRun.h:372
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:468
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:475
Int_t * fTagPed
Definition: TEcnaRun.h:444
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:503
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:455
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:496
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagHfn
Definition: TEcnaRun.h:464
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:450
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:479
Double_t ** fT2d_sig
Definition: TEcnaRun.h:428
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:487
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:443
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:433
Int_t * fTagTno
Definition: TEcnaRun.h:449
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:438
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:465
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:483
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:434
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:418
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:484
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:432
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:497
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:478
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:508
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:488
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:448
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:493
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Double_t * fT1d_ev
Definition: TEcnaRun.h:425
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415
Double_t ** fT3d2_AdcValues
Definition: TEcnaRun.h:413
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:474
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:460
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:502
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:377
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
TString fTTBELL
Definition: TEcnaRun.h:374
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:463
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Double_t * fT1d_sig
Definition: TEcnaRun.h:429
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:492

Member Function Documentation

◆ AverageHighFrequencyNoise()

void TEcnaRun::AverageHighFrequencyNoise ( )

Definition at line 2388 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 StandardCalculations().

2388  {
2389  // Calculation of the average
2390  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the High Frequency Noise
2391 
2392  //... preliminary calculation of the High Frequency Noise if not done yet
2393  if (fTagHfn[0] != 1) {
2395  fTagHfn[0] = 0;
2396  }
2397  //................... Allocation av_hifn + init to zero (mandatory)
2398  if (fT1d_av_hifn == nullptr) {
2399  fT1d_av_hifn = new Double_t[fEcal->MaxStinEcnaInStex()];
2400  fCnew++;
2401  }
2402  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2403  if (fT1d_av_hifn[i0StexStinEcna] != (Double_t)0) {
2404  fMiscDiag[44]++;
2405  fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2406  }
2407  }
2408 
2410  std::cout << "*TEcnaRun::AverageHighFrequencyNoise()" << std::endl;
2411  }
2413  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average High Frequency Noise"
2414  << std::endl;
2415  }
2416 
2417  //................... Calculation
2418  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2419  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2420  fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2421  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2422  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2423 
2424  if (fStexName == "SM ") {
2425  fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];
2426  }
2427 
2428  if (fStexName == "Dee") {
2429  //---------------- Special translation for mixed SCEcna (29 and 32)
2430  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2431  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2432  Int_t n1StinEcha = i0StinEcha + 1;
2433  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2434  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2435  }
2436  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2437  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2438  }
2439  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2440  fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];
2441  }
2442  }
2443  }
2444  Double_t xdivis = (Double_t)0.;
2445  if (fStexName == "SM ") {
2446  xdivis = (Double_t)fEcal->MaxCrysInStin();
2447  }
2448  if (fStexName == "Dee") {
2449  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2450  }
2451 
2452  fT1d_av_hifn[i0StexStinEcna] = fT1d_av_hifn[i0StexStinEcna] / xdivis;
2453  }
2454  fTagAvHfn[0] = 1;
2456 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t * fTagHfn
Definition: TEcnaRun.h:464
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:465
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:71
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1934
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:463
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ AverageLowFrequencyNoise()

void TEcnaRun::AverageLowFrequencyNoise ( )

Definition at line 2313 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 StandardCalculations().

2313  {
2314  // Calculation of the average
2315  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Low Frequency Noise
2316 
2317  //... preliminary calculation of the Low Frequency Noise if not done yet
2318  if (fTagLfn[0] != 1) {
2320  fTagLfn[0] = 0;
2321  }
2322  //................... Allocation av_lofn + init to zero (mandatory)
2323  if (fT1d_av_lofn == nullptr) {
2324  fT1d_av_lofn = new Double_t[fEcal->MaxStinEcnaInStex()];
2325  fCnew++;
2326  }
2327  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2328  if (fT1d_av_lofn[i0StexStinEcna] != (Double_t)0) {
2329  fMiscDiag[43]++;
2330  fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2331  }
2332  }
2333 
2335  std::cout << "*TEcnaRun::AverageLowFrequencyNoise()" << std::endl;
2336  }
2338  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average Low Frequency Noise"
2339  << std::endl;
2340  }
2341 
2342  //................... Calculation
2343  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2344  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2345  fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2346  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2347  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2348 
2349  if (fStexName == "SM ") {
2350  fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];
2351  }
2352 
2353  if (fStexName == "Dee") {
2354  //---------------- Special translation for mixed SCEcna (29 and 32)
2355  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2356  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2357  Int_t n1StinEcha = i0StinEcha + 1;
2358  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2359  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2360  }
2361  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2362  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2363  }
2364  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2365  fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];
2366  }
2367  }
2368  }
2369  Double_t xdivis = (Double_t)0.;
2370  if (fStexName == "SM ") {
2371  xdivis = (Double_t)fEcal->MaxCrysInStin();
2372  }
2373  if (fStexName == "Dee") {
2374  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2375  }
2376 
2377  fT1d_av_lofn[i0StexStinEcna] = fT1d_av_lofn[i0StexStinEcna] / xdivis;
2378  }
2379  fTagAvLfn[0] = 1;
2381 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:70
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:458
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Int_t fFlagPrint
Definition: TEcnaRun.h:507
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1861
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:460
TString fStinName
Definition: TEcnaRun.h:391
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ AverageMeanCorrelationsBetweenSamples()

void TEcnaRun::AverageMeanCorrelationsBetweenSamples ( )

Definition at line 2463 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 MeanCorrelationsBetweenSamples().

Referenced by StandardCalculations().

2463  {
2464  // Calculation of the average
2465  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the mean cor(s,s)
2466 
2467  //... preliminary calculation of the mean cor(s,s) if not done yet
2468  if (fTagMeanCorss[0] != 1) {
2470  fTagMeanCorss[0] = 0;
2471  }
2472  //................... Allocation av_ev_corss + init to zero (mandatory)
2473  if (fT1d_av_ev_corss == nullptr) {
2474  fT1d_av_ev_corss = new Double_t[fEcal->MaxStinEcnaInStex()];
2475  fCnew++;
2476  }
2477  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2478  if (fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0) {
2479  fMiscDiag[45]++;
2480  fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2481  }
2482  }
2483 
2485  std::cout << "*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << std::endl;
2486  }
2488  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average mean cor(s,s)"
2489  << std::endl;
2490  }
2491 
2492  //................... Calculation
2493  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2494  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2495  fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2496  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2497  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2498 
2499  if (fStexName == "SM ") {
2500  fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];
2501  }
2502 
2503  if (fStexName == "Dee") {
2504  //---------------- Special translation for mixed SCEcna (29 and 32)
2505  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2506  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2507  Int_t n1StinEcha = i0StinEcha + 1;
2508  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2509  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2510  }
2511  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2512  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2513  }
2514  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2515  fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];
2516  }
2517  }
2518  }
2519  Double_t xdivis = (Double_t)0.;
2520  if (fStexName == "SM ") {
2521  xdivis = (Double_t)fEcal->MaxCrysInStin();
2522  }
2523  if (fStexName == "Dee") {
2524  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2525  }
2526 
2527  fT1d_av_ev_corss[i0StexStinEcna] = fT1d_av_ev_corss[i0StexStinEcna] / xdivis;
2528  }
2529  fTagAvMeanCorss[0] = 1;
2531 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:89
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:455
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2017
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ AveragePedestals()

void TEcnaRun::AveragePedestals ( )

Definition at line 2162 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 StandardCalculations().

2162  {
2163  // Calculation of the average
2164  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Pedestals
2165 
2166  //... preliminary calculation of the Pedestals if not done yet
2167  if (fTagPed[0] != 1) {
2168  Pedestals();
2169  fTagPed[0] = 0;
2170  }
2171  //................... Allocation av_mped + init to zero (mandatory)
2172  if (fT1d_av_mped == nullptr) {
2173  fT1d_av_mped = new Double_t[fEcal->MaxStinEcnaInStex()];
2174  fCnew++;
2175  }
2176  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2177  if (fT1d_av_mped[i0StexStinEcna] != (Double_t)0) {
2178  fMiscDiag[41]++;
2179  fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
2180  }
2181  }
2182 
2184  std::cout << "*TEcnaRun::AveragePedestals()" << std::endl;
2185  }
2187  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average Pedestals"
2188  << std::endl;
2189  }
2190 
2191  //................... Calculation
2192  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2193  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2194  fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
2195  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2196  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2197 
2198  if (fStexName == "SM ") {
2199  fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];
2200  }
2201 
2202  if (fStexName == "Dee") {
2203  //---------------- Special translation for mixed SCEcna (29 and 32)
2204  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2205  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2206  Int_t n1StinEcha = i0StinEcha + 1;
2207  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2208  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2209  }
2210  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2211  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2212  }
2213  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2214  fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];
2215  }
2216  }
2217  }
2218  Double_t xdivis = (Double_t)0.;
2219  if (fStexName == "SM ") {
2220  xdivis = (Double_t)fEcal->MaxCrysInStin();
2221  }
2222  if (fStexName == "Dee") {
2223  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2224  }
2225 
2226  fT1d_av_mped[i0StexStinEcna] = fT1d_av_mped[i0StexStinEcna] / xdivis;
2227  }
2228 
2229  fTagAvPed[0] = 1;
2231 }
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:445
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t * fTagPed
Definition: TEcnaRun.h:444
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:443
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t fAvPedCalc
Definition: TEcnaHeader.h:88
void Pedestals()
Definition: TEcnaRun.cc:1746
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ AverageSigmaOfCorrelationsBetweenSamples()

void TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples ( )

Definition at line 2538 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 StandardCalculations().

2538  {
2539  // Calculation of the average
2540  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the sigma of cor(s,s)
2541 
2542  //... preliminary calculation of the sigma of cor(s,s) if not done yet
2543  if (fTagSigCorss[0] != 1) {
2545  fTagSigCorss[0] = 0;
2546  }
2547  //................... Allocation av_sig_corss + init to zero (mandatory)
2548  if (fT1d_av_sig_corss == nullptr) {
2549  fT1d_av_sig_corss = new Double_t[fEcal->MaxStinEcnaInStex()];
2550  fCnew++;
2551  }
2552  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2553  if (fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0) {
2554  fMiscDiag[46]++;
2555  fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2556  }
2557  }
2558 
2560  std::cout << "*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << std::endl;
2561  }
2563  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average sigma of cor(s,s)"
2564  << std::endl;
2565  }
2566 
2567  //................... Calculation
2568  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2569  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2570  fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2571  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2572  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2573 
2574  if (fStexName == "SM ") {
2575  fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];
2576  }
2577 
2578  if (fStexName == "Dee") {
2579  //---------------- Special translation for mixed SCEcna (29 and 32)
2580  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2581  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2582  Int_t n1StinEcha = i0StinEcha + 1;
2583  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2584  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2585  }
2586  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2587  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2588  }
2589  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2590  fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];
2591  }
2592  }
2593  }
2594  Double_t xdivis = (Double_t)0.;
2595  if (fStexName == "SM ") {
2596  xdivis = (Double_t)fEcal->MaxCrysInStin();
2597  }
2598  if (fStexName == "Dee") {
2599  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2600  }
2601 
2602  fT1d_av_sig_corss[i0StexStinEcna] = fT1d_av_sig_corss[i0StexStinEcna] / xdivis;
2603  }
2604  fTagAvSigCorss[0] = 1;
2606 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:470
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:468
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2090
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:90
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ AverageTotalNoise()

void TEcnaRun::AverageTotalNoise ( )

Definition at line 2238 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 StandardCalculations().

2238  {
2239  // Calculation of the average
2240  // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Total Noise
2241 
2242  //... preliminary calculation of the averaged Total Noise if not done yet
2243  if (fTagTno[0] != 1) {
2244  TotalNoise();
2245  fTagTno[0] = 0;
2246  }
2247  //................... Allocation av_totn + init to zero (mandatory)
2248  if (fT1d_av_totn == nullptr) {
2249  fT1d_av_totn = new Double_t[fEcal->MaxStinEcnaInStex()];
2250  fCnew++;
2251  }
2252  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2253  if (fT1d_av_totn[i0StexStinEcna] != (Double_t)0) {
2254  fMiscDiag[42]++;
2255  fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2256  }
2257  }
2258 
2260  std::cout << "*TEcnaRun::AverageTotalNoise()" << std::endl;
2261  }
2263  std::cout << " Calculation, for all the " << fStinName.Data() << "s, of the average total Noise"
2264  << std::endl;
2265  }
2266 
2267  //................... Calculation
2268  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
2269  Int_t n1StexStinEcna = i0StexStinEcna + 1;
2270  fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2271  for (Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++) {
2272  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2273 
2274  if (fStexName == "SM ") {
2275  fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];
2276  }
2277 
2278  if (fStexName == "Dee") {
2279  //---------------- Special translation for mixed SCEcna (29 and 32)
2280  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2281  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2282  Int_t n1StinEcha = i0StinEcha + 1;
2283  if (n1StexStinEcna == 10 && n1StinEcha == 11) {
2284  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);
2285  }
2286  if (n1StexStinEcna == 11 && n1StinEcha == 11) {
2287  i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);
2288  }
2289  if (!((n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11)) {
2290  fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];
2291  }
2292  }
2293  }
2294  Double_t xdivis = (Double_t)0.;
2295  if (fStexName == "SM ") {
2296  xdivis = (Double_t)fEcal->MaxCrysInStin();
2297  }
2298  if (fStexName == "Dee") {
2299  xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");
2300  }
2301 
2302  fT1d_av_totn[i0StexStinEcna] = fT1d_av_totn[i0StexStinEcna] / xdivis;
2303  }
2304  fTagAvTno[0] = 1;
2306 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
void TotalNoise()
Definition: TEcnaRun.cc:1802
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:450
Int_t * fTagTno
Definition: TEcnaRun.h:449
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:69
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:448
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ CloseRootFile()

Bool_t TEcnaRun::CloseRootFile ( const Text_t *  name)

Definition at line 3299 of file TEcnaRun.cc.

References TEcnaRootFile::CloseFile(), gather_cfg::cout, fCnaParPaths, fCodePrintAllComments, fFlagPrint, fOpenRootFile, fTTBELL, gCnaRootFile, mergeVDriftHistosByStation::name, and TEcnaParPaths::ResultsRootFilePath().

Referenced by WriteRootFile().

3299  {
3300  //Close the Root file
3301 
3302  TString s_name;
3303  s_name = fCnaParPaths->ResultsRootFilePath();
3304  s_name.Append('/');
3305  s_name.Append(name);
3306 
3307  Bool_t ok_close = kFALSE;
3308 
3309  if (fOpenRootFile == kTRUE) {
3311 
3313  std::cout << "*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() << " closed." << std::endl;
3314  }
3315 
3316  // delete gCnaRootFile; gCnaRootFile = 0; fCdelete++;
3317 
3318  fOpenRootFile = kFALSE;
3319  ok_close = kTRUE;
3320  } else {
3321  std::cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open." << fTTBELL << std::endl;
3322  }
3323  return ok_close;
3324 }
Bool_t fOpenRootFile
Definition: TEcnaRun.h:393
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t fFlagPrint
Definition: TEcnaRun.h:507
TString fTTBELL
Definition: TEcnaRun.h:374
const TString & ResultsRootFilePath() const

◆ CorrelationsBetweenSamples()

void TEcnaRun::CorrelationsBetweenSamples ( )

Definition at line 1667 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, mps_fire::i, dqmiolumiharvest::j, TEcnaParEcal::MaxCrysEcnaInStex(), mathSSE::sqrt(), and suppress.

Referenced by MeanCorrelationsBetweenSamples(), and StandardCalculations().

1667  {
1668  //Calculation of the correlations between samples for all the StexEchas
1669 
1670  //... preliminary calculation of the covariances if not done yet.
1671  // Test only the first tag since the cov are computed globaly
1672  // but set all the tags to 0 because we don't want to write
1673  // the covariances in the result ROOT file
1674  if (fTagCovCss[0] != 1) {
1676  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
1677  fTagCovCss[j0StexEcha] = 0;
1678  }
1679  }
1680 
1682  std::cout << "*TEcnaRun::CorrelationsBetweenSamples()" << std::endl;
1683  }
1685  std::cout << " Calculation: correlations between samples"
1686  << " for each channel." << std::endl;
1687  }
1688 
1689  //................... Allocations cor_ss
1690  if (fT3d_cor_ss == nullptr) {
1691  const Int_t n_samp = fNbSampForCalc;
1692  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1693  fT3d_cor_ss = new Double_t**[n_StexEcha];
1694  fCnew++;
1695  fT3d2_cor_ss = new Double_t*[n_StexEcha * n_samp];
1696  fCnew++;
1697  fT3d1_cor_ss = new Double_t[n_StexEcha * n_samp * n_samp];
1698  fCnew++;
1699  for (Int_t i = 0; i < n_StexEcha; i++) {
1700  fT3d_cor_ss[i] = &fT3d2_cor_ss[0] + i * n_samp;
1701  for (Int_t j = 0; j < n_samp; j++) {
1702  fT3d2_cor_ss[n_samp * i + j] = &fT3d1_cor_ss[0] + n_samp * (n_samp * i + j);
1703  }
1704  }
1705  }
1706 
1707  //..................... calculation of the correlations (=init)
1708  //......................computation of half of the matrix, diagonal included (verif = 1)
1709 
1710  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
1711  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1712  for (Int_t j0Sample = 0; j0Sample <= i0Sample; j0Sample++) {
1713  if ((fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample] > 0) && (fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample] > 0)) {
1714  [[clang::suppress]] fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] =
1715  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /
1716  (sqrt(fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample]) * sqrt(fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample]));
1717  } else {
1718  [[clang::suppress]] fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0; // prevoir compteur + fTTBELL
1719  }
1720  fT3d_cor_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample];
1721  }
1722  }
1723  fTagCorCss[j0StexEcha] = 1;
1725  }
1726 }
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:439
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
void CovariancesBetweenSamples()
Definition: TEcnaRun.cc:1601
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:438
Int_t fCorCssCalc
Definition: TEcnaHeader.h:74
T sqrt(T t)
Definition: SSEVec.h:23
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:432
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ CovariancesBetweenSamples()

void TEcnaRun::CovariancesBetweenSamples ( )

Definition at line 1601 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_AdcValues, fT3d_cov_ss, fTagCovCss, fTagMSp, mps_fire::i, dqmiolumiharvest::j, TEcnaParEcal::MaxCrysEcnaInStex(), SampleMeans(), and suppress.

Referenced by CorrelationsBetweenSamples().

1601  {
1602  //Calculation of the covariances between samples for all the StexEchas
1603 
1605  std::cout << "*TEcnaRun::CovariancesBetweenSamples()" << std::endl;
1606  }
1608  std::cout << " Calculation: covariances between samples"
1609  << " for each channel." << std::endl;
1610  }
1611 
1612  //................... Allocations cov_ss
1613  if (fT3d_cov_ss == nullptr) {
1614  const Int_t n_samp = fNbSampForCalc;
1615  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1616  fT3d_cov_ss = new Double_t**[n_StexEcha];
1617  fCnew++;
1618  fT3d2_cov_ss = new Double_t*[n_StexEcha * n_samp];
1619  fCnew++;
1620  fT3d1_cov_ss = new Double_t[n_StexEcha * n_samp * n_samp];
1621  fCnew++;
1622  for (Int_t i = 0; i < n_StexEcha; i++) {
1623  fT3d_cov_ss[i] = &fT3d2_cov_ss[0] + i * n_samp;
1624  for (Int_t j = 0; j < n_samp; j++) {
1625  fT3d2_cov_ss[n_samp * i + j] = &fT3d1_cov_ss[0] + n_samp * (n_samp * i + j);
1626  }
1627  }
1628  }
1629 
1630  //.................. Calculation (= init)
1631  //.................. computation of half of the matrix, diagonal included)
1632 
1633  //... preliminary calculation of the expectation values if not done yet.
1634  // The tag is set to 1 after call to the method. It is reset to 0
1635  // because the expectation values must not be written in the result ROOT file
1636  // (since the tag was equal to 0)
1637  // Results in array fT2d_ev[j0StexEcha][i0Sample]
1638  if (fTagMSp[0] != 1) {
1639  SampleMeans();
1640  fTagMSp[0] = 0;
1641  }
1642 
1643  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
1644  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1645  for (Int_t j0Sample = 0; j0Sample <= i0Sample; j0Sample++) {
1646  [[clang::suppress]] fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1647  for (Int_t i_event = 0; i_event < fNumberOfEvents; i_event++) {
1648  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] +=
1649  (fT3d_AdcValues[j0StexEcha][i0Sample][i_event] - fT2d_ev[j0StexEcha][i0Sample]) *
1650  (fT3d_AdcValues[j0StexEcha][j0Sample][i_event] - fT2d_ev[j0StexEcha][j0Sample]);
1651  }
1652  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /= (Double_t)fNumberOfEvents;
1653  fT3d_cov_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample];
1654  }
1655  }
1656  fTagCovCss[j0StexEcha] = 1;
1658  }
1659 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:433
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:434
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:432
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
void SampleMeans()
Definition: TEcnaRun.cc:1470
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
Int_t fCovCssCalc
Definition: TEcnaHeader.h:73
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ Expert1Calculations()

void TEcnaRun::Expert1Calculations ( )

Definition at line 1442 of file TEcnaRun.cc.

References HighFrequencyCorrelationsBetweenChannels(), and LowFrequencyCorrelationsBetweenChannels().

Referenced by TEcnaGui::Calculations().

1442  {
1443  // long time, big file
1444 
1447 }
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2947
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2742

◆ Expert2Calculations()

void TEcnaRun::Expert2Calculations ( )

Definition at line 1449 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins(), and LowFrequencyMeanCorrelationsBetweenStins().

Referenced by TEcnaGui::Calculations().

1449  {
1450  // long time, no big file
1451  // expert 1 is called (if not called before) without writing in file.
1452  // Results are used only in memory to compute expert2 calculations
1453 
1456 }
void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3139
void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3031

◆ GetNewRootFileName()

const TString & TEcnaRun::GetNewRootFileName ( ) const

Definition at line 3432 of file TEcnaRun.cc.

References fNewRootFileName.

3432 { return fNewRootFileName; }
TString fNewRootFileName
Definition: TEcnaRun.h:398

◆ GetNewRootFileNameShort()

const TString & TEcnaRun::GetNewRootFileNameShort ( ) const

Definition at line 3433 of file TEcnaRun.cc.

References fNewRootFileNameShort.

Referenced by TEcnaGui::Calculations().

3433 { return fNewRootFileNameShort; }
TString fNewRootFileNameShort
Definition: TEcnaRun.h:399

◆ GetPathForResults()

Bool_t TEcnaRun::GetPathForResults ( )

Definition at line 87 of file TEcnaRun.cc.

References fCnaParPaths, and TEcnaParPaths::GetPathForResultsRootFiles().

TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Bool_t GetPathForResultsRootFiles()

◆ GetReadyToCompute()

void TEcnaRun::GetReadyToCompute ( )

Definition at line 1361 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaWrite, fEcal, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, TEcnaHeader::fLastReqEvtNumber, TEcnaWrite::fMakeResultsFileName(), TEcnaHeader::fNbOfSamples, fNbSampForFic, fNumberOfEvents, TEcnaHeader::fReqNbOfEvts, TEcnaHeader::fRunNumber, TEcnaHeader::fStex, fT2d_NbOfEvts, TEcnaHeader::fTypAna, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaWrite::NumberOfEventsAnalysis(), and TEcnaWrite::RegisterFileParameters().

Referenced by TEcnaGui::Calculations().

1361  {
1362  //
1363  // MAKE THE RESULTS FILE NAME and
1364  // CHECK OF THE NUMBER OF FOUND EVENTS AND init fNumberOfEvents
1365  // (number used to compute the average values over the events)
1366  // The number of events fNumberOfEvents is extracted from the array fT2d_NbOfEvts[]
1367  // which has been filled by the GetSampleAdcValues(...) method
1368 
1369  //..................... Making of the Root File name that will be written
1376  fFileHeader->fStex);
1377 
1378  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
1379 
1380  //..................... Checking numbers of found events channel by channel
1381  if (fT2d_NbOfEvts != nullptr) {
1384  } else {
1385  std::cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << std::endl;
1386  }
1387 }
Int_t NumberOfEventsAnalysis(Int_t **, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaWrite.cc:512
Int_t fStex
Definition: TEcnaHeader.h:53
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:595
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t fNbOfSamples
Definition: TEcnaHeader.h:48
Int_t fNbSampForFic
Definition: TEcnaRun.h:405
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
TString fTypAna
Definition: TEcnaHeader.h:47
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
Int_t fRunNumber
Definition: TEcnaHeader.h:49
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:629
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:386
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ GetReadyToReadData() [1/2]

void TEcnaRun::GetReadyToReadData ( const 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 669 of file TEcnaRun.cc.

References nlast, and contentValuesCheck::run_number.

Referenced by TEcnaGui::Calculations().

674  {
675  //Preparation of the data reading. Set part of the header. No RunType as argument.
676  //Use default value = 99999999 and call method with all the arguments (see below)
677 
678  Int_t RunType = 99999999;
679  GetReadyToReadData(typ_ana, run_number, nfirst, nlast, nbevts, Stex, RunType);
680 }
void GetReadyToReadData(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:669
int nlast
Definition: AMPTWrapper.h:57

◆ GetReadyToReadData() [2/2]

void TEcnaRun::GetReadyToReadData ( const 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 682 of file TEcnaRun.cc.

References DMR_cfg::cerr, gather_cfg::cout, fCnew, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagPrint, TEcnaHeader::fLastReqEvtNumber, fMiscDiag, fNbOfMiscDiagCounters, fNbSampForFic, fObjectManager, fReadyToReadData, TEcnaHeader::fReqNbOfEvts, TEcnaHeader::fRunNumber, TEcnaHeader::fRunType, fSpecialStexStinNotIndexed, TEcnaHeader::fStex, fStexName, fStinName, fT1d_NbOfEvts, fT1d_StexStinFromIndex, fT2d_NbOfEvts, fT3d1_AdcValues, fT3d2_AdcValues, fT3d_AdcValues, 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(), TEcnaParEcal::MaxStinEcnaInStex(), nlast, contentValuesCheck::run_number, and suppress.

688  {
689  //Preparation of the data reading. Set part of the header
690  //
691  // [nfirst, nlast] = [1,50] (50 events) or [151,300] (150 events) or etc...
692 
693  Int_t nrangeevts = nlast - nfirst + 1; // number of events in range
694 
695  if (nrangeevts < nbevts) {
696  if (nlast >= nfirst) {
697  std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts
698  << ", out of range (range = " << nfirst << "," << nlast << ")" << std::endl
699  << " The number of found events will be less " << std::endl
700  << " than the number of requested events." << std::endl;
701  }
702  if (nlast < nfirst) {
703  std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast
704  << ", less than first requested event number (= " << nfirst << ")" << std::endl
705  << " File will be read until EOF if the number of found events"
706  << std::endl
707  << " remains less than the number of requested events." << std::endl;
708  }
709  }
710 
711  //............. allocation for counters
712  fMiscDiag = new Int_t[fNbOfMiscDiagCounters];
713  fCnew++;
714  for (Int_t iz = 0; iz < fNbOfMiscDiagCounters; iz++) {
715  fMiscDiag[iz] = (Int_t)0;
716  }
717 
718  //************** CHECK OF ARGUMENTS: nfirst_arg and nbevts_arg
719  Int_t nentries = 99999999; // => to be reintroduced as argument (like run_type) (?)
720  if (nfirst <= nentries) {
721  //--------------------- test positivity of nfirst_arg (GetReadyToReadData)
722  if (nfirst > 0) {
723  //-------- test compatibility between the last requested event number
724  // and the number of entries
725  if (nlast <= nentries) {
726  const Text_t* h_name = "CnaHeader"; //==> voir cette question avec FXG
727  const Text_t* h_title = "CnaHeader"; //==> voir cette question avec FXG
728  //fFileHeader->HeaderParameters(h_name, h_title ,
729  // typ_ana, fNbSampForFic,
730  // run_number, nfirst, nlast, nbevts,
731  // Stex, nentries); fCnew++;
732 
733  if (fEcal->MaxStinEcnaInStex() > 0 && fEcal->MaxCrysInStin() > 0 && fNbSampForFic > 0) {
734  if (fFileHeader == nullptr) {
735  fFileHeader = new TEcnaHeader(fObjectManager, h_name, h_title);
736  } // fCnew++;
737 
738  fFileHeader->HeaderParameters(typ_ana, fNbSampForFic, run_number, nfirst, nlast, nbevts, Stex, run_type);
739 
740  // After this call to TEcnaHeader, we have: (GetReadyToReadData)
741  // fFileHeader->fTypAna = typ_ana
742  // fFileHeader->fNbOfSamples = fNbSampForFic
743  // fFileHeader->fRunNumber = run_number
744  // fFileHeader->fFirstReqEvtNumber = nfirst
745  // fFileHeader->fLastReqEvtNumber = nlast
746  // fFileHeader->fReqNbOfEvts = nbevts
747  // fFileHeader->fStex = Stex number
748  // fFileHeader->fRunType = run_type
749 
750  // fFileHeader->Print();
751 
752  // {Int_t cintoto; std::cout << "taper 0 pour continuer" << std::endl; cin >> cintoto;}
753 
754  // fFileHeader->SetName("CnaHeader"); *======> voir FXG
755  // fFileHeader->SetTitle("CnaHeader");
756 
757  //......................................... allocation tags + init of them (GetReadyToReadData)
758 
759  fTagStinNumbers = new Int_t[1];
760  fCnew++;
761  fTagStinNumbers[0] = (Int_t)0;
762  fTagNbOfEvts = new Int_t[1];
763  fCnew++;
764  fTagNbOfEvts[0] = (Int_t)0;
765 
766  fTagAdcEvt = new Int_t[fEcal->MaxCrysEcnaInStex()];
767  fCnew++;
768  for (Int_t iz = 0; iz < fEcal->MaxCrysEcnaInStex(); iz++) {
769  fTagAdcEvt[iz] = (Int_t)0;
770  }
771 
772  fTagMSp = new Int_t[1];
773  fCnew++;
774  fTagMSp[0] = (Int_t)0;
775  fTagSSp = new Int_t[1];
776  fCnew++;
777  fTagSSp[0] = (Int_t)0;
778 
779  fTagCovCss = new Int_t[fEcal->MaxCrysEcnaInStex()];
780  fCnew++;
781  for (Int_t iz = 0; iz < fEcal->MaxCrysEcnaInStex(); iz++) {
782  fTagCovCss[iz] = (Int_t)0;
783  }
784 
785  fTagCorCss = new Int_t[fEcal->MaxCrysEcnaInStex()];
786  fCnew++;
787  for (Int_t iz = 0; iz < fEcal->MaxCrysEcnaInStex(); iz++) {
788  fTagCorCss[iz] = (Int_t)0;
789  }
790 
791  fTagLfCov = new Int_t[1];
792  fCnew++;
793  fTagLfCov[0] = (Int_t)0;
794  fTagLfCor = new Int_t[1];
795  fCnew++;
796  fTagLfCor[0] = (Int_t)0;
797 
798  fTagHfCov = new Int_t[1];
799  fCnew++;
800  fTagHfCov[0] = (Int_t)0;
801  fTagHfCor = new Int_t[1];
802  fCnew++;
803  fTagHfCor[0] = (Int_t)0;
804 
805  fTagLFccMoStins = new Int_t[1];
806  fCnew++;
807  fTagLFccMoStins[0] = (Int_t)0;
808  fTagHFccMoStins = new Int_t[1];
809  fCnew++;
810  fTagHFccMoStins[0] = (Int_t)0;
811 
812  fTagPed = new Int_t[1];
813  fCnew++;
814  fTagPed[0] = (Int_t)0;
815  fTagTno = new Int_t[1];
816  fCnew++;
817  fTagTno[0] = (Int_t)0;
818  fTagMeanCorss = new Int_t[1];
819  fCnew++;
820  fTagMeanCorss[0] = (Int_t)0;
821 
822  fTagLfn = new Int_t[1];
823  fCnew++;
824  fTagLfn[0] = (Int_t)0;
825  fTagHfn = new Int_t[1];
826  fCnew++;
827  fTagHfn[0] = (Int_t)0;
828  fTagSigCorss = new Int_t[1];
829  fCnew++;
830  fTagSigCorss[0] = (Int_t)0;
831 
832  fTagAvPed = new Int_t[1];
833  fCnew++;
834  fTagAvPed[0] = (Int_t)0;
835  fTagAvTno = new Int_t[1];
836  fCnew++;
837  fTagAvTno[0] = (Int_t)0;
838  fTagAvLfn = new Int_t[1];
839  fCnew++;
840  fTagAvLfn[0] = (Int_t)0;
841  fTagAvHfn = new Int_t[1];
842  fCnew++;
843  fTagAvHfn[0] = (Int_t)0;
844  fTagAvMeanCorss = new Int_t[1];
845  fCnew++;
846  fTagAvMeanCorss[0] = (Int_t)0;
847  fTagAvSigCorss = new Int_t[1];
848  fCnew++;
849  fTagAvSigCorss[0] = (Int_t)0;
850 
851  //====================================================================================
852  //
853  // allocation for fT1d_StexStinFromIndex[] and init to fSpecialStexStinNotIndexed
854  //
855  //====================================================================================
856 
857  if (fT1d_StexStinFromIndex == nullptr) {
859  fCnew++;
860  }
861  for (Int_t i0_Stin = 0; i0_Stin < fEcal->MaxStinEcnaInStex(); i0_Stin++) {
863  }
864 
865  //------------------------------------------------------------- (GetReadyToReadData)
866 
867  //====================================================================================
868  //
869  // allocation of the 3D array fT3d_AdcValues[channel][sample][events] (ADC values)
870  //
871  // This array is filled in the GetSampleAdcValues(...) method
872  //
873  //====================================================================================
874 
875  if (fT3d_AdcValues == nullptr) {
876  //............ Allocation for the 3d array
877  std::cout << "*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions."
878  << " Nb of requested evts = " << fFileHeader->fReqNbOfEvts << std::endl
879  << " This number must not be too large"
880  << " (no failure after this message means alloc OK)." << std::endl;
881 
882  fT3d_AdcValues = new Double_t**[fEcal->MaxCrysEcnaInStex()];
883  fCnew++;
884 
886  fCnew++;
887 
889  fCnew++;
890 
891  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
892  fT3d_AdcValues[i0StexEcha] = &fT3d2_AdcValues[0] + i0StexEcha * fNbSampForFic;
893  for (Int_t j0Sample = 0; j0Sample < fNbSampForFic; j0Sample++) {
894  fT3d2_AdcValues[fNbSampForFic * i0StexEcha + j0Sample] =
895  &fT3d1_AdcValues[0] + fFileHeader->fReqNbOfEvts * (fNbSampForFic * i0StexEcha + j0Sample);
896  }
897  }
898  }
899  //................................. Init to zero
900  for (Int_t iza = 0; iza < fEcal->MaxCrysEcnaInStex(); iza++) {
901  for (Int_t izb = 0; izb < fNbSampForFic; izb++) {
902  for (Int_t izc = 0; izc < fFileHeader->fReqNbOfEvts; izc++) {
903  if (fT3d_AdcValues[iza][izb][izc] != (Double_t)0) {
904  fMiscDiag[0]++;
905  fT3d_AdcValues[iza][izb][izc] = (Double_t)0;
906  }
907  }
908  }
909  }
910 
911  //--------------------------------------------------------- (GetReadyToReadData)
912  //====================================================================================
913  //
914  // allocation of the 2D array fT2d_NbOfEvts[channel][sample] (Max nb of evts)
915  //
916  //====================================================================================
917 
918  if (fT2d_NbOfEvts == nullptr) {
919  fT2d_NbOfEvts = new Int_t*[fEcal->MaxCrysEcnaInStex()];
920  fCnew++;
922  fCnew++;
923 
924  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
925  fT2d_NbOfEvts[i0StexEcha] = &fT1d_NbOfEvts[0] + i0StexEcha * fNbSampForFic;
926  }
927 
928  //................ Init the array to 0
929  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
930  for (Int_t i0Sample = 0; i0Sample < fNbSampForFic; i0Sample++) {
931  [[clang::suppress]] fT2d_NbOfEvts[i0StexEcha][i0Sample] = 0;
932  }
933  }
934  } else {
935  std::cerr << "!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!"
936  << " Pointer already not NULL " << fTTBELL << std::endl;
937  // {Int_t cintoto; std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"
938  // << std::endl; std::cin >> cintoto;}
939  }
940  } else {
941  std::cerr << std::endl
942  << "!TEcnaRun::GetReadyToReadData(...)> "
943  << " *** ERROR *** " << std::endl
944  << " --------------------------------------------------" << std::endl
945  << " NULL or NEGATIVE values for arguments" << std::endl
946  << " with expected positive values:" << std::endl
947  << " Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << std::endl
948  << " Number of crystals in Stin = " << fEcal->MaxCrysInStin() << std::endl
949  << " Number of samples by channel = " << fNbSampForFic << std::endl
950  << std::endl
951  << std::endl
952  << " hence, no memory allocation for array member has been performed." << std::endl;
953 
954  std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit";
955  Int_t toto;
956  std::cin >> toto;
957  }
958  //----------------------------------------------------------- (GetReadyToReadData)
960  std::cout << std::endl;
961  std::cout << "*TEcnaRun::GetReadyToReadData(...)>" << std::endl
962  << " The method has been called with the following argument values:" << std::endl
963  << " Analysis name = " << fFileHeader->fTypAna << std::endl
964  << " Run number = " << fFileHeader->fRunNumber << std::endl
965  << " Run type = " << fFileHeader->fRunType << std::endl
966  << " First requested event number = " << fFileHeader->fFirstReqEvtNumber << std::endl
967  << " Last requested event number = " << fFileHeader->fLastReqEvtNumber << std::endl
968  << " " << fStexName.Data() << " number = " << fFileHeader->fStex
969  << std::endl
970  << " Number of " << fStinName.Data() << " in " << fStexName.Data() << " = "
971  << fEcal->MaxStinEcnaInStex() << std::endl
972  << " Number of crystals in " << fStinName.Data() << " = " << fEcal->MaxCrysInStin()
973  << std::endl
974  << " Number of samples by channel = " << fNbSampForFic << std::endl
975  << std::endl;
976  }
977 
978  fReadyToReadData = 1; // set flag
979  } else {
981  std::cout << "!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << std::endl
982  << "! The fisrt requested event number is not positive (nfirst = " << nfirst << ") " << fTTBELL
983  << std::endl;
984  }
985  }
986  } else {
988  std::cout << std::endl
989  << "!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << std::endl
990  << "! The number of requested events (nbevts = " << nbevts << ") is too large." << std::endl
991  << "! Last event number = " << nlast << " > number of entries = " << nentries << ". " << fTTBELL
992  << std::endl
993  << std::endl;
994  }
995  }
996  } else {
997  std::cout << "!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> "
998  << " The first requested event number is greater than the number of entries." << fTTBELL << std::endl;
999  }
1001  std::cout << "*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = " << fReadyToReadData
1002  << std::endl;
1003  }
1004 
1005 } // end of GetReadyToReadData
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:380
Int_t fReadyToReadData
Definition: TEcnaRun.h:394
Int_t fRunType
Definition: TEcnaHeader.h:60
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Int_t * fTagPed
Definition: TEcnaRun.h:444
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagHfn
Definition: TEcnaRun.h:464
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Int_t fNbSampForFic
Definition: TEcnaRun.h:405
Int_t * fTagTno
Definition: TEcnaRun.h:449
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:418
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:401
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Int_t MaxCrysInStin()
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t fCnew
Definition: TEcnaRun.h:371
TString fTypAna
Definition: TEcnaHeader.h:47
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
int nlast
Definition: AMPTWrapper.h:57
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415
void HeaderParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaHeader.cc:126
Double_t ** fT3d2_AdcValues
Definition: TEcnaRun.h:413
Int_t MaxStinEcnaInStex()
Int_t fRunNumber
Definition: TEcnaHeader.h:49
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
TString fStinName
Definition: TEcnaRun.h:391
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:377
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
TString fTTBELL
Definition: TEcnaRun.h:374
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ GetRootFileName()

const TString & TEcnaRun::GetRootFileName ( ) const

Definition at line 1329 of file TEcnaRun.cc.

References fRootFileName.

1329 { return fRootFileName; }
TString fRootFileName
Definition: TEcnaRun.h:396

◆ GetRootFileNameShort()

const TString & TEcnaRun::GetRootFileNameShort ( ) const

Definition at line 1330 of file TEcnaRun.cc.

References fRootFileNameShort.

Referenced by TEcnaGui::Calculations().

1330 { return fRootFileNameShort; }
TString fRootFileNameShort
Definition: TEcnaRun.h:397

◆ GetSampleAdcValues()

Bool_t TEcnaRun::GetSampleAdcValues ( const Int_t &  n1EventNumber,
const Int_t &  n1StexStin,
const Int_t &  i0StinEcha,
const Int_t &  i0Sample,
const Double_t &  adcvalue 
)

Definition at line 1031 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_AdcValues, fTagNbOfEvts, fTagStinNumbers, fTTBELL, TEcnaNumbering::GetDeeSCConsFrom1DeeSCEcna(), TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxSampADC(), and TEcnaParEcal::MaxStinEcnaInStex().

1035  {
1036  //Building of the arrays fT1d_StexStinFromIndex[] and fT3d_AdcValues[][][]
1037 
1038  fBuildEvtNotSkipped++; // event not skipped by cmsRun
1039 
1040  Bool_t ret_code = kFALSE;
1041 
1042  Int_t i0EventIndex = n1EventNumber - 1; // INDEX FOR Event number
1043  Int_t i0StexStinEcna = n1StexStin - 1; // INDEX FOR StexStin = Number_of_the_Stin_in_Stex - 1
1044 
1045  Int_t i_trouve = 0;
1046  //.................................................................. (GetSampleAdcValues)
1047  if (fReadyToReadData == 1) {
1048  if (n1StexStin >= 1 && n1StexStin <= fEcal->MaxStinEcnaInStex()) {
1049  if (i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin()) {
1050  if (i0Sample >= 0 && i0Sample < fEcal->MaxSampADC()) {
1051  //..... Put the StexStin number in 1D array fT1d_StexStinFromIndex[] = Stin index + 1
1052  if (fT1d_StexStinFromIndex != nullptr) // table fT1d_StexStinFromIndex[index] already allocated
1053  {
1054  ret_code = kTRUE;
1055 
1056  // StexStin already indexed
1057  if (n1StexStin == fT1d_StexStinFromIndex[i0StexStinEcna]) {
1058  i_trouve = 1;
1059  }
1060 
1061  // StexStin index not found: set index for new StexStin
1062  if (i_trouve != 1) {
1063  if (fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed) {
1064  fT1d_StexStinFromIndex[i0StexStinEcna] = n1StexStin;
1066  fTagStinNumbers[0] = 1;
1067  fStinIndexBuilt++; // number of found Stins
1068 
1070  if (fStinIndexBuilt == 1) {
1071  std::cout << std::endl
1072  << "*TEcnaRun::GetSampleAdcValues(...)> event " << n1EventNumber << " : first event for "
1073  << fStexName.Data() << " " << fFileHeader->fStex << "; " << fStinName.Data() << "s : ";
1074  }
1075  if (fFlagSubDet == "EB") {
1076  std::cout << fT1d_StexStinFromIndex[i0StexStinEcna] << ", ";
1077  }
1078  if (fFlagSubDet == "EE") {
1080  fT1d_StexStinFromIndex[i0StexStinEcna])
1081  << ", ";
1082  }
1083  }
1084  //.................................................... (GetSampleAdcValues)
1086  std::cout << " (" << fStinIndexBuilt << " " << fStinName.Data() << " found), channel " << i0StinEcha
1087  << ", i0Sample " << i0Sample << std::endl;
1088  }
1089  ret_code = kTRUE;
1090  } // if ( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
1091  else {
1092  std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> NOT ALLOWED if RESULT. "
1093  << " n1StexStin = " << n1StexStin << ", fT1d_StexStinFromIndex[" << i0StexStinEcna
1094  << "] = " << fT1d_StexStinFromIndex[i0StexStinEcna]
1095  << ", fStinIndexBuilt = " << fStinIndexBuilt << fTTBELL << std::endl;
1096  ret_code = kFALSE;
1097  }
1098  } // if (i_trouve != 1 )
1099 
1100  } // if( fT1d_StexStinFromIndex != 0 )
1101  else {
1102  std::cout << "!TEcnaRun, GetSampleAdcValues *** ERROR ***> "
1103  << " fT1d_StexStinFromIndex = " << fT1d_StexStinFromIndex
1104  << " fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << std::endl;
1105  ret_code = kFALSE;
1106  } //.................................................................. (GetSampleAdcValues)
1107  } // end of if( i0Sample >= 0 && i0Sample < fNbSampForFic )
1108  else {
1109  //.......Reading data => Message and error only if sample >= fEcal->MaxSampADC()
1110  // (not fNbSampForFic, the later is used only for calculations)
1111  if (i0Sample >= fEcal->MaxSampADC()) {
1112  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1113  << " sample number = " << i0Sample << ". OUT OF BOUNDS"
1114  << " (max = " << fNbSampForFic << ")" << fTTBELL << std::endl;
1115  ret_code = kFALSE;
1116  } else {
1117  ret_code = kTRUE;
1118  }
1119  } // else of if( i0Sample >= 0 && i0Sample < fNbSampForFic )
1120  } // end of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
1121  else {
1122  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1123  << " channel number in " << fStinName.Data() << " = " << i0StinEcha << ". OUT OF BOUNDS"
1124  << " (max = " << fEcal->MaxCrysInStin() << ")" << fTTBELL << std::endl;
1125  ret_code = kFALSE;
1126  } // else of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
1127  } else {
1128  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> " << fStinName.Data() << " number in "
1129  << fStexName.Data() << " = " << n1StexStin << ". OUT OF BOUNDS"
1130  << " (max = " << fEcal->MaxStinEcnaInStex() << ")" << fTTBELL << std::endl;
1131  ret_code = kFALSE;
1132  }
1133 
1134  //.................................................................. (GetSampleAdcValues)
1135  //........ Filling of the 2D array of the event numbers in the data reading loop and
1136  // filling of the 3D array of the ADC sample values
1137  //
1138  // ONLY if ret_code == kTRUE
1139 
1140  if (ret_code == kTRUE) {
1141  //............ 1) Conversion (Stin,i0StinEcha) -> i0StexEcha (same numbering for EB and EE)
1142  //==========================================================================================
1143  // n1StexStin (Tower or SC): 1 2 3
1144  // iStexStin 0 1 2
1145  //
1146  // i0StinEcha: 0......24 0......24 0......24
1147  //
1148  // i0StexEcha : 0......24 25......49 50......74 grouped by StexStin's
1149  // i0StexEcha+1 (Xtal): 1......25 26......50 51......75
1150  //
1151  //==========================================================================================
1152 
1153  Int_t i0StexEcha = i0StexStinEcna * fEcal->MaxCrysInStin() + i0StinEcha;
1154 
1155  //--------------------------------------------------------- (GetSampleAdcValues)
1156  if (i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) {
1157  //............ 2) Increase of the nb of evts for (StexEcha,sample) (events found in the data)
1158  (fT2d_NbOfEvts[i0StexEcha][i0Sample])++; // value after first incrementation = 1
1159  fTagNbOfEvts[0] = 1;
1161 
1162  //............ 3) Filling of the 3D array of the ADC values
1163  if (i0EventIndex >= 0 && i0EventIndex < fFileHeader->fReqNbOfEvts) {
1164  if (i0Sample >= 0 && i0Sample < fNbSampForFic) {
1165  fT3d_AdcValues[i0StexEcha][i0Sample][i0EventIndex] = adcvalue;
1166  } else {
1167  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1168  << " sample index = " << i0Sample << ". OUT OF BOUNDS"
1169  << " (max = " << fNbSampForFic << ")" << fTTBELL << std::endl;
1170  }
1171  } else {
1172  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1173  << " event number = " << n1EventNumber << ". OUT OF BOUNDS"
1174  << " (max = " << fFileHeader->fReqNbOfEvts << ")" << fTTBELL << std::endl;
1175  ret_code = kFALSE;
1176  }
1177  } else {
1178  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1179  << " CHANNEL NUMBER OUT OF BOUNDS" << std::endl
1180  << " i0StexEcha number = " << i0StexEcha << " , n1StexStin = " << n1StexStin
1181  << " , i0StinEcha = " << i0StinEcha
1182  << " , fEcal->MaxCrysEcnaInStex() = " << fEcal->MaxCrysEcnaInStex() << fTTBELL << std::endl;
1183  ret_code = kFALSE;
1184  // {Int_t cintoto; std::cout << "TAPER 0 POUR CONTINUER" << std::endl; cin >> cintoto;}
1185  }
1186  } // end of if( ret_code == kTRUE )
1187  else {
1188  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> ret_code = kFALSE " << fTTBELL << std::endl;
1189  }
1190  } // end of if(fReadyToReadData == 1)
1191  else {
1192  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> GetReadyToReadData(...) not called." << fTTBELL
1193  << std::endl;
1194  ret_code = kFALSE;
1195  }
1196  //.................................................................. (GetSampleAdcValues)
1197  if (ret_code == kFALSE) {
1198  std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> ret_code = " << ret_code
1199  << " (FALSE). Event: " << n1EventNumber << ", " << fStexName.Data() << ": " << fFileHeader->fStex << ", "
1200  << fStinName.Data() << ": " << n1StexStin << ", channel: " << i0StinEcha << ", Sample: " << i0Sample
1201  << ", ADC value: " << adcvalue << std::endl;
1202  }
1203  return ret_code;
1204 }
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:403
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
Int_t fReadyToReadData
Definition: TEcnaRun.h:394
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStexName
Definition: TEcnaRun.h:391
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:64
Int_t fNbSampForFic
Definition: TEcnaRun.h:405
TString fFlagSubDet
Definition: TEcnaRun.h:390
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:402
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:401
Int_t MaxCrysInStin()
Int_t GetDeeSCConsFrom1DeeSCEcna(const Int_t &, const Int_t &)
Int_t MaxCrysEcnaInStex()
Int_t MaxSampADC()
Int_t MaxStinEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:63
TString fStinName
Definition: TEcnaRun.h:391
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ HighFrequencyCorrelationsBetweenChannels()

void TEcnaRun::HighFrequencyCorrelationsBetweenChannels ( )

Definition at line 2947 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(), TEcnaNumbering::StexEchaForCons(), and suppress.

Referenced by Expert1Calculations(), and HighFrequencyMeanCorrelationsBetweenStins().

2947  {
2948  //Calculation of the High Frequency Correlations between channels
2949 
2950  //... preliminary calculation of the covariances if not done yet.
2951  if (fTagHfCov[0] != 1) {
2953  fTagHfCov[0] = 0;
2954  }
2955 
2957  std::cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << std::endl;
2958  }
2960  std::cout << " Calculation of the High Frequency Correlations between channels" << std::endl
2961  << " Starting allocation. " << std::endl;
2962  }
2963 
2964  //................. allocation fT2d_hf_cor + init to zero (mandatory)
2965  if (fT2d_hf_cor == nullptr) {
2966  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2967  fT2d_hf_cor = new Double_t*[n_StexEcha];
2968  fCnew++;
2969  fT2d1_hf_cor = new Double_t[n_StexEcha * n_StexEcha];
2970  fCnew++;
2971  for (Int_t i0StexEcha = 0; i0StexEcha < n_StexEcha; i0StexEcha++) {
2972  fT2d_hf_cor[i0StexEcha] = &fT2d1_hf_cor[0] + i0StexEcha * n_StexEcha;
2973  }
2974  }
2975 
2976  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2977  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
2978  if (fT2d_hf_cor[i0StexEcha][j0StexEcha] != (Double_t)0) {
2979  fMiscDiag[24]++;
2980  [[clang::suppress]] fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;
2981  }
2982  }
2983  }
2984 
2985  //................. calculation
2986  //........................... computation of half of the matrix, diagonal included
2987 
2988  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2989  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2990  (fFlagSubDet == "EB")) {
2991  for (Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++) {
2992  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0) ||
2993  (fFlagSubDet == "EB")) {
2994  if (fT2d_hf_cov[i0StexEcha][i0StexEcha] > 0 && fT2d_hf_cov[j0StexEcha][j0StexEcha] > 0) {
2995  fT2d_hf_cor[i0StexEcha][j0StexEcha] =
2996  fT2d_hf_cov[i0StexEcha][j0StexEcha] / ((Double_t)sqrt(fT2d_hf_cov[i0StexEcha][i0StexEcha]) *
2997  (Double_t)sqrt(fT2d_hf_cov[j0StexEcha][j0StexEcha]));
2998  } else {
2999  fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
3000  }
3001 
3002  fT2d_hf_cor[j0StexEcha][i0StexEcha] = fT2d_hf_cor[i0StexEcha][j0StexEcha];
3003  }
3004  }
3005  }
3006  if (i0StexEcha % 100 == 0) {
3007  std::cout << i0StexEcha << "[HFN Cor], ";
3008  }
3009  }
3010  std::cout << std::endl;
3011 
3012  fTagHfCor[0] = 1;
3014 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fHfCorCalc
Definition: TEcnaHeader.h:76
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:487
TString fFlagSubDet
Definition: TEcnaRun.h:390
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:483
T sqrt(T t)
Definition: SSEVec.h:23
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:371
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:488
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
void HighFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2825
Int_t MaxCrysEcnaInStex()
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ HighFrequencyCovariancesBetweenChannels()

void TEcnaRun::HighFrequencyCovariancesBetweenChannels ( )

Definition at line 2825 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_AdcValues, fTagHfCov, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaNumbering::StexEchaForCons(), and suppress.

Referenced by HighFrequencyCorrelationsBetweenChannels().

2825  {
2826  //Calculation of the High Frequency Covariances between channels
2827 
2829  std::cout << "*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << std::endl;
2830  }
2832  std::cout << " Calculation of the High Frequency Covariances between channels" << std::endl;
2833  }
2834 
2835  //................. allocation fT2d_hf_cov + init to zero (mandatory)
2836  if (fT2d_hf_cov == nullptr) {
2837  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2838  fT2d_hf_cov = new Double_t*[n_StexEcha];
2839  fCnew++;
2840  fT2d1_hf_cov = new Double_t[n_StexEcha * n_StexEcha];
2841  fCnew++;
2842  for (Int_t i0StexEcha = 0; i0StexEcha < n_StexEcha; i0StexEcha++) {
2843  fT2d_hf_cov[i0StexEcha] = &fT2d1_hf_cov[0] + i0StexEcha * n_StexEcha;
2844  }
2845  }
2846 
2847  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2848  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
2849  if (fT2d_hf_cov[i0StexEcha][j0StexEcha] != (Double_t)0) {
2850  fMiscDiag[23]++;
2851  [[clang::suppress]] fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2852  }
2853  }
2854  }
2855 
2856  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2857  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2858  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2859  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2860  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2861  }
2862  }
2863  //................... Allocation cov_over_samp(i0StexEcha,j0StexEcha)
2864  TMatrixD cov_over_samp(fEcal->MaxCrysEcnaInStex(), fEcal->MaxCrysEcnaInStex());
2865  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2866  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
2867  cov_over_samp(i0StexEcha, j0StexEcha) = (Double_t)0.;
2868  }
2869  }
2870 
2871  //........................................... Calculation (HighFrequencyCovariancesBetweenChannels)
2873  std::cout << " Calculation of the mean (over the events)" << std::endl
2874  << " of the covariances between the channels (over the samples 1 to " << fNbSampForCalc << ")."
2875  << std::endl;
2876  }
2877 
2878  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2879 
2880  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2881  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2882  (fFlagSubDet == "EB")) {
2883  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2884  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2885  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2886  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
2887  mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
2888  }
2889  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2890  }
2891  }
2892  if (i0StexEcha % 100 == 0) {
2893  std::cout << i0StexEcha << "[HFNa Cov], ";
2894  }
2895  }
2896  std::cout << std::endl;
2897 
2898  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2899 
2900  //... Calculation of half of the matrix, diagonal included (HighFrequencyCovariancesBetweenChannels)
2901  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2902  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2903  (fFlagSubDet == "EB")) {
2904  for (Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++) {
2905  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0) ||
2906  (fFlagSubDet == "EB")) {
2907  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2908  // Calculation, for each event, of the covariance over the samples
2909  cov_over_samp(i0StexEcha, j0StexEcha) = (Double_t)0;
2910  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
2911  cov_over_samp(i0StexEcha, j0StexEcha) +=
2912  (fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(i0StexEcha, n_event)) *
2913  (fT3d_AdcValues[j0StexEcha][i0Sample][n_event] - mean_over_samples(j0StexEcha, n_event));
2914  }
2915  cov_over_samp(i0StexEcha, j0StexEcha) /= (Double_t)fNbSampForCalc;
2916  }
2917  //....... Calculation of the mean over the events of Cov_s[A(c_i,s*,e*),A(c_j,s*,e*)]
2918  //......... Calculation of half of the matrix, diagonal included
2919  fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2920  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2921  fT2d_hf_cov[i0StexEcha][j0StexEcha] += cov_over_samp(i0StexEcha, j0StexEcha);
2922  }
2923  fT2d_hf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2924 
2925  fT2d_hf_cov[j0StexEcha][i0StexEcha] = fT2d_hf_cov[i0StexEcha][j0StexEcha];
2926  }
2927  }
2928  }
2929  if (i0StexEcha % 100 == 0) {
2930  std::cout << i0StexEcha << "[HFNb Cov], ";
2931  }
2932  }
2933  std::cout << std::endl;
2934 
2935  fTagHfCov[0] = 1;
2937 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fHfCovCalc
Definition: TEcnaHeader.h:75
TString fFlagSubDet
Definition: TEcnaRun.h:390
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:483
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:484
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t MaxCrysEcnaInStex()
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ HighFrequencyMeanCorrelationsBetweenSCs()

void TEcnaRun::HighFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 3137 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3139

◆ HighFrequencyMeanCorrelationsBetweenStins()

void TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins ( )

Definition at line 3139 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(), mps_fire::i, TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), and suppress.

Referenced by Expert2Calculations(), HighFrequencyMeanCorrelationsBetweenSCs(), and HighFrequencyMeanCorrelationsBetweenTowers().

3139  {
3140  //Calculation of the mean High Frequency Correlations
3141  //between channels for each Stin
3142 
3143  //... preliminary calculation of the High Frequency Cor(c,c) if not done yet
3144  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
3145  if (fTagHfCor[0] != 1) {
3147  fTagHfCor[0] = 0;
3148  }
3149 
3150  //..... mean fT2d_hfcc_mostins for each pair (Stin_X,Stin_Y)
3152  std::cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << std::endl;
3153  }
3155  std::cout << " Calculation of the mean, for each " << fFlagSubDet.Data() << ", of the" << std::endl
3156  << " High Frequency Correlations between channels." << std::endl;
3157  }
3158 
3159  //................. allocation fT2d_hfcc_mostins + init to zero (mandatory)
3160  if (fT2d_hfcc_mostins == nullptr) {
3161  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
3162  fT2d_hfcc_mostins = new Double_t*[n_Stin];
3163  fCnew++;
3164  fT2d1_hfcc_mostins = new Double_t[n_Stin * n_Stin];
3165  fCnew++;
3166  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < n_Stin; i0StexStinEcna++) {
3167  fT2d_hfcc_mostins[i0StexStinEcna] = &fT2d1_hfcc_mostins[0] + i0StexStinEcna * n_Stin;
3168  }
3169  }
3170 
3171  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
3172  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
3173  if (fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0) {
3174  fMiscDiag[32]++;
3175  [[clang::suppress]] fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
3176  }
3177  }
3178  }
3179 
3180  //..... Calculation of the mean HF Cor(c,c) for each pair (Stin_X,Stin_Y)
3181  //
3182  // ! => Warning: this matrix is NOT symmetric => take N*N elements
3183  // Only (Stin,Stin) matrix is symmetric.
3184  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
3185  // (except for the (Stin,Stin) DIAGONAL elements)
3186  // Then:
3187  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
3188 
3189  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin() * fEcal->MaxCrysInStin());
3190 
3191  TVectorD half_HFccMos(ndim);
3192  for (Int_t i = 0; i < ndim; i++) {
3193  half_HFccMos(i) = (Double_t)0.;
3194  }
3195 
3197  std::cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << std::endl;
3198  }
3200  std::cout << " Calculation, for each " << fFlagSubDet.Data() << ", of the mean " << std::endl
3201  << " High Frequency cor(c,c)." << std::endl;
3202  }
3203 
3204  //..................... Calculation
3205  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
3206  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
3207  //.................... Copy the relevant Mean Correlations(c,c') in 1D vector half_HFccMos()
3208  Int_t i_count = 0;
3209  for (Int_t i0StinCrys = 0; i0StinCrys < fEcal->MaxCrysInStin(); i0StinCrys++) {
3210  Int_t i0StexEcha = i0StexStinEcna * fEcal->MaxCrysInStin() + i0StinCrys;
3211  for (Int_t j0StinCrys = 0; j0StinCrys < fEcal->MaxCrysInStin(); j0StinCrys++) {
3212  Int_t j0StexEcha = j0StexStinEcna * fEcal->MaxCrysInStin() + j0StinCrys;
3213  if ((i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
3214  (j0StexEcha >= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex())) {
3215  half_HFccMos(i_count) = fT2d_hf_cor[i0StexEcha][j0StexEcha];
3216  i_count++;
3217  } else {
3218  std::cout << "!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
3219  << "i0StexEcha = " << i0StexEcha << ", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl;
3220  }
3221  }
3222  }
3223  //..... Calculation of the mean absolute values of the HF mean Correlations(c,c')
3224  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
3225  for (Int_t i_rcor = 0; i_rcor < ndim; i_rcor++) {
3226  [[clang::suppress]] fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_HFccMos(i_rcor));
3227  }
3228  [[clang::suppress]] fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
3229  }
3230  if (i0StexStinEcna % 10 == 0) {
3231  std::cout << i0StexStinEcna << "[HFN MCtt], ";
3232  }
3233  }
3234  std::cout << std::endl;
3235 
3236  fTagHFccMoStins[0] = 1;
3238 } // ------- end of HighFrequencyMeanCorrelationsBetweenStins() -------
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:80
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:496
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:487
TString fFlagSubDet
Definition: TEcnaRun.h:390
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:497
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2947
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxStinEcnaInStex()
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ HighFrequencyMeanCorrelationsBetweenTowers()

void TEcnaRun::HighFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 3136 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3139

◆ HighFrequencyNoise()

void TEcnaRun::HighFrequencyNoise ( )

Definition at line 1934 of file TEcnaRun.cc.

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

Referenced by AverageHighFrequencyNoise(), and StandardCalculations().

1934  {
1935  // Calculation, for each channel, of the mean (over the events)
1936  // of the ADC sigmas (over the samples 0 to fNbSampForCalc-1)
1937 
1938  //................... Allocation fT1d_evevt_of_sigsamp + init to zero (mandatory)
1939  if (fT1d_evevt_of_sigsamp == nullptr) {
1940  fT1d_evevt_of_sigsamp = new Double_t[fEcal->MaxCrysEcnaInStex()];
1941  fCnew++;
1942  }
1943  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1944  if (fT1d_evevt_of_sigsamp[i0StexEcha] != (Double_t)0) {
1945  fMiscDiag[14]++;
1946  [[clang::suppress]] fT1d_evevt_of_sigsamp[i0StexEcha] = (Double_t)0;
1947  }
1948  }
1949 
1950  //................... Allocations mean_over_samples, sigma_over_sample
1951  TVectorD mean_over_samples(fNumberOfEvents);
1952  for (Int_t i = 0; i < fNumberOfEvents; i++) {
1953  mean_over_samples(i) = (Double_t)0.;
1954  }
1955  TVectorD sigma_over_samples(fNumberOfEvents);
1956  for (Int_t i = 0; i < fNumberOfEvents; i++) {
1957  sigma_over_samples(i) = (Double_t)0.;
1958  }
1959 
1960  //..................... Calculation
1962  std::cout << "*TEcnaRun::HighFrequencyNoise()" << std::endl;
1963  }
1965  std::cout << " Calculation, for each channel, of the sigma (over the events)" << std::endl
1966  << " of the ADC expectation values (over the samples 1 to " << fNbSampForCalc << ")."
1967  << std::endl;
1968  }
1969 
1970  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1971  //..................... Calculation of the sigma over samples
1972  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
1973  // Calculation, for each event, of the mean over the samples
1974  mean_over_samples(n_event) = (Double_t)0.;
1975  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1976  mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
1977  }
1978  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1979 
1980  // Calculation, for each event, of the sigma over the samples
1981  Double_t var_over_samples = (Double_t)0;
1982  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1983  Double_t deviation = fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(n_event);
1984  var_over_samples += deviation * deviation;
1985  }
1986  var_over_samples /= (Double_t)fNbSampForCalc;
1987 
1988  if (var_over_samples < 0) {
1989  std::cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << std::endl;
1990  } else {
1991  sigma_over_samples(n_event) = sqrt(var_over_samples);
1992  }
1993  }
1994 
1995  //....... Calculation of the mean over the events of the sigma over samples
1996  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
1997  fT1d_evevt_of_sigsamp[i0StexEcha] += sigma_over_samples(n_event);
1998  }
1999 
2000  fT1d_evevt_of_sigsamp[i0StexEcha] /= (Double_t)fNumberOfEvents;
2001  }
2002  fTagHfn[0] = 1;
2003  fFileHeader->fHfnCalc++;
2004 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Int_t fHfnCalc
Definition: TEcnaHeader.h:85
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagHfn
Definition: TEcnaRun.h:464
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
T sqrt(T t)
Definition: SSEVec.h:23
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysEcnaInStex()
TString fTTBELL
Definition: TEcnaRun.h:374
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:463
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ Init()

void TEcnaRun::Init ( TEcnaObject pObjectManager)

Definition at line 89 of file TEcnaRun.cc.

References fBuildEvtNotSkipped, fCdelete, fCnaCommand, fCnaError, fCnaParCout, fCnaParPaths, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fFlagPrint, fgMaxCar, fMaxMsgIndexForMiscDiag, fMemoReadNumberOfEventsforSamples, fMiscDiag, fNbOfMiscDiagCounters, fNumberOfEvents, fObjectManager, 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_AdcValues, fT3d1_cor_ss, fT3d1_cov_ss, fT3d2_AdcValues, fT3d2_cor_ss, fT3d2_cov_ss, fT3d_AdcValues, fT3d_cor_ss, fT3d_cov_ss, 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, gCnaRootFile, TEcnaParCout::GetCodePrint(), TEcnaObject::GetPointerValue(), and TEcnaObject::RegisterPointer().

Referenced by TEcnaRun().

89  {
90  //Initialisation
91 
92  fCnew = 0;
93  fCdelete = 0;
94  fCnaCommand = 0;
95  fCnaError = 0;
96 
97  fTTBELL = '\007';
98 
99  //........................... TString file names init
100  fgMaxCar = (Int_t)512;
101 
102  //................ MiscDiag counters .................
103  fMaxMsgIndexForMiscDiag = (Int_t)10;
104  fNbOfMiscDiagCounters = (Int_t)50;
105  fMiscDiag = nullptr;
106 
107  fNumberOfEvents = 0;
108  //............................. init pointers ( Init() )
109  fT3d_AdcValues = nullptr;
110  fT3d2_AdcValues = nullptr;
111  fT3d1_AdcValues = nullptr;
112 
113  fT1d_StexStinFromIndex = nullptr;
114 
115  fT2d_NbOfEvts = nullptr;
116  fT1d_NbOfEvts = nullptr;
117 
118  fT2d_ev = nullptr;
119  fT1d_ev = nullptr;
120  fT2d_sig = nullptr;
121  fT1d_sig = nullptr;
122 
123  fT3d_cov_ss = nullptr;
124  fT3d2_cov_ss = nullptr;
125  fT3d1_cov_ss = nullptr;
126 
127  fT3d_cor_ss = nullptr;
128  fT3d2_cor_ss = nullptr;
129  fT3d1_cor_ss = nullptr;
130 
131  fT2d_lf_cov = nullptr;
132  fT2d1_lf_cov = nullptr;
133 
134  fT2d_lf_cor = nullptr;
135  fT2d1_lf_cor = nullptr;
136 
137  fT2d_hf_cov = nullptr;
138  fT2d1_hf_cov = nullptr;
139 
140  fT2d_hf_cor = nullptr;
141  fT2d1_hf_cor = nullptr;
142 
143  fT2d_lfcc_mostins = nullptr;
144  fT2d1_lfcc_mostins = nullptr;
145 
146  fT2d_hfcc_mostins = nullptr;
147  fT2d1_hfcc_mostins = nullptr;
148 
149  fT1d_ev_ev = nullptr;
150  fT1d_evsamp_of_sigevt = nullptr;
151  fT1d_ev_cor_ss = nullptr;
152  fT1d_av_mped = nullptr;
153  fT1d_av_totn = nullptr;
154  fT1d_av_lofn = nullptr;
155  fT1d_av_hifn = nullptr;
156  fT1d_av_ev_corss = nullptr;
157  fT1d_av_sig_corss = nullptr;
158 
159  fT1d_sigevt_of_evsamp = nullptr;
160  fT1d_evevt_of_sigsamp = nullptr;
161  fT1d_sig_cor_ss = nullptr;
162 
163  fT2dCrysNumbersTable = nullptr;
164  fT1dCrysNumbersTable = nullptr;
165 
166  //................................ tags ( Init() )
167  fTagStinNumbers = nullptr;
168 
169  fTagNbOfEvts = nullptr;
170 
171  fTagAdcEvt = nullptr;
172 
173  fTagMSp = nullptr;
174  fTagSSp = nullptr;
175 
176  fTagCovCss = nullptr;
177  fTagCorCss = nullptr;
178 
179  fTagHfCov = nullptr;
180  fTagHfCor = nullptr;
181  fTagLfCov = nullptr;
182  fTagLfCor = nullptr;
183 
184  fTagLFccMoStins = nullptr;
185  fTagHFccMoStins = nullptr;
186 
187  fTagPed = nullptr;
188  fTagTno = nullptr;
189  fTagMeanCorss = nullptr;
190 
191  fTagLfn = nullptr;
192  fTagHfn = nullptr;
193  fTagSigCorss = nullptr;
194 
195  fTagAvPed = nullptr;
196  fTagAvTno = nullptr;
197  fTagAvLfn = nullptr;
198  fTagAvHfn = nullptr;
199 
200  fTagAvMeanCorss = nullptr;
201  fTagAvSigCorss = nullptr;
202 
203  fObjectManager = (TEcnaObject*)pObjectManager;
204  pObjectManager->RegisterPointer("TEcnaRun", (Long_t)this);
205 
206  //............................ fCnaParCout
207  Long_t iCnaParCout = pObjectManager->GetPointerValue("TEcnaParCout");
208  if (iCnaParCout == 0) {
209  fCnaParCout = new TEcnaParCout(pObjectManager); /*fCnew++*/
210  } else {
211  fCnaParCout = (TEcnaParCout*)iCnaParCout;
212  }
213 
214  //............................ fCnaParPaths
215  Long_t iCnaParPaths = pObjectManager->GetPointerValue("TEcnaParPaths");
216  if (iCnaParPaths == 0) {
217  fCnaParPaths = new TEcnaParPaths(pObjectManager); /*fCnew++*/
218  } else {
219  fCnaParPaths = (TEcnaParPaths*)iCnaParPaths;
220  }
221 
222  //................................................... Code Print ( Init() )
224  fCodePrintWarnings = fCnaParCout->GetCodePrint("Warnings "); // => default value
227 
229 
230  //...................................................
231  gCnaRootFile = nullptr;
232  fOpenRootFile = kFALSE;
233  fReadyToReadData = 0;
234 
235  //.............................................. Miscellaneous
237 
238  fStinIndexBuilt = 0;
240 
242 
243 } // end of Init()
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:470
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:445
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:439
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:458
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:403
Bool_t fOpenRootFile
Definition: TEcnaRun.h:393
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
Int_t fCdelete
Definition: TEcnaRun.h:372
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:380
Int_t fReadyToReadData
Definition: TEcnaRun.h:394
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:384
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:468
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:475
Int_t * fTagPed
Definition: TEcnaRun.h:444
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:503
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:455
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:496
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagHfn
Definition: TEcnaRun.h:464
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:450
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:479
Double_t ** fT2d_sig
Definition: TEcnaRun.h:428
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:100
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:487
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:443
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:433
Int_t fCnaError
Definition: TEcnaRun.h:369
Int_t * fTagTno
Definition: TEcnaRun.h:449
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:438
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:465
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:483
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:434
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:418
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:402
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:484
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t fCodePrintComments
Definition: TEcnaRun.h:508
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:432
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
Int_t fMemoReadNumberOfEventsforSamples
Definition: TEcnaRun.h:410
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fMaxMsgIndexForMiscDiag
Definition: TEcnaRun.h:378
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:497
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:401
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:478
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:508
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:488
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:448
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:493
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t GetCodePrint(const TString &)
Definition: TEcnaParCout.cc:66
Double_t * fT1d_ev
Definition: TEcnaRun.h:425
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415
Int_t fgMaxCar
Definition: TEcnaRun.h:367
Double_t ** fT3d2_AdcValues
Definition: TEcnaRun.h:413
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:474
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:460
Int_t fCnaCommand
Definition: TEcnaRun.h:369
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:502
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:377
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:209
TString fTTBELL
Definition: TEcnaRun.h:374
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:463
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Double_t * fT1d_sig
Definition: TEcnaRun.h:429
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:492

◆ LowFrequencyCorrelationsBetweenChannels()

void TEcnaRun::LowFrequencyCorrelationsBetweenChannels ( )

Definition at line 2742 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(), TEcnaNumbering::StexEchaForCons(), and suppress.

Referenced by Expert1Calculations(), and LowFrequencyMeanCorrelationsBetweenStins().

2742  {
2743  //Calculation of the Low Frequency Correlations between channels
2744 
2745  //... preliminary calculation of the covariances if not done yet.
2746  if (fTagLfCov[0] != 1) {
2748  fTagLfCov[0] = 0;
2749  }
2750 
2752  std::cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << std::endl;
2753  }
2755  std::cout << " Calculation of the Low Frequency Correlations between channels" << std::endl
2756  << " Starting allocation. " << std::endl;
2757  }
2758 
2759  //................. allocation fT2d_lf_cor + init to zero (mandatory)
2760  if (fT2d_lf_cor == nullptr) {
2761  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2762  fT2d_lf_cor = new Double_t*[n_StexEcha];
2763  fCnew++;
2764  fT2d1_lf_cor = new Double_t[n_StexEcha * n_StexEcha];
2765  fCnew++;
2766  for (Int_t i0StexEcha = 0; i0StexEcha < n_StexEcha; i0StexEcha++) {
2767  fT2d_lf_cor[i0StexEcha] = &fT2d1_lf_cor[0] + i0StexEcha * n_StexEcha;
2768  }
2769  }
2770 
2771  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2772  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
2773  if (fT2d_lf_cor[i0StexEcha][j0StexEcha] != (Double_t)0) {
2774  fMiscDiag[22]++;
2775  [[clang::suppress]] fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;
2776  }
2777  }
2778  }
2779 
2780  //................. calculation
2781  //........................... computation of half of the matrix, diagonal included
2782  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2783  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2784  (fFlagSubDet == "EB")) {
2785  for (Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++) {
2786  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0) ||
2787  (fFlagSubDet == "EB")) {
2788  if (fT2d_lf_cov[i0StexEcha][i0StexEcha] > 0 && fT2d_lf_cov[j0StexEcha][j0StexEcha] > 0) {
2789  fT2d_lf_cor[i0StexEcha][j0StexEcha] =
2790  fT2d_lf_cov[i0StexEcha][j0StexEcha] /
2791  ((Double_t)sqrt(fT2d_lf_cov[i0StexEcha][i0StexEcha] * fT2d_lf_cov[j0StexEcha][j0StexEcha]));
2792  } else {
2793  fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2794  }
2795  fT2d_lf_cor[j0StexEcha][i0StexEcha] = fT2d_lf_cor[i0StexEcha][j0StexEcha];
2796  }
2797  }
2798  }
2799  if (i0StexEcha % 100 == 0) {
2800  std::cout << i0StexEcha << "[LFN Cor], ";
2801  }
2802  }
2803  std::cout << std::endl;
2804 
2805  fTagLfCor[0] = 1;
2807 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:479
TString fFlagSubDet
Definition: TEcnaRun.h:390
T sqrt(T t)
Definition: SSEVec.h:23
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:478
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t fLfCorCalc
Definition: TEcnaHeader.h:78
Int_t MaxCrysEcnaInStex()
void LowFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2633
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:474
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ LowFrequencyCovariancesBetweenChannels()

void TEcnaRun::LowFrequencyCovariancesBetweenChannels ( )

Definition at line 2633 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_AdcValues, fTagLfCov, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaNumbering::StexEchaForCons(), and suppress.

Referenced by LowFrequencyCorrelationsBetweenChannels().

2633  {
2634  //Calculation of the Low Frequency Covariances between channels
2635 
2637  std::cout << "*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << std::endl;
2638  }
2640  std::cout << " Calculation of the Low Frequency Covariances between channels" << std::endl;
2641  }
2642 
2643  //................. allocation fT2d_lf_cov + init to zero (mandatory)
2644  if (fT2d_lf_cov == nullptr) {
2645  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2646  fT2d_lf_cov = new Double_t*[n_StexEcha];
2647  fCnew++;
2648  fT2d1_lf_cov = new Double_t[n_StexEcha * n_StexEcha];
2649  fCnew++;
2650  for (Int_t i0StexEcha = 0; i0StexEcha < n_StexEcha; i0StexEcha++) {
2651  fT2d_lf_cov[i0StexEcha] = &fT2d1_lf_cov[0] + i0StexEcha * n_StexEcha;
2652  }
2653  }
2654 
2655  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2656  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
2657  if (fT2d_lf_cov[i0StexEcha][j0StexEcha] != (Double_t)0) {
2658  fMiscDiag[21]++;
2659  [[clang::suppress]] fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2660  }
2661  }
2662  }
2663  //........................................... Calculation (LowFrequencyCovariancesBetweenChannels)
2664  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2665  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2666  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2667  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2668  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2669  }
2670  }
2671  //................... Allocation MoeOfMos(i0StexEcha)
2672  TVectorD MoeOfMos(fEcal->MaxCrysEcnaInStex());
2673  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2674  MoeOfMos(i0StexEcha) = (Double_t)0.;
2675  }
2676 
2677  //................... Calculation
2679  std::cout << " Calculation, for each pair of channels, of the covariance (over the events)" << std::endl
2680  << " between the ADC expectation values (over the samples 1 to " << fNbSampForCalc << ")."
2681  << std::endl;
2682  }
2683 
2684  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2685 
2686  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2687  MoeOfMos(i0StexEcha) = (Double_t)0;
2688 
2689  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2690  (fFlagSubDet == "EB")) {
2691  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2692  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2693  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2694  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
2695  mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
2696  }
2697  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2698  }
2699  //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*]] )
2700  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2701  MoeOfMos(i0StexEcha) += mean_over_samples(i0StexEcha, n_event);
2702  }
2703  MoeOfMos(i0StexEcha) /= (Double_t)fNumberOfEvents;
2704  }
2705  }
2706 
2707  //... Calculation of half of the matrix, diagonal included (LowFrequencyCovariancesBetweenChannels)
2708  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2709  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0) ||
2710  (fFlagSubDet == "EB")) {
2711  for (Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++) {
2712  if ((fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0) ||
2713  (fFlagSubDet == "EB")) {
2714  fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2715  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
2716  fT2d_lf_cov[i0StexEcha][j0StexEcha] += (mean_over_samples(i0StexEcha, n_event) - MoeOfMos(i0StexEcha)) *
2717  (mean_over_samples(j0StexEcha, n_event) - MoeOfMos(j0StexEcha));
2718  }
2719  fT2d_lf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2720 
2721  fT2d_lf_cov[j0StexEcha][i0StexEcha] = fT2d_lf_cov[i0StexEcha][j0StexEcha];
2722  }
2723  }
2724  if (i0StexEcha % 100 == 0) {
2725  std::cout << i0StexEcha << "[LFN Cov], ";
2726  }
2727  }
2728  }
2729  std::cout << std::endl;
2730  fTagLfCov[0] = 1;
2732 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:475
TString fFlagSubDet
Definition: TEcnaRun.h:390
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysEcnaInStex()
Int_t fLfCovCalc
Definition: TEcnaHeader.h:77
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:474
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ LowFrequencyMeanCorrelationsBetweenSCs()

void TEcnaRun::LowFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 3029 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3031

◆ LowFrequencyMeanCorrelationsBetweenStins()

void TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins ( )

Definition at line 3031 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, mps_fire::i, LowFrequencyCorrelationsBetweenChannels(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), and suppress.

Referenced by Expert2Calculations(), LowFrequencyMeanCorrelationsBetweenSCs(), and LowFrequencyMeanCorrelationsBetweenTowers().

3031  {
3032  //Calculation of the mean Low Frequency Correlations
3033  //between channels for each Stin
3034 
3035  //... preliminary calculation of the Low Frequency Cor(c,c) if not done yet
3036  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
3037  if (fTagLfCor[0] != 1) {
3039  fTagLfCor[0] = 0;
3040  }
3041 
3042  //..... mean fT2d_lfcc_mostins for each pair (Stin_X,Stin_Y)
3044  std::cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << std::endl;
3045  }
3047  std::cout << " Calculation of the mean, for each " << fStinName.Data() << ", of the" << std::endl
3048  << " Low Frequency Correlations between channels." << std::endl;
3049  }
3050 
3051  //................. allocation fT2d_lfcc_mostins + init to zero (mandatory)
3052  if (fT2d_lfcc_mostins == nullptr) {
3053  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
3054  fT2d_lfcc_mostins = new Double_t*[n_Stin];
3055  fCnew++;
3056  fT2d1_lfcc_mostins = new Double_t[n_Stin * n_Stin];
3057  fCnew++;
3058  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < n_Stin; i0StexStinEcna++) {
3059  fT2d_lfcc_mostins[i0StexStinEcna] = &fT2d1_lfcc_mostins[0] + i0StexStinEcna * n_Stin;
3060  }
3061  }
3062 
3063  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
3064  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
3065  if (fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0) {
3066  fMiscDiag[31]++;
3067  [[clang::suppress]] fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
3068  }
3069  }
3070  }
3071 
3072  //..... Calculation of the mean LF Cor(c,c) for each pair (Stin_X,Stin_Y)
3073  //
3074  // ! => Warning: this matrix is NOT symmetric => take N*N elements
3075  // Only (Stin,Stin) matrix is symmetric.
3076  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
3077  // (except for the (Stin,Stin) DIAGONAL elements)
3078  // Then:
3079  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
3080 
3081  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin() * fEcal->MaxCrysInStin());
3082 
3083  TVectorD half_LFccMos(ndim);
3084  for (Int_t i = 0; i < ndim; i++) {
3085  half_LFccMos(i) = (Double_t)0.;
3086  }
3087 
3088  //..................... Calculation
3090  std::cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << std::endl;
3091  }
3093  std::cout << " Calculation, for each " << fStinName.Data() << ", of the mean " << std::endl
3094  << " Low Frequency cor(c,c)." << std::endl;
3095  }
3096 
3097  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
3098  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
3099  //................... .Copy the Mean Correlations(c,c') in 1D vector half_LFccMos()
3100  Int_t i_count = 0;
3101  for (Int_t i0StinCrys = 0; i0StinCrys < fEcal->MaxCrysInStin(); i0StinCrys++) {
3102  Int_t i0StexEcha = i0StexStinEcna * fEcal->MaxCrysInStin() + i0StinCrys;
3103  for (Int_t j0StinCrys = 0; j0StinCrys < fEcal->MaxCrysInStin(); j0StinCrys++) {
3104  Int_t j0StexEcha = j0StexStinEcna * fEcal->MaxCrysInStin() + j0StinCrys;
3105  if ((i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
3106  (j0StexEcha >= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex())) {
3107  half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha];
3108  i_count++;
3109  } else {
3110  std::cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
3111  << "i0StexEcha = " << i0StexEcha << ", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl;
3112  }
3113  }
3114  }
3115  //...... Calculation of the mean absolute values of the LF mean Correlations(c,c')
3116  [[clang::suppress]] fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
3117  for (Int_t i_rcor = 0; i_rcor < ndim; i_rcor++) {
3118  [[clang::suppress]] fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_LFccMos(i_rcor));
3119  }
3120  [[clang::suppress]] fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
3121  }
3122  if (i0StexStinEcna % 10 == 0) {
3123  std::cout << i0StexStinEcna << "[LFN MCtt], ";
3124  }
3125  }
3126  std::cout << std::endl;
3127 
3128  fTagLFccMoStins[0] = 1;
3130 } // ------- end of LowFrequencyMeanCorrelationsBetweenStins() -------
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t MaxCrysInStin()
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:371
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:493
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:79
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2742
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:391
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:492

◆ LowFrequencyMeanCorrelationsBetweenTowers()

void TEcnaRun::LowFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 3028 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:3031

◆ LowFrequencyNoise()

void TEcnaRun::LowFrequencyNoise ( )

Definition at line 1861 of file TEcnaRun.cc.

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

Referenced by AverageLowFrequencyNoise(), and StandardCalculations().

1861  {
1862  // Calculation, for each channel, of the sigma (over the events)
1863  // of the ADC expectation values (over the samples 0 to fNbSampForCalc-1)
1864 
1865  //................... Allocation fT1d_sigevt_of_evsamp + init to zero (mandatory)
1866  if (fT1d_sigevt_of_evsamp == nullptr) {
1867  fT1d_sigevt_of_evsamp = new Double_t[fEcal->MaxCrysEcnaInStex()];
1868  fCnew++;
1869  }
1870  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1871  if (fT1d_sigevt_of_evsamp[i0StexEcha] != (Double_t)0) {
1872  fMiscDiag[13]++;
1873  [[clang::suppress]] fT1d_sigevt_of_evsamp[i0StexEcha] = (Double_t)0;
1874  }
1875  }
1876 
1877  //................... Allocation mean_over_samples
1878  TVectorD mean_over_samples(fNumberOfEvents);
1879  for (Int_t i = 0; i < fNumberOfEvents; i++) {
1880  mean_over_samples(i) = (Double_t)0.;
1881  }
1882 
1883  //..................... Calculation
1885  std::cout << "*TEcnaRun::LowFrequencyNoise()" << std::endl;
1886  }
1888  std::cout << " Calculation, for each channel, of the sigma (over the events)" << std::endl
1889  << " of the ADC expectation values (over the samples 1 to " << fNbSampForCalc << ")."
1890  << std::endl;
1891  }
1892 
1893  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1894  // Calculation of the mean over the events of the mean over the samples
1895  Double_t mean_over_events = (Double_t)0;
1896  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
1897  // Calculation, for each event, of the mean over the samples
1898  mean_over_samples(n_event) = (Double_t)0.;
1899  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1900  mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
1901  }
1902  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1903 
1904  mean_over_events += mean_over_samples(n_event);
1905  }
1906  mean_over_events /= (Double_t)fNumberOfEvents;
1907 
1908  // Calculation of the sigma over the events of the mean over the samples
1909  Double_t var = (Double_t)0;
1910  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++) {
1911  Double_t ecart = mean_over_samples(n_event) - mean_over_events;
1912  var += ecart * ecart;
1913  }
1914  var /= (Double_t)fNumberOfEvents;
1915 
1916  fT1d_sigevt_of_evsamp[i0StexEcha] = sqrt(var);
1917  }
1918  fTagLfn[0] = 1;
1919  fFileHeader->fLfnCalc++;
1920 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:458
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
T sqrt(T t)
Definition: SSEVec.h:23
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysEcnaInStex()
Int_t fLfnCalc
Definition: TEcnaHeader.h:84
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ MeanCorrelationsBetweenSamples()

void TEcnaRun::MeanCorrelationsBetweenSamples ( )

Definition at line 2017 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, mps_fire::i, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by AverageMeanCorrelationsBetweenSamples(), SigmaOfCorrelationsBetweenSamples(), and StandardCalculations().

2017  {
2018  // Calculation, for all the channels, of the expectation values
2019  // of the correlations between the first fNbSampForCalc samples
2020 
2021  //... preliminary calculation of the correlations if not done yet
2022  // (test only the first element since the cor are computed globaly)
2023  if (fTagCorCss[0] != 1) {
2025  fTagCorCss[0] = 0;
2026  }
2027 
2028  //................... Allocations ev_cor_ss + init to zero (mandatory)
2029  if (fT1d_ev_cor_ss == nullptr) {
2030  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2031  fT1d_ev_cor_ss = new Double_t[n_StexEcha];
2032  fCnew++;
2033  }
2034  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2035  if (fT1d_ev_cor_ss[i0StexEcha] != (Double_t)0) {
2036  fMiscDiag[15]++;
2037  fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
2038  }
2039  }
2040 
2041  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
2042  // ( half of (them minus the diagonal) )
2043  Int_t ndim = (Int_t)(fNbSampForCalc * (fNbSampForCalc - 1) / 2);
2044 
2045  TVectorD half_cor_ss(ndim);
2046  for (Int_t i = 0; i < ndim; i++) {
2047  half_cor_ss(i) = (Double_t)0.;
2048  }
2049 
2050  //..................... Calculation
2052  std::cout << "*TEcnaRun::MeanCorrelationsBetweenSamples()" << std::endl;
2053  }
2055  std::cout << " Calculation, for all the channels, of the expectation values of the" << std::endl
2056  << " correlations between the first " << fNbSampForCalc << " samples." << std::endl;
2057  }
2058 
2059  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2060  //..................... half_cor_ss() array filling
2061  Int_t i_count = 0;
2062  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
2063  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++) {
2064  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
2065  i_count++;
2066  }
2067  }
2068  //...................... mean cor(s,s') calculation
2069  fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
2070  for (Int_t i_rcor = 0; i_rcor < ndim; i_rcor++) {
2071  fT1d_ev_cor_ss[i0StexEcha] += half_cor_ss(i_rcor);
2072  }
2073  fT1d_ev_cor_ss[i0StexEcha] /= (Double_t)ndim;
2074  }
2075  fTagMeanCorss[0] = 1;
2077 }
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:83
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t MaxCrysEcnaInStex()
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1667
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ OpenRootFile()

Bool_t TEcnaRun::OpenRootFile ( const Text_t *  name,
const TString &  status 
)

Definition at line 3256 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaParPaths, fCodePrintAllComments, fFlagPrint, fObjectManager, fOpenRootFile, TEcnaRootFile::fRootFileStatus, gCnaRootFile, TEcnaObject::GetPointerValue(), mergeVDriftHistosByStation::name, TEcnaRootFile::OpenR(), TEcnaRootFile::OpenW(), TEcnaRootFile::ReStart(), TEcnaParPaths::ResultsRootFilePath(), and mps_update::status.

Referenced by WriteRootFile().

3256  {
3257  //Open the Root file
3258 
3259  Bool_t ok_open = kFALSE;
3260 
3261  TString s_name;
3262  s_name = fCnaParPaths->ResultsRootFilePath();
3263  s_name.Append('/');
3264  s_name.Append(name);
3265 
3266  //gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); fCnew++;
3267 
3268  Long_t iCnaRootFile = fObjectManager->GetPointerValue("TEcnaRootFile");
3269  if (iCnaRootFile == 0) {
3270  gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); /* Anew("gCnaRootFile");*/
3271  } else {
3272  gCnaRootFile = (TEcnaRootFile*)iCnaRootFile;
3273  gCnaRootFile->ReStart(s_name.Data(), status);
3274  }
3275 
3276  if (gCnaRootFile->fRootFileStatus == "RECREATE") {
3277  ok_open = gCnaRootFile->OpenW();
3278  }
3279  if (gCnaRootFile->fRootFileStatus == "READ") {
3280  ok_open = gCnaRootFile->OpenR();
3281  }
3282 
3283  if (!ok_open) // unable to open file
3284  {
3285  std::cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << std::endl;
3286  } else {
3288  std::cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << std::endl;
3289  }
3290  fOpenRootFile = kTRUE;
3291  }
3292  return ok_open;
3293 }
Bool_t OpenR(const Text_t *="")
Bool_t fOpenRootFile
Definition: TEcnaRun.h:393
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:380
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t fFlagPrint
Definition: TEcnaRun.h:507
TString fRootFileStatus
Definition: TEcnaRootFile.h:31
void ReStart(const Text_t *)
Bool_t OpenW(const Text_t *="")
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:209
const TString & ResultsRootFilePath() const

◆ Pedestals()

void TEcnaRun::Pedestals ( )

Definition at line 1746 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(), SampleMeans(), and suppress.

Referenced by AveragePedestals(), and StandardCalculations().

1746  {
1747  // Calculation, for each channel, of the expectation values
1748  // (over the samples 0 to fNbSampForCalc-1) of the ADC expectation values
1749  // (over the events)
1750 
1751  //... preliminary calculation of the expectation values if not done yet
1752  if (fTagMSp[0] != 1) {
1753  SampleMeans();
1754  fTagMSp[0] = 0;
1755  }
1756 
1757  //................... Allocation ev_ev + init to zero (mandatory)
1758  if (fT1d_ev_ev == nullptr) {
1759  fT1d_ev_ev = new Double_t[fEcal->MaxCrysEcnaInStex()];
1760  fCnew++;
1761  }
1762  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1763  [[clang::suppress]]
1764  if (fT1d_ev_ev[i0StexEcha] != (Double_t)0) {
1765  fMiscDiag[11]++;
1766  fT1d_ev_ev[i0StexEcha] = (Double_t)0;
1767  }
1768  }
1769 
1770  //..................... Calculation
1772  std::cout << "*TEcnaRun::Pedestals()" << std::endl;
1773  }
1775  std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1776  << fNbSampForCalc << ")" << std::endl
1777  << " of the ADC expectation values (over the events)." << std::endl;
1778  }
1779 
1780  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1781  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1782  [[clang::suppress]] fT1d_ev_ev[i0StexEcha] += fT2d_ev[i0StexEcha][i0Sample];
1783  }
1784  [[clang::suppress]] fT1d_ev_ev[i0StexEcha] /= fNbSampForCalc;
1785  }
1786  fTagPed[0] = 1;
1787  fFileHeader->fPedCalc++;
1788 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagPed
Definition: TEcnaRun.h:444
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:443
Int_t fPedCalc
Definition: TEcnaHeader.h:81
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
void SampleMeans()
Definition: TEcnaRun.cc:1470
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ PrintAllComments()

void TEcnaRun::PrintAllComments ( )

Definition at line 4853 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintAllComments, and fFlagPrint.

4853  {
4854  // Set flags to authorize printing of the comments of all the methods
4855 
4857  std::cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << std::endl;
4858 }
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Int_t fFlagPrint
Definition: TEcnaRun.h:507

◆ PrintComments()

void TEcnaRun::PrintComments ( )

Definition at line 4839 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintComments, and fFlagPrint.

4839  {
4840  // Set flags to authorize printing of some comments concerning initialisations (default)
4841 
4843  std::cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << std::endl;
4844 }
Int_t fCodePrintComments
Definition: TEcnaRun.h:508
Int_t fFlagPrint
Definition: TEcnaRun.h:507

◆ PrintNoComment()

void TEcnaRun::PrintNoComment ( )

Definition at line 4860 of file TEcnaRun.cc.

References fCodePrintNoComment, and fFlagPrint.

4860  {
4861  // Set flags to forbid the printing of all the comments
4862 
4864 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fFlagPrint
Definition: TEcnaRun.h:507

◆ PrintWarnings()

void TEcnaRun::PrintWarnings ( )

Definition at line 4846 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintWarnings, and fFlagPrint.

4846  {
4847  // Set flags to authorize printing of warnings
4848 
4850  std::cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << std::endl;
4851 }
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:508

◆ ReadSampleAdcValues() [1/2]

Bool_t TEcnaRun::ReadSampleAdcValues ( )

Definition at line 1211 of file TEcnaRun.cc.

References fEcal, and TEcnaParEcal::MaxSampADC().

Referenced by TEcnaGui::Calculations().

1211 { return ReadSampleAdcValues(fEcal->MaxSampADC()); }
Bool_t ReadSampleAdcValues()
Definition: TEcnaRun.cc:1211
Int_t MaxSampADC()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ ReadSampleAdcValues() [2/2]

Bool_t TEcnaRun::ReadSampleAdcValues ( const Int_t &  nb_samp_for_calc)

Definition at line 1213 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaRead::DataExist(), fCnaParPaths, fEcal, fFileHeader, TEcnaHeader::fFirstReqEvtNumber, fFlagSubDet, TEcnaRead::FileParameters(), TEcnaHeader::fLastReqEvtNumber, TEcnaHeader::fNbOfEvtsCalc, TEcnaHeader::fNbOfSamples, fNbSampForCalc, fObjectManager, TEcnaHeader::fReqNbOfEvts, fRootFileName, fRootFileNameShort, TEcnaHeader::fRunNumber, TEcnaHeader::fStartDate, TEcnaHeader::fStartTime, TEcnaHeader::fStex, TEcnaHeader::fStinNumbersCalc, TEcnaHeader::fStopDate, TEcnaHeader::fStopTime, fT1d_StexStinFromIndex, fT2d_NbOfEvts, fT3d_AdcValues, fTagNbOfEvts, fTagStinNumbers, fTTBELL, TEcnaHeader::fTypAna, TEcnaRead::GetRootFileName(), TEcnaRead::GetRootFileNameShort(), TEcnaRead::GetStartDate(), TEcnaRead::GetStartTime(), TEcnaRead::GetStexStinFromIndex(), TEcnaRead::GetStopDate(), TEcnaRead::GetStopTime(), mps_fire::i, dqmiolumiharvest::j, TEcnaRead::LookAtRootFile(), TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), TEcnaRead::PrintNoComment(), TEcnaRead::ReadNumberOfEventsForSamples(), TEcnaRead::ReadSampleAdcValuesSameFile(), TEcnaRead::ReadStinNumbers(), and TEcnaParPaths::ResultsRootFilePath().

1213  {
1214  // read the Sample ADC values from "ADC" result root files (ReadSampleAdcValues)
1215 
1216  // put the number of sample for calculations in attribute fNbSampForCalc
1217  // and call the method without arguments
1218  // We must have: nb_samp_for_calc <= fFileHeader->fNbOfSamples (= nb of samples in ROOT file)
1219 
1220  fNbSampForCalc = nb_samp_for_calc;
1221 
1222  // TEcnaRead* MyRootFile = new TEcnaRead(fFlagSubDet.Data(), fCnaParPaths, fCnaParCout,
1223  // fFileHeader, fEcalNumbering, fCnaWrite); // fCnew++;
1224 
1225  TEcnaRead* MyRootFile = new TEcnaRead(fObjectManager, fFlagSubDet.Data()); // fCnew++;
1226 
1227  MyRootFile->PrintNoComment();
1228 
1229  MyRootFile->FileParameters(fFileHeader->fTypAna,
1235  fFileHeader->fStex,
1236  fCnaParPaths->ResultsRootFilePath().Data());
1237 
1238  Bool_t ok_read = MyRootFile->LookAtRootFile();
1239 
1240  fFileHeader->fStartTime = MyRootFile->GetStartTime();
1241  fFileHeader->fStopTime = MyRootFile->GetStopTime();
1242  fFileHeader->fStartDate = MyRootFile->GetStartDate();
1243  fFileHeader->fStopDate = MyRootFile->GetStopDate();
1244 
1245  if (ok_read == kTRUE) {
1246  fRootFileName = MyRootFile->GetRootFileName();
1247  fRootFileNameShort = MyRootFile->GetRootFileNameShort();
1248  std::cout << "*TEcnaRun::ReadSampleAdcValues> Reading sample ADC values from file: " << std::endl
1249  << " " << fRootFileName << std::endl;
1250 
1251  size_t i_no_data = 0;
1252 
1253  //.......... Read the StinNumbers in the old file (ReadSampleAdcValues)
1254  TVectorD vec(fEcal->MaxStinEcnaInStex());
1255  for (Int_t i = 0; i < fEcal->MaxStinEcnaInStex(); i++) {
1256  vec(i) = (Double_t)0.;
1257  }
1258  vec = MyRootFile->ReadStinNumbers(fEcal->MaxStinEcnaInStex());
1259  if (MyRootFile->DataExist() == kTRUE) {
1260  fTagStinNumbers[0] = 1;
1262  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
1263  fT1d_StexStinFromIndex[i0StexStinEcna] = (Int_t)vec(i0StexStinEcna);
1264  }
1265  } else {
1266  i_no_data++;
1267  }
1268  //.......... Read the Numbers of Events in the old file (ReadSampleAdcValues)
1269  TMatrixD partial_matrix(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1270  for (Int_t i = 0; i < fEcal->MaxCrysInStin(); i++) {
1271  for (Int_t j = 0; j < fFileHeader->fNbOfSamples; j++) {
1272  partial_matrix(i, j) = (Double_t)0.;
1273  }
1274  }
1275 
1276  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
1277  Int_t n1StexStin = MyRootFile->GetStexStinFromIndex(i0StexStinEcna);
1278  if (n1StexStin != -1) {
1279  partial_matrix =
1281 
1282  if (MyRootFile->DataExist() == kTRUE) {
1283  fTagNbOfEvts[0] = 1;
1285  for (Int_t i0StinCrys = 0; i0StinCrys < fEcal->MaxCrysInStin(); i0StinCrys++) {
1286  Int_t i0StexEcha = (n1StexStin - 1) * fEcal->MaxCrysInStin() + i0StinCrys;
1287  for (Int_t i0Sample = 0; i0Sample < fFileHeader->fNbOfSamples; i0Sample++) {
1288  fT2d_NbOfEvts[i0StexEcha][i0Sample] = (Int_t)partial_matrix(i0StinCrys, i0Sample);
1289  }
1290  }
1291  } else {
1292  i_no_data++;
1293  }
1294  }
1295  }
1296 
1297  //.......... Read the Sample ADC values in the old file (ReadSampleAdcValues)
1298  Double_t*** fT3d_read_AdcValues = MyRootFile->ReadSampleAdcValuesSameFile(
1300 
1301  if (MyRootFile->DataExist() == kTRUE) {
1302  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1303  for (Int_t i0Sample = 0; i0Sample < fFileHeader->fNbOfSamples; i0Sample++) {
1304  for (Int_t i_event = 0; i_event < fFileHeader->fReqNbOfEvts; i_event++) {
1305  fT3d_AdcValues[i0StexEcha][i0Sample][i_event] = fT3d_read_AdcValues[i0StexEcha][i0Sample][i_event];
1306  }
1307  }
1308  }
1309  } else {
1310  i_no_data++;
1311  }
1312  if (i_no_data) {
1313  std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1314  << " Read failure. i_no_data = " << i_no_data << fTTBELL << std::endl;
1315  }
1316  } else {
1317  std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1318  << " ROOT file not found" << fTTBELL << std::endl;
1319  }
1320  delete MyRootFile; // fCdelete++;
1321  return ok_read;
1322 }
const TString & GetRootFileNameShort() const
Definition: TEcnaRead.cc:4213
Int_t fStex
Definition: TEcnaHeader.h:53
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:380
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
const TString & GetStartDate() const
Definition: TEcnaRead.cc:832
time_t GetStopTime()
Definition: TEcnaRead.cc:831
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:64
Int_t fNbOfSamples
Definition: TEcnaHeader.h:48
TString fStopDate
Definition: TEcnaHeader.h:58
const TString & GetStopDate() const
Definition: TEcnaRead.cc:833
const TString & GetRootFileName() const
Definition: TEcnaRead.cc:4212
TString fFlagSubDet
Definition: TEcnaRun.h:390
TVectorD ReadStinNumbers(const Int_t &)
Definition: TEcnaRead.cc:1240
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t GetStexStinFromIndex(const Int_t &)
Definition: TEcnaRead.cc:4221
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
void PrintNoComment()
Definition: TEcnaRead.cc:4319
Int_t MaxCrysInStin()
TString fStartDate
Definition: TEcnaHeader.h:57
Bool_t DataExist()
Definition: TEcnaRead.cc:1097
TString fTypAna
Definition: TEcnaHeader.h:47
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:1757
Double_t *** ReadSampleAdcValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:3975
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
void FileParameters(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const TString &)
Definition: TEcnaRead.cc:729
Int_t MaxCrysEcnaInStex()
time_t fStartTime
Definition: TEcnaHeader.h:55
time_t fStopTime
Definition: TEcnaHeader.h:56
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
Bool_t LookAtRootFile()
Definition: TEcnaRead.cc:1040
Int_t MaxStinEcnaInStex()
Int_t fRunNumber
Definition: TEcnaHeader.h:49
TString fRootFileName
Definition: TEcnaRun.h:396
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:63
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
TString fTTBELL
Definition: TEcnaRun.h:374
time_t GetStartTime()
Definition: TEcnaRead.cc:830
const TString & ResultsRootFilePath() const
TString fRootFileNameShort
Definition: TEcnaRun.h:397
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ SampleMeans()

void TEcnaRun::SampleMeans ( )

Definition at line 1470 of file TEcnaRun.cc.

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

Referenced by CovariancesBetweenSamples(), Pedestals(), SampleSigmas(), and StandardCalculations().

1470  {
1471  // Calculation of the expectation values over events
1472  // for the samples 0 to fNbSampForCalc and for all the StexEchas
1473 
1475  std::cout << "*TEcnaRun::SampleMeans() " << std::endl;
1476  }
1478  std::cout << " Calculation: sample expectation values over the events"
1479  << " for each channel." << std::endl;
1480  }
1481 
1482  //................... Allocation fT2d_ev
1483  if (fT2d_ev == nullptr) {
1484  Int_t n_samp = fNbSampForCalc;
1485  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1486  fT2d_ev = new Double_t*[n_StexEcha];
1487  fCnew++;
1488  fT1d_ev = new Double_t[n_StexEcha * n_samp];
1489  fCnew++;
1490  for (Int_t i = 0; i < n_StexEcha; i++) {
1491  fT2d_ev[i] = &fT1d_ev[0] + i * n_samp;
1492  }
1493  }
1494  //................... init fT2d_ev to zero
1495  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1496  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1497  [[clang::suppress]]
1498  if (fT2d_ev[i0StexEcha][i0Sample] != (Double_t)0) {
1499  fMiscDiag[1]++;
1500  fT2d_ev[i0StexEcha][i0Sample] = (Double_t)0;
1501  }
1502  }
1503  }
1504 
1505  //................... Calculation
1506  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1507  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1508  for (Int_t i_event = 0; i_event < fNumberOfEvents; i_event++) {
1509  [[clang::suppress]] fT2d_ev[i0StexEcha][i0Sample] += fT3d_AdcValues[i0StexEcha][i0Sample][i_event];
1510  }
1511  [[clang::suppress]] fT2d_ev[i0StexEcha][i0Sample] /= fNumberOfEvents;
1512  }
1513  }
1514  fTagMSp[0] = 1;
1515  fFileHeader->fMSpCalc++;
1516 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fMSpCalc
Definition: TEcnaHeader.h:67
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_ev
Definition: TEcnaRun.h:425
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ SampleSigmas()

void TEcnaRun::SampleSigmas ( )

Definition at line 1526 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_AdcValues, fTagMSp, fTagSSp, TEcnaParEcal::MaxCrysEcnaInStex(), SampleMeans(), mathSSE::sqrt(), and suppress.

Referenced by StandardCalculations(), and TotalNoise().

1526  {
1527  //Calculation of the sigmas of the samples for all the StexEchas
1528 
1530  std::cout << "*TEcnaRun::SampleSigmas()" << std::endl;
1531  }
1533  std::cout << " Calculation: sample ADC sigmas over the events "
1534  << " for each channel." << std::endl;
1535  }
1536 
1537  //... preliminary calculation of the expectation values if not done yet.
1538  // The tag is set to 1 after call to the method. It is reset to 0
1539  // because the expectation values must not be written in the result ROOT file
1540  // (since the tag was equal to 0)
1541  if (fTagMSp[0] != 1) {
1542  SampleMeans();
1543  fTagMSp[0] = 0;
1544  }
1545 
1546  //................... Allocation fT2d_sig
1547  if (fT2d_sig == nullptr) {
1548  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1549  Int_t n_samp = fNbSampForCalc;
1550  fT2d_sig = new Double_t*[n_StexEcha];
1551  fCnew++;
1552  fT1d_sig = new Double_t[n_StexEcha * n_samp];
1553  fCnew++;
1554  for (Int_t i0StexEcha = 0; i0StexEcha < n_StexEcha; i0StexEcha++) {
1555  fT2d_sig[i0StexEcha] = &fT1d_sig[0] + i0StexEcha * n_samp;
1556  }
1557  }
1558  // ................... init fT2d_sig to zero
1559  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1560  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1561  [[clang::suppress]]
1562  if (fT2d_sig[i0StexEcha][i0Sample] != (Double_t)0) {
1563  fMiscDiag[2]++;
1564  fT2d_sig[i0StexEcha][i0Sample] = (Double_t)0;
1565  }
1566  }
1567  }
1568 
1569  //................... Calculation
1570  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1571  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1572  Double_t variance = (Double_t)0.;
1573  for (Int_t i_event = 0; i_event < fNumberOfEvents; i_event++) {
1574  Double_t ecart = fT3d_AdcValues[i0StexEcha][i0Sample][i_event] - fT2d_ev[i0StexEcha][i0Sample];
1575  variance += ecart * ecart;
1576  }
1577  variance /= fNumberOfEvents;
1578  [[clang::suppress]] fT2d_sig[i0StexEcha][i0Sample] = sqrt(variance);
1579  }
1580  }
1581  fTagSSp[0] = 1;
1582  fFileHeader->fSSpCalc++;
1583 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fSSpCalc
Definition: TEcnaHeader.h:68
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t ** fT2d_sig
Definition: TEcnaRun.h:428
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
T sqrt(T t)
Definition: SSEVec.h:23
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fNumberOfEvents
Definition: TEcnaRun.h:408
void SampleMeans()
Definition: TEcnaRun.cc:1470
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_sig
Definition: TEcnaRun.h:429
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ SampleValues()

void TEcnaRun::SampleValues ( )

Definition at line 1398 of file TEcnaRun.cc.

References TEcnaHeader::fAdcEvtCalc, fEcal, fFileHeader, fTagAdcEvt, and TEcnaParEcal::MaxCrysEcnaInStex().

1398  {
1399  //3D histo of the sample ADC values for all the triples (StexEcha, sample, event)
1400 
1401  // The histo is already in fT3d_AdcValues[][][]
1402  // this method sets the "Tag", increment the "f...Calc" (and must be kept for that)
1403  // f...Calc > 0 => allow writing on file.
1404 
1405  if (fFileHeader->fAdcEvtCalc > 0) {
1406  fFileHeader->fAdcEvtCalc = 0;
1407  }
1408  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1409  fTagAdcEvt[i0StexEcha] = 1;
1411  }
1412 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:66
Int_t MaxCrysEcnaInStex()
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ SetEcalSubDetector()

void TEcnaRun::SetEcalSubDetector ( const TString &  SubDet)

Definition at line 246 of file TEcnaRun.cc.

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

Referenced by TEcnaRun().

246  {
247  // Set Subdetector (EB or EE)
248 
249  Int_t MaxCar = fgMaxCar;
250  fFlagSubDet.Resize(MaxCar);
251  fFlagSubDet = SubDet.Data();
252 
253  fEcal = nullptr;
254  fEcal = new TEcnaParEcal(fFlagSubDet.Data()); //fCnew++;
255  fEcalNumbering = nullptr;
256  fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); //fCnew++;
257  fCnaWrite = nullptr;
258 
260 
261  if (fFlagSubDet == "EB") {
262  fStexName = "SM ";
263  fStinName = "tower";
264  }
265  if (fFlagSubDet == "EE") {
266  fStexName = "Dee";
267  fStinName = " SC ";
268  }
269 }
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:384
TString fStexName
Definition: TEcnaRun.h:391
TString fFlagSubDet
Definition: TEcnaRun.h:390
SubDet
Definition: ModulesSoA.h:11
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t fgMaxCar
Definition: TEcnaRun.h:367
TString fStinName
Definition: TEcnaRun.h:391
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:386
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:383
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ SigmaOfCorrelationsBetweenSamples()

void TEcnaRun::SigmaOfCorrelationsBetweenSamples ( )

Definition at line 2090 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, mps_fire::i, TEcnaParEcal::MaxCrysEcnaInStex(), MeanCorrelationsBetweenSamples(), mathSSE::sqrt(), and ALCARECOEcalPhiSym_cff::var.

Referenced by AverageSigmaOfCorrelationsBetweenSamples(), and StandardCalculations().

2090  {
2091  //Calculation of the sigmas of the (sample,sample) correlations for all the StexEchas
2092 
2093  //... preliminary calculation of the mean cor(s,s') if not done yet
2094  // (test only the first element since the cor are computed globaly)
2095  // Results available in array fT1d_ev_cor_ss[i0StexEcha]
2096  if (fTagMeanCorss[0] != 1) {
2098  fTagMeanCorss[0] = 0;
2099  }
2100 
2101  //................... Allocations sig_cor_ss + init to zero
2102  if (fT1d_sig_cor_ss == nullptr) {
2103  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2104  fT1d_sig_cor_ss = new Double_t[n_StexEcha];
2105  fCnew++;
2106  }
2107  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2108  if (fT1d_sig_cor_ss[i0StexEcha] != (Double_t)0) {
2109  fMiscDiag[16]++;
2110  fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;
2111  }
2112  }
2113 
2115  std::cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << std::endl;
2116  }
2118  std::cout << " Calculation of the sigmas of the (sample,sample)" << std::endl
2119  << " correlations for all the channels." << std::endl;
2120  }
2121 
2122  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
2123  // (half of them minus the diagonal)
2124  Int_t ndim = (Int_t)(fNbSampForCalc * (fNbSampForCalc - 1) / 2);
2125 
2126  TVectorD half_cor_ss(ndim);
2127  for (Int_t i = 0; i < ndim; i++) {
2128  half_cor_ss(i) = (Double_t)0.;
2129  }
2130 
2131  //.................. Calculation
2132  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
2133  //..................... half_cor_ss() array filling
2134  Int_t i_count = 0;
2135  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
2136  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++) {
2137  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
2138  i_count++;
2139  }
2140  }
2141 
2142  //...................... sigma of cor(s,s') calculation
2143  Double_t var = (Double_t)0;
2144  for (Int_t i_rcor = 0; i_rcor < ndim; i_rcor++) {
2145  Double_t ecart = half_cor_ss(i_rcor) - fT1d_ev_cor_ss[i0StexEcha];
2146  var += ecart * ecart;
2147  }
2148  var /= (Double_t)ndim;
2149  fT1d_sig_cor_ss[i0StexEcha] = sqrt(var);
2150  }
2151  fTagSigCorss[0] = 1;
2153 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:468
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
T sqrt(T t)
Definition: SSEVec.h:23
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fCnew
Definition: TEcnaRun.h:371
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2017
Int_t MaxCrysEcnaInStex()
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:86
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ StandardCalculations()

void TEcnaRun::StandardCalculations ( )

Definition at line 1422 of file TEcnaRun.cc.

References AverageHighFrequencyNoise(), AverageLowFrequencyNoise(), AverageMeanCorrelationsBetweenSamples(), AveragePedestals(), AverageSigmaOfCorrelationsBetweenSamples(), AverageTotalNoise(), CorrelationsBetweenSamples(), HighFrequencyNoise(), LowFrequencyNoise(), MeanCorrelationsBetweenSamples(), Pedestals(), SampleMeans(), SampleSigmas(), SigmaOfCorrelationsBetweenSamples(), and TotalNoise().

Referenced by TEcnaGui::Calculations().

1422  {
1423  SampleMeans();
1424  SampleSigmas();
1426 
1427  Pedestals(); // => mean over Xtal's
1428  TotalNoise();
1433 
1434  AveragePedestals(); // Average => mean over Stin's (Tower if EB, SC if EE)
1440 }
void AverageTotalNoise()
Definition: TEcnaRun.cc:2238
void TotalNoise()
Definition: TEcnaRun.cc:1802
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2090
void AverageMeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2463
void AverageLowFrequencyNoise()
Definition: TEcnaRun.cc:2313
void SampleMeans()
Definition: TEcnaRun.cc:1470
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1861
void AverageSigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2538
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2017
void SampleSigmas()
Definition: TEcnaRun.cc:1526
void AveragePedestals()
Definition: TEcnaRun.cc:2162
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1934
void AverageHighFrequencyNoise()
Definition: TEcnaRun.cc:2388
void Pedestals()
Definition: TEcnaRun.cc:1746
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1667

◆ StartStopDate()

void TEcnaRun::StartStopDate ( const TString &  c_startdate,
const TString &  c_stopdate 
)

Definition at line 1349 of file TEcnaRun.cc.

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

1349  {
1350  // Put the start an stop date (if they exist) in fFileHeader class attributes.
1351 
1352  fFileHeader->fStartDate = c_startdate;
1353  fFileHeader->fStopDate = c_stopdate;
1354 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
TString fStopDate
Definition: TEcnaHeader.h:58
TString fStartDate
Definition: TEcnaHeader.h:57

◆ StartStopTime()

void TEcnaRun::StartStopTime ( time_t  t_startime,
time_t  t_stoptime 
)

Definition at line 1342 of file TEcnaRun.cc.

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

1342  {
1343  // Put the start an stop time (if they exist) in fFileHeader class attributes.
1344 
1345  fFileHeader->fStartTime = t_startime;
1346  fFileHeader->fStopTime = t_stoptime;
1347 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
time_t fStartTime
Definition: TEcnaHeader.h:55
time_t fStopTime
Definition: TEcnaHeader.h:56

◆ TotalNoise()

void TEcnaRun::TotalNoise ( )

Definition at line 1802 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(), SampleSigmas(), and suppress.

Referenced by AverageTotalNoise(), and StandardCalculations().

1802  {
1803  // Calculation, for each channel, of the expectation values
1804  // (over the samples 0 to fNbSampForCalc-1) of the sigmas
1805  // (over the events)
1806 
1807  //... preliminary calculation of the sigmas if not done yet
1808  if (fTagSSp[0] != 1) {
1809  SampleSigmas();
1810  fTagSSp[0] = 0;
1811  }
1812 
1813  //................... Allocation ev_ev + init to zero (mandatory)
1814  if (fT1d_evsamp_of_sigevt == nullptr) {
1815  fT1d_evsamp_of_sigevt = new Double_t[fEcal->MaxCrysEcnaInStex()];
1816  fCnew++;
1817  }
1818  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1819  if (fT1d_evsamp_of_sigevt[i0StexEcha] != (Double_t)0) {
1820  fMiscDiag[12]++;
1821  [[clang::suppress]] fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;
1822  }
1823  }
1824 
1825  //..................... Calculation
1827  std::cout << "*TEcnaRun::TotalNoise()" << std::endl;
1828  }
1830  std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1831  << fNbSampForCalc << ")" << std::endl
1832  << " of the ADC expectation values (over the events)." << std::endl;
1833  }
1834 
1835  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
1836  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++) {
1837  if (fT2d_sig[i0StexEcha][i0Sample] < 0) {
1838  std::cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!" << fTTBELL << std::endl;
1839  } else {
1840  [[clang::suppress]] fT1d_evsamp_of_sigevt[i0StexEcha] += fT2d_sig[i0StexEcha][i0Sample];
1841  }
1842  }
1844  }
1845  fTagTno[0] = 1;
1846  fFileHeader->fTnoCalc++;
1847 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t * fMiscDiag
Definition: TEcnaRun.h:376
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Double_t ** fT2d_sig
Definition: TEcnaRun.h:428
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Int_t * fTagTno
Definition: TEcnaRun.h:449
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fCnew
Definition: TEcnaRun.h:371
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:448
void SampleSigmas()
Definition: TEcnaRun.cc:1526
Int_t fTnoCalc
Definition: TEcnaHeader.h:82
Int_t MaxCrysEcnaInStex()
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAdcEvt()

void TEcnaRun::TRootAdcEvt ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4477 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fFileHeader, TEcnaResultType::fMatHis, TEcnaHeader::fReqNbOfEvts, fT3d_AdcValues, fTagAdcEvt, and gCnaRootFile.

Referenced by WriteRootFile().

4477  {
4478  if (fTagAdcEvt[user_StexEcha] == 1) {
4479  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4480  //...................... all the bins set to zero
4481  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++) {
4482  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) = (Double_t)0.;
4483  }
4484  //...................... fill the non-zero bins
4485  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++) {
4486  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) = fT3d_AdcValues[user_StexEcha][i0Sample][j_bin];
4487  }
4488  }
4489  }
4490 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:412
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415

◆ TRootAvEvCorss()

void TEcnaRun::TRootAvEvCorss ( )

Definition at line 4808 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_ev_corss, fTagAvMeanCorss, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4808  {
4809  if (fTagAvMeanCorss[0] == 1) // test 1st elt only since global calc
4810  {
4811  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4812  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_ev_corss[j0StexStinEcna];
4813  }
4814  }
4815 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:455
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAvHfn()

void TEcnaRun::TRootAvHfn ( )

Definition at line 4593 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_hifn, fTagAvHfn, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4593  {
4594  if (fTagAvHfn[0] == 1) {
4595  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4596  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_hifn[j0StexStinEcna];
4597  }
4598  }
4599 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:465
TEcnaNArrayD fMatHis
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAvLfn()

void TEcnaRun::TRootAvLfn ( )

Definition at line 4579 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_lofn, fTagAvLfn, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4579  {
4580  if (fTagAvLfn[0] == 1) {
4581  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4582  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_lofn[j0StexStinEcna];
4583  }
4584  }
4585 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:460
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAvPed()

void TEcnaRun::TRootAvPed ( )

Definition at line 4793 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_mped, fTagAvPed, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4793  {
4794  if (fTagAvPed[0] == 1) {
4795  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4796  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_mped[j0StexStinEcna];
4797  }
4798  }
4799 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:445
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAvSigCorss()

void TEcnaRun::TRootAvSigCorss ( )

Definition at line 4824 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_sig_corss, fTagAvSigCorss, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4824  {
4825  if (fTagAvSigCorss[0] == 1) // test 1st elt only since global calc
4826  {
4827  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4828  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_sig_corss[j0StexStinEcna];
4829  }
4830  }
4831 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:470
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootAvTno()

void TEcnaRun::TRootAvTno ( )

Definition at line 4566 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_av_totn, fTagAvTno, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4566  {
4567  if (fTagAvTno[0] == 1) {
4568  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4569  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_av_totn[j0StexStinEcna];
4570  }
4571  }
4572 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:450
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootCorCss()

void TEcnaRun::TRootCorCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4687 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatMat, fT3d_cor_ss, fTagCorCss, and gCnaRootFile.

Referenced by WriteRootFile().

4687  {
4688  if (fTagCorCss[user_StexEcha] == 1) {
4689  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4690  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++) {
4691  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) = fT3d_cor_ss[user_StexEcha][i0Sample][j0Sample];
4692  }
4693  }
4694  }
4695 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:437
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13

◆ TRootCovCss()

void TEcnaRun::TRootCovCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4671 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatMat, fT3d_cov_ss, fTagCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

4671  {
4672  if (fTagCovCss[user_StexEcha] == 1) {
4673  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4674  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++) {
4675  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) = fT3d_cov_ss[user_StexEcha][i0Sample][j0Sample];
4676  }
4677  }
4678  }
4679 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:432

◆ TRootHFccMoStins()

void TEcnaRun::TRootHFccMoStins ( )

Definition at line 4549 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_hfcc_mostins, fTagHFccMoStins, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4549  {
4550  if (fTagHFccMoStins[0] == 1) {
4551  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
4552  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4553  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4554  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4555  }
4556  }
4557  }
4558 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:496
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootHfCor()

void TEcnaRun::TRootHfCor ( )

Definition at line 4655 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_hf_cor, fTagHfCor, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4655  {
4656  if (fTagHfCor[0] == 1) {
4657  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
4658  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4659  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) = fT2d_hf_cor[i0StexEcha][j0StexEcha];
4660  }
4661  }
4662  }
4663 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:487
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootHfCov()

void TEcnaRun::TRootHfCov ( )

Definition at line 4639 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_hf_cov, fTagHfCov, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4639  {
4640  if (fTagHfCov[0] == 1) {
4641  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
4642  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4643  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) = fT2d_hf_cov[i0StexEcha][j0StexEcha];
4644  }
4645  }
4646  }
4647 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:483
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootHfn()

void TEcnaRun::TRootHfn ( )

Definition at line 4763 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_evevt_of_sigsamp, fTagHfn, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4763  {
4764  if (fTagHfn[0] == 1) {
4765  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4766  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_evevt_of_sigsamp[j0StexEcha];
4767  }
4768  }
4769 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Int_t * fTagHfn
Definition: TEcnaRun.h:464
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:463
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootLFccMoStins()

void TEcnaRun::TRootLFccMoStins ( )

Definition at line 4531 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_lfcc_mostins, fTagLFccMoStins, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4531  {
4532  if (fTagLFccMoStins[0] == 1) {
4533  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++) {
4534  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4535  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4536  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4537  }
4538  }
4539  }
4540 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:492

◆ TRootLfCor()

void TEcnaRun::TRootLfCor ( )

Definition at line 4623 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_lf_cor, fTagLfCor, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4623  {
4624  if (fTagLfCor[0] == 1) {
4625  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
4626  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4627  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) = fT2d_lf_cor[i0StexEcha][j0StexEcha];
4628  }
4629  }
4630  }
4631 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:478
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootLfCov()

void TEcnaRun::TRootLfCov ( )

Definition at line 4607 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatMat, fT2d_lf_cov, fTagLfCov, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4607  {
4608  if (fTagLfCov[0] == 1) {
4609  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
4610  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4611  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) = fT2d_lf_cov[i0StexEcha][j0StexEcha];
4612  }
4613  }
4614  }
4615 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
Int_t MaxCrysEcnaInStex()
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:474
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootLfn()

void TEcnaRun::TRootLfn ( )

Definition at line 4748 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_sigevt_of_evsamp, fTagLfn, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4748  {
4749  if (fTagLfn[0] == 1) {
4750  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4751  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_sigevt_of_evsamp[j0StexEcha];
4752  }
4753  }
4754 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:458
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagLfn
Definition: TEcnaRun.h:459
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootMeanCorss()

void TEcnaRun::TRootMeanCorss ( )

Definition at line 4733 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_ev_cor_ss, fTagMeanCorss, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4733  {
4734  if (fTagMeanCorss[0] == 1) {
4735  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4736  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_ev_cor_ss[j0StexEcha];
4737  }
4738  }
4739 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:453
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootMSp()

void TEcnaRun::TRootMSp ( const Int_t &  argNbSampWrite)

Definition at line 4498 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT2d_ev, fTagMSp, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4498  {
4499  if (fTagMSp[0] == 1) {
4500  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4501  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4502  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) = fT2d_ev[j0StexEcha][i0Sample];
4503  }
4504  }
4505  }
4506 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t ** fT2d_ev
Definition: TEcnaRun.h:424
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootNbOfEvts()

void TEcnaRun::TRootNbOfEvts ( const Int_t &  argNbSampWrite)

Definition at line 4461 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT2d_NbOfEvts, fTagNbOfEvts, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4461  {
4462  if (fTagNbOfEvts[0] == 1) {
4463  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4464  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4465  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) = fT2d_NbOfEvts[j0StexEcha][i0Sample];
4466  }
4467  }
4468  }
4469 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t MaxCrysEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootPed()

void TEcnaRun::TRootPed ( )

Definition at line 4704 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_ev_ev, fTagPed, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4704  {
4705  if (fTagPed[0] == 1) {
4706  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4707  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_ev_ev[j0StexEcha];
4708  }
4709  }
4710 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Int_t * fTagPed
Definition: TEcnaRun.h:444
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:443
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootSigCorss()

void TEcnaRun::TRootSigCorss ( )

Definition at line 4778 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_sig_cor_ss, fTagSigCorss, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4778  {
4779  if (fTagSigCorss[0] == 1) {
4780  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4781  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_sig_cor_ss[j0StexEcha];
4782  }
4783  }
4784 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:468
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootSSp()

void TEcnaRun::TRootSSp ( const Int_t &  argNbSampWrite)

Definition at line 4514 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT2d_sig, fTagSSp, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4514  {
4515  if (fTagSSp[0] == 1) {
4516  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4517  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++) {
4518  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) = fT2d_sig[j0StexEcha][i0Sample];
4519  }
4520  }
4521  }
4522 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Double_t ** fT2d_sig
Definition: TEcnaRun.h:428
Int_t * fTagSSp
Definition: TEcnaRun.h:430
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootStinNumbers()

void TEcnaRun::TRootStinNumbers ( )

Definition at line 4447 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_StexStinFromIndex, fTagStinNumbers, gCnaRootFile, and TEcnaParEcal::MaxStinEcnaInStex().

Referenced by WriteRootFile().

4447  {
4448  if (fTagStinNumbers[0] == 1) {
4449  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++) {
4450  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) = fT1d_StexStinFromIndex[j0StexStinEcna];
4451  }
4452  }
4453 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:421
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ TRootTno()

void TEcnaRun::TRootTno ( )

Definition at line 4718 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, fEcal, TEcnaResultType::fMatHis, fT1d_evsamp_of_sigevt, fTagTno, gCnaRootFile, and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteRootFile().

4718  {
4719  if (fTagTno[0] == 1) {
4720  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++) {
4721  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) = fT1d_evsamp_of_sigevt[j0StexEcha];
4722  }
4723  }
4724 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
Int_t * fTagTno
Definition: TEcnaRun.h:449
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
TEcnaNArrayD fMatHis
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:448
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ WriteNewRootFile()

Bool_t TEcnaRun::WriteNewRootFile ( const TString &  TypAna)

Definition at line 3392 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().

3392  {
3393  //Write a new Root file. File name automatically generated by fCnaWrite->fMakeResultsFileName()
3394  //called here.
3395 
3396  Bool_t ok_write = kFALSE;
3397 
3398  fCnaWrite->RegisterFileParameters(TypAna.Data(),
3404  fFileHeader->fStex,
3409 
3410  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
3413 
3414  const Text_t* FileShortName = (const Text_t*)fNewRootFileNameShort.Data();
3415 
3417  std::cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << std::endl
3418  << " " << fNewRootFileNameShort.Data() << std::endl;
3419  }
3420 
3421  ok_write = WriteRootFile(FileShortName, fNbSampForCalc);
3422 
3423  return ok_write;
3424 }
Int_t fStex
Definition: TEcnaHeader.h:53
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:595
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
TString fStopDate
Definition: TEcnaHeader.h:58
const TString & GetRootFileNameShort() const
Definition: TEcnaWrite.cc:387
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3342
Int_t fNbSampForCalc
Definition: TEcnaRun.h:406
Int_t fFlagPrint
Definition: TEcnaRun.h:507
TString fStartDate
Definition: TEcnaHeader.h:57
const TString & GetRootFileName() const
Definition: TEcnaWrite.cc:386
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:50
TString fNewRootFileNameShort
Definition: TEcnaRun.h:399
time_t fStartTime
Definition: TEcnaHeader.h:55
time_t fStopTime
Definition: TEcnaHeader.h:56
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:51
Int_t fRunNumber
Definition: TEcnaHeader.h:49
TString fNewRootFileName
Definition: TEcnaRun.h:398
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:629
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:386

◆ WriteRootFile() [1/2]

Bool_t TEcnaRun::WriteRootFile ( )

Definition at line 3342 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaWrite, fCodePrintAllComments, fCodePrintNoComment, fEcal, fFileHeader, fFlagPrint, TEcnaHeader::fNbOfSamples, fT2d_NbOfEvts, fTTBELL, TEcnaWrite::GetRootFileName(), TEcnaWrite::GetRootFileNameShort(), and TEcnaParEcal::MaxCrysEcnaInStex().

Referenced by WriteNewRootFile().

3342  {
3343  //Write the Root file.
3344  //File name automatically generated by fCnaWrite->fMakeResultsFileName()
3345  //previously called in GetReadyToCompute().
3346 
3347  Bool_t ok_write = kFALSE;
3348 
3349  //============================= check number of found events
3350  Int_t nCountEvts = 0;
3351 
3352  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++) {
3353  for (Int_t i0Sample = 0; i0Sample < fFileHeader->fNbOfSamples; i0Sample++) {
3354  nCountEvts += fT2d_NbOfEvts[i0StexEcha][i0Sample];
3355  }
3356  }
3357 
3358  if (nCountEvts <= 0) {
3359  //============== no write if no event found
3360  std::cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data()
3361  << ". File will not be written." << std::endl;
3362  ok_write = kTRUE;
3363  } else {
3365  std::cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << std::endl
3366  << " " << fCnaWrite->GetRootFileName().Data() << std::endl;
3367  }
3368 
3369  const Text_t* FileShortName = (const Text_t*)fCnaWrite->GetRootFileNameShort().Data();
3370  ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples);
3371 
3372  if (ok_write == kTRUE) {
3374  std::cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data()
3375  << std::endl;
3376  }
3377  } else {
3378  std::cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data()
3379  << fTTBELL << std::endl;
3380  }
3381  }
3382  return ok_write;
3383 } // end of WriteRootFile()
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:508
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t fNbOfSamples
Definition: TEcnaHeader.h:48
const TString & GetRootFileNameShort() const
Definition: TEcnaWrite.cc:387
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3342
Int_t fFlagPrint
Definition: TEcnaRun.h:507
const TString & GetRootFileName() const
Definition: TEcnaWrite.cc:386
Int_t MaxCrysEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:417
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:386
TString fTTBELL
Definition: TEcnaRun.h:374
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382

◆ WriteRootFile() [2/2]

Bool_t TEcnaRun::WriteRootFile ( const Text_t *  name,
Int_t &  argNbSampWrite 
)

Definition at line 3440 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, TEcnaRootFile::fCnaIndivResult, fCnaParPaths, TEcnaRootFile::fCnaResultsTree, fCodePrintAllComments, TEcnaHeader::fCorCssCalc, TEcnaHeader::fCovCssCalc, fEcal, fFileHeader, fFlagPrint, fgMaxCar, TEcnaHeader::fHFccMoStinsCalc, TEcnaHeader::fHfCorCalc, TEcnaHeader::fHfCovCalc, TEcnaHeader::fHfnCalc, isotrackNtuplerCondor::file_name, TEcnaResultType::fIthElement, TEcnaHeader::fLFccMoStinsCalc, TEcnaHeader::fLfCorCalc, TEcnaHeader::fLfCovCalc, TEcnaHeader::fLfnCalc, TEcnaResultType::fMatHis, TEcnaResultType::fMatMat, TEcnaHeader::fMeanCorssCalc, TEcnaHeader::fMSpCalc, TEcnaHeader::fNbOfEvtsCalc, fOpenRootFile, TEcnaHeader::fPedCalc, TEcnaHeader::fReqNbOfEvts, TEcnaRootFile::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, TEcnaResultType::fTypOfCnaResult, gCnaRootFile, mps_fire::i, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxStinEcnaInStex(), mergeVDriftHistosByStation::name, OpenRootFile(), TEcnaNArrayD::ReSet(), TEcnaParPaths::ResultsRootFilePath(), TEcnaResultType::SetSizeHis(), TEcnaResultType::SetSizeMat(), 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().

3440  {
3441  //Write the Root file
3442 
3443  const Text_t* file_name = name;
3444 
3445  Bool_t ok_write = kFALSE;
3446 
3447  if (fOpenRootFile) {
3448  std::cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open." << fTTBELL << std::endl;
3449  } else {
3450  // List of the different element types and associated parameters as ordered in the ROOT file (smaller -> larger)
3451  // ==========
3452  //
3453  // WARNING *** HERE SIZES ARE THESE FOR THE BARREL (1700 Xtals) and for 10 samples ***
3454  //
3455  // Nb of Type of element Type Type Size Comment
3456  // elements Number Name
3457  //
3458  // 1 fMatHis(1,StexStin) ( 0) cTypNumbers 1*( 1, 68) = 68
3459 
3460  // 1 fMatHis(1,StexStin) (12) cTypAvPed 1*( 1, 68) = 68
3461  // 1 fMatHis(1,StexStin) ( 3) cTypAvTno 1*( 1, 68) = 68
3462  // 1 fMatHis(1,StexStin) ( 4) cTypAvLfn 1*( 1, 68) = 68
3463  // 1 fMatHis(1,StexStin) ( 5) cTypAvHfn 1*( 1, 68) = 68
3464  // 1 fMatHis(1,StexStin) (13) cTypAvMeanCorss 1*( 1, 68) = 68
3465  // 1 fMatHis(1,StexStin) (14) cTypAvSigCorss 1*( 1, 68) = 68
3466 
3467  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3468  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3469  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3470  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3471  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3472  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3473 
3474  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3475  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3476 
3477  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3478  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3479  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3480 
3481  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3482  // StexEcha fMatMat(sample, sample ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3483 
3484  // StexEcha fMatHis(sample, bin_evt) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3485 
3486  // 1 fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3487  // 1 fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3488 
3489  // 1 fMatMat(StexEcha, StexEcha) ( 6) cTypHfCov 1*(1700,1700) = 2 890 000 // (06/05/08)
3490  // 1 fMatMat(StexEcha, StexEcha) ( 7) cTypHfCor 1*(1700,1700) = 2 890 000 // (06/05/08)
3491 
3492  //......................................................................................................
3493 
3494  OpenRootFile(file_name, "RECREATE");
3495 
3496  TString typ_name = "?";
3497  Int_t v_nb_times = 0;
3498  Int_t v_dim_one = 0;
3499  Int_t v_dim_two = 0;
3500  Int_t v_size = 0;
3501  Int_t v_tot = 0;
3502  Int_t v_tot_writ = 0;
3503 
3504  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3505  //
3506  // ===> no general method and no translation to TEcnaWrite
3507  // because the fT1d.. and fT2d... arrays
3508  // are attributes of TEcnaRun (calls to the "TRootXXXX" methods)
3509  //
3510  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3511 
3512  //-------------------------- Stin numbers
3513  // 1 fMatHis(1,Stin) ( 0) cTypNumbers 1*( 1, 68) = 68
3514 
3515  Int_t MaxCar = fgMaxCar;
3516  typ_name.Resize(MaxCar);
3517  typ_name = "StinNumbers";
3518  v_nb_times = fFileHeader->fStinNumbersCalc;
3519  v_dim_one = 1;
3520  v_dim_two = fEcal->MaxStinEcnaInStex();
3521  v_size = v_nb_times * v_dim_one * v_dim_two;
3522  v_tot += v_size;
3523 
3525  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3526  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3527  << v_size;
3528  }
3529 
3530  for (Int_t i = 0; i < v_nb_times; i++) {
3531  if (fTagStinNumbers[0] == 1) {
3534  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3536  TRootStinNumbers();
3537  gCnaRootFile->fCnaResultsTree->Fill();
3538  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3539  std::cout << " => WRITTEN ON FILE ";
3540  v_tot_writ += v_size;
3541  }
3542  }
3543  }
3545  std::cout << std::endl;
3546  }
3547 
3548  //-------------------------- Average Pedestals (1 value per Stin)
3549  // 1 fMatHis(1, StexStin) (12) cTypAvPed 1*(1, 68) = 68
3550 
3551  MaxCar = fgMaxCar;
3552  typ_name.Resize(MaxCar);
3553  typ_name = "AvPed";
3554  v_nb_times = fFileHeader->fAvPedCalc;
3555  v_dim_one = 1;
3556  v_dim_two = fEcal->MaxStinEcnaInStex();
3557  v_size = v_nb_times * v_dim_one * v_dim_two;
3558  v_tot += v_size;
3559 
3561  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3562  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3563  << v_size;
3564  }
3565 
3566  for (Int_t i = 0; i < v_nb_times; i++) {
3567  if (fTagAvPed[0] == 1) {
3570  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3572  TRootAvPed();
3573  gCnaRootFile->fCnaResultsTree->Fill();
3574  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3575  std::cout << " => WRITTEN ON FILE ";
3576  v_tot_writ += v_size;
3577  }
3578  }
3579  }
3581  std::cout << std::endl;
3582  }
3583 
3584  //-------------------------- Average Total noise
3585  // StexEcha fMatHis(1, StexStin) ( 3) cTypAvTno 1*(1, 68) = 68
3586 
3587  MaxCar = fgMaxCar;
3588  typ_name.Resize(MaxCar);
3589  typ_name = "AvTno";
3590  v_nb_times = fFileHeader->fAvTnoCalc;
3591  v_dim_one = 1;
3592  v_dim_two = fEcal->MaxStinEcnaInStex();
3593  v_size = v_nb_times * v_dim_one * v_dim_two;
3594  v_tot += v_size;
3595 
3597  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3598  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3599  << v_size;
3600  }
3601 
3602  for (Int_t i = 0; i < v_nb_times; i++) {
3603  if (fTagAvTno[0] == 1) {
3606  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3608  TRootAvTno();
3609  gCnaRootFile->fCnaResultsTree->Fill();
3610  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3611  std::cout << " => WRITTEN ON FILE ";
3612  v_tot_writ += v_size;
3613  }
3614  }
3615  }
3617  std::cout << std::endl;
3618  }
3619 
3620  //-------------------------- Average Low frequency noise
3621  // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*(1, 68) = 68
3622 
3623  MaxCar = fgMaxCar;
3624  typ_name.Resize(MaxCar);
3625  typ_name = "AvLfn";
3626  v_nb_times = fFileHeader->fAvLfnCalc;
3627  v_dim_one = 1;
3628  v_dim_two = fEcal->MaxStinEcnaInStex();
3629  v_size = v_nb_times * v_dim_one * v_dim_two;
3630  v_tot += v_size;
3631 
3633  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3634  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3635  << v_size;
3636  }
3637 
3638  for (Int_t i = 0; i < v_nb_times; i++) {
3639  if (fTagAvLfn[0] == 1) {
3642  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3644  TRootAvLfn();
3645  gCnaRootFile->fCnaResultsTree->Fill();
3646  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3647  std::cout << " => WRITTEN ON FILE ";
3648  v_tot_writ += v_size;
3649  }
3650  }
3651  }
3653  std::cout << std::endl;
3654  }
3655 
3656  //-------------------------- Average High frequency noise
3657  // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*(1, 68) = 68
3658 
3659  MaxCar = fgMaxCar;
3660  typ_name.Resize(MaxCar);
3661  typ_name = "AvHfn";
3662  v_nb_times = fFileHeader->fAvHfnCalc;
3663  v_dim_one = 1;
3664  v_dim_two = fEcal->MaxStinEcnaInStex();
3665  v_size = v_nb_times * v_dim_one * v_dim_two;
3666  v_tot += v_size;
3667 
3669  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3670  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3671  << v_size;
3672  }
3673 
3674  for (Int_t i = 0; i < v_nb_times; i++) {
3675  if (fTagAvHfn[0] == 1) {
3678  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3680  TRootAvHfn();
3681  gCnaRootFile->fCnaResultsTree->Fill();
3682  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3683  std::cout << " => WRITTEN ON FILE ";
3684  v_tot_writ += v_size;
3685  }
3686  }
3687  }
3689  std::cout << std::endl;
3690  }
3691 
3692  //-------------------------- Average mean cor(s,s)
3693  // 1 fMatHis(1, StexStin) (13) cTypAvMeanCorss 1*(1, 68) = 68
3694 
3695  MaxCar = fgMaxCar;
3696  typ_name.Resize(MaxCar);
3697  typ_name = "AvMeanCorss";
3698  v_nb_times = fFileHeader->fAvMeanCorssCalc;
3699  v_dim_one = 1;
3700  v_dim_two = fEcal->MaxStinEcnaInStex();
3701  v_size = v_nb_times * v_dim_one * v_dim_two;
3702  v_tot += v_size;
3703 
3705  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3706  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3707  << v_size;
3708  }
3709 
3710  for (Int_t i = 0; i < v_nb_times; i++) {
3711  if (fTagAvMeanCorss[0] == 1) {
3714  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3716  TRootAvEvCorss();
3717  gCnaRootFile->fCnaResultsTree->Fill();
3718  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3719  std::cout << " => WRITTEN ON FILE ";
3720  v_tot_writ += v_size;
3721  }
3722  }
3723  }
3725  std::cout << std::endl;
3726  }
3727 
3728  //-------------------------- Average sigma of cor(s,s)
3729  // 1 fMatHis(1, StexStin) (14) cTypAvSigCorss 1*(1, 68) = 68
3730 
3731  MaxCar = fgMaxCar;
3732  typ_name.Resize(MaxCar);
3733  typ_name = "AvSigCorss";
3734  v_nb_times = fFileHeader->fAvSigCorssCalc;
3735  v_dim_one = 1;
3736  v_dim_two = fEcal->MaxStinEcnaInStex();
3737  v_size = v_nb_times * v_dim_one * v_dim_two;
3738  v_tot += v_size;
3739 
3741  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3742  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3743  << v_size;
3744  }
3745 
3746  for (Int_t i = 0; i < v_nb_times; i++) {
3747  if (fTagAvSigCorss[0] == 1) {
3750  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3752  TRootAvSigCorss();
3753  gCnaRootFile->fCnaResultsTree->Fill();
3754  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3755  std::cout << " => WRITTEN ON FILE ";
3756  v_tot_writ += v_size;
3757  }
3758  }
3759  }
3761  std::cout << std::endl;
3762  }
3763 
3764  //-------------------------- Expectation values of the expectation values of the samples (pedestals)
3765  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3766 
3767  MaxCar = fgMaxCar;
3768  typ_name.Resize(MaxCar);
3769  typ_name = "Ped";
3770  v_nb_times = fFileHeader->fPedCalc;
3771  v_dim_one = 1;
3772  v_dim_two = fEcal->MaxCrysEcnaInStex();
3773  v_size = v_nb_times * v_dim_one * v_dim_two;
3774  v_tot += v_size;
3775 
3777  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3778  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3779  << v_size;
3780  }
3781 
3782  for (Int_t i = 0; i < v_nb_times; i++) {
3783  if (fTagPed[0] == 1) {
3786  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3788  TRootPed();
3789  gCnaRootFile->fCnaResultsTree->Fill();
3790  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3791  std::cout << " => WRITTEN ON FILE ";
3792  v_tot_writ += v_size;
3793  }
3794  }
3795  }
3797  std::cout << std::endl;
3798  }
3799 
3800  //-------------------------- Expectation values of the sigmas the samples
3801  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3802 
3803  MaxCar = fgMaxCar;
3804  typ_name.Resize(MaxCar);
3805  typ_name = "Tno";
3806  v_nb_times = fFileHeader->fTnoCalc;
3807  v_dim_one = 1;
3808  v_dim_two = fEcal->MaxCrysEcnaInStex();
3809  v_size = v_nb_times * v_dim_one * v_dim_two;
3810  v_tot += v_size;
3811 
3813  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3814  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3815  << v_size;
3816  }
3817 
3818  for (Int_t i = 0; i < v_nb_times; i++) {
3819  if (fTagTno[0] == 1) {
3822  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3824  TRootTno();
3825  gCnaRootFile->fCnaResultsTree->Fill();
3826  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3827  std::cout << " => WRITTEN ON FILE ";
3828  v_tot_writ += v_size;
3829  }
3830  }
3831  }
3833  std::cout << std::endl;
3834  }
3835 
3836  //-------------------------- Expectation values of the correlations between the samples
3837  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3838 
3839  MaxCar = fgMaxCar;
3840  typ_name.Resize(MaxCar);
3841  typ_name = "MeanCorss";
3842  v_nb_times = fFileHeader->fMeanCorssCalc;
3843  v_dim_one = 1;
3844  v_dim_two = fEcal->MaxCrysEcnaInStex();
3845  v_size = v_nb_times * v_dim_one * v_dim_two;
3846  v_tot += v_size;
3847 
3849  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3850  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3851  << v_size;
3852  }
3853 
3854  for (Int_t i = 0; i < v_nb_times; i++) {
3855  if (fTagMeanCorss[0] == 1) {
3858  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3860  TRootMeanCorss();
3861  gCnaRootFile->fCnaResultsTree->Fill();
3862  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3863  std::cout << " => WRITTEN ON FILE ";
3864  v_tot_writ += v_size;
3865  }
3866  }
3867  }
3869  std::cout << std::endl;
3870  }
3871 
3872  //-------------------------- Sigmas of the expectation values of the samples
3873  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3874 
3875  MaxCar = fgMaxCar;
3876  typ_name.Resize(MaxCar);
3877  typ_name = "Lfn";
3878  v_nb_times = fFileHeader->fLfnCalc;
3879  v_dim_one = 1;
3880  v_dim_two = fEcal->MaxCrysEcnaInStex();
3881  v_size = v_nb_times * v_dim_one * v_dim_two;
3882  v_tot += v_size;
3883 
3885  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3886  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3887  << v_size;
3888  }
3889 
3890  for (Int_t i = 0; i < v_nb_times; i++) {
3891  if (fTagLfn[0] == 1) {
3894  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3896  TRootLfn();
3897  gCnaRootFile->fCnaResultsTree->Fill();
3898  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3899  std::cout << " => WRITTEN ON FILE ";
3900  v_tot_writ += v_size;
3901  }
3902  }
3903  }
3905  std::cout << std::endl;
3906  }
3907 
3908  //-------------------------- Sigmas of the sigmas of the samples
3909  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3910 
3911  MaxCar = fgMaxCar;
3912  typ_name.Resize(MaxCar);
3913  typ_name = "Hfn";
3914  v_nb_times = fFileHeader->fHfnCalc;
3915  v_dim_one = 1;
3916  v_dim_two = fEcal->MaxCrysEcnaInStex();
3917  v_size = v_nb_times * v_dim_one * v_dim_two;
3918  v_tot += v_size;
3919 
3921  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3922  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3923  << v_size;
3924  }
3925 
3926  for (Int_t i = 0; i < v_nb_times; i++) {
3927  if (fTagHfn[0] == 1) {
3930  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3932  TRootHfn();
3933  gCnaRootFile->fCnaResultsTree->Fill();
3934  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3935  std::cout << " => WRITTEN ON FILE ";
3936  v_tot_writ += v_size;
3937  }
3938  }
3939  }
3941  std::cout << std::endl;
3942  }
3943 
3944  //-------------------------- Sigmas of the correlations between the samples
3945  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3946 
3947  MaxCar = fgMaxCar;
3948  typ_name.Resize(MaxCar);
3949  typ_name = "SigCorss";
3950  v_nb_times = fFileHeader->fSigCorssCalc;
3951  v_dim_one = 1;
3952  v_dim_two = fEcal->MaxCrysEcnaInStex();
3953  v_size = v_nb_times * v_dim_one * v_dim_two;
3954  v_tot += v_size;
3955 
3957  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3958  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3959  << v_size;
3960  }
3961 
3962  for (Int_t i = 0; i < v_nb_times; i++) {
3963  if (fTagSigCorss[0] == 1) {
3966  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
3968  TRootSigCorss();
3969  gCnaRootFile->fCnaResultsTree->Fill();
3970  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
3971  std::cout << " => WRITTEN ON FILE ";
3972  v_tot_writ += v_size;
3973  }
3974  }
3975  }
3977  std::cout << std::endl;
3978  }
3979 
3980  //----- Mean Covariances between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3981  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3982 
3983  MaxCar = fgMaxCar;
3984  typ_name.Resize(MaxCar);
3985  typ_name = "LFccMoStins";
3986  v_nb_times = fFileHeader->fLFccMoStinsCalc;
3987  v_dim_one = fEcal->MaxStinEcnaInStex();
3988  v_dim_two = fEcal->MaxStinEcnaInStex();
3989  v_size = v_nb_times * v_dim_one * v_dim_two;
3990  v_tot += v_size;
3991 
3993  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3994  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
3995  << v_size;
3996  }
3997 
3998  for (Int_t i = 0; i < v_nb_times; i++) {
3999  if (fTagLFccMoStins[0] == 1) {
4002  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4004  TRootLFccMoStins();
4005  gCnaRootFile->fCnaResultsTree->Fill();
4006  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4007  std::cout << " => WRITTEN ON FILE ";
4008  v_tot_writ += v_size;
4009  }
4010  }
4011  }
4013  std::cout << std::endl;
4014  }
4015 
4016  //----- Mean Correlations between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
4017  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
4018 
4019  MaxCar = fgMaxCar;
4020  typ_name.Resize(MaxCar);
4021  typ_name = "HFccMoStins";
4022  v_nb_times = fFileHeader->fHFccMoStinsCalc;
4023  v_dim_one = fEcal->MaxStinEcnaInStex();
4024  v_dim_two = fEcal->MaxStinEcnaInStex();
4025  v_size = v_nb_times * v_dim_one * v_dim_two;
4026  v_tot += v_size;
4027 
4029  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4030  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4031  << v_size;
4032  }
4033 
4034  for (Int_t i = 0; i < v_nb_times; i++) {
4035  if (fTagHFccMoStins[0] == 1) {
4038  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4040  TRootHFccMoStins();
4041  gCnaRootFile->fCnaResultsTree->Fill();
4042  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4043  std::cout << " => WRITTEN ON FILE ";
4044  v_tot_writ += v_size;
4045  }
4046  }
4047  }
4049  std::cout << std::endl;
4050  }
4051 
4052  //-------------------------- Numbers of found events (NbOfEvts)
4053  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
4054 
4055  MaxCar = fgMaxCar;
4056  typ_name.Resize(MaxCar);
4057  typ_name = "NbOfEvts";
4058  v_nb_times = fFileHeader->fNbOfEvtsCalc;
4059  v_dim_one = fEcal->MaxCrysEcnaInStex();
4060  v_dim_two = argNbSampWrite;
4061  v_size = v_nb_times * v_dim_one * v_dim_two;
4062  v_tot += v_size;
4063 
4065  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4066  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4067  << v_size;
4068  }
4069 
4070  for (Int_t i = 0; i < v_nb_times; i++) {
4071  if (fTagNbOfEvts[0] == 1) {
4074  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
4076  TRootNbOfEvts(argNbSampWrite);
4077  gCnaRootFile->fCnaResultsTree->Fill();
4078  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4079  std::cout << " => WRITTEN ON FILE ";
4080  v_tot_writ += v_size;
4081  }
4082  }
4083  }
4085  std::cout << std::endl;
4086  }
4087 
4088  //-------------------------- Expectation values of the samples
4089  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
4090 
4091  MaxCar = fgMaxCar;
4092  typ_name.Resize(MaxCar);
4093  typ_name = "MSp";
4094  v_nb_times = fFileHeader->fMSpCalc;
4095  v_dim_one = fEcal->MaxCrysEcnaInStex();
4096  v_dim_two = argNbSampWrite;
4097  v_size = v_nb_times * v_dim_one * v_dim_two;
4098  v_tot += v_size;
4099 
4101  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4102  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4103  << v_size;
4104  }
4105 
4106  for (Int_t i = 0; i < v_nb_times; i++) {
4107  if (fTagMSp[0] == 1) {
4110  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
4112  TRootMSp(argNbSampWrite);
4113  gCnaRootFile->fCnaResultsTree->Fill();
4114  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4115  std::cout << " => WRITTEN ON FILE ";
4116  v_tot_writ += v_size;
4117  }
4118  }
4119  }
4121  std::cout << std::endl;
4122  }
4123 
4124  //-------------------------- Sigmas of the samples
4125  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
4126 
4127  MaxCar = fgMaxCar;
4128  typ_name.Resize(MaxCar);
4129  typ_name = "SSp";
4130  v_nb_times = fFileHeader->fSSpCalc;
4131  v_dim_one = fEcal->MaxCrysEcnaInStex();
4132  v_dim_two = argNbSampWrite;
4133  v_size = v_nb_times * v_dim_one * v_dim_two;
4134  v_tot += v_size;
4135 
4137  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4138  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4139  << v_size;
4140  }
4141 
4142  for (Int_t i = 0; i < v_nb_times; i++) {
4143  if (fTagSSp[0] == 1) {
4146  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
4148  TRootSSp(argNbSampWrite);
4149  gCnaRootFile->fCnaResultsTree->Fill();
4150  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4151  std::cout << " => WRITTEN ON FILE ";
4152  v_tot_writ += v_size;
4153  }
4154  }
4155  }
4157  std::cout << std::endl;
4158  }
4159 
4160  //-------------------------- Covariances between samples
4161 
4162  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
4163 
4164  MaxCar = fgMaxCar;
4165  typ_name.Resize(MaxCar);
4166  typ_name = "CovCss";
4167  v_nb_times = fFileHeader->fCovCssCalc;
4168  v_dim_one = argNbSampWrite;
4169  v_dim_two = argNbSampWrite;
4170  v_size = v_nb_times * v_dim_one * v_dim_two;
4171  v_tot += v_size;
4172 
4174  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4175  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4176  << v_size;
4177  }
4178 
4179  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) {
4180  if (fTagCovCss[i0StexEcha] == 1) {
4182  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
4183  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4185  TRootCovCss(i0StexEcha, argNbSampWrite);
4186  gCnaRootFile->fCnaResultsTree->Fill();
4187  if (i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments) {
4188  std::cout << " => WRITTEN ON FILE ";
4189  v_tot_writ += v_size;
4190  }
4191  }
4192  }
4194  std::cout << std::endl;
4195  }
4196 
4197  //-------------------------- Correlations between samples
4198  // StexEcha fMatMat(sample, sample) ( 9) cTypCorCss 1700*( 10, 10) = 170 000
4199 
4200  MaxCar = fgMaxCar;
4201  typ_name.Resize(MaxCar);
4202  typ_name = "CorCss";
4203  v_nb_times = fFileHeader->fCorCssCalc;
4204  v_dim_one = argNbSampWrite;
4205  v_dim_two = argNbSampWrite;
4206  v_size = v_nb_times * v_dim_one * v_dim_two;
4207  v_tot += v_size;
4208 
4210  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4211  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4212  << v_size;
4213  }
4214 
4215  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) {
4216  if (fTagCorCss[i0StexEcha] == 1) {
4218  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
4219  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4221  TRootCorCss(i0StexEcha, argNbSampWrite);
4222  gCnaRootFile->fCnaResultsTree->Fill();
4223  if (i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments) {
4224  std::cout << " => WRITTEN ON FILE ";
4225  v_tot_writ += v_size;
4226  }
4227  }
4228  }
4230  std::cout << std::endl;
4231  }
4232 
4233  //-------------------------- Samples as a function of event = events distributions
4234  // StexEcha fMatHis(sample, bins) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
4235 
4236  MaxCar = fgMaxCar;
4237  typ_name.Resize(MaxCar);
4238  typ_name = "AdcEvt";
4239  v_nb_times = fFileHeader->fAdcEvtCalc;
4240  v_dim_one = argNbSampWrite;
4241  v_dim_two = fFileHeader->fReqNbOfEvts;
4242  v_size = v_nb_times * v_dim_one * v_dim_two;
4243  v_tot += v_size;
4244 
4246  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4247  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4248  << v_size;
4249  }
4250 
4251  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++) {
4252  if (fTagAdcEvt[i0StexEcha] == 1) {
4254  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
4255  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one, v_dim_two);
4257  TRootAdcEvt(i0StexEcha, argNbSampWrite);
4258  gCnaRootFile->fCnaResultsTree->Fill();
4259  if (i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments) {
4260  std::cout << " => WRITTEN ON FILE ";
4261  v_tot_writ += v_size;
4262  }
4263  }
4264  }
4266  std::cout << std::endl;
4267  }
4268 
4269  //-------------------------- Low Frequency Covariances between StexEchas
4270  // sample fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
4271 
4272  MaxCar = fgMaxCar;
4273  typ_name.Resize(MaxCar);
4274  typ_name = "LfCov";
4275  v_nb_times = fFileHeader->fLfCovCalc;
4276  v_dim_one = fEcal->MaxCrysEcnaInStex();
4277  v_dim_two = fEcal->MaxCrysEcnaInStex();
4278  v_size = v_nb_times * v_dim_one * v_dim_two;
4279  v_tot += v_size;
4280 
4282  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4283  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4284  << v_size;
4285  }
4286 
4287  for (Int_t i = 0; i < v_nb_times; i++) { //=================================== Record type EB
4288  if (fTagLfCov[0] == 1) {
4291  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4293  TRootLfCov();
4294  gCnaRootFile->fCnaResultsTree->Fill();
4295  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4296  std::cout << " => WRITTEN ON FILE ";
4297  v_tot_writ += v_size;
4298  }
4299  }
4300  }
4302  std::cout << std::endl;
4303  }
4304 
4305  //-------------------------- Low Frequency Correlations between StexEchas
4306  // sample fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
4307 
4308  MaxCar = fgMaxCar;
4309  typ_name.Resize(MaxCar);
4310  typ_name = "LfCor";
4311  v_nb_times = fFileHeader->fLfCorCalc;
4312  v_dim_one = fEcal->MaxCrysEcnaInStex();
4313  v_dim_two = fEcal->MaxCrysEcnaInStex();
4314  v_size = v_nb_times * v_dim_one * v_dim_two;
4315  v_tot += v_size;
4316 
4318  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4319  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4320  << v_size;
4321  }
4322 
4323  for (Int_t i = 0; i < v_nb_times; i++) {
4324  if (fTagLfCor[0] == 1) {
4327  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4329  TRootLfCor();
4330  gCnaRootFile->fCnaResultsTree->Fill();
4331  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4332  std::cout << " => WRITTEN ON FILE ";
4333  v_tot_writ += v_size;
4334  }
4335  }
4336  }
4338  std::cout << std::endl;
4339  }
4340 
4341  //-------------------------- High Frequency Covariances between StexEchas
4342  // sample fMatMat(StexEcha, StexEcha) (6) cTypHfCov 1*(1700,1700) = 2 890 000
4343 
4344  MaxCar = fgMaxCar;
4345  typ_name.Resize(MaxCar);
4346  typ_name = "HfCov";
4347  v_nb_times = fFileHeader->fHfCovCalc;
4348  v_dim_one = fEcal->MaxCrysEcnaInStex();
4349  v_dim_two = fEcal->MaxCrysEcnaInStex();
4350  v_size = v_nb_times * v_dim_one * v_dim_two;
4351  v_tot += v_size;
4352 
4354  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4355  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4356  << v_size;
4357  }
4358 
4359  for (Int_t i = 0; i < v_nb_times; i++) {
4360  if (fTagHfCov[0] == 1) {
4363  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4365  TRootHfCov();
4366  gCnaRootFile->fCnaResultsTree->Fill();
4367  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4368  std::cout << " => WRITTEN ON FILE ";
4369  v_tot_writ += v_size;
4370  }
4371  }
4372  }
4374  std::cout << std::endl;
4375  }
4376 
4377  //-------------------------- High Frequency Correlations between StexEchas
4378  // sample fMatMat(StexEcha, StexEcha) (7) cTypHfCor 1*(1700,1700) = 2 890 000
4379 
4380  MaxCar = fgMaxCar;
4381  typ_name.Resize(MaxCar);
4382  typ_name = "HfCor";
4383  v_nb_times = fFileHeader->fHfCorCalc;
4384  v_dim_one = fEcal->MaxCrysEcnaInStex();
4385  v_dim_two = fEcal->MaxCrysEcnaInStex();
4386  v_size = v_nb_times * v_dim_one * v_dim_two;
4387  v_tot += v_size;
4388 
4390  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
4391  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = " << std::setw(9)
4392  << v_size;
4393  }
4394 
4395  for (Int_t i = 0; i < v_nb_times; i++) {
4396  if (fTagHfCor[0] == 1) {
4399  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one, v_dim_two);
4401  TRootHfCor();
4402  gCnaRootFile->fCnaResultsTree->Fill();
4403  if (i == 0 && fFlagPrint == fCodePrintAllComments) {
4404  std::cout << " => WRITTEN ON FILE ";
4405  v_tot_writ += v_size;
4406  }
4407  }
4408  }
4410  std::cout << std::endl;
4411  }
4412 
4413  //---------------------------------------------- WRITING
4414  //...................................... file
4415  gCnaRootFile->fRootFile->Write();
4416  //...................................... header
4417  fFileHeader->Write();
4418 
4419  //...................................... status message
4421  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(20) << "TOTAL: " << std::setw(21)
4422  << "CALCULATED = " << std::setw(9) << v_tot << " => WRITTEN ON FILE = " << std::setw(9) << v_tot_writ
4423  << std::endl;
4424  }
4425 
4427  std::cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << std::endl
4428  << " " << fCnaParPaths->ResultsRootFilePath().Data() << std::endl;
4429  }
4430 
4431  ok_write = kTRUE;
4432 
4433  //...................................... close
4435  }
4436  return ok_write;
4437 } //-------------- End of WriteRootFile(...) -----------------------
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:42
TEcnaNArrayD fMatMat
void TRootAdcEvt(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4477
Int_t * fTagCorCss
Definition: TEcnaRun.h:440
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:80
void TRootHfn()
Definition: TEcnaRun.cc:4763
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:494
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:70
Int_t fSSpCalc
Definition: TEcnaHeader.h:68
Bool_t fOpenRootFile
Definition: TEcnaRun.h:393
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:422
Int_t * fTagLfCor
Definition: TEcnaRun.h:480
void TRootSigCorss()
Definition: TEcnaRun.cc:4778
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:508
void TRootSSp(const Int_t &)
Definition: TEcnaRun.cc:4514
Int_t fHfnCalc
Definition: TEcnaHeader.h:85
void TRootLfCor()
Definition: TEcnaRun.cc:4623
void TRootLFccMoStins()
Definition: TEcnaRun.cc:4531
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:381
Int_t * fTagCovCss
Definition: TEcnaRun.h:435
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:89
void TRootCovCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4671
Int_t * fTagPed
Definition: TEcnaRun.h:444
void TRootAvTno()
Definition: TEcnaRun.cc:4566
Int_t fHfCorCalc
Definition: TEcnaHeader.h:76
void SetSizeHis(Int_t, Int_t)
void TRootAvLfn()
Definition: TEcnaRun.cc:4579
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:52
Int_t * fTagAvTno
Definition: TEcnaRun.h:451
Int_t * fTagHfn
Definition: TEcnaRun.h:464
void TRootHfCor()
Definition: TEcnaRun.cc:4655
Int_t fMSpCalc
Definition: TEcnaHeader.h:67
void TRootAvEvCorss()
Definition: TEcnaRun.cc:4808
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:64
Int_t * fTagSSp
Definition: TEcnaRun.h:430
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:83
Bool_t CloseRootFile(const Text_t *)
Definition: TEcnaRun.cc:3299
void TRootStinNumbers()
Definition: TEcnaRun.cc:4447
void TRootHFccMoStins()
Definition: TEcnaRun.cc:4549
void TRootMSp(const Int_t &)
Definition: TEcnaRun.cc:4498
Int_t fHfCovCalc
Definition: TEcnaHeader.h:75
Int_t * fTagTno
Definition: TEcnaRun.h:449
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRun.cc:13
Int_t * fTagAvLfn
Definition: TEcnaRun.h:461
TEcnaNArrayD fMatHis
CnaResultTyp fTypOfCnaResult
Int_t * fTagLfn
Definition: TEcnaRun.h:459
void TRootAvHfn()
Definition: TEcnaRun.cc:4593
Int_t fCorCssCalc
Definition: TEcnaHeader.h:74
void TRootPed()
Definition: TEcnaRun.cc:4704
void TRootTno()
Definition: TEcnaRun.cc:4718
void TRootCorCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4687
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:69
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:385
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:471
Int_t fPedCalc
Definition: TEcnaHeader.h:81
Int_t * fTagHfCor
Definition: TEcnaRun.h:489
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:419
Int_t * fTagAvPed
Definition: TEcnaRun.h:446
void TRootLfn()
Definition: TEcnaRun.cc:4748
void TRootLfCov()
Definition: TEcnaRun.cc:4607
Int_t fFlagPrint
Definition: TEcnaRun.h:507
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:71
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:498
Bool_t OpenRootFile(const Text_t *, const TString &)
Definition: TEcnaRun.cc:3256
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:456
Int_t * fTagLfCov
Definition: TEcnaRun.h:476
void SetSizeMat(Int_t, Int_t)
void ReSet(Int_t)
Int_t fAvPedCalc
Definition: TEcnaHeader.h:88
void TRootAvSigCorss()
Definition: TEcnaRun.cc:4824
Int_t * fTagHfCov
Definition: TEcnaRun.h:485
Int_t * fTagAvHfn
Definition: TEcnaRun.h:466
Int_t * fTagSigCorss
Definition: TEcnaRun.h:469
Int_t fLfCorCalc
Definition: TEcnaHeader.h:78
Int_t * fTagMSp
Definition: TEcnaRun.h:426
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:66
Int_t fTnoCalc
Definition: TEcnaHeader.h:82
Int_t MaxCrysEcnaInStex()
void TRootNbOfEvts(const Int_t &)
Definition: TEcnaRun.cc:4461
Int_t fLfCovCalc
Definition: TEcnaHeader.h:77
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:79
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:415
void TRootMeanCorss()
Definition: TEcnaRun.cc:4733
Int_t fgMaxCar
Definition: TEcnaRun.h:367
Int_t MaxStinEcnaInStex()
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:86
Int_t fLfnCalc
Definition: TEcnaHeader.h:84
void TRootHfCov()
Definition: TEcnaRun.cc:4639
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:63
TString fTTBELL
Definition: TEcnaRun.h:374
TTree * fCnaResultsTree
Definition: TEcnaRootFile.h:37
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:454
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:90
Int_t fCovCssCalc
Definition: TEcnaHeader.h:73
TFile * fRootFile
Definition: TEcnaRootFile.h:33
const TString & ResultsRootFilePath() const
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:382
void TRootAvPed()
Definition: TEcnaRun.cc:4793

Member Data Documentation

◆ fBuildEvtNotSkipped

Int_t TEcnaRun::fBuildEvtNotSkipped
private

Definition at line 403 of file TEcnaRun.h.

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

◆ fCdelete

Int_t TEcnaRun::fCdelete
private

Definition at line 372 of file TEcnaRun.h.

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

◆ fCnaCommand

Int_t TEcnaRun::fCnaCommand
private

Definition at line 369 of file TEcnaRun.h.

Referenced by Init().

◆ fCnaError

Int_t TEcnaRun::fCnaError
private

Definition at line 369 of file TEcnaRun.h.

Referenced by Init().

◆ fCnaParCout

TEcnaParCout* TEcnaRun::fCnaParCout
private

Definition at line 384 of file TEcnaRun.h.

Referenced by Init(), and SetEcalSubDetector().

◆ fCnaParPaths

TEcnaParPaths* TEcnaRun::fCnaParPaths
private

◆ fCnaWrite

TEcnaWrite* TEcnaRun::fCnaWrite
private

Definition at line 386 of file TEcnaRun.h.

Referenced by GetReadyToCompute(), SetEcalSubDetector(), WriteNewRootFile(), and WriteRootFile().

◆ fCnew

Int_t TEcnaRun::fCnew
private

◆ fCodePrintAllComments

Int_t TEcnaRun::fCodePrintAllComments
private

◆ fCodePrintComments

Int_t TEcnaRun::fCodePrintComments
private

Definition at line 508 of file TEcnaRun.h.

Referenced by Init(), and PrintComments().

◆ fCodePrintNoComment

Int_t TEcnaRun::fCodePrintNoComment
private

◆ fCodePrintWarnings

Int_t TEcnaRun::fCodePrintWarnings
private

Definition at line 508 of file TEcnaRun.h.

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

◆ fEcal

TEcnaParEcal* TEcnaRun::fEcal
private

◆ fEcalNumbering

TEcnaNumbering* TEcnaRun::fEcalNumbering
private

◆ fFcout_f

std::ofstream TEcnaRun::fFcout_f
private

Definition at line 505 of file TEcnaRun.h.

◆ fFileHeader

TEcnaHeader* TEcnaRun::fFileHeader
private

◆ fFlagPrint

Int_t TEcnaRun::fFlagPrint
private

◆ fFlagSubDet

TString TEcnaRun::fFlagSubDet
private

◆ fgMaxCar

Int_t TEcnaRun::fgMaxCar
private

Definition at line 367 of file TEcnaRun.h.

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

◆ fMaxMsgIndexForMiscDiag

Int_t TEcnaRun::fMaxMsgIndexForMiscDiag
private

Definition at line 378 of file TEcnaRun.h.

Referenced by Init().

◆ fMemoReadNumberOfEventsforSamples

Int_t TEcnaRun::fMemoReadNumberOfEventsforSamples
private

Definition at line 410 of file TEcnaRun.h.

Referenced by Init().

◆ fMiscDiag

Int_t* TEcnaRun::fMiscDiag
private

◆ fNbOfMiscDiagCounters

Int_t TEcnaRun::fNbOfMiscDiagCounters
private

Definition at line 377 of file TEcnaRun.h.

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

◆ fNbSampForCalc

Int_t TEcnaRun::fNbSampForCalc
private

◆ fNbSampForFic

Int_t TEcnaRun::fNbSampForFic
private

Definition at line 405 of file TEcnaRun.h.

Referenced by GetReadyToCompute(), GetReadyToReadData(), GetSampleAdcValues(), and TEcnaRun().

◆ fNewRootFileName

TString TEcnaRun::fNewRootFileName
private

Definition at line 398 of file TEcnaRun.h.

Referenced by GetNewRootFileName(), and WriteNewRootFile().

◆ fNewRootFileNameShort

TString TEcnaRun::fNewRootFileNameShort
private

Definition at line 399 of file TEcnaRun.h.

Referenced by GetNewRootFileNameShort(), and WriteNewRootFile().

◆ fNumberOfEvents

Int_t TEcnaRun::fNumberOfEvents
private

◆ fObjectManager

TEcnaObject* TEcnaRun::fObjectManager
private

Definition at line 380 of file TEcnaRun.h.

Referenced by GetReadyToReadData(), Init(), OpenRootFile(), and ReadSampleAdcValues().

◆ fOpenRootFile

Bool_t TEcnaRun::fOpenRootFile
private

Definition at line 393 of file TEcnaRun.h.

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

◆ fReadyToReadData

Int_t TEcnaRun::fReadyToReadData
private

Definition at line 394 of file TEcnaRun.h.

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

◆ fRootFileName

TString TEcnaRun::fRootFileName
private

Definition at line 396 of file TEcnaRun.h.

Referenced by GetRootFileName(), and ReadSampleAdcValues().

◆ fRootFileNameShort

TString TEcnaRun::fRootFileNameShort
private

Definition at line 397 of file TEcnaRun.h.

Referenced by GetRootFileNameShort(), and ReadSampleAdcValues().

◆ fSpecialStexStinNotIndexed

Int_t TEcnaRun::fSpecialStexStinNotIndexed
private

Definition at line 401 of file TEcnaRun.h.

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

◆ fStexName

TString TEcnaRun::fStexName
private

◆ fStinIndexBuilt

Int_t TEcnaRun::fStinIndexBuilt
private

Definition at line 402 of file TEcnaRun.h.

Referenced by GetSampleAdcValues(), and Init().

◆ fStinName

TString TEcnaRun::fStinName
private

◆ fT1d_av_ev_corss

Double_t* TEcnaRun::fT1d_av_ev_corss
private

Definition at line 455 of file TEcnaRun.h.

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

◆ fT1d_av_hifn

Double_t* TEcnaRun::fT1d_av_hifn
private

Definition at line 465 of file TEcnaRun.h.

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

◆ fT1d_av_lofn

Double_t* TEcnaRun::fT1d_av_lofn
private

Definition at line 460 of file TEcnaRun.h.

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

◆ fT1d_av_mped

Double_t* TEcnaRun::fT1d_av_mped
private

Definition at line 445 of file TEcnaRun.h.

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

◆ fT1d_av_sig_corss

Double_t* TEcnaRun::fT1d_av_sig_corss
private

◆ fT1d_av_totn

Double_t* TEcnaRun::fT1d_av_totn
private

Definition at line 450 of file TEcnaRun.h.

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

◆ fT1d_ev

Double_t* TEcnaRun::fT1d_ev
private

Definition at line 425 of file TEcnaRun.h.

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

◆ fT1d_ev_cor_ss

Double_t* TEcnaRun::fT1d_ev_cor_ss
private

◆ fT1d_ev_ev

Double_t* TEcnaRun::fT1d_ev_ev
private

Definition at line 443 of file TEcnaRun.h.

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

◆ fT1d_evevt_of_sigsamp

Double_t* TEcnaRun::fT1d_evevt_of_sigsamp
private

Definition at line 463 of file TEcnaRun.h.

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

◆ fT1d_evsamp_of_sigevt

Double_t* TEcnaRun::fT1d_evsamp_of_sigevt
private

Definition at line 448 of file TEcnaRun.h.

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

◆ fT1d_NbOfEvts

Int_t* TEcnaRun::fT1d_NbOfEvts
private

Definition at line 418 of file TEcnaRun.h.

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

◆ fT1d_sig

Double_t* TEcnaRun::fT1d_sig
private

Definition at line 429 of file TEcnaRun.h.

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

◆ fT1d_sig_cor_ss

Double_t* TEcnaRun::fT1d_sig_cor_ss
private

◆ fT1d_sigevt_of_evsamp

Double_t* TEcnaRun::fT1d_sigevt_of_evsamp
private

Definition at line 458 of file TEcnaRun.h.

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

◆ fT1d_StexStinFromIndex

Int_t* TEcnaRun::fT1d_StexStinFromIndex
private

◆ fT1dCrysNumbersTable

Int_t* TEcnaRun::fT1dCrysNumbersTable
private

Definition at line 503 of file TEcnaRun.h.

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

◆ fT2d1_hf_cor

Double_t* TEcnaRun::fT2d1_hf_cor
private

Definition at line 488 of file TEcnaRun.h.

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

◆ fT2d1_hf_cov

Double_t* TEcnaRun::fT2d1_hf_cov
private

Definition at line 484 of file TEcnaRun.h.

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

◆ fT2d1_hfcc_mostins

Double_t* TEcnaRun::fT2d1_hfcc_mostins
private

Definition at line 497 of file TEcnaRun.h.

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

◆ fT2d1_lf_cor

Double_t* TEcnaRun::fT2d1_lf_cor
private

Definition at line 479 of file TEcnaRun.h.

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

◆ fT2d1_lf_cov

Double_t* TEcnaRun::fT2d1_lf_cov
private

Definition at line 475 of file TEcnaRun.h.

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

◆ fT2d1_lfcc_mostins

Double_t* TEcnaRun::fT2d1_lfcc_mostins
private

Definition at line 493 of file TEcnaRun.h.

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

◆ fT2d_ev

Double_t** TEcnaRun::fT2d_ev
private

◆ fT2d_hf_cor

Double_t** TEcnaRun::fT2d_hf_cor
private

◆ fT2d_hf_cov

Double_t** TEcnaRun::fT2d_hf_cov
private

◆ fT2d_hfcc_mostins

Double_t** TEcnaRun::fT2d_hfcc_mostins
private

◆ fT2d_lf_cor

Double_t** TEcnaRun::fT2d_lf_cor
private

◆ fT2d_lf_cov

Double_t** TEcnaRun::fT2d_lf_cov
private

◆ fT2d_lfcc_mostins

Double_t** TEcnaRun::fT2d_lfcc_mostins
private

◆ fT2d_NbOfEvts

Int_t** TEcnaRun::fT2d_NbOfEvts
private

◆ fT2d_sig

Double_t** TEcnaRun::fT2d_sig
private

Definition at line 428 of file TEcnaRun.h.

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

◆ fT2dCrysNumbersTable

Int_t** TEcnaRun::fT2dCrysNumbersTable
private

Definition at line 502 of file TEcnaRun.h.

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

◆ fT3d1_AdcValues

Double_t* TEcnaRun::fT3d1_AdcValues
private

Definition at line 414 of file TEcnaRun.h.

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

◆ fT3d1_cor_ss

Double_t* TEcnaRun::fT3d1_cor_ss
private

Definition at line 439 of file TEcnaRun.h.

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

◆ fT3d1_cov_ss

Double_t* TEcnaRun::fT3d1_cov_ss
private

Definition at line 434 of file TEcnaRun.h.

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

◆ fT3d2_AdcValues

Double_t** TEcnaRun::fT3d2_AdcValues
private

Definition at line 413 of file TEcnaRun.h.

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

◆ fT3d2_cor_ss

Double_t** TEcnaRun::fT3d2_cor_ss
private

Definition at line 438 of file TEcnaRun.h.

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

◆ fT3d2_cov_ss

Double_t** TEcnaRun::fT3d2_cov_ss
private

Definition at line 433 of file TEcnaRun.h.

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

◆ fT3d_AdcValues

Double_t*** TEcnaRun::fT3d_AdcValues
private

◆ fT3d_cor_ss

Double_t*** TEcnaRun::fT3d_cor_ss
private

◆ fT3d_cov_ss

Double_t*** TEcnaRun::fT3d_cov_ss
private

◆ fTagAdcEvt

Int_t* TEcnaRun::fTagAdcEvt
private

◆ fTagAvHfn

Int_t* TEcnaRun::fTagAvHfn
private

◆ fTagAvLfn

Int_t* TEcnaRun::fTagAvLfn
private

◆ fTagAvMeanCorss

Int_t* TEcnaRun::fTagAvMeanCorss
private

◆ fTagAvPed

Int_t* TEcnaRun::fTagAvPed
private

◆ fTagAvSigCorss

Int_t* TEcnaRun::fTagAvSigCorss
private

◆ fTagAvTno

Int_t* TEcnaRun::fTagAvTno
private

◆ fTagCorCss

Int_t* TEcnaRun::fTagCorCss
private

◆ fTagCovCss

Int_t* TEcnaRun::fTagCovCss
private

◆ fTagHFccMoStins

Int_t* TEcnaRun::fTagHFccMoStins
private

◆ fTagHfCor

Int_t* TEcnaRun::fTagHfCor
private

◆ fTagHfCov

Int_t* TEcnaRun::fTagHfCov
private

◆ fTagHfn

Int_t* TEcnaRun::fTagHfn
private

◆ fTagLFccMoStins

Int_t* TEcnaRun::fTagLFccMoStins
private

◆ fTagLfCor

Int_t* TEcnaRun::fTagLfCor
private

◆ fTagLfCov

Int_t* TEcnaRun::fTagLfCov
private

◆ fTagLfn

Int_t* TEcnaRun::fTagLfn
private

◆ fTagMeanCorss

Int_t* TEcnaRun::fTagMeanCorss
private

◆ fTagMSp

Int_t* TEcnaRun::fTagMSp
private

◆ fTagNbOfEvts

Int_t* TEcnaRun::fTagNbOfEvts
private

◆ fTagPed

Int_t* TEcnaRun::fTagPed
private

◆ fTagSigCorss

Int_t* TEcnaRun::fTagSigCorss
private

◆ fTagSSp

Int_t* TEcnaRun::fTagSSp
private

◆ fTagStinNumbers

Int_t* TEcnaRun::fTagStinNumbers
private

◆ fTagTno

Int_t* TEcnaRun::fTagTno
private

◆ fTTBELL

TString TEcnaRun::fTTBELL
private