CMS 3D CMS Logo

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

#include <TEcnaRun.h>

Inheritance diagram for TEcnaRun:

Public Member Functions

void 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 ()
 
TString GetNewRootFileName ()
 
TString GetNewRootFileNameShort ()
 
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 &)
 
TString GetRootFileName ()
 
TString GetRootFileNameShort ()
 
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 ()
 
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 &)
 
virtual ~TEcnaRun ()
 

Private Attributes

Int_t fBuildEvtNotSkipped
 
Int_t fCdelete
 
Int_t fCnaCommand
 
Int_t fCnaError
 
TEcnaParCoutfCnaParCout
 
TEcnaParPathsfCnaParPaths
 
TEcnaWritefCnaWrite
 
Int_t fCnew
 
Int_t fCodePrintAllComments
 
Int_t fCodePrintComments
 
Int_t fCodePrintNoComment
 
Int_t fCodePrintWarnings
 
TEcnaParEcalfEcal
 
TEcnaNumberingfEcalNumbering
 
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::TEcnaRun ( )

Definition at line 19 of file TEcnaRun.cc.

20 {
21 //Constructor without argument: nothing special done
22 
23  // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl;
24 }
TEcnaRun::TEcnaRun ( TEcnaObject pObjectManager,
const TString &  SubDet 
)

Definition at line 26 of file TEcnaRun.cc.

References fCnaParCout, fCnaParPaths, fEcal, fFileHeader, fNbSampForFic, fObjectManager, TEcnaObject::GetPointerValue(), Init(), TEcnaParEcal::MaxSampADC(), TEcnaObject::RegisterPointer(), and SetEcalSubDetector().

27 {
28 //Constructor with argument: call to Init() and declare fEcal according to SubDet value ("EB" or "EE")
29 
30  // std::cout << "[Info Management] CLASS: TEcnaRun. CREATE OBJECT: this = " << this << std::endl;
31 
32  Init();
33  fObjectManager = (TEcnaObject*)pObjectManager;
34  Long_t i_this = (Long_t)this;
35  pObjectManager->RegisterPointer("TEcnaRun", i_this);
36 
37  //............................ fCnaParCout
38  fCnaParCout = 0;
39  Long_t iCnaParCout = pObjectManager->GetPointerValue("TEcnaParCout");
40  if( iCnaParCout == 0 )
41  {fCnaParCout = new TEcnaParCout(pObjectManager); /*fCnew++*/}
42  else
43  {fCnaParCout = (TEcnaParCout*)iCnaParCout;}
44 
45  //............................ fCnaParPaths
46  fCnaParPaths = 0;
47  Long_t iCnaParPaths = pObjectManager->GetPointerValue("TEcnaParPaths");
48  if( iCnaParPaths == 0 )
49  {fCnaParPaths = new TEcnaParPaths(pObjectManager); /*fCnew++*/}
50  else
51  {fCnaParPaths = (TEcnaParPaths*)iCnaParPaths;}
52 
53  //fCfgResultsRootFilePath = fCnaParPaths->ResultsRootFilePath();
54  //fCfgHistoryRunListFilePath = fCnaParPaths->HistoryRunListFilePath();
55 
56  //ffFileHeader = 0;
57  //fconst Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
58  //fconst Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
59  //ffFileHeader = new TEcnaHeader(h_name, h_title); //fCnew++;
60 
61  //............................ fFileHeader
62  const Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
63  const Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
64 
65  fFileHeader = 0;
66  //Int_t iFileHeader = pObjectManager->GetPointerValue("TEcnaHeader");
67  Long_t iFileHeader = 0; // one TEcnaHeader object for each file since they can be open simultaneously
68  if( iFileHeader == 0 )
69  {fFileHeader = new TEcnaHeader(pObjectManager, h_name, h_title); /*fCnew++*/}
70  else
71  {fFileHeader = (TEcnaHeader*)iFileHeader;}
72 
73  SetEcalSubDetector(SubDet.Data());
74  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for ROOT file
75 }
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:382
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:386
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:105
Int_t fNbSampForFic
Definition: TEcnaRun.h:407
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
void Init()
Definition: TEcnaRun.cc:136
void SetEcalSubDetector(const TString &)
Definition: TEcnaRun.cc:275
Int_t MaxSampADC()
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:232
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
TEcnaRun::TEcnaRun ( TEcnaObject pObjectManager,
const TString &  SubDet,
const Int_t &  NbOfSamples 
)

Definition at line 77 of file TEcnaRun.cc.

References gather_cfg::cout, fCnaParCout, fCnaParPaths, fEcal, fFileHeader, fNbSampForFic, fObjectManager, fTTBELL, TEcnaObject::GetPointerValue(), Init(), TEcnaParEcal::MaxSampADC(), TEcnaObject::RegisterPointer(), and SetEcalSubDetector().

78 {
79  //fCnaParPaths = 0; fCnaParPaths = new TEcnaParPaths(); //fCnew++;
80  //fCnaParCout = 0; fCnaParCout = new TEcnaParCout(); //fCnew++;
81 
82  Init();
83  fObjectManager = (TEcnaObject*)pObjectManager;
84  Long_t i_this = (Long_t)this;
85  pObjectManager->RegisterPointer("TEcnaRun", i_this);
86 
87  //............................ fCnaParCout
88  fCnaParCout = 0;
89  Long_t iCnaParCout = pObjectManager->GetPointerValue("TEcnaParCout");
90  if( iCnaParCout == 0 )
91  {fCnaParCout = new TEcnaParCout(pObjectManager); /*fCnew++*/}
92  else
93  {fCnaParCout = (TEcnaParCout*)iCnaParCout;}
94 
95  //............................ fCnaParPaths
96  fCnaParPaths = 0;
97  Long_t iCnaParPaths = pObjectManager->GetPointerValue("TEcnaParPaths");
98  if( iCnaParPaths == 0 )
99  {fCnaParPaths = new TEcnaParPaths(pObjectManager); /*fCnew++*/}
100  else
101  {fCnaParPaths = (TEcnaParPaths*)iCnaParPaths;}
102 
103  //fCfgResultsRootFilePath = fCnaParPaths->ResultsRootFilePath();
104  //fCfgHistoryRunListFilePath = fCnaParPaths->HistoryRunListFilePath();
105 
106  //............................ fFileHeader
107  const Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
108  const Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
109 
110  fFileHeader = 0;
111  //Long_t iFileHeader = pObjectManager->GetPointerValue("TEcnaHeader");
112  Long_t iFileHeader = 0; // one TEcnaHeader object for each file since they can be open simultaneously
113  if( iFileHeader == 0 )
114  {fFileHeader = new TEcnaHeader(pObjectManager, h_name, h_title); /*fCnew++*/}
115  else
116  {fFileHeader = (TEcnaHeader*)iFileHeader;}
117 
118  SetEcalSubDetector(SubDet.Data());
119  if( NbOfSamples>0 && NbOfSamples<=fEcal->MaxSampADC() )
120  {
121  fNbSampForFic = NbOfSamples;
122  }
123  else
124  {
125  std::cout << "TEcnaRun/CONSTRUCTOR> Number of required samples = " << NbOfSamples
126  << ": OUT OF RANGE. Set to the default value (= " << fEcal->MaxSampADC() << ")."
127  << fTTBELL << std::endl;
128  fNbSampForFic = fEcal->MaxSampADC(); // DEFAULT Number of samples for file reading
129  }
130 
131 }
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:382
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:386
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Bool_t RegisterPointer(const TString &, const Long_t &)
Definition: TEcnaObject.cc:105
Int_t fNbSampForFic
Definition: TEcnaRun.h:407
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
void Init()
Definition: TEcnaRun.cc:136
void SetEcalSubDetector(const TString &)
Definition: TEcnaRun.cc:275
Int_t MaxSampADC()
tuple cout
Definition: gather_cfg.py:121
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:232
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
TEcnaRun::TEcnaRun ( const TEcnaRun dcop)

Definition at line 300 of file TEcnaRun.cc.

References gather_cfg::cout.

301 {
302  std::cout << "*TEcnaRun::TEcnaRun(const TEcnaRun& dcop)> "
303  << " Now is the time to write a copy constructor"
304  << std::endl;
305 
306  //{ Int_t cintoto; cin >> cintoto; }
307 
308 }
tuple cout
Definition: gather_cfg.py:121
TEcnaRun::~TEcnaRun ( )
virtual

Definition at line 329 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 i.

330 {
331  //Destructor
332 
334  {
335  std::cout << "*TEcnaRun::~TEcnaRun()> Entering destructor." << std::endl;
336  }
337 
339  {
340  if( fBuildEvtNotSkipped > 0 )
341  {
342  std::cout << "************************************************************************************* "
343  << std::endl;
344  std::cout << "*TEcnaRun::~TEcnaRun()> Nb of calls to GetSampleAdcValues by cmsRun: "
345  << fBuildEvtNotSkipped << std::endl;
346  std::cout << "************************************************************************************* "
347  << std::endl;
348  }
349  }
350 
352  {
353  Int_t misc_czero = 0;
354  for(Int_t i = 0; i < fNbOfMiscDiagCounters; i++)
355  {
356  if( fMiscDiag[i] != 0 )
357  {
358  std::cout << " fMiscDiag Counter "
359  << std::setw(3) << i << " = " << std::setw(9) << fMiscDiag[i]
360  << " (INFO: alloc on non zero freed zone) " << std::endl;
361  }
362  else
363  {
364  misc_czero++;
365  }
366  }
367  std::cout << " Nb of fMiscDiag counters at zero: "
368  << misc_czero << " (total nb of counters: "
369  << fNbOfMiscDiagCounters << ")" << std::endl;
370  }
371 
372  if (fMiscDiag != 0){delete [] fMiscDiag; fCdelete++;}
373 
374  //if (fFileHeader != 0){delete fFileHeader; fCdelete++;}
375  //if (fEcal != 0){delete fEcal; fCdelete++;}
376  //if (fEcalNumbering != 0){delete fEcalNumbering; fCdelete++;}
377  //if (fCnaParCout != 0){delete fCnaParCout; fCdelete++;}
378  //if (fCnaParPaths != 0){delete fCnaParPaths; fCdelete++;}
379  //if (fCnaWrite != 0){delete fCnaWrite; fCdelete++;}
380 
382 
383  if (fT2d_NbOfEvts != 0){delete [] fT2d_NbOfEvts; fCdelete++;}
384  if (fT1d_NbOfEvts != 0){delete [] fT1d_NbOfEvts; fCdelete++;}
385 
386  if (fT3d_AdcValues != 0){delete [] fT3d_AdcValues; fCdelete++;}
387  if (fT3d2_AdcValues != 0){delete [] fT3d2_AdcValues; fCdelete++;}
388  if (fT3d1_AdcValues != 0){delete [] fT3d1_AdcValues; fCdelete++;}
389 
390  if (fT2d_ev != 0){delete [] fT2d_ev; fCdelete++;}
391  if (fT1d_ev != 0){delete [] fT1d_ev; fCdelete++;}
392 
393  if (fT2d_sig != 0){delete [] fT2d_sig; fCdelete++;}
394  if (fT1d_sig != 0){delete [] fT1d_sig; fCdelete++;}
395 
396  if (fT3d_cov_ss != 0){delete [] fT3d_cov_ss; fCdelete++;}
397  if (fT3d2_cov_ss != 0){delete [] fT3d2_cov_ss; fCdelete++;}
398  if (fT3d1_cov_ss != 0){delete [] fT3d1_cov_ss; fCdelete++;}
399 
400  if (fT3d_cor_ss != 0){delete [] fT3d_cor_ss; fCdelete++;}
401  if (fT3d2_cor_ss != 0){delete [] fT3d2_cor_ss; fCdelete++;}
402  if (fT3d1_cor_ss != 0){delete [] fT3d1_cor_ss; fCdelete++;}
403 
404  if (fT2d_lf_cov != 0){delete [] fT2d_lf_cov; fCdelete++;}
405  if (fT2d1_lf_cov != 0){delete [] fT2d1_lf_cov; fCdelete++;}
406 
407  if (fT2d_lf_cor != 0){delete [] fT2d_lf_cor; fCdelete++;}
408  if (fT2d1_lf_cor != 0){delete [] fT2d1_lf_cor; fCdelete++;}
409 
410  if (fT2d_hf_cov != 0){delete [] fT2d_hf_cov; fCdelete++;}
411  if (fT2d1_hf_cov != 0){delete [] fT2d1_hf_cov; fCdelete++;}
412 
413  if (fT2d_hf_cor != 0){delete [] fT2d_hf_cor; fCdelete++;}
414  if (fT2d1_hf_cor != 0){delete [] fT2d1_hf_cor; fCdelete++;}
415 
416  if (fT2d_lfcc_mostins != 0){delete [] fT2d_lfcc_mostins; fCdelete++;}
417  if (fT2d1_lfcc_mostins != 0){delete [] fT2d1_lfcc_mostins ; fCdelete++;}
418 
419  if (fT2d_hfcc_mostins != 0){delete [] fT2d_hfcc_mostins ; fCdelete++;}
420  if (fT2d1_hfcc_mostins != 0){delete [] fT2d1_hfcc_mostins; fCdelete++;}
421 
422  if (fT1d_ev_ev != 0){delete [] fT1d_ev_ev; fCdelete++;}
423  if (fT1d_evsamp_of_sigevt != 0){delete [] fT1d_evsamp_of_sigevt; fCdelete++;}
424  if (fT1d_ev_cor_ss != 0){delete [] fT1d_ev_cor_ss; fCdelete++;}
425  if (fT1d_av_mped != 0){delete [] fT1d_av_mped; fCdelete++;}
426  if (fT1d_av_totn != 0){delete [] fT1d_av_totn; fCdelete++;}
427  if (fT1d_av_lofn != 0){delete [] fT1d_av_lofn; fCdelete++;}
428  if (fT1d_av_hifn != 0){delete [] fT1d_av_hifn; fCdelete++;}
429  if (fT1d_av_ev_corss != 0){delete [] fT1d_av_ev_corss; fCdelete++;}
430  if (fT1d_av_sig_corss != 0){delete [] fT1d_av_sig_corss; fCdelete++;}
431 
432  if (fT1d_sigevt_of_evsamp != 0){delete [] fT1d_sigevt_of_evsamp; fCdelete++;}
433  if (fT1d_evevt_of_sigsamp != 0){delete [] fT1d_evevt_of_sigsamp; fCdelete++;}
434  if (fT1d_sig_cor_ss != 0){delete [] fT1d_sig_cor_ss; fCdelete++;}
435 
436  if (fT2dCrysNumbersTable != 0){delete [] fT2dCrysNumbersTable; fCdelete++;}
437  if (fT1dCrysNumbersTable != 0){delete [] fT1dCrysNumbersTable; fCdelete++;}
438 
439  if (fTagStinNumbers != 0){delete [] fTagStinNumbers; fCdelete++;}
440  if (fTagNbOfEvts != 0){delete [] fTagNbOfEvts; fCdelete++;}
441  if (fTagAdcEvt != 0){delete [] fTagAdcEvt; fCdelete++;}
442  if (fTagMSp != 0){delete [] fTagMSp; fCdelete++;}
443  if (fTagSSp != 0){delete [] fTagSSp; fCdelete++;}
444 
445  if (fTagCovCss != 0){delete [] fTagCovCss; fCdelete++;}
446  if (fTagCorCss != 0){delete [] fTagCorCss; fCdelete++;}
447 
448  if (fTagHfCov != 0){delete [] fTagHfCov; fCdelete++;}
449  if (fTagHfCor != 0){delete [] fTagHfCor; fCdelete++;}
450  if (fTagLfCov != 0){delete [] fTagLfCov; fCdelete++;}
451  if (fTagLfCor != 0){delete [] fTagLfCor; fCdelete++;}
452 
453  if (fTagLFccMoStins != 0){delete [] fTagLFccMoStins; fCdelete++;}
454  if (fTagHFccMoStins != 0){delete [] fTagHFccMoStins; fCdelete++;}
455 
456  if (fTagPed != 0){delete [] fTagPed; fCdelete++;}
457  if (fTagTno != 0){delete [] fTagTno; fCdelete++;}
458  if (fTagMeanCorss != 0){delete [] fTagMeanCorss; fCdelete++;}
459 
460  if (fTagLfn != 0){delete [] fTagLfn; fCdelete++;}
461  if (fTagHfn != 0){delete [] fTagHfn; fCdelete++;}
462  if (fTagSigCorss != 0){delete [] fTagSigCorss; fCdelete++;}
463 
464  if (fTagAvPed != 0){delete [] fTagAvPed; fCdelete++;}
465  if (fTagAvTno != 0){delete [] fTagAvTno; fCdelete++;}
466  if (fTagAvLfn != 0){delete [] fTagAvLfn; fCdelete++;}
467  if (fTagAvHfn != 0){delete [] fTagAvHfn; fCdelete++;}
468  if (fTagAvMeanCorss != 0){delete [] fTagAvMeanCorss; fCdelete++;}
469  if (fTagAvSigCorss != 0){delete [] fTagAvSigCorss; fCdelete++;}
470 
471  if ( fCnew != fCdelete )
472  {
473  std::cout << "!TEcnaRun::~TEcnaRun()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = "
474  << fCnew << ", fCdelete = " << fCdelete << fTTBELL << std::endl;
475  }
476  else
477  {
478  // std::cout << "*TEcnaRun::~TEcnaRun()> Management of memory allocations: OK. fCnew = "
479  // << fCnew << ", fCdelete = " << fCdelete << std::endl;
480  }
481 
483  {
484  std::cout << "*TEcnaRun::~TEcnaRun()> Exiting destructor (this = " << this << ")." << std::endl
485  << "~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#"
486  << std::endl;
487  }
488 
489  // std::cout << "[Info Management] CLASS: TEcnaRun. DESTROY OBJECT: this = " << this << std::endl;
490 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:472
int i
Definition: DBlmapReader.cc:9
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:447
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:441
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:460
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:405
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
Int_t fCdelete
Definition: TEcnaRun.h:374
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:470
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:477
Int_t * fTagPed
Definition: TEcnaRun.h:446
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:505
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:457
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:498
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:416
Int_t * fTagHfn
Definition: TEcnaRun.h:466
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:452
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:481
Double_t ** fT2d_sig
Definition: TEcnaRun.h:430
Int_t * fTagSSp
Definition: TEcnaRun.h:432
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:489
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:445
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:435
Int_t * fTagTno
Definition: TEcnaRun.h:451
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:440
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:467
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:485
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:436
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:420
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:486
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:434
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:499
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:480
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:510
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:490
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:450
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:495
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Double_t * fT1d_ev
Definition: TEcnaRun.h:427
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
Double_t ** fT3d2_AdcValues
Definition: TEcnaRun.h:415
tuple cout
Definition: gather_cfg.py:121
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:476
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:462
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:504
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:379
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TString fTTBELL
Definition: TEcnaRun.h:376
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:465
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Double_t * fT1d_sig
Definition: TEcnaRun.h:431
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:494

Member Function Documentation

void TEcnaRun::AverageHighFrequencyNoise ( )

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

2136 {
2137 // Calculation of the average
2138 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the High Frequency Noise
2139 
2140  //... preliminary calculation of the High Frequency Noise if not done yet
2141  if ( fTagHfn[0] != 1 ){HighFrequencyNoise(); fTagHfn[0]=0;}
2142  //................... Allocation av_hifn + init to zero (mandatory)
2143  if( fT1d_av_hifn == 0 ){fT1d_av_hifn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2144  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2145  {if( fT1d_av_hifn[i0StexStinEcna] != (Double_t)0 )
2146  {fMiscDiag[44]++; fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;}}
2147 
2148  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageHighFrequencyNoise()" << std::endl;}
2150  std::cout << " Calculation, for all the "
2151  << fStinName.Data() << "s, of the average High Frequency Noise" << std::endl;}
2152 
2153  //................... Calculation
2154  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2155  {
2156  Int_t n1StexStinEcna = i0StexStinEcna+1;
2157  fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2158  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2159  {
2160  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2161 
2162  if( fStexName == "SM " )
2163  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2164 
2165  if( fStexName == "Dee" )
2166  {
2167  //---------------- Special translation for mixed SCEcna (29 and 32)
2168  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2169  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2170  Int_t n1StinEcha = i0StinEcha+1;
2171  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2172  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2173  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2174  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2175  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2176  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2177  }
2178  }
2179  Double_t xdivis = (Double_t)0.;
2180  if( fStexName == "SM " )
2181  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2182  if( fStexName == "Dee" )
2183  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2184 
2185  fT1d_av_hifn[i0StexStinEcna] = fT1d_av_hifn[i0StexStinEcna]/xdivis;
2186  }
2187  fTagAvHfn[0] = 1; fFileHeader->fAvHfnCalc++;
2188 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t * fTagHfn
Definition: TEcnaRun.h:466
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:467
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:74
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1751
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:465
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::AverageLowFrequencyNoise ( )

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

2076 {
2077 // Calculation of the average
2078 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Low Frequency Noise
2079 
2080  //... preliminary calculation of the Low Frequency Noise if not done yet
2081  if ( fTagLfn[0] != 1 ){LowFrequencyNoise(); fTagLfn[0]=0;}
2082  //................... Allocation av_lofn + init to zero (mandatory)
2083  if( fT1d_av_lofn == 0 ){fT1d_av_lofn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2084  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2085  {if( fT1d_av_lofn[i0StexStinEcna] != (Double_t)0 )
2086  {fMiscDiag[43]++; fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;}}
2087 
2088  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageLowFrequencyNoise()" << std::endl;}
2090  std::cout << " Calculation, for all the "
2091  << fStinName.Data() << "s, of the average Low Frequency Noise" << std::endl;}
2092 
2093  //................... Calculation
2094  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2095  {
2096  Int_t n1StexStinEcna = i0StexStinEcna+1;
2097  fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2098  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2099  {
2100  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2101 
2102  if( fStexName == "SM " )
2103  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2104 
2105  if( fStexName == "Dee" )
2106  {
2107  //---------------- Special translation for mixed SCEcna (29 and 32)
2108  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2109  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2110  Int_t n1StinEcha = i0StinEcha+1;
2111  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2112  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2113  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2114  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2115  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2116  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2117  }
2118  }
2119  Double_t xdivis = (Double_t)0.;
2120  if( fStexName == "SM " )
2121  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2122  if( fStexName == "Dee" )
2123  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2124 
2125  fT1d_av_lofn[i0StexStinEcna] = fT1d_av_lofn[i0StexStinEcna]/xdivis;
2126  }
2127  fTagAvLfn[0] = 1; fFileHeader->fAvLfnCalc++;
2128 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:73
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:460
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Int_t fFlagPrint
Definition: TEcnaRun.h:509
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1681
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:462
TString fStinName
Definition: TEcnaRun.h:393
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::AverageMeanCorrelationsBetweenSamples ( )

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

2196 {
2197 // Calculation of the average
2198 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the mean cor(s,s)
2199 
2200  //... preliminary calculation of the mean cor(s,s) if not done yet
2202  //................... Allocation av_ev_corss + init to zero (mandatory)
2203  if( fT1d_av_ev_corss == 0 ){fT1d_av_ev_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2204  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2205  {if( fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0 )
2206  {fMiscDiag[45]++; fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;}}
2207 
2208  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << std::endl;}
2210  std::cout << " Calculation, for all the "
2211  << fStinName.Data() << "s, of the average mean cor(s,s)" << std::endl;}
2212 
2213  //................... Calculation
2214  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2215  {
2216  Int_t n1StexStinEcna = i0StexStinEcna+1;
2217  fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2218  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2219  {
2220  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2221 
2222  if( fStexName == "SM " )
2223  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2224 
2225  if( fStexName == "Dee" )
2226  {
2227  //---------------- Special translation for mixed SCEcna (29 and 32)
2228  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2229  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2230  Int_t n1StinEcha = i0StinEcha+1;
2231  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2232  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2233  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2234  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2235  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2236  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2237  }
2238  }
2239  Double_t xdivis = (Double_t)0.;
2240  if( fStexName == "SM " )
2241  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2242  if( fStexName == "Dee" )
2243  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2244 
2245  fT1d_av_ev_corss[i0StexStinEcna] = fT1d_av_ev_corss[i0StexStinEcna]/xdivis;
2246  }
2248 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:92
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:457
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1823
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::AveragePedestals ( )

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

1955 {
1956 // Calculation of the average
1957 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Pedestals
1958 
1959  //... preliminary calculation of the Pedestals if not done yet
1960  if ( fTagPed[0] != 1 ){Pedestals(); fTagPed[0]=0;}
1961  //................... Allocation av_mped + init to zero (mandatory)
1962  if( fT1d_av_mped == 0 ){fT1d_av_mped = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
1963  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1964  {if( fT1d_av_mped[i0StexStinEcna] != (Double_t)0 )
1965  {fMiscDiag[41]++; fT1d_av_mped[i0StexStinEcna] = (Double_t)0;}}
1966 
1967  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AveragePedestals()" << std::endl;}
1969  std::cout << " Calculation, for all the "
1970  << fStinName.Data() << "s, of the average Pedestals" << std::endl;}
1971 
1972  //................... Calculation
1973  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1974  {
1975  Int_t n1StexStinEcna = i0StexStinEcna+1;
1976  fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
1977  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
1978  {
1979  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
1980 
1981  if( fStexName == "SM " )
1982  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1983 
1984  if( fStexName == "Dee" )
1985  {
1986  //---------------- Special translation for mixed SCEcna (29 and 32)
1987  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
1988  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
1989  Int_t n1StinEcha = i0StinEcha+1;
1990  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
1991  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
1992  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
1993  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
1994  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
1995  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1996  }
1997  }
1998  Double_t xdivis = (Double_t)0.;
1999  if( fStexName == "SM " )
2000  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2001  if( fStexName == "Dee" )
2002  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2003 
2004  fT1d_av_mped[i0StexStinEcna] = fT1d_av_mped[i0StexStinEcna]/xdivis;
2005  }
2006 
2007  fTagAvPed[0] = 1; fFileHeader->fAvPedCalc++;
2008 }
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:447
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t * fTagPed
Definition: TEcnaRun.h:446
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:445
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t fAvPedCalc
Definition: TEcnaHeader.h:91
void Pedestals()
Definition: TEcnaRun.cc:1583
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples ( )

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

2256 {
2257 // Calculation of the average
2258 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the sigma of cor(s,s)
2259 
2260  //... preliminary calculation of the sigma of cor(s,s) if not done yet
2262  //................... Allocation av_sig_corss + init to zero (mandatory)
2263  if( fT1d_av_sig_corss == 0 ){fT1d_av_sig_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2264  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2265  {if( fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0 )
2266  {fMiscDiag[46]++; fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;}}
2267 
2268  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << std::endl;}
2270  std::cout << " Calculation, for all the "
2271  << fStinName.Data() << "s, of the average sigma of cor(s,s)" << std::endl;}
2272 
2273  //................... Calculation
2274  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2275  {
2276  Int_t n1StexStinEcna = i0StexStinEcna+1;
2277  fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2278  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2279  {
2280  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2281 
2282  if( fStexName == "SM " )
2283  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2284 
2285  if( fStexName == "Dee" )
2286  {
2287  //---------------- Special translation for mixed SCEcna (29 and 32)
2288  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2289  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2290  Int_t n1StinEcha = i0StinEcha+1;
2291  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2292  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2293  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2294  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2295  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2296  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2297  }
2298  }
2299  Double_t xdivis = (Double_t)0.;
2300  if( fStexName == "SM " )
2301  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2302  if( fStexName == "Dee" )
2303  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2304 
2305  fT1d_av_sig_corss[i0StexStinEcna] = fT1d_av_sig_corss[i0StexStinEcna]/xdivis;
2306  }
2308 }
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:472
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:470
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1889
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:93
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::AverageTotalNoise ( )

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

2016 {
2017 // Calculation of the average
2018 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Total Noise
2019 
2020  //... preliminary calculation of the averaged Total Noise if not done yet
2021  if ( fTagTno[0] != 1 ){TotalNoise(); fTagTno[0]=0;}
2022  //................... Allocation av_totn + init to zero (mandatory)
2023  if( fT1d_av_totn == 0 ){fT1d_av_totn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2024  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2025  {if( fT1d_av_totn[i0StexStinEcna] != (Double_t)0 )
2026  {fMiscDiag[42]++; fT1d_av_totn[i0StexStinEcna] = (Double_t)0;}}
2027 
2028  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::AverageTotalNoise()" << std::endl;}
2030  std::cout << " Calculation, for all the "
2031  << fStinName.Data() << "s, of the average total Noise" << std::endl;}
2032 
2033  //................... Calculation
2034  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2035  {
2036  Int_t n1StexStinEcna = i0StexStinEcna+1;
2037  fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2038  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2039  {
2040  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2041 
2042  if( fStexName == "SM " )
2043  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2044 
2045  if( fStexName == "Dee" )
2046  {
2047  //---------------- Special translation for mixed SCEcna (29 and 32)
2048  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2049  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2050  Int_t n1StinEcha = i0StinEcha+1;
2051  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2052  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2053  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2054  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2055  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2056  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2057  }
2058  }
2059  Double_t xdivis = (Double_t)0.;
2060  if( fStexName == "SM " )
2061  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2062  if( fStexName == "Dee" )
2063  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2064 
2065  fT1d_av_totn[i0StexStinEcna] = fT1d_av_totn[i0StexStinEcna]/xdivis;
2066  }
2067  fTagAvTno[0] = 1; fFileHeader->fAvTnoCalc++;
2068 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
void TotalNoise()
Definition: TEcnaRun.cc:1628
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:452
Int_t * fTagTno
Definition: TEcnaRun.h:451
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:72
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysInStinEcna(const Int_t &, const Int_t &, const TString &)
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:450
Int_t Get0StexEchaFrom1StexStinAnd0StinEcha(const Int_t &, const Int_t &)
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Bool_t TEcnaRun::CloseRootFile ( const Text_t *  name)

Definition at line 2972 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

2972  {
2973 //Close the Root file
2974 
2975  TString s_name;
2976  s_name = fCnaParPaths->ResultsRootFilePath();
2977  s_name.Append('/');
2978  s_name.Append(name);
2979 
2980  Bool_t ok_close = kFALSE;
2981 
2982  if (fOpenRootFile == kTRUE )
2983  {
2985 
2987  std::cout << "*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() << " closed." << std::endl;}
2988 
2989  // delete gCnaRootFile; gCnaRootFile = 0; fCdelete++;
2990 
2991  fOpenRootFile = kFALSE;
2992  ok_close = kTRUE;
2993  }
2994  else
2995  {
2996  std::cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open."
2997  << fTTBELL << std::endl;
2998  }
2999  return ok_close;
3000 }
Bool_t fOpenRootFile
Definition: TEcnaRun.h:395
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
Int_t fFlagPrint
Definition: TEcnaRun.h:509
TString ResultsRootFilePath()
tuple cout
Definition: gather_cfg.py:121
TString fTTBELL
Definition: TEcnaRun.h:376
void TEcnaRun::CorrelationsBetweenSamples ( )

Definition at line 1509 of file TEcnaRun.cc.

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

Referenced by MeanCorrelationsBetweenSamples(), and StandardCalculations().

1510 {
1511 //Calculation of the correlations between samples for all the StexEchas
1512 
1513  //... preliminary calculation of the covariances if not done yet.
1514  // Test only the first tag since the cov are computed globaly
1515  // but set all the tags to 0 because we don't want to write
1516  // the covariances in the result ROOT file
1517  if ( fTagCovCss[0] != 1 ){CovariancesBetweenSamples();
1518  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1519  {fTagCovCss[j0StexEcha] = 0;}}
1520 
1521  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::CorrelationsBetweenSamples()" << std::endl;}
1523  std::cout << " Calculation: correlations between samples"
1524  << " for each channel." << std::endl;}
1525 
1526  //................... Allocations cor_ss
1527  if( fT3d_cor_ss == 0){
1528  const Int_t n_samp = fNbSampForCalc;
1529  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1530  fT3d_cor_ss = new Double_t**[n_StexEcha]; fCnew++;
1531  fT3d2_cor_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1532  fT3d1_cor_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1533  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1534  fT3d_cor_ss[i] = &fT3d2_cor_ss[0] + i*n_samp;
1535  for(Int_t j = 0 ; j < n_samp ; j++){
1536  fT3d2_cor_ss[n_samp*i+j] = &fT3d1_cor_ss[0]+n_samp*(n_samp*i+j);}}
1537  }
1538 
1539  //..................... calculation of the correlations (=init)
1540  //......................computation of half of the matrix, diagonal included (verif = 1)
1541 
1542  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1543  {
1544  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1545  {
1546  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample ; j0Sample++)
1547  {
1548  if( (fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample] > 0) &&
1549  (fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample] > 0) )
1550  {
1551  fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample]/
1552  ( sqrt(fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample])*sqrt(fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample]) );
1553  }
1554  else
1555  {
1556  (fT3d_cor_ss)[j0StexEcha][i0Sample][j0Sample] = (Double_t)0; // prevoir compteur + fTTBELL
1557  }
1558  fT3d_cor_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample];
1559  }
1560  }
1561  fTagCorCss[j0StexEcha] = 1; fFileHeader->fCorCssCalc++;
1562  }
1563 }
int i
Definition: DBlmapReader.cc:9
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:441
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
void CovariancesBetweenSamples()
Definition: TEcnaRun.cc:1449
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:440
Int_t fCorCssCalc
Definition: TEcnaHeader.h:77
T sqrt(T t)
Definition: SSEVec.h:48
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:434
int j
Definition: DBlmapReader.cc:9
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::CovariancesBetweenSamples ( )

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

Referenced by CorrelationsBetweenSamples().

1450 {
1451  //Calculation of the covariances between samples for all the StexEchas
1452 
1453  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::CovariancesBetweenSamples()" << std::endl;}
1455  std::cout << " Calculation: covariances between samples"
1456  << " for each channel." << std::endl;}
1457 
1458  //................... Allocations cov_ss
1459  if( fT3d_cov_ss == 0 ){
1460  const Int_t n_samp = fNbSampForCalc;
1461  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1462  fT3d_cov_ss = new Double_t**[n_StexEcha]; fCnew++;
1463  fT3d2_cov_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1464  fT3d1_cov_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1465  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1466  fT3d_cov_ss[i] = &fT3d2_cov_ss[0] + i*n_samp;
1467  for(Int_t j = 0 ; j < n_samp ; j++){
1468  fT3d2_cov_ss[n_samp*i+j] = &fT3d1_cov_ss[0]+n_samp*(n_samp*i+j);}}
1469  }
1470 
1471  //.................. Calculation (= init)
1472  //.................. computation of half of the matrix, diagonal included)
1473 
1474  //... preliminary calculation of the expectation values if not done yet.
1475  // The tag is set to 1 after call to the method. It is reset to 0
1476  // because the expectation values must not be written in the result ROOT file
1477  // (since the tag was equal to 0)
1478  // Results in array fT2d_ev[j0StexEcha][i0Sample]
1479  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1480 
1481 
1482  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1483  {
1484  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1485  {
1486  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample; j0Sample++)
1487  {
1488  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1489  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1490  {
1491  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] +=
1492  (fT3d_AdcValues[j0StexEcha][i0Sample][i_event] - fT2d_ev[j0StexEcha][i0Sample])
1493  *(fT3d_AdcValues[j0StexEcha][j0Sample][i_event] - fT2d_ev[j0StexEcha][j0Sample]);
1494  }
1495  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /= (Double_t)fNumberOfEvents;
1496  fT3d_cov_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample];
1497  }
1498  }
1499  fTagCovCss[j0StexEcha] = 1; fFileHeader->fCovCssCalc++;
1500  }
1501 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:435
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:436
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:434
int j
Definition: DBlmapReader.cc:9
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
void SampleMeans()
Definition: TEcnaRun.cc:1329
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
Int_t fCovCssCalc
Definition: TEcnaHeader.h:76
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::Expert1Calculations ( )

Definition at line 1299 of file TEcnaRun.cc.

References HighFrequencyCorrelationsBetweenChannels(), and LowFrequencyCorrelationsBetweenChannels().

Referenced by TEcnaGui::Calculations().

1300 {
1301  // long time, big file
1302 
1305 }
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2640
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2440
void TEcnaRun::Expert2Calculations ( )

Definition at line 1307 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins(), and LowFrequencyMeanCorrelationsBetweenStins().

Referenced by TEcnaGui::Calculations().

1308 {
1309  // long time, no big file
1310  // expert 1 is called (if not called before) without writing in file.
1311  // Results are used only in memory to compute expert2 calculations
1312 
1315 }
void HighFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2824
void LowFrequencyMeanCorrelationsBetweenStins()
Definition: TEcnaRun.cc:2726
TString TEcnaRun::GetNewRootFileName ( )

Definition at line 3103 of file TEcnaRun.cc.

References fNewRootFileName.

3103 {return fNewRootFileName;}
TString fNewRootFileName
Definition: TEcnaRun.h:400
TString TEcnaRun::GetNewRootFileNameShort ( )

Definition at line 3104 of file TEcnaRun.cc.

References fNewRootFileNameShort.

Referenced by TEcnaGui::Calculations().

3104 {return fNewRootFileNameShort;}
TString fNewRootFileNameShort
Definition: TEcnaRun.h:401
Bool_t TEcnaRun::GetPathForResults ( )

Definition at line 134 of file TEcnaRun.cc.

References fCnaParPaths, and TEcnaParPaths::GetPathForResultsRootFiles().

TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
Bool_t GetPathForResultsRootFiles()
void TEcnaRun::GetReadyToCompute ( )

Definition at line 1219 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 EcnaAnalyzer::analyze(), TEcnaGui::Calculations(), and EcnaAnalyzer::~EcnaAnalyzer().

1220 {
1221 //
1222  // MAKE THE RESULTS FILE NAME and
1223  // CHECK OF THE NUMBER OF FOUND EVENTS AND init fNumberOfEvents
1224  // (number used to compute the average values over the events)
1225  // The number of events fNumberOfEvents is extracted from the array fT2d_NbOfEvts[]
1226  // which has been filled by the GetSampleAdcValues(...) method
1227 
1228  //..................... Making of the Root File name that will be written
1233 
1234  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
1235 
1236  //..................... Checking numbers of found events channel by channel
1237  if( fT2d_NbOfEvts != 0 )
1238  {
1241  }
1242  else
1243  {
1244  std::cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << std::endl;
1245  }
1246 }
Int_t NumberOfEventsAnalysis(Int_t **, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaWrite.cc:520
Int_t fStex
Definition: TEcnaHeader.h:56
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:610
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
Int_t fNbOfSamples
Definition: TEcnaHeader.h:51
Int_t fNbSampForFic
Definition: TEcnaRun.h:407
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
TString fTypAna
Definition: TEcnaHeader.h:50
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:53
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:54
tuple cout
Definition: gather_cfg.py:121
Int_t fRunNumber
Definition: TEcnaHeader.h:52
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:640
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:388
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
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 507 of file TEcnaRun.cc.

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

510 {
511 //Preparation of the data reading. Set part of the header. No RunType as argument.
512 //Use default value = 99999999 and call method with all the arguments (see below)
513 
514  Int_t RunType = 99999999;
515  GetReadyToReadData(typ_ana, run_number, nfirst, nlast, nbevts, Stex, RunType);
516 }
void GetReadyToReadData(const TString &, const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:507
int nlast
Definition: AMPTWrapper.h:47
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 518 of file TEcnaRun.cc.

References ecal_dqm_sourceclient-live_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(), and TEcnaParEcal::MaxStinEcnaInStex().

521 {
522 //Preparation of the data reading. Set part of the header
523 //
524 // [nfirst, nlast] = [1,50] (50 events) or [151,300] (150 events) or etc...
525 
526  Int_t nrangeevts = nlast - nfirst + 1; // number of events in range
527 
528  if( nrangeevts < nbevts )
529  {
530  if( nlast >= nfirst )
531  {
532  std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- WARNING ---> number of events = " << nbevts
533  << ", out of range (range = " << nfirst << "," << nlast << ")" << std::endl
534  << " The number of found events will be less " << std::endl
535  << " than the number of requested events." << std::endl;
536  }
537  if( nlast < nfirst )
538  {
539  std::cout << "*TEcnaRun::GetReadyToReadData(...)> --- INFO ---> last requested event number = " << nlast
540  << ", less than first requested event number (= " << nfirst << ")" << std::endl
541  << " File will be read until EOF if the number of found events" << std::endl
542  << " remains less than the number of requested events." << std::endl;
543  }
544 
545  }
546 
547  //............. allocation for counters
548  fMiscDiag = new Int_t[fNbOfMiscDiagCounters]; fCnew++;
549  for (Int_t iz=0; iz<fNbOfMiscDiagCounters; iz++){fMiscDiag[iz] = (Int_t)0;}
550 
551  //************** CHECK OF ARGUMENTS: nfirst_arg and nbevts_arg
552  Int_t nentries = 99999999; // => to be reintroduced as argument (like run_type) (?)
553  if ( nfirst <= nentries )
554  {
555  //--------------------- test positivity of nfirst_arg (GetReadyToReadData)
556  if ( nfirst > 0 )
557  {
558  //-------- test compatibility between the last requested event number
559  // and the number of entries
560  if( nlast <= nentries )
561  {
562  const Text_t *h_name = "CnaHeader"; //==> voir cette question avec FXG
563  const Text_t *h_title = "CnaHeader"; //==> voir cette question avec FXG
564  //fFileHeader->HeaderParameters(h_name, h_title ,
565  // typ_ana, fNbSampForFic,
566  // run_number, nfirst, nlast, nbevts,
567  // Stex, nentries); fCnew++;
568 
569  if ( fEcal->MaxStinEcnaInStex() > 0 && fEcal->MaxCrysInStin() > 0 && fNbSampForFic > 0 )
570  {
571  if( fFileHeader == 0 ){fFileHeader = new TEcnaHeader(fObjectManager, h_name, h_title);} // fCnew++;
572 
574  run_number, nfirst, nlast, nbevts,
575  Stex, run_type);
576 
577  // After this call to TEcnaHeader, we have: (GetReadyToReadData)
578  // fFileHeader->fTypAna = typ_ana
579  // fFileHeader->fNbOfSamples = fNbSampForFic
580  // fFileHeader->fRunNumber = run_number
581  // fFileHeader->fFirstReqEvtNumber = nfirst
582  // fFileHeader->fLastReqEvtNumber = nlast
583  // fFileHeader->fReqNbOfEvts = nbevts
584  // fFileHeader->fStex = Stex number
585  // fFileHeader->fRunType = run_type
586 
587  // fFileHeader->Print();
588 
589  // {Int_t cintoto; std::cout << "taper 0 pour continuer" << std::endl; cin >> cintoto;}
590 
591  // fFileHeader->SetName("CnaHeader"); *======> voir FXG
592  // fFileHeader->SetTitle("CnaHeader");
593 
594  //......................................... allocation tags + init of them (GetReadyToReadData)
595 
596  fTagStinNumbers = new Int_t[1]; fCnew++; fTagStinNumbers[0] = (Int_t)0;
597  fTagNbOfEvts = new Int_t[1]; fCnew++; fTagNbOfEvts[0] = (Int_t)0;
598 
599  fTagAdcEvt = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
600  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagAdcEvt[iz] = (Int_t)0;}
601 
602  fTagMSp = new Int_t[1]; fCnew++; fTagMSp[0] = (Int_t)0;
603  fTagSSp = new Int_t[1]; fCnew++; fTagSSp[0] = (Int_t)0;
604 
605  fTagCovCss = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
606  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCovCss[iz] = (Int_t)0;}
607 
608  fTagCorCss = new Int_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
609  for (Int_t iz=0; iz<fEcal->MaxCrysEcnaInStex(); iz++){fTagCorCss[iz] = (Int_t)0;}
610 
611  fTagLfCov = new Int_t[1]; fCnew++; fTagLfCov[0] = (Int_t)0;
612  fTagLfCor = new Int_t[1]; fCnew++; fTagLfCor[0] = (Int_t)0;
613 
614  fTagHfCov = new Int_t[1]; fCnew++; fTagHfCov[0] = (Int_t)0;
615  fTagHfCor = new Int_t[1]; fCnew++; fTagHfCor[0] = (Int_t)0;
616 
617  fTagLFccMoStins = new Int_t[1]; fCnew++; fTagLFccMoStins[0] = (Int_t)0;
618  fTagHFccMoStins = new Int_t[1]; fCnew++; fTagHFccMoStins[0] = (Int_t)0;
619 
620  fTagPed = new Int_t[1]; fCnew++; fTagPed[0] = (Int_t)0;
621  fTagTno = new Int_t[1]; fCnew++; fTagTno[0] = (Int_t)0;
622  fTagMeanCorss = new Int_t[1]; fCnew++; fTagMeanCorss[0] = (Int_t)0;
623 
624  fTagLfn = new Int_t[1]; fCnew++; fTagLfn[0] = (Int_t)0;
625  fTagHfn = new Int_t[1]; fCnew++; fTagHfn[0] = (Int_t)0;
626  fTagSigCorss = new Int_t[1]; fCnew++; fTagSigCorss[0] = (Int_t)0;
627 
628  fTagAvPed = new Int_t[1]; fCnew++; fTagAvPed[0] = (Int_t)0;
629  fTagAvTno = new Int_t[1]; fCnew++; fTagAvTno[0] = (Int_t)0;
630  fTagAvLfn = new Int_t[1]; fCnew++; fTagAvLfn[0] = (Int_t)0;
631  fTagAvHfn = new Int_t[1]; fCnew++; fTagAvHfn[0] = (Int_t)0;
632  fTagAvMeanCorss = new Int_t[1]; fCnew++; fTagAvMeanCorss[0] = (Int_t)0;
633  fTagAvSigCorss = new Int_t[1]; fCnew++; fTagAvSigCorss[0] = (Int_t)0;
634 
635  //====================================================================================
636  //
637  // allocation for fT1d_StexStinFromIndex[] and init to fSpecialStexStinNotIndexed
638  //
639  //====================================================================================
640 
641  if(fT1d_StexStinFromIndex == 0)
642  {
644  }
645  for ( Int_t i0_Stin = 0; i0_Stin < fEcal->MaxStinEcnaInStex(); i0_Stin++ )
646  {
648  }
649 
650  //------------------------------------------------------------- (GetReadyToReadData)
651 
652  //====================================================================================
653  //
654  // allocation of the 3D array fT3d_AdcValues[channel][sample][events] (ADC values)
655  //
656  // This array is filled in the GetSampleAdcValues(...) method
657  //
658  //====================================================================================
659 
660  if(fT3d_AdcValues == 0)
661  {
662  //............ Allocation for the 3d array
663  std::cout << "*TEcnaRun::GetReadyToReadData(...)> Allocation of 3D array for ADC distributions."
664  << " Nb of requested evts = " << fFileHeader->fReqNbOfEvts << std::endl
665  << " This number must not be too large"
666  << " (no failure after this message means alloc OK)." << std::endl;
667 
668  fT3d_AdcValues = new Double_t**[fEcal->MaxCrysEcnaInStex()]; fCnew++;
669 
671  new Double_t*[fEcal->MaxCrysEcnaInStex()*
672  fNbSampForFic]; fCnew++;
673 
675  new Double_t[fEcal->MaxCrysEcnaInStex()*
678 
679  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++){
680  fT3d_AdcValues[i0StexEcha] = &fT3d2_AdcValues[0] + i0StexEcha*fNbSampForFic;
681  for(Int_t j0Sample=0; j0Sample<fNbSampForFic; j0Sample++){
682  fT3d2_AdcValues[fNbSampForFic*i0StexEcha + j0Sample] = &fT3d1_AdcValues[0]+
683  fFileHeader->fReqNbOfEvts*(fNbSampForFic*i0StexEcha+j0Sample);}}
684  }
685  //................................. Init to zero
686  for (Int_t iza=0; iza<fEcal->MaxCrysEcnaInStex(); iza++)
687  {
688  for (Int_t izb=0; izb<fNbSampForFic; izb++)
689  {
690  for (Int_t izc=0; izc<fFileHeader->fReqNbOfEvts; izc++)
691  {
692  if( fT3d_AdcValues[iza][izb][izc] != (Double_t)0 )
693  {
694  fMiscDiag[0]++;
695  fT3d_AdcValues[iza][izb][izc] = (Double_t)0;
696  }
697  }
698  }
699  }
700 
701  //--------------------------------------------------------- (GetReadyToReadData)
702  //====================================================================================
703  //
704  // allocation of the 2D array fT2d_NbOfEvts[channel][sample] (Max nb of evts)
705  //
706  //====================================================================================
707 
708  if (fT2d_NbOfEvts == 0)
709  {
710  fT2d_NbOfEvts = new Int_t*[fEcal->MaxCrysEcnaInStex()]; fCnew++;
711  fT1d_NbOfEvts = new Int_t[fEcal->MaxCrysEcnaInStex()*
712  fNbSampForFic]; fCnew++;
713 
714  for(Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
715  {
716  fT2d_NbOfEvts[i0StexEcha] =
717  &fT1d_NbOfEvts[0] + i0StexEcha*fNbSampForFic;
718  }
719 
720  //................ Init the array to 0
721  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
722  {
723  for(Int_t i0Sample=0; i0Sample<fNbSampForFic; i0Sample++)
724  {
725  fT2d_NbOfEvts[i0StexEcha][i0Sample] = 0;
726  }
727  }
728  }
729  else
730  {
731  std::cerr << "!TEcnaRun::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_NbOfEvts!"
732  << " Pointer already not NULL " << fTTBELL << std::endl;
733  // {Int_t cintoto; std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"
734  // << std::endl; std::cin >> cintoto;}
735  }
736  }
737  else
738  {
739  std::cerr << std::endl
740  << "!TEcnaRun::GetReadyToReadData(...)> "
741  << " *** ERROR *** " << std::endl
742  << " --------------------------------------------------"
743  << std::endl
744  << " NULL or NEGATIVE values for arguments" << std::endl
745  << " with expected positive values:" << std::endl
746  << " Number of Stins in Stex = " << fEcal->MaxStinEcnaInStex() << std::endl
747  << " Number of crystals in Stin = " << fEcal->MaxCrysInStin() << std::endl
748  << " Number of samples by channel = " << fNbSampForFic << std::endl
749  << std::endl
750  << std::endl
751  << " hence, no memory allocation for array member has been performed." << std::endl;
752 
753  std::cout << "Enter: 0 and RETURN to continue or: CTRL C to exit";
754  Int_t toto;
755  std::cin >> toto;
756  }
757  //----------------------------------------------------------- (GetReadyToReadData)
759  std::cout << std::endl;
760  std::cout << "*TEcnaRun::GetReadyToReadData(...)>" << std::endl
761  << " The method has been called with the following argument values:" << std::endl
762  << " Analysis name = "
763  << fFileHeader->fTypAna << std::endl
764  << " Run number = "
765  << fFileHeader->fRunNumber << std::endl
766  << " Run type = "
767  << fFileHeader->fRunType << std::endl
768  << " First requested event number = "
769  << fFileHeader->fFirstReqEvtNumber << std::endl
770  << " Last requested event number = "
771  << fFileHeader->fLastReqEvtNumber << std::endl
772  << " " << fStexName.Data() << " number = "
773  << fFileHeader->fStex << std::endl
774  << " Number of " << fStinName.Data()
775  << " in " << fStexName.Data() << " = "
776  << fEcal->MaxStinEcnaInStex() << std::endl
777  << " Number of crystals in " << fStinName.Data() << " = "
778  << fEcal->MaxCrysInStin() << std::endl
779  << " Number of samples by channel = "
780  << fNbSampForFic << std::endl
781  << std::endl;}
782 
783  fReadyToReadData = 1; // set flag
784  }
785  else
786  {
788  std::cout << "!TEcnaRun::GetReadyToReadData(...) > WARNING/CORRECTION:" << std::endl
789  << "! The fisrt requested event number is not positive (nfirst = " << nfirst << ") "
790  << fTTBELL << std::endl;}
791  }
792  }
793  else
794  {
796  std::cout << std::endl << "!TEcnaRun::GetReadyToReadData(...)> WARNING/CORRECTION:" << std::endl
797  << "! The number of requested events (nbevts = " << nbevts << ") is too large." << std::endl
798  << "! Last event number = " << nlast << " > number of entries = " << nentries << ". "
799  << fTTBELL << std::endl << std::endl;}
800  }
801  }
802  else
803  {
804  std::cout << "!TEcnaRun::GetReadyToReadData(...) *** ERROR ***> "
805  << " The first requested event number is greater than the number of entries."
806  << fTTBELL << std::endl;
807  }
809  std::cout << "*TEcnaRun::GetReadyToReadData(...)> Leaving the method. fReadyToReadData = "
810  << fReadyToReadData << std::endl; }
811 
812 } // end of GetReadyToReadData
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:382
Int_t fReadyToReadData
Definition: TEcnaRun.h:396
Int_t fRunType
Definition: TEcnaHeader.h:63
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Int_t * fTagPed
Definition: TEcnaRun.h:446
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:416
Int_t * fTagHfn
Definition: TEcnaRun.h:466
Int_t * fTagSSp
Definition: TEcnaRun.h:432
Int_t fNbSampForFic
Definition: TEcnaRun.h:407
Int_t * fTagTno
Definition: TEcnaRun.h:451
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:420
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:403
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Int_t MaxCrysInStin()
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:373
TString fTypAna
Definition: TEcnaHeader.h:50
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:53
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:54
int nlast
Definition: AMPTWrapper.h:47
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
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:415
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
Int_t fRunNumber
Definition: TEcnaHeader.h:52
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
TString fStinName
Definition: TEcnaRun.h:393
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:379
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TString fTTBELL
Definition: TEcnaRun.h:376
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
TString TEcnaRun::GetRootFileName ( )

Definition at line 1185 of file TEcnaRun.cc.

References fRootFileName.

1185 {return fRootFileName;}
TString fRootFileName
Definition: TEcnaRun.h:398
TString TEcnaRun::GetRootFileNameShort ( )

Definition at line 1186 of file TEcnaRun.cc.

References fRootFileNameShort.

Referenced by TEcnaGui::Calculations().

1186 {return fRootFileNameShort;}
TString fRootFileNameShort
Definition: TEcnaRun.h:399
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 838 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, TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxSampADC(), and TEcnaParEcal::MaxStinEcnaInStex().

841 {
842  //Building of the arrays fT1d_StexStinFromIndex[] and fT3d_AdcValues[][][]
843 
844  fBuildEvtNotSkipped++; // event not skipped by cmsRun
845 
846  Bool_t ret_code = kFALSE;
847 
848  Int_t i0EventIndex = n1EventNumber - 1; // INDEX FOR Event number
849  Int_t i0StexStinEcna = n1StexStin - 1; // INDEX FOR StexStin = Number_of_the_Stin_in_Stex - 1
850 
851  Int_t i_trouve = 0;
852  //.................................................................. (GetSampleAdcValues)
853  if(fReadyToReadData == 1)
854  {
855  if( n1StexStin>= 1 && n1StexStin <= fEcal->MaxStinEcnaInStex() )
856  {
857  if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
858  {
859  if( i0Sample >= 0 && i0Sample < fEcal->MaxSampADC() )
860  {
861  //..... Put the StexStin number in 1D array fT1d_StexStinFromIndex[] = Stin index + 1
862  if( fT1d_StexStinFromIndex != 0 ) // table fT1d_StexStinFromIndex[index] already allocated
863  {
864  ret_code = kTRUE;
865 
866  // StexStin already indexed
867  if( n1StexStin == fT1d_StexStinFromIndex[i0StexStinEcna] ){i_trouve = 1;}
868 
869  // StexStin index not found: set index for new StexStin
870  if (i_trouve != 1 )
871  {
872  if( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
873  {
874  fT1d_StexStinFromIndex[i0StexStinEcna] = n1StexStin;
876  fTagStinNumbers[0] = 1;
877  fStinIndexBuilt++; // number of found Stins
878 
880  {
881  if( fStinIndexBuilt == 1 )
882  {
883  std::cout << std::endl << "*TEcnaRun::GetSampleAdcValues(...)> event " << n1EventNumber
884  << " : first event for " << fStexName.Data() << " " << fFileHeader->fStex
885  << "; " << fStinName.Data() << "s : ";
886  }
887  if( fFlagSubDet == "EB" )
888  {std::cout << fT1d_StexStinFromIndex[i0StexStinEcna] << ", ";}
889  if( fFlagSubDet == "EE" )
891  GetDeeSCConsFrom1DeeSCEcna(fFileHeader->fStex, fT1d_StexStinFromIndex[i0StexStinEcna])
892  << ", ";}
893  }
894  //.................................................... (GetSampleAdcValues)
896  {
897  std::cout << " (" << fStinIndexBuilt << " " << fStinName.Data()
898  << " found), channel " << i0StinEcha << ", i0Sample " << i0Sample << std::endl;
899  }
900  ret_code = kTRUE;
901  } // if ( fT1d_StexStinFromIndex[i0StexStinEcna] == fSpecialStexStinNotIndexed )
902  else
903  {
904  std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> NOT ALLOWED if RESULT. "
905  << " n1StexStin = " << n1StexStin << ", fT1d_StexStinFromIndex["
906  << i0StexStinEcna << "] = "
907  << fT1d_StexStinFromIndex[i0StexStinEcna]
908  << ", fStinIndexBuilt = " << fStinIndexBuilt
909  << fTTBELL << std::endl;
910  ret_code = kFALSE;
911  }
912  } // if (i_trouve != 1 )
913 
914  } // if( fT1d_StexStinFromIndex != 0 )
915  else
916  {
917  std::cout << "!TEcnaRun, GetSampleAdcValues *** ERROR ***> "
918  << " fT1d_StexStinFromIndex = " << fT1d_StexStinFromIndex
919  << " fT1d_StexStinFromIndex[] ALLOCATION NOT DONE" << fTTBELL << std::endl;
920  ret_code = kFALSE;
921  } //.................................................................. (GetSampleAdcValues)
922  } // end of if( i0Sample >= 0 && i0Sample < fNbSampForFic )
923  else
924  {
925  //.......Reading data => Message and error only if sample >= fEcal->MaxSampADC()
926  // (not fNbSampForFic, the later is used only for calculations)
927  if( i0Sample >= fEcal->MaxSampADC() )
928  {
929  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
930  << " sample number = " << i0Sample << ". OUT OF BOUNDS"
931  << " (max = " << fNbSampForFic << ")"
932  << fTTBELL << std::endl;
933  ret_code = kFALSE;
934  }
935  else
936  {
937  ret_code = kTRUE;
938  }
939  }// else of if( i0Sample >= 0 && i0Sample < fNbSampForFic )
940  } // end of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
941  else
942  {
943  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
944  << " channel number in " << fStinName.Data() << " = " << i0StinEcha << ". OUT OF BOUNDS"
945  << " (max = " << fEcal->MaxCrysInStin() << ")"
946  << fTTBELL << std::endl;
947  ret_code = kFALSE;
948  } // else of if( i0StinEcha >= 0 && i0StinEcha < fEcal->MaxCrysInStin() )
949  }
950  else
951  {
952  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
953  << fStinName.Data() << " number in " << fStexName.Data() << " = " << n1StexStin << ". OUT OF BOUNDS"
954  << " (max = " << fEcal->MaxStinEcnaInStex() << ")"
955  << fTTBELL << std::endl;
956  ret_code = kFALSE;
957  }
958 
959  //.................................................................. (GetSampleAdcValues)
960  //........ Filling of the 2D array of the event numbers in the data reading loop and
961  // filling of the 3D array of the ADC sample values
962  //
963  // ONLY if ret_code == kTRUE
964 
965  if( ret_code == kTRUE )
966  {
967  //............ 1) Conversion (Stin,i0StinEcha) -> i0StexEcha (same numbering for EB and EE)
968  //==========================================================================================
969  // n1StexStin (Tower or SC): 1 2 3
970  // iStexStin 0 1 2
971  //
972  // i0StinEcha: 0......24 0......24 0......24
973  //
974  // i0StexEcha : 0......24 25......49 50......74 grouped by StexStin's
975  // i0StexEcha+1 (Xtal): 1......25 26......50 51......75
976  //
977  //==========================================================================================
978 
979  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinEcha;
980 
981  //--------------------------------------------------------- (GetSampleAdcValues)
982  if( i0StexEcha >= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex() )
983  {
984  //............ 2) Increase of the nb of evts for (StexEcha,sample) (events found in the data)
985  (fT2d_NbOfEvts[i0StexEcha][i0Sample])++; // value after first incrementation = 1
986  fTagNbOfEvts[0] = 1;
988 
989  //............ 3) Filling of the 3D array of the ADC values
990  if ( i0EventIndex >= 0 && i0EventIndex < fFileHeader->fReqNbOfEvts )
991  {
992  if( i0Sample >= 0 && i0Sample < fNbSampForFic )
993  {
994  fT3d_AdcValues[i0StexEcha][i0Sample][i0EventIndex] = adcvalue;
995  }
996  else
997  {
998  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
999  << " sample index = " << i0Sample << ". OUT OF BOUNDS"
1000  << " (max = " << fNbSampForFic << ")"
1001  << fTTBELL << std::endl;
1002  }
1003  }
1004  else
1005  {
1006  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1007  << " event number = " << n1EventNumber << ". OUT OF BOUNDS"
1008  << " (max = " << fFileHeader->fReqNbOfEvts << ")"
1009  << fTTBELL << std::endl;
1010  ret_code = kFALSE;
1011  }
1012  }
1013  else
1014  {
1015  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> "
1016  << " CHANNEL NUMBER OUT OF BOUNDS" << std::endl
1017  << " i0StexEcha number = " << i0StexEcha
1018  << " , n1StexStin = " << n1StexStin
1019  << " , i0StinEcha = " << i0StinEcha
1020  << " , fEcal->MaxCrysEcnaInStex() = " << fEcal->MaxCrysEcnaInStex()
1021  << fTTBELL << std::endl;
1022  ret_code = kFALSE;
1023  // {Int_t cintoto; std::cout << "TAPER 0 POUR CONTINUER" << std::endl; cin >> cintoto;}
1024  }
1025  } // end of if( ret_code == kTRUE )
1026  else
1027  {
1028  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> ret_code = kFALSE "
1029  << fTTBELL << std::endl;
1030  }
1031  } // end of if(fReadyToReadData == 1)
1032  else
1033  {
1034  std::cout << "!TEcnaRun::GetSampleAdcValues(...) *** ERROR ***> GetReadyToReadData(...) not called."
1035  << fTTBELL << std::endl;
1036  ret_code = kFALSE;
1037  }
1038  //.................................................................. (GetSampleAdcValues)
1039  if (ret_code == kFALSE)
1040  {
1041  std::cout << "!TEcnaRun::GetSampleAdcValues(...)> *** ERROR ***> ret_code = " << ret_code
1042  << " (FALSE). Event: " << n1EventNumber
1043  << ", " << fStexName.Data() << ": " << fFileHeader->fStex
1044  << ", " << fStinName.Data() << ": " << n1StexStin
1045  << ", channel: " << i0StinEcha
1046  << ", Sample: " << i0Sample
1047  << ", ADC value: " << adcvalue << std::endl;
1048  }
1049  return ret_code;
1050 }
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:405
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
Int_t fReadyToReadData
Definition: TEcnaRun.h:396
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStexName
Definition: TEcnaRun.h:393
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:67
Int_t fNbSampForFic
Definition: TEcnaRun.h:407
TString fFlagSubDet
Definition: TEcnaRun.h:392
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:404
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:403
Int_t MaxCrysInStin()
Int_t MaxCrysEcnaInStex()
Int_t MaxSampADC()
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:66
TString fStinName
Definition: TEcnaRun.h:393
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::HighFrequencyCorrelationsBetweenChannels ( )

Definition at line 2640 of file TEcnaRun.cc.

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

Referenced by Expert1Calculations(), and HighFrequencyMeanCorrelationsBetweenStins().

2641 {
2642 //Calculation of the High Frequency Correlations between channels
2643 
2644  //... preliminary calculation of the covariances if not done yet.
2645  if ( fTagHfCov[0] != 1 )
2647 
2648  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << std::endl;}
2650  std::cout << " Calculation of the High Frequency Correlations between channels" << std::endl
2651  << " Starting allocation. "
2652  << std::endl;}
2653 
2654  //................. allocation fT2d_hf_cor + init to zero (mandatory)
2655  if( fT2d_hf_cor == 0 ){
2656  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2657  fT2d_hf_cor = new Double_t*[n_StexEcha]; fCnew++;
2658  fT2d1_hf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2659  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2660  fT2d_hf_cor[i0StexEcha] = &fT2d1_hf_cor[0] + i0StexEcha*n_StexEcha;}
2661  }
2662 
2663  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2664  {
2665  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2666  {
2667  if( fT2d_hf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2668  {fMiscDiag[24]++; fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2669  }
2670  }
2671 
2672  //................. calculation
2673  //........................... computation of half of the matrix, diagonal included
2674 
2675  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2676  {
2677  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2678  || ( fFlagSubDet == "EB") )
2679  {
2680  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2681  {
2682  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2683  || ( fFlagSubDet == "EB") )
2684  {
2685  if( fT2d_hf_cov[i0StexEcha][i0StexEcha] > 0
2686  && fT2d_hf_cov[j0StexEcha][j0StexEcha] > 0 )
2687  {
2688  fT2d_hf_cor[i0StexEcha][j0StexEcha] =
2689  fT2d_hf_cov[i0StexEcha][j0StexEcha]/
2690  ( (Double_t)sqrt(fT2d_hf_cov[i0StexEcha][i0StexEcha]) *
2691  (Double_t)sqrt(fT2d_hf_cov[j0StexEcha][j0StexEcha]) );
2692  }
2693  else
2694  {
2695  fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2696  }
2697 
2698  fT2d_hf_cor[j0StexEcha][i0StexEcha] = fT2d_hf_cor[i0StexEcha][j0StexEcha];
2699  }
2700  }
2701  }
2702  if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFN Cor], ";}
2703  }
2704  std::cout << std::endl;
2705 
2706  fTagHfCor[0] = 1; fFileHeader->fHfCorCalc++;
2707 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fHfCorCalc
Definition: TEcnaHeader.h:79
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:489
TString fFlagSubDet
Definition: TEcnaRun.h:392
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:485
T sqrt(T t)
Definition: SSEVec.h:48
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:373
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:490
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
void HighFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2523
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::HighFrequencyCovariancesBetweenChannels ( )

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

Referenced by HighFrequencyCorrelationsBetweenChannels().

2524 {
2525 //Calculation of the High Frequency Covariances between channels
2526 
2527  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyCovariancesBetweenChannels()" << std::endl;}
2529  std::cout << " Calculation of the High Frequency Covariances between channels" << std::endl;}
2530 
2531  //................. allocation fT2d_hf_cov + init to zero (mandatory)
2532  if( fT2d_hf_cov == 0 ){
2533  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2534  fT2d_hf_cov = new Double_t*[n_StexEcha]; fCnew++;
2535  fT2d1_hf_cov = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2536  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2537  fT2d_hf_cov[i0StexEcha] = &fT2d1_hf_cov[0] + i0StexEcha*n_StexEcha;}
2538  }
2539 
2540  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2541  {
2542  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2543  {
2544  if( fT2d_hf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2545  {fMiscDiag[23]++; fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2546  }
2547  }
2548 
2549  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2550  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2551  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2552  {for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2553  {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2554  //................... Allocation cov_over_samp(i0StexEcha,j0StexEcha)
2555  TMatrixD cov_over_samp(fEcal->MaxCrysEcnaInStex(), fEcal->MaxCrysEcnaInStex());
2556  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2557  {for(Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
2558  {cov_over_samp(i0StexEcha, j0StexEcha)=(Double_t)0.;}}
2559 
2560  //........................................... Calculation (HighFrequencyCovariancesBetweenChannels)
2562  std::cout << " Calculation of the mean (over the events)" << std::endl
2563  << " of the covariances between the channels (over the samples 1 to "
2564  << fNbSampForCalc << ")." << std::endl;}
2565 
2566  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2567 
2568  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2569  {
2570  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2571  || ( fFlagSubDet == "EB") )
2572  {
2573  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2574  {
2575  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2576  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2577  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2578  {mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];}
2579  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2580  }
2581  }
2582  if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFNa Cov], ";}
2583  }
2584  std::cout << std::endl;
2585 
2586  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2587 
2588  //... Calculation of half of the matrix, diagonal included (HighFrequencyCovariancesBetweenChannels)
2589  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2590  {
2591  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2592  || ( fFlagSubDet == "EB") )
2593  {
2594  for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2595  {
2596  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2597  || ( fFlagSubDet == "EB") )
2598  {
2599  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2600  {
2601  // Calculation, for each event, of the covariance over the samples
2602  cov_over_samp(i0StexEcha,j0StexEcha) = (Double_t)0;
2603  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2604  {
2605  cov_over_samp(i0StexEcha,j0StexEcha) +=
2606  ( fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(i0StexEcha, n_event) )*
2607  ( fT3d_AdcValues[j0StexEcha][i0Sample][n_event] - mean_over_samples(j0StexEcha, n_event) );
2608  }
2609  cov_over_samp(i0StexEcha,j0StexEcha) /= (Double_t)fNbSampForCalc;
2610 
2611  }
2612  //....... Calculation of the mean over the events of Cov_s[A(c_i,s*,e*),A(c_j,s*,e*)]
2613  //......... Calculation of half of the matrix, diagonal included
2614  fT2d_hf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2615  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2616  {
2617  fT2d_hf_cov[i0StexEcha][j0StexEcha] += cov_over_samp(i0StexEcha,j0StexEcha);
2618  }
2619  fT2d_hf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2620 
2621  fT2d_hf_cov[j0StexEcha][i0StexEcha] = fT2d_hf_cov[i0StexEcha][j0StexEcha];
2622  }
2623  }
2624  }
2625  if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[HFNb Cov], ";}
2626  }
2627  std::cout << std::endl;
2628 
2629  fTagHfCov[0] = 1; fFileHeader->fHfCovCalc++;
2630 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fHfCovCalc
Definition: TEcnaHeader.h:78
TString fFlagSubDet
Definition: TEcnaRun.h:392
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:485
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:486
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::HighFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 2821 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

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

Definition at line 2824 of file TEcnaRun.cc.

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

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

2825 {
2826 //Calculation of the mean High Frequency Correlations
2827 //between channels for each Stin
2828 
2829  //... preliminary calculation of the High Frequency Cor(c,c) if not done yet
2830  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
2832 
2833  //..... mean fT2d_hfcc_mostins for each pair (Stin_X,Stin_Y)
2834  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << std::endl;}
2836  std::cout << " Calculation of the mean, for each "
2837  << fFlagSubDet.Data() << ", of the" << std::endl
2838  << " High Frequency Correlations between channels." << std::endl;}
2839 
2840  //................. allocation fT2d_hfcc_mostins + init to zero (mandatory)
2841  if( fT2d_hfcc_mostins == 0 ){
2842  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2843  fT2d_hfcc_mostins = new Double_t*[n_Stin]; fCnew++;
2844  fT2d1_hfcc_mostins = new Double_t[n_Stin*n_Stin]; fCnew++;
2845  for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2846  fT2d_hfcc_mostins[i0StexStinEcna] = &fT2d1_hfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2847  }
2848 
2849  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2850  {
2851  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2852  {
2853  if( fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2854  {fMiscDiag[32]++; fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2855  }
2856  }
2857 
2858  //..... Calculation of the mean HF Cor(c,c) for each pair (Stin_X,Stin_Y)
2859  //
2860  // ! => Warning: this matrix is NOT symmetric => take N*N elements
2861  // Only (Stin,Stin) matrix is symmetric.
2862  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
2863  // (except for the (Stin,Stin) DIAGONAL elements)
2864  // Then:
2865  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
2866 
2867  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2868 
2869  TVectorD half_HFccMos(ndim); for(Int_t i=0; i<ndim; i++){half_HFccMos(i)=(Double_t)0.;}
2870 
2871  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()" << std::endl;}
2873  std::cout << " Calculation, for each "
2874  << fFlagSubDet.Data() << ", of the mean " << std::endl
2875  << " High Frequency cor(c,c)." << std::endl;}
2876 
2877  //..................... Calculation
2878  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2879  {
2880  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2881  {
2882  //.................... Copy the relevant Mean Correlations(c,c') in 1D vector half_HFccMos()
2883  Int_t i_count = 0;
2884  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2885  {
2886  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2887  for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2888  {
2889  Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2890  if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2891  (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2892  {half_HFccMos(i_count) = fT2d_hf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2893  else
2894  {std::cout << "!TEcnaRun::HighFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2895  << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl; }
2896  }
2897  }
2898  //..... Calculation of the mean absolute values of the HF mean Correlations(c,c')
2899  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2900  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2901  {
2902  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_HFccMos(i_rcor));
2903  }
2904  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2905  }
2906  if( i0StexStinEcna%10 == 0 ){std::cout << i0StexStinEcna << "[HFN MCtt], ";}
2907  }
2908  std::cout << std::endl;
2909 
2911 } // ------- end of HighFrequencyMeanCorrelationsBetweenStins() -------
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:83
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:498
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:489
TString fFlagSubDet
Definition: TEcnaRun.h:392
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:499
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2640
Int_t MaxCrysInStin()
Int_t fCnew
Definition: TEcnaRun.h:373
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::HighFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 2819 of file TEcnaRun.cc.

References HighFrequencyMeanCorrelationsBetweenStins().

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

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

Referenced by AverageHighFrequencyNoise(), and StandardCalculations().

1752 {
1753 // Calculation, for each channel, of the mean (over the events)
1754 // of the ADC sigmas (over the samples 0 to fNbSampForCalc-1)
1755 
1756  //................... Allocation fT1d_evevt_of_sigsamp + init to zero (mandatory)
1757  if( fT1d_evevt_of_sigsamp == 0 ){
1758  fT1d_evevt_of_sigsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1759  }
1760  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1761  {
1762  if( fT1d_evevt_of_sigsamp[i0StexEcha] != (Double_t)0 )
1763  {fMiscDiag[14]++; fT1d_evevt_of_sigsamp[i0StexEcha] = (Double_t)0;}
1764  }
1765 
1766  //................... Allocations mean_over_samples, sigma_over_sample
1767  TVectorD mean_over_samples(fNumberOfEvents);
1768  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1769  TVectorD sigma_over_samples(fNumberOfEvents);
1770  for(Int_t i=0; i<fNumberOfEvents; i++){sigma_over_samples(i)=(Double_t)0.;}
1771 
1772  //..................... Calculation
1773  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::HighFrequencyNoise()" << std::endl;}
1775  std::cout << " Calculation, for each channel, of the sigma (over the events)" << std::endl
1776  << " of the ADC expectation values (over the samples 1 to "
1777  << fNbSampForCalc << ")." << std::endl;}
1778 
1779  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1780  {
1781  //..................... Calculation of the sigma over samples
1782  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1783  {
1784  // Calculation, for each event, of the mean over the samples
1785  mean_over_samples(n_event) = (Double_t)0.;
1786  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1787  {mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];}
1788  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1789 
1790  // Calculation, for each event, of the sigma over the samples
1791  Double_t var_over_samples = (Double_t)0;
1792  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1793  {Double_t deviation = fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(n_event);
1794  var_over_samples += deviation*deviation;}
1795  var_over_samples /= (Double_t)fNbSampForCalc;
1796 
1797  if( var_over_samples < 0)
1798  {std::cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << std::endl;}
1799  else
1800  {sigma_over_samples(n_event) = sqrt(var_over_samples);}
1801  }
1802 
1803  //....... Calculation of the mean over the events of the sigma over samples
1804  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1805  {fT1d_evevt_of_sigsamp[i0StexEcha] += sigma_over_samples(n_event);}
1806 
1807  fT1d_evevt_of_sigsamp[i0StexEcha] /= (Double_t)fNumberOfEvents;
1808  }
1809  fTagHfn[0] = 1; fFileHeader->fHfnCalc++;
1810 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Int_t fHfnCalc
Definition: TEcnaHeader.h:88
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagHfn
Definition: TEcnaRun.h:466
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
T sqrt(T t)
Definition: SSEVec.h:48
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TString fTTBELL
Definition: TEcnaRun.h:376
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:465
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::Init ( void  )

Definition at line 136 of file TEcnaRun.cc.

References fBuildEvtNotSkipped, fCdelete, fCnaCommand, fCnaError, fCnaParCout, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fFlagPrint, fgMaxCar, fMaxMsgIndexForMiscDiag, fMemoReadNumberOfEventsforSamples, fMiscDiag, fNbOfMiscDiagCounters, fNumberOfEvents, fOpenRootFile, fReadyToReadData, fSpecialStexStinNotIndexed, fStinIndexBuilt, fT1d_av_ev_corss, fT1d_av_hifn, fT1d_av_lofn, fT1d_av_mped, fT1d_av_sig_corss, fT1d_av_totn, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_evevt_of_sigsamp, fT1d_evsamp_of_sigevt, fT1d_NbOfEvts, fT1d_sig, fT1d_sig_cor_ss, fT1d_sigevt_of_evsamp, fT1d_StexStinFromIndex, fT1dCrysNumbersTable, fT2d1_hf_cor, fT2d1_hf_cov, fT2d1_hfcc_mostins, fT2d1_lf_cor, fT2d1_lf_cov, fT2d1_lfcc_mostins, fT2d_ev, fT2d_hf_cor, fT2d_hf_cov, fT2d_hfcc_mostins, fT2d_lf_cor, fT2d_lf_cov, fT2d_lfcc_mostins, fT2d_NbOfEvts, fT2d_sig, fT2dCrysNumbersTable, fT3d1_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, and TEcnaParCout::GetCodePrint().

Referenced by TEcnaRun().

137 {
138 //Initialisation
139 
140  fCnew = 0;
141  fCdelete = 0;
142  fCnaCommand = 0;
143  fCnaError = 0;
144 
145  fTTBELL = '\007';
146 
147  //........................... TString file names init
148  fgMaxCar = (Int_t)512;
149 
150  //................ MiscDiag counters .................
151  fMaxMsgIndexForMiscDiag = (Int_t)10;
152  fNbOfMiscDiagCounters = (Int_t)50;
153  fMiscDiag = 0;
154 
155  fNumberOfEvents = 0;
156  //............................. init pointers ( Init() )
157  fT3d_AdcValues = 0;
158  fT3d2_AdcValues = 0;
159  fT3d1_AdcValues = 0;
160 
162 
163  fT2d_NbOfEvts = 0;
164  fT1d_NbOfEvts = 0;
165 
166  fT2d_ev = 0;
167  fT1d_ev = 0;
168  fT2d_sig = 0;
169  fT1d_sig = 0;
170 
171  fT3d_cov_ss = 0;
172  fT3d2_cov_ss = 0;
173  fT3d1_cov_ss = 0;
174 
175  fT3d_cor_ss = 0;
176  fT3d2_cor_ss = 0;
177  fT3d1_cor_ss = 0;
178 
179  fT2d_lf_cov = 0;
180  fT2d1_lf_cov = 0;
181 
182  fT2d_lf_cor = 0;
183  fT2d1_lf_cor = 0;
184 
185  fT2d_hf_cov = 0;
186  fT2d1_hf_cov = 0;
187 
188  fT2d_hf_cor = 0;
189  fT2d1_hf_cor = 0;
190 
191  fT2d_lfcc_mostins = 0;
192  fT2d1_lfcc_mostins = 0;
193 
194  fT2d_hfcc_mostins = 0;
195  fT2d1_hfcc_mostins = 0;
196 
197  fT1d_ev_ev = 0;
199  fT1d_ev_cor_ss = 0;
200  fT1d_av_mped = 0;
201  fT1d_av_totn = 0;
202  fT1d_av_lofn = 0;
203  fT1d_av_hifn = 0;
204  fT1d_av_ev_corss = 0;
205  fT1d_av_sig_corss = 0;
206 
209  fT1d_sig_cor_ss = 0;
210 
213 
214  //................................ tags ( Init() )
215  fTagStinNumbers = 0;
216 
217  fTagNbOfEvts = 0;
218 
219  fTagAdcEvt = 0;
220 
221  fTagMSp = 0;
222  fTagSSp = 0;
223 
224  fTagCovCss = 0;
225  fTagCorCss = 0;
226 
227  fTagHfCov = 0;
228  fTagHfCor = 0;
229  fTagLfCov = 0;
230  fTagLfCor = 0;
231 
232  fTagLFccMoStins = 0;
233  fTagHFccMoStins = 0;
234 
235  fTagPed = 0;
236  fTagTno = 0;
237  fTagMeanCorss = 0;
238 
239  fTagLfn = 0;
240  fTagHfn = 0;
241  fTagSigCorss = 0;
242 
243  fTagAvPed = 0;
244  fTagAvTno = 0;
245  fTagAvLfn = 0;
246  fTagAvHfn = 0;
247 
248  fTagAvMeanCorss = 0;
249  fTagAvSigCorss = 0;
250 
251  //................................................... Code Print ( Init() )
253  fCodePrintWarnings = fCnaParCout->GetCodePrint("Warnings "); // => default value
256 
258 
259  //...................................................
260  gCnaRootFile = 0;
261  fOpenRootFile = kFALSE;
262  fReadyToReadData = 0;
263 
264  //.............................................. Miscellaneous
266 
267  fStinIndexBuilt = 0;
269 
271 
272 }// end of Init()
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:472
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:447
Double_t * fT3d1_cor_ss
Definition: TEcnaRun.h:441
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:460
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fBuildEvtNotSkipped
Definition: TEcnaRun.h:405
Bool_t fOpenRootFile
Definition: TEcnaRun.h:395
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
Int_t fCdelete
Definition: TEcnaRun.h:374
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
Int_t fReadyToReadData
Definition: TEcnaRun.h:396
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:386
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:470
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:477
Int_t * fTagPed
Definition: TEcnaRun.h:446
Int_t * fT1dCrysNumbersTable
Definition: TEcnaRun.h:505
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:457
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:498
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
Double_t * fT3d1_AdcValues
Definition: TEcnaRun.h:416
Int_t * fTagHfn
Definition: TEcnaRun.h:466
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:452
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:481
Double_t ** fT2d_sig
Definition: TEcnaRun.h:430
Int_t * fTagSSp
Definition: TEcnaRun.h:432
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:489
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:445
Double_t ** fT3d2_cov_ss
Definition: TEcnaRun.h:435
Int_t fCnaError
Definition: TEcnaRun.h:371
Int_t * fTagTno
Definition: TEcnaRun.h:451
Double_t ** fT3d2_cor_ss
Definition: TEcnaRun.h:440
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:467
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:485
Double_t * fT3d1_cov_ss
Definition: TEcnaRun.h:436
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
Int_t * fT1d_NbOfEvts
Definition: TEcnaRun.h:420
Int_t fStinIndexBuilt
Definition: TEcnaRun.h:404
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Double_t * fT2d1_hf_cov
Definition: TEcnaRun.h:486
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t fCodePrintComments
Definition: TEcnaRun.h:510
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:434
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
Int_t fMemoReadNumberOfEventsforSamples
Definition: TEcnaRun.h:412
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fMaxMsgIndexForMiscDiag
Definition: TEcnaRun.h:380
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Double_t * fT2d1_hfcc_mostins
Definition: TEcnaRun.h:499
Int_t fSpecialStexStinNotIndexed
Definition: TEcnaRun.h:403
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:480
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:510
Double_t * fT2d1_hf_cor
Definition: TEcnaRun.h:490
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:450
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:495
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t GetCodePrint(const TString &)
Definition: TEcnaParCout.cc:70
Double_t * fT1d_ev
Definition: TEcnaRun.h:427
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
Int_t fgMaxCar
Definition: TEcnaRun.h:369
Double_t ** fT3d2_AdcValues
Definition: TEcnaRun.h:415
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:476
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:462
Int_t fCnaCommand
Definition: TEcnaRun.h:371
Int_t ** fT2dCrysNumbersTable
Definition: TEcnaRun.h:504
Int_t fNbOfMiscDiagCounters
Definition: TEcnaRun.h:379
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TString fTTBELL
Definition: TEcnaRun.h:376
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:465
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Double_t * fT1d_sig
Definition: TEcnaRun.h:431
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:494
void TEcnaRun::LowFrequencyCorrelationsBetweenChannels ( )

Definition at line 2440 of file TEcnaRun.cc.

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

Referenced by Expert1Calculations(), and LowFrequencyMeanCorrelationsBetweenStins().

2441 {
2442 //Calculation of the Low Frequency Correlations between channels
2443 
2444  //... preliminary calculation of the covariances if not done yet.
2445  if ( fTagLfCov[0] != 1 )
2447 
2448  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << std::endl;}
2450  std::cout << " Calculation of the Low Frequency Correlations between channels" << std::endl
2451  << " Starting allocation. "
2452  << std::endl;}
2453 
2454  //................. allocation fT2d_lf_cor + init to zero (mandatory)
2455  if( fT2d_lf_cor == 0 ){
2456  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2457  fT2d_lf_cor = new Double_t*[n_StexEcha]; fCnew++;
2458  fT2d1_lf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2459  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2460  fT2d_lf_cor[i0StexEcha] = &fT2d1_lf_cor[0] + i0StexEcha*n_StexEcha;}
2461  }
2462 
2463  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2464  {
2465  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2466  {
2467  if( fT2d_lf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2468  {fMiscDiag[22]++; fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2469  }
2470  }
2471 
2472  //................. calculation
2473  //........................... computation of half of the matrix, diagonal included
2474  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2475  {
2476  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2477  || ( fFlagSubDet == "EB") )
2478  {
2479  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2480  {
2481  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2482  || ( fFlagSubDet == "EB") )
2483  {
2484  if( fT2d_lf_cov[i0StexEcha][i0StexEcha] > 0
2485  && fT2d_lf_cov[j0StexEcha][j0StexEcha] > 0 )
2486  {
2487  fT2d_lf_cor[i0StexEcha][j0StexEcha] =
2488  fT2d_lf_cov[i0StexEcha][j0StexEcha]/
2489  ( (Double_t)sqrt( fT2d_lf_cov[i0StexEcha][i0StexEcha]*
2490  fT2d_lf_cov[j0StexEcha][j0StexEcha] ) );
2491  }
2492  else
2493  {
2494  fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2495  }
2496  fT2d_lf_cor[j0StexEcha][i0StexEcha] = fT2d_lf_cor[i0StexEcha][j0StexEcha];
2497  }
2498  }
2499  }
2500  if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[LFN Cor], ";}
2501  }
2502  std::cout << std::endl;
2503 
2504  fTagLfCor[0] = 1; fFileHeader->fLfCorCalc++;
2505 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t * fT2d1_lf_cor
Definition: TEcnaRun.h:481
TString fFlagSubDet
Definition: TEcnaRun.h:392
T sqrt(T t)
Definition: SSEVec.h:48
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:480
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t fLfCorCalc
Definition: TEcnaHeader.h:81
Int_t MaxCrysEcnaInStex()
void LowFrequencyCovariancesBetweenChannels()
Definition: TEcnaRun.cc:2335
tuple cout
Definition: gather_cfg.py:121
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:476
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::LowFrequencyCovariancesBetweenChannels ( )

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

Referenced by LowFrequencyCorrelationsBetweenChannels().

2336 {
2337 //Calculation of the Low Frequency Covariances between channels
2338 
2339  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyCovariancesBetweenChannels()" << std::endl;}
2341  std::cout << " Calculation of the Low Frequency Covariances between channels" << std::endl;}
2342 
2343  //................. allocation fT2d_lf_cov + init to zero (mandatory)
2344  if( fT2d_lf_cov == 0 ){
2345  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2346  fT2d_lf_cov = new Double_t*[n_StexEcha]; fCnew++;
2347  fT2d1_lf_cov = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2348  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2349  fT2d_lf_cov[i0StexEcha] = &fT2d1_lf_cov[0] + i0StexEcha*n_StexEcha;}}
2350 
2351  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2352  {
2353  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2354  {
2355  if( fT2d_lf_cov[i0StexEcha][j0StexEcha] != (Double_t)0 )
2356  {fMiscDiag[21]++; fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;}
2357  }
2358  }
2359  //........................................... Calculation (LowFrequencyCovariancesBetweenChannels)
2360  //................... Allocation mean_over_samples(i0StexEcha, n_event)
2361  TMatrixD mean_over_samples(fEcal->MaxCrysEcnaInStex(), fNumberOfEvents);
2362  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2363  {for(Int_t n_event=0; n_event<fNumberOfEvents; n_event++)
2364  {mean_over_samples(i0StexEcha, n_event)=(Double_t)0.;}}
2365  //................... Allocation MoeOfMos(i0StexEcha)
2366  TVectorD MoeOfMos(fEcal->MaxCrysEcnaInStex());
2367  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2368  { MoeOfMos(i0StexEcha)=(Double_t)0.;}
2369 
2370  //................... Calculation
2372  std::cout << " Calculation, for each pair of channels, of the covariance (over the events)" << std::endl
2373  << " between the ADC expectation values (over the samples 1 to "
2374  << fNbSampForCalc << ")." << std::endl;}
2375 
2376  std::cout << " Please, wait (end at i= " << fEcal->MaxCrysEcnaInStex() << "): " << std::endl;
2377 
2378  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2379  {
2380  MoeOfMos(i0StexEcha) = (Double_t)0;
2381 
2382  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2383  || ( fFlagSubDet == "EB") )
2384  {
2385  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2386  {
2387  // Calculation, for each event, of the mean over the samples ( = E_s[A(c_i,s*,e_n] )
2388  mean_over_samples(i0StexEcha, n_event) = (Double_t)0.;
2389  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
2390  {
2391  mean_over_samples(i0StexEcha, n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
2392  }
2393  mean_over_samples(i0StexEcha, n_event) /= (Double_t)fNbSampForCalc;
2394  }
2395  //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*]] )
2396  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2397  {MoeOfMos(i0StexEcha) += mean_over_samples(i0StexEcha, n_event);}
2398  MoeOfMos(i0StexEcha) /= (Double_t)fNumberOfEvents;
2399  }
2400  }
2401 
2402  //... Calculation of half of the matrix, diagonal included (LowFrequencyCovariancesBetweenChannels)
2403  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
2404  {
2405  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2406  || ( fFlagSubDet == "EB") )
2407  {
2408  for(Int_t j0StexEcha = 0; j0StexEcha <= i0StexEcha; j0StexEcha++)
2409  {
2410  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2411  || ( fFlagSubDet == "EB") )
2412  {
2413  fT2d_lf_cov[i0StexEcha][j0StexEcha] = (Double_t)0;
2414  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
2415  {
2416  fT2d_lf_cov[i0StexEcha][j0StexEcha] +=
2417  ( mean_over_samples(i0StexEcha, n_event) - MoeOfMos(i0StexEcha) )
2418  *( mean_over_samples(j0StexEcha, n_event) - MoeOfMos(j0StexEcha) );
2419  }
2420  fT2d_lf_cov[i0StexEcha][j0StexEcha] /= (Double_t)fNumberOfEvents;
2421 
2422  fT2d_lf_cov[j0StexEcha][i0StexEcha] = fT2d_lf_cov[i0StexEcha][j0StexEcha];
2423  }
2424  }
2425  if( i0StexEcha%100 == 0 ){std::cout << i0StexEcha << "[LFN Cov], ";}
2426  }
2427  }
2428  std::cout << std::endl;
2429  fTagLfCov[0] = 1; fFileHeader->fLfCovCalc++;
2430 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t * fT2d1_lf_cov
Definition: TEcnaRun.h:477
TString fFlagSubDet
Definition: TEcnaRun.h:392
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Int_t StexEchaForCons(const Int_t &, const Int_t &)
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysEcnaInStex()
Int_t fLfCovCalc
Definition: TEcnaHeader.h:80
tuple cout
Definition: gather_cfg.py:121
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:476
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::LowFrequencyMeanCorrelationsBetweenSCs ( )

Definition at line 2723 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

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

Definition at line 2726 of file TEcnaRun.cc.

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

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

2727 {
2728 //Calculation of the mean Low Frequency Correlations
2729 //between channels for each Stin
2730 
2731  //... preliminary calculation of the Low Frequency Cor(c,c) if not done yet
2732  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
2734 
2735  //..... mean fT2d_lfcc_mostins for each pair (Stin_X,Stin_Y)
2736  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << std::endl;}
2738  std::cout << " Calculation of the mean, for each "
2739  << fStinName.Data() << ", of the" << std::endl
2740  << " Low Frequency Correlations between channels." << std::endl;}
2741 
2742  //................. allocation fT2d_lfcc_mostins + init to zero (mandatory)
2743  if( fT2d_lfcc_mostins == 0 ){
2744  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2745  fT2d_lfcc_mostins = new Double_t*[n_Stin]; fCnew++;
2746  fT2d1_lfcc_mostins = new Double_t[n_Stin*n_Stin]; fCnew++;
2747  for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2748  fT2d_lfcc_mostins[i0StexStinEcna] = &fT2d1_lfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2749  }
2750 
2751  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2752  {
2753  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2754  {
2755  if( fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2756  {fMiscDiag[31]++; fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2757  }
2758  }
2759 
2760  //..... Calculation of the mean LF Cor(c,c) for each pair (Stin_X,Stin_Y)
2761  //
2762  // ! => Warning: this matrix is NOT symmetric => take N*N elements
2763  // Only (Stin,Stin) matrix is symmetric.
2764  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
2765  // (except for the (Stin,Stin) DIAGONAL elements)
2766  // Then:
2767  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
2768 
2769  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2770 
2771  TVectorD half_LFccMos(ndim); for(Int_t i=0; i<ndim; i++){half_LFccMos(i)=(Double_t)0.;}
2772 
2773  //..................... Calculation
2774  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << std::endl;}
2776  std::cout << " Calculation, for each "
2777  << fStinName.Data() << ", of the mean " << std::endl
2778  << " Low Frequency cor(c,c)." << std::endl;}
2779 
2780  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2781  {
2782  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2783  {
2784  //................... .Copy the Mean Correlations(c,c') in 1D vector half_LFccMos()
2785  Int_t i_count = 0;
2786  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2787  {
2788  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2789  for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2790  {
2791  Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2792  if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2793  (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2794  {half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2795  else
2796  {std::cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2797  << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << std::endl; }
2798  }
2799  }
2800  //...... Calculation of the mean absolute values of the LF mean Correlations(c,c')
2801  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2802  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2803  {
2804  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_LFccMos(i_rcor));
2805  }
2806  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2807  }
2808  if( i0StexStinEcna%10 == 0 ){std::cout << i0StexStinEcna << "[LFN MCtt], ";}
2809  }
2810  std::cout << std::endl;
2811 
2813 } // ------- end of LowFrequencyMeanCorrelationsBetweenStins() -------
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t MaxCrysInStin()
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:480
Int_t fCnew
Definition: TEcnaRun.h:373
Double_t * fT2d1_lfcc_mostins
Definition: TEcnaRun.h:495
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:82
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2440
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
TString fStinName
Definition: TEcnaRun.h:393
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:494
void TEcnaRun::LowFrequencyMeanCorrelationsBetweenTowers ( )

Definition at line 2721 of file TEcnaRun.cc.

References LowFrequencyMeanCorrelationsBetweenStins().

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

Definition at line 1681 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, i, TEcnaParEcal::MaxCrysEcnaInStex(), mathSSE::sqrt(), and MetTreeProducer::var().

Referenced by AverageLowFrequencyNoise(), and StandardCalculations().

1682 {
1683 // Calculation, for each channel, of the sigma (over the events)
1684 // of the ADC expectation values (over the samples 0 to fNbSampForCalc-1)
1685 
1686  //................... Allocation fT1d_sigevt_of_evsamp + init to zero (mandatory)
1687  if( fT1d_sigevt_of_evsamp == 0 ){
1688  fT1d_sigevt_of_evsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1689  }
1690  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1691  {
1692  if( fT1d_sigevt_of_evsamp[i0StexEcha] != (Double_t)0 )
1693  {fMiscDiag[13]++; fT1d_sigevt_of_evsamp[i0StexEcha] = (Double_t)0;}
1694  }
1695 
1696  //................... Allocation mean_over_samples
1697  TVectorD mean_over_samples(fNumberOfEvents);
1698  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1699 
1700  //..................... Calculation
1701  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::LowFrequencyNoise()" << std::endl;}
1703  std::cout << " Calculation, for each channel, of the sigma (over the events)" << std::endl
1704  << " of the ADC expectation values (over the samples 1 to "
1705  << fNbSampForCalc << ")." << std::endl;}
1706 
1707  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1708  {
1709  // Calculation of the mean over the events of the mean over the samples
1710  Double_t mean_over_events = (Double_t)0;
1711  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1712  {
1713  // Calculation, for each event, of the mean over the samples
1714  mean_over_samples(n_event) = (Double_t)0.;
1715  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1716  {
1717  mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
1718  }
1719  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1720 
1721  mean_over_events += mean_over_samples(n_event);
1722  }
1723  mean_over_events /= (Double_t)fNumberOfEvents;
1724 
1725  // Calculation of the sigma over the events of the mean over the samples
1726  Double_t var = (Double_t)0;
1727  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1728  {
1729  Double_t ecart = mean_over_samples(n_event) - mean_over_events;
1730  var += ecart*ecart;
1731  }
1732  var /= (Double_t)fNumberOfEvents;
1733 
1734  fT1d_sigevt_of_evsamp[i0StexEcha] = sqrt(var);
1735  }
1736  fTagLfn[0] = 1; fFileHeader->fLfnCalc++;
1737 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:460
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
T sqrt(T t)
Definition: SSEVec.h:48
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
Int_t fLfnCalc
Definition: TEcnaHeader.h:87
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::MeanCorrelationsBetweenSamples ( )

Definition at line 1823 of file TEcnaRun.cc.

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

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

1824 {
1825  // Calculation, for all the channels, of the expectation values
1826  // of the correlations between the first fNbSampForCalc samples
1827 
1828  //... preliminary calculation of the correlations if not done yet
1829  // (test only the first element since the cor are computed globaly)
1830  if ( fTagCorCss[0] != 1 ){CorrelationsBetweenSamples(); fTagCorCss[0]=0;}
1831 
1832  //................... Allocations ev_cor_ss + init to zero (mandatory)
1833  if( fT1d_ev_cor_ss == 0 ){
1834  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1835  fT1d_ev_cor_ss = new Double_t[n_StexEcha]; fCnew++;
1836  }
1837  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1838  {
1839  if( fT1d_ev_cor_ss[i0StexEcha] != (Double_t)0 )
1840  {fMiscDiag[15]++; fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;}
1841  }
1842 
1843  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
1844  // ( half of (them minus the diagonal) )
1845  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1846 
1847  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
1848 
1849  //..................... Calculation
1850  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::MeanCorrelationsBetweenSamples()" << std::endl;}
1852  std::cout << " Calculation, for all the channels, of the expectation values of the" << std::endl
1853  << " correlations between the first " << fNbSampForCalc << " samples." << std::endl;}
1854 
1855  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1856  {
1857  //..................... half_cor_ss() array filling
1858  Int_t i_count = 0;
1859  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1860  {
1861  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1862  {
1863  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1864  i_count++;
1865  }
1866  }
1867  //...................... mean cor(s,s') calculation
1868  fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
1869  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1870  {
1871  fT1d_ev_cor_ss[i0StexEcha] += half_cor_ss(i_rcor);
1872  }
1873  fT1d_ev_cor_ss[i0StexEcha] /= (Double_t)ndim;
1874  }
1876 }
int i
Definition: DBlmapReader.cc:9
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:86
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1509
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Bool_t TEcnaRun::OpenRootFile ( const Text_t *  name,
const TString &  status 
)

Definition at line 2929 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

2929  {
2930 //Open the Root file
2931 
2932  Bool_t ok_open = kFALSE;
2933 
2934  TString s_name;
2935  s_name = fCnaParPaths->ResultsRootFilePath();
2936  s_name.Append('/');
2937  s_name.Append(name);
2938 
2939  //gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); fCnew++;
2940 
2941  Long_t iCnaRootFile = fObjectManager->GetPointerValue("TEcnaRootFile");
2942  if( iCnaRootFile == 0 )
2943  {
2944  gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); /* Anew("gCnaRootFile");*/
2945  }
2946  else
2947  {
2948  gCnaRootFile = (TEcnaRootFile*)iCnaRootFile;
2949  gCnaRootFile->ReStart(s_name.Data(), status);
2950  }
2951 
2952  if ( gCnaRootFile->fRootFileStatus == "RECREATE" ){ok_open = gCnaRootFile->OpenW();}
2953  if ( gCnaRootFile->fRootFileStatus == "READ" ){ok_open = gCnaRootFile->OpenR();}
2954 
2955  if (!ok_open) // unable to open file
2956  {
2957  std::cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << std::endl;
2958  }
2959  else
2960  {
2962  {std::cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << std::endl;}
2963  fOpenRootFile = kTRUE;
2964  }
2965  return ok_open;
2966 }
Bool_t OpenR(const Text_t *="")
Bool_t fOpenRootFile
Definition: TEcnaRun.h:395
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:382
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
Int_t fFlagPrint
Definition: TEcnaRun.h:509
TString fRootFileStatus
Definition: TEcnaRootFile.h:34
TString ResultsRootFilePath()
void ReStart(const Text_t *)
tuple cout
Definition: gather_cfg.py:121
Bool_t OpenW(const Text_t *="")
tuple status
Definition: ntuplemaker.py:245
Long_t GetPointerValue(const TString &)
Definition: TEcnaObject.cc:232
void TEcnaRun::Pedestals ( )

Definition at line 1583 of file TEcnaRun.cc.

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

Referenced by AveragePedestals(), and StandardCalculations().

1584 {
1585 // Calculation, for each channel, of the expectation values
1586 // (over the samples 0 to fNbSampForCalc-1) of the ADC expectation values
1587 // (over the events)
1588 
1589  //... preliminary calculation of the expectation values if not done yet
1590  if ( fTagMSp[0] != 1 ){SampleMeans(); fTagMSp[0]=0;}
1591 
1592  //................... Allocation ev_ev + init to zero (mandatory)
1593  if( fT1d_ev_ev == 0 ){fT1d_ev_ev = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1594  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1595  {if( fT1d_ev_ev[i0StexEcha] != (Double_t)0 )
1596  {fMiscDiag[11]++; fT1d_ev_ev[i0StexEcha] = (Double_t)0;}}
1597 
1598  //..................... Calculation
1599  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::Pedestals()" << std::endl;}
1601  std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1602  << fNbSampForCalc << ")" << std::endl
1603  << " of the ADC expectation values (over the events)." << std::endl;}
1604 
1605  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1606  {
1607  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1608  {
1609  fT1d_ev_ev[i0StexEcha] += fT2d_ev[i0StexEcha][i0Sample];
1610  }
1611  fT1d_ev_ev[i0StexEcha] /= fNbSampForCalc;
1612  }
1613  fTagPed[0] = 1; fFileHeader->fPedCalc++;
1614 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagPed
Definition: TEcnaRun.h:446
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:445
Int_t fPedCalc
Definition: TEcnaHeader.h:84
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
void SampleMeans()
Definition: TEcnaRun.cc:1329
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::PrintAllComments ( )

Definition at line 4544 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintAllComments, and fFlagPrint.

4545 {
4546 // Set flags to authorize printing of the comments of all the methods
4547 
4549  std::cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << std::endl;
4550 }
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Int_t fFlagPrint
Definition: TEcnaRun.h:509
tuple cout
Definition: gather_cfg.py:121
void TEcnaRun::PrintComments ( )

Definition at line 4528 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintComments, and fFlagPrint.

4529 {
4530 // Set flags to authorize printing of some comments concerning initialisations (default)
4531 
4533  std::cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << std::endl;
4534 }
Int_t fCodePrintComments
Definition: TEcnaRun.h:510
Int_t fFlagPrint
Definition: TEcnaRun.h:509
tuple cout
Definition: gather_cfg.py:121
void TEcnaRun::PrintNoComment ( )

Definition at line 4552 of file TEcnaRun.cc.

References fCodePrintNoComment, and fFlagPrint.

4553 {
4554 // Set flags to forbid the printing of all the comments
4555 
4557 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fFlagPrint
Definition: TEcnaRun.h:509
void TEcnaRun::PrintWarnings ( )

Definition at line 4536 of file TEcnaRun.cc.

References gather_cfg::cout, fCodePrintWarnings, and fFlagPrint.

4537 {
4538 // Set flags to authorize printing of warnings
4539 
4541  std::cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << std::endl;
4542 }
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fCodePrintWarnings
Definition: TEcnaRun.h:510
tuple cout
Definition: gather_cfg.py:121
Bool_t TEcnaRun::ReadSampleAdcValues ( )

Definition at line 1057 of file TEcnaRun.cc.

References fEcal, and TEcnaParEcal::MaxSampADC().

Referenced by TEcnaGui::Calculations().

1057 {return ReadSampleAdcValues(fEcal->MaxSampADC());}
Bool_t ReadSampleAdcValues()
Definition: TEcnaRun.cc:1057
Int_t MaxSampADC()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Bool_t TEcnaRun::ReadSampleAdcValues ( const Int_t &  nb_samp_for_calc)

Definition at line 1059 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(), i, j, TEcnaRead::LookAtRootFile(), TEcnaParEcal::MaxCrysEcnaInStex(), TEcnaParEcal::MaxCrysInStin(), TEcnaParEcal::MaxStinEcnaInStex(), TEcnaRead::PrintNoComment(), TEcnaRead::ReadNumberOfEventsForSamples(), TEcnaRead::ReadSampleAdcValuesSameFile(), TEcnaRead::ReadStinNumbers(), and TEcnaParPaths::ResultsRootFilePath().

1060 {
1061  // read the Sample ADC values from "ADC" result root files (ReadSampleAdcValues)
1062 
1063  // put the number of sample for calculations in attribute fNbSampForCalc
1064  // and call the method without arguments
1065  // We must have: nb_samp_for_calc <= fFileHeader->fNbOfSamples (= nb of samples in ROOT file)
1066 
1067  fNbSampForCalc = nb_samp_for_calc;
1068 
1069 // TEcnaRead* MyRootFile = new TEcnaRead(fFlagSubDet.Data(), fCnaParPaths, fCnaParCout,
1070 // fFileHeader, fEcalNumbering, fCnaWrite); // fCnew++;
1071 
1072  TEcnaRead* MyRootFile = new TEcnaRead(fObjectManager, fFlagSubDet.Data()); // fCnew++;
1073 
1074  MyRootFile->PrintNoComment();
1075 
1079  fCnaParPaths->ResultsRootFilePath().Data());
1080 
1081  Bool_t ok_read = MyRootFile->LookAtRootFile();
1082 
1083  fFileHeader->fStartTime = MyRootFile->GetStartTime();
1084  fFileHeader->fStopTime = MyRootFile->GetStopTime();
1085  fFileHeader->fStartDate = MyRootFile->GetStartDate();
1086  fFileHeader->fStopDate = MyRootFile->GetStopDate();
1087 
1088  if ( ok_read == kTRUE )
1089  {
1090  fRootFileName = MyRootFile->GetRootFileName();
1091  fRootFileNameShort = MyRootFile->GetRootFileNameShort();
1092  std::cout << "*TEcnaRun::ReadSampleAdcValues> Reading sample ADC values from file: " << std::endl
1093  << " " << fRootFileName << std::endl;
1094 
1095  size_t i_no_data = 0;
1096 
1097  //.......... Read the StinNumbers in the old file (ReadSampleAdcValues)
1098  TVectorD vec(fEcal->MaxStinEcnaInStex());
1099  for(Int_t i=0; i<fEcal->MaxStinEcnaInStex(); i++){vec(i)=(Double_t)0.;}
1100  vec = MyRootFile->ReadStinNumbers(fEcal->MaxStinEcnaInStex());
1101  if( MyRootFile->DataExist() == kTRUE )
1102  {
1103  fTagStinNumbers[0] = 1;
1105  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1106  {fT1d_StexStinFromIndex[i0StexStinEcna] = (Int_t)vec(i0StexStinEcna);}
1107  }
1108  else
1109  {
1110  i_no_data++;
1111  }
1112  //.......... Read the Numbers of Events in the old file (ReadSampleAdcValues)
1113  TMatrixD partial_matrix(fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1114  for(Int_t i=0; i<fEcal->MaxCrysInStin(); i++)
1115  {for(Int_t j=0; j<fFileHeader->fNbOfSamples; j++){partial_matrix(i,j)=(Double_t)0.;}}
1116 
1117  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1118  {
1119  Int_t n1StexStin = MyRootFile->GetStexStinFromIndex(i0StexStinEcna);
1120  if(n1StexStin != -1)
1121  {
1122  partial_matrix =
1123  MyRootFile->ReadNumberOfEventsForSamples
1124  (n1StexStin, fEcal->MaxCrysInStin(), fFileHeader->fNbOfSamples);
1125 
1126  if( MyRootFile->DataExist() == kTRUE )
1127  {
1128  fTagNbOfEvts[0] = 1;
1130  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
1131  {
1132  Int_t i0StexEcha = (n1StexStin-1)*fEcal->MaxCrysInStin() + i0StinCrys;
1133  for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
1134  {fT2d_NbOfEvts[i0StexEcha][i0Sample] = (Int_t)partial_matrix(i0StinCrys,i0Sample);}
1135  }
1136  }
1137  else
1138  {
1139  i_no_data++;
1140  }
1141  }
1142  }
1143 
1144  //.......... Read the Sample ADC values in the old file (ReadSampleAdcValues)
1145  Double_t*** fT3d_read_AdcValues =
1146  MyRootFile->ReadSampleAdcValuesSameFile
1148 
1149  if( MyRootFile->DataExist() == kTRUE )
1150  {
1151  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1152  {
1153  for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples;i0Sample++)
1154  {
1155  for(Int_t i_event=0; i_event<fFileHeader->fReqNbOfEvts; i_event++)
1156  {fT3d_AdcValues[i0StexEcha][i0Sample][i_event] =
1157  fT3d_read_AdcValues[i0StexEcha][i0Sample][i_event];}
1158  }
1159  }
1160  }
1161  else
1162  {
1163  i_no_data++;
1164  }
1165  if(i_no_data)
1166  {
1167  std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1168  << " Read failure. i_no_data = " << i_no_data << fTTBELL << std::endl;
1169  }
1170  }
1171  else
1172  {
1173  std::cout << "!TEcnaRun::ReadSampleAdcValues(...)> *ERROR* =====> "
1174  << " ROOT file not found" << fTTBELL << std::endl;
1175  }
1176  delete MyRootFile; // fCdelete++;
1177  return ok_read;
1178 }
int i
Definition: DBlmapReader.cc:9
Int_t fStex
Definition: TEcnaHeader.h:56
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
TEcnaObject * fObjectManager
Definition: TEcnaRun.h:382
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString GetStartDate()
Definition: TEcnaRead.cc:756
TString GetRootFileNameShort()
Definition: TEcnaRead.cc:4357
time_t GetStopTime()
Definition: TEcnaRead.cc:755
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:67
Int_t fNbOfSamples
Definition: TEcnaHeader.h:51
TString fStopDate
Definition: TEcnaHeader.h:61
TString fFlagSubDet
Definition: TEcnaRun.h:392
TVectorD ReadStinNumbers(const Int_t &)
Definition: TEcnaRead.cc:1129
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t GetStexStinFromIndex(const Int_t &)
Definition: TEcnaRead.cc:4365
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
int j
Definition: DBlmapReader.cc:9
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
TString GetStopDate()
Definition: TEcnaRead.cc:757
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
void PrintNoComment()
Definition: TEcnaRead.cc:4462
Int_t MaxCrysInStin()
TString GetRootFileName()
Definition: TEcnaRead.cc:4356
TString fStartDate
Definition: TEcnaHeader.h:60
Bool_t DataExist()
Definition: TEcnaRead.cc:976
TString fTypAna
Definition: TEcnaHeader.h:50
TMatrixD ReadNumberOfEventsForSamples(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:1705
Double_t *** ReadSampleAdcValuesSameFile(const Int_t &, const Int_t &, const Int_t &)
Definition: TEcnaRead.cc:4162
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:53
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:649
TString ResultsRootFilePath()
Int_t MaxCrysEcnaInStex()
time_t fStartTime
Definition: TEcnaHeader.h:58
time_t fStopTime
Definition: TEcnaHeader.h:59
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:54
Bool_t LookAtRootFile()
Definition: TEcnaRead.cc:922
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
Int_t fRunNumber
Definition: TEcnaHeader.h:52
TString fRootFileName
Definition: TEcnaRun.h:398
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:66
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TString fTTBELL
Definition: TEcnaRun.h:376
time_t GetStartTime()
Definition: TEcnaRead.cc:754
TString fRootFileNameShort
Definition: TEcnaRun.h:399
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::SampleMeans ( )

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

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

1330 {
1331 // Calculation of the expectation values over events
1332 // for the samples 0 to fNbSampForCalc and for all the StexEchas
1333 
1334  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SampleMeans() " << std::endl;}
1336  std::cout << " Calculation: sample expectation values over the events"
1337  << " for each channel." << std::endl;}
1338 
1339  //................... Allocation fT2d_ev
1340  if ( fT2d_ev == 0 ){
1341  Int_t n_samp = fNbSampForCalc;
1342  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1343  fT2d_ev = new Double_t*[n_StexEcha]; fCnew++;
1344  fT1d_ev = new Double_t[n_StexEcha*n_samp]; fCnew++;
1345  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1346  fT2d_ev[i] = &fT1d_ev[0] + i*n_samp;}
1347  }
1348  //................... init fT2d_ev to zero
1349  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1350  {
1351  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1352  {
1353  if( fT2d_ev[i0StexEcha][i0Sample] != (Double_t)0 )
1354  {fMiscDiag[1]++; fT2d_ev[i0StexEcha][i0Sample] = (Double_t)0;}
1355  }
1356  }
1357 
1358  //................... Calculation
1359  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1360  {
1361  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1362  {
1363  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1364  {
1365  fT2d_ev[i0StexEcha][i0Sample] += fT3d_AdcValues[i0StexEcha][i0Sample][i_event];
1366  }
1367  fT2d_ev[i0StexEcha][i0Sample] /= fNumberOfEvents;
1368  }
1369  }
1370  fTagMSp[0] = 1; fFileHeader->fMSpCalc++;
1371 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fMSpCalc
Definition: TEcnaHeader.h:70
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_ev
Definition: TEcnaRun.h:427
tuple cout
Definition: gather_cfg.py:121
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::SampleSigmas ( )

Definition at line 1381 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(), and mathSSE::sqrt().

Referenced by StandardCalculations(), and TotalNoise().

1382 {
1383 //Calculation of the sigmas of the samples for all the StexEchas
1384 
1385  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SampleSigmas()" << std::endl;}
1387  std::cout << " Calculation: sample ADC sigmas over the events "
1388  << " for each channel." << std::endl;}
1389 
1390  //... preliminary calculation of the expectation values if not done yet.
1391  // The tag is set to 1 after call to the method. It is reset to 0
1392  // because the expectation values must not be written in the result ROOT file
1393  // (since the tag was equal to 0)
1394  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1395 
1396  //................... Allocation fT2d_sig
1397  if( fT2d_sig == 0){
1398  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1399  Int_t n_samp = fNbSampForCalc;
1400  fT2d_sig = new Double_t*[n_StexEcha]; fCnew++;
1401  fT1d_sig = new Double_t[n_StexEcha*n_samp]; fCnew++;
1402  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
1403  fT2d_sig[i0StexEcha] = &fT1d_sig[0] + i0StexEcha*n_samp;}
1404  }
1405  // ................... init fT2d_sig to zero
1406  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1407  {
1408  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1409  {
1410  if( fT2d_sig[i0StexEcha][i0Sample] != (Double_t)0 )
1411  {fMiscDiag[2]++; fT2d_sig[i0StexEcha][i0Sample] = (Double_t)0;}
1412  }
1413  }
1414 
1415  //................... Calculation
1416  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1417  {
1418  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1419  {
1420  Double_t variance = (Double_t)0.;
1421  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1422  {
1423  Double_t ecart = fT3d_AdcValues[i0StexEcha][i0Sample][i_event] - fT2d_ev[i0StexEcha][i0Sample];
1424  variance += ecart*ecart;
1425  }
1426  variance /= fNumberOfEvents;
1427  fT2d_sig[i0StexEcha][i0Sample] = sqrt(variance);
1428  }
1429  }
1430  fTagSSp[0] = 1; fFileHeader->fSSpCalc++;
1431 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fSSpCalc
Definition: TEcnaHeader.h:71
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t ** fT2d_sig
Definition: TEcnaRun.h:430
Int_t * fTagSSp
Definition: TEcnaRun.h:432
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
T sqrt(T t)
Definition: SSEVec.h:48
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fNumberOfEvents
Definition: TEcnaRun.h:410
void SampleMeans()
Definition: TEcnaRun.cc:1329
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
Double_t * fT1d_sig
Definition: TEcnaRun.h:431
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::SampleValues ( )

Definition at line 1257 of file TEcnaRun.cc.

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

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

1258 {
1259 //3D histo of the sample ADC values for all the triples (StexEcha, sample, event)
1260 
1261  // The histo is already in fT3d_AdcValues[][][]
1262  // this method sets the "Tag", increment the "f...Calc" (and must be kept for that)
1263  // f...Calc > 0 => allow writing on file.
1264 
1266  for( Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1267  {fTagAdcEvt[i0StexEcha] = 1; fFileHeader->fAdcEvtCalc++;}
1268 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:69
Int_t MaxCrysEcnaInStex()
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::SetEcalSubDetector ( const TString &  SubDet)

Definition at line 275 of file TEcnaRun.cc.

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

Referenced by TEcnaRun().

276 {
277  // Set Subdetector (EB or EE)
278 
279  Int_t MaxCar = fgMaxCar;
280  fFlagSubDet.Resize(MaxCar);
281  fFlagSubDet = SubDet.Data();
282 
283 
284  fEcal = 0; fEcal = new TEcnaParEcal(fFlagSubDet.Data()); //fCnew++;
285  fEcalNumbering = 0; fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); //fCnew++;
286  fCnaWrite = 0;
287 
288  fCnaWrite =
290 
291  if( fFlagSubDet == "EB" ){fStexName = "SM "; fStinName = "tower";}
292  if( fFlagSubDet == "EE" ){fStexName = "Dee"; fStinName = " SC ";}
293 }
TEcnaParCout * fCnaParCout
Definition: TEcnaRun.h:386
TString fStexName
Definition: TEcnaRun.h:393
TString fFlagSubDet
Definition: TEcnaRun.h:392
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
Int_t fgMaxCar
Definition: TEcnaRun.h:369
TString fStinName
Definition: TEcnaRun.h:393
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:388
TEcnaNumbering * fEcalNumbering
Definition: TEcnaRun.h:385
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::SigmaOfCorrelationsBetweenSamples ( )

Definition at line 1889 of file TEcnaRun.cc.

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

Referenced by AverageSigmaOfCorrelationsBetweenSamples(), and StandardCalculations().

1890 {
1891  //Calculation of the sigmas of the (sample,sample) correlations for all the StexEchas
1892 
1893  //... preliminary calculation of the mean cor(s,s') if not done yet
1894  // (test only the first element since the cor are computed globaly)
1895  // Results available in array fT1d_ev_cor_ss[i0StexEcha]
1897 
1898  //................... Allocations sig_cor_ss + init to zero
1899  if( fT1d_sig_cor_ss == 0 ){
1900  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1901  fT1d_sig_cor_ss = new Double_t[n_StexEcha]; fCnew++;
1902  }
1903  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1904  {
1905  if( fT1d_sig_cor_ss[i0StexEcha] != (Double_t)0 )
1906  {fMiscDiag[16]++; fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;}
1907  }
1908 
1909  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << std::endl;}
1911  std::cout << " Calculation of the sigmas of the (sample,sample)" << std::endl
1912  << " correlations for all the channels." << std::endl;}
1913 
1914  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
1915  // (half of them minus the diagonal)
1916  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1917 
1918  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
1919 
1920  //.................. Calculation
1921  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1922  {
1923  //..................... half_cor_ss() array filling
1924  Int_t i_count = 0;
1925  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1926  {
1927  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1928  {
1929  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1930  i_count++;
1931  }
1932  }
1933 
1934  //...................... sigma of cor(s,s') calculation
1935  Double_t var = (Double_t)0;
1936  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1937  {
1938  Double_t ecart = half_cor_ss(i_rcor) - fT1d_ev_cor_ss[i0StexEcha];
1939  var += ecart*ecart;
1940  }
1941  var /= (Double_t)ndim;
1942  fT1d_sig_cor_ss[i0StexEcha] = sqrt(var);
1943  }
1945 }
int i
Definition: DBlmapReader.cc:9
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:470
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
T sqrt(T t)
Definition: SSEVec.h:48
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fCnew
Definition: TEcnaRun.h:373
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1823
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:89
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::StandardCalculations ( )

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

1279 {
1280  SampleMeans();
1281  SampleSigmas();
1283 
1284  Pedestals(); // => mean over Xtal's
1285  TotalNoise();
1290 
1291  AveragePedestals(); // Average => mean over Stin's (Tower if EB, SC if EE)
1297 }
void AverageTotalNoise()
Definition: TEcnaRun.cc:2015
void TotalNoise()
Definition: TEcnaRun.cc:1628
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1889
void AverageMeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2195
void AverageLowFrequencyNoise()
Definition: TEcnaRun.cc:2075
void SampleMeans()
Definition: TEcnaRun.cc:1329
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1681
void AverageSigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2255
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1823
void SampleSigmas()
Definition: TEcnaRun.cc:1381
void AveragePedestals()
Definition: TEcnaRun.cc:1954
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1751
void AverageHighFrequencyNoise()
Definition: TEcnaRun.cc:2135
void Pedestals()
Definition: TEcnaRun.cc:1583
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1509
void TEcnaRun::StartStopDate ( const TString &  c_startdate,
const TString &  c_stopdate 
)

Definition at line 1206 of file TEcnaRun.cc.

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

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

1207 {
1208 // Put the start an stop date (if they exist) in fFileHeader class attributes.
1209 
1210  fFileHeader->fStartDate = c_startdate;
1211  fFileHeader->fStopDate = c_stopdate;
1212 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
TString fStopDate
Definition: TEcnaHeader.h:61
TString fStartDate
Definition: TEcnaHeader.h:60
void TEcnaRun::StartStopTime ( time_t  t_startime,
time_t  t_stoptime 
)

Definition at line 1198 of file TEcnaRun.cc.

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

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

1199 {
1200 // Put the start an stop time (if they exist) in fFileHeader class attributes.
1201 
1202  fFileHeader->fStartTime = t_startime;
1203  fFileHeader->fStopTime = t_stoptime;
1204 }
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
time_t fStartTime
Definition: TEcnaHeader.h:58
time_t fStopTime
Definition: TEcnaHeader.h:59
void TEcnaRun::TotalNoise ( )

Definition at line 1628 of file TEcnaRun.cc.

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

Referenced by AverageTotalNoise(), and StandardCalculations().

1629 {
1630 // Calculation, for each channel, of the expectation values
1631 // (over the samples 0 to fNbSampForCalc-1) of the sigmas
1632 // (over the events)
1633 
1634  //... preliminary calculation of the sigmas if not done yet
1635  if ( fTagSSp[0] != 1 ){SampleSigmas(); fTagSSp[0]=0;}
1636 
1637  //................... Allocation ev_ev + init to zero (mandatory)
1638  if( fT1d_evsamp_of_sigevt == 0 ){fT1d_evsamp_of_sigevt = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1639  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1640  {if( fT1d_evsamp_of_sigevt[i0StexEcha] != (Double_t)0 )
1641  {fMiscDiag[12]++; fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;}}
1642 
1643  //..................... Calculation
1644  if(fFlagPrint != fCodePrintNoComment){std::cout << "*TEcnaRun::TotalNoise()" << std::endl;}
1646  std::cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1647  << fNbSampForCalc << ")" << std::endl
1648  << " of the ADC expectation values (over the events)." << std::endl;}
1649 
1650  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1651  {
1652  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1653  {
1654  if( fT2d_sig[i0StexEcha][i0Sample] < 0)
1655  {
1656  std::cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!"
1657  << fTTBELL << std::endl;
1658  }
1659  else
1660  {
1661  fT1d_evsamp_of_sigevt[i0StexEcha] += fT2d_sig[i0StexEcha][i0Sample];
1662  }
1663  }
1664  fT1d_evsamp_of_sigevt[i0StexEcha] /= fNbSampForCalc;
1665  }
1666  fTagTno[0] = 1; fFileHeader->fTnoCalc++;
1667 }
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t * fMiscDiag
Definition: TEcnaRun.h:378
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Double_t ** fT2d_sig
Definition: TEcnaRun.h:430
Int_t * fTagSSp
Definition: TEcnaRun.h:432
Int_t * fTagTno
Definition: TEcnaRun.h:451
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fCnew
Definition: TEcnaRun.h:373
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:450
void SampleSigmas()
Definition: TEcnaRun.cc:1381
Int_t fTnoCalc
Definition: TEcnaHeader.h:85
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAdcEvt ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4065 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4066 {
4067  if (fTagAdcEvt[user_StexEcha] == 1 )
4068  {
4069  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4070  {
4071  //...................... all the bins set to zero
4072  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4073  {
4074  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) = (Double_t)0.;
4075  }
4076  //...................... fill the non-zero bins
4077  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4078  {
4079  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) =
4080  fT3d_AdcValues[user_StexEcha][i0Sample][j_bin];
4081  }
4082  }
4083  }
4084 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Double_t *** fT3d_AdcValues
Definition: TEcnaRun.h:414
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
void TEcnaRun::TRootAvEvCorss ( )

Definition at line 4491 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4492 {
4493  if (fTagAvMeanCorss[0] == 1 ) // test 1st elt only since global calc
4494  {
4495  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4496  {
4497  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4498  fT1d_av_ev_corss[j0StexStinEcna];
4499  }
4500  }
4501 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t * fT1d_av_ev_corss
Definition: TEcnaRun.h:457
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAvHfn ( )

Definition at line 4213 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4214 {
4215  if (fTagAvHfn[0] == 1 )
4216  {
4217  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4218  {
4219  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4220  fT1d_av_hifn[j0StexStinEcna];
4221  }
4222  }
4223 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t * fT1d_av_hifn
Definition: TEcnaRun.h:467
TEcnaNArrayD fMatHis
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAvLfn ( )

Definition at line 4195 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4196 {
4197  if (fTagAvLfn[0] == 1 )
4198  {
4199  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4200  {
4201  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4202  fT1d_av_lofn[j0StexStinEcna];
4203  }
4204  }
4205 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
Double_t * fT1d_av_lofn
Definition: TEcnaRun.h:462
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAvPed ( )

Definition at line 4472 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4473 {
4474  if (fTagAvPed[0] == 1 )
4475  {
4476  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4477  {
4478  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4479  fT1d_av_mped[j0StexStinEcna];
4480  }
4481  }
4482 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t * fT1d_av_mped
Definition: TEcnaRun.h:447
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAvSigCorss ( )

Definition at line 4510 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4511 {
4512  if (fTagAvSigCorss[0] == 1 ) // test 1st elt only since global calc
4513  {
4514  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4515  {
4516  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4517  fT1d_av_sig_corss[j0StexStinEcna];
4518  }
4519  }
4520 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t * fT1d_av_sig_corss
Definition: TEcnaRun.h:472
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootAvTno ( )

Definition at line 4178 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4179 {
4180  if (fTagAvTno[0] == 1 )
4181  {
4182  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4183  {
4184  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4185  fT1d_av_totn[j0StexStinEcna];
4186  }
4187  }
4188 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
Double_t * fT1d_av_totn
Definition: TEcnaRun.h:452
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootCorCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4337 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4338 {
4339  if (fTagCorCss[user_StexEcha] == 1 )
4340  {
4341  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4342  {
4343  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4344  {
4345  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4346  fT3d_cor_ss[user_StexEcha][i0Sample][j0Sample];
4347  }
4348  }
4349  }
4350 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Double_t *** fT3d_cor_ss
Definition: TEcnaRun.h:439
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
void TEcnaRun::TRootCovCss ( const Int_t &  user_StexEcha,
const Int_t &  argNbSampWrite 
)

Definition at line 4316 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4317 {
4318  if (fTagCovCss[user_StexEcha] == 1 )
4319  {
4320  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4321  {
4322  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4323  {
4324  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4325  fT3d_cov_ss[user_StexEcha][i0Sample][j0Sample];
4326  }
4327  }
4328  }
4329 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t *** fT3d_cov_ss
Definition: TEcnaRun.h:434
void TEcnaRun::TRootHFccMoStins ( )

Definition at line 4157 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4158 {
4159  if (fTagHFccMoStins[0] == 1 )
4160  {
4161  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4162  {
4163  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4164  {
4165  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4166  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4167  }
4168  }
4169  }
4170 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
Double_t ** fT2d_hfcc_mostins
Definition: TEcnaRun.h:498
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootHfCor ( )

Definition at line 4294 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4295 {
4296  if (fTagHfCor[0] == 1 )
4297  {
4298  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4299  {
4300  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4301  {
4302  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4303  fT2d_hf_cor[i0StexEcha][j0StexEcha];
4304  }
4305  }
4306  }
4307 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t ** fT2d_hf_cor
Definition: TEcnaRun.h:489
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootHfCov ( )

Definition at line 4273 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4274 {
4275  if (fTagHfCov[0] == 1 )
4276  {
4277  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4278  {
4279  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4280  {
4281  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4282  fT2d_hf_cov[i0StexEcha][j0StexEcha];
4283  }
4284  }
4285  }
4286 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t ** fT2d_hf_cov
Definition: TEcnaRun.h:485
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootHfn ( )

Definition at line 4434 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4435 {
4436  if (fTagHfn[0] == 1 )
4437  {
4438  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4439  {
4440  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4441  fT1d_evevt_of_sigsamp[j0StexEcha];
4442  }
4443  }
4444 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Int_t * fTagHfn
Definition: TEcnaRun.h:466
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
Double_t * fT1d_evevt_of_sigsamp
Definition: TEcnaRun.h:465
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootLFccMoStins ( )

Definition at line 4135 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4136 {
4137  if (fTagLFccMoStins[0] == 1 )
4138  {
4139  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4140  {
4141  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4142  {
4143  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4144  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4145  }
4146  }
4147  }
4148 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t MaxStinEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Double_t ** fT2d_lfcc_mostins
Definition: TEcnaRun.h:494
void TEcnaRun::TRootLfCor ( )

Definition at line 4252 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4253 {
4254  if (fTagLfCor[0] == 1 )
4255  {
4256  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4257  {
4258  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4259  {
4260  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4261  fT2d_lf_cor[i0StexEcha][j0StexEcha];
4262  }
4263  }
4264  }
4265 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t ** fT2d_lf_cor
Definition: TEcnaRun.h:480
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootLfCov ( )

Definition at line 4231 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4232 {
4233  if (fTagLfCov[0] == 1 )
4234  {
4235  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4236  {
4237  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4238  {
4239  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4240  fT2d_lf_cov[i0StexEcha][j0StexEcha];
4241  }
4242  }
4243  }
4244 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
Int_t MaxCrysEcnaInStex()
Double_t ** fT2d_lf_cov
Definition: TEcnaRun.h:476
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootLfn ( )

Definition at line 4415 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4416 {
4417  if (fTagLfn[0] == 1 )
4418  {
4419  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4420  {
4421  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4422  fT1d_sigevt_of_evsamp[j0StexEcha];
4423  }
4424  }
4425 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t * fT1d_sigevt_of_evsamp
Definition: TEcnaRun.h:460
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagLfn
Definition: TEcnaRun.h:461
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootMeanCorss ( )

Definition at line 4396 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4397 {
4398  if (fTagMeanCorss[0] == 1 )
4399  {
4400  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4401  {
4402  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4403  fT1d_ev_cor_ss[j0StexEcha];
4404  }
4405  }
4406 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Double_t * fT1d_ev_cor_ss
Definition: TEcnaRun.h:455
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootMSp ( const Int_t &  argNbSampWrite)

Definition at line 4092 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4093 {
4094  if (fTagMSp[0] == 1 )
4095  {
4096  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4097  {
4098  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4099  {
4100  gCnaRootFile->fCnaIndivResult->fMatHis( j0StexEcha, i0Sample) =
4101  fT2d_ev[j0StexEcha][i0Sample];
4102  }
4103  }
4104  }
4105 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t ** fT2d_ev
Definition: TEcnaRun.h:426
TEcnaNArrayD fMatHis
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootNbOfEvts ( const Int_t &  argNbSampWrite)

Definition at line 4044 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4045 {
4046  if (fTagNbOfEvts[0] == 1 )
4047  {
4048  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4049  {
4050  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4051  {
4052  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4053  fT2d_NbOfEvts[j0StexEcha][i0Sample];
4054  }
4055  }
4056  }
4057 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t MaxCrysEcnaInStex()
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootPed ( )

Definition at line 4359 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4360 {
4361  if (fTagPed[0] == 1 )
4362  {
4363  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4364  {
4365  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4366  fT1d_ev_ev[j0StexEcha];
4367  }
4368  }
4369 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Int_t * fTagPed
Definition: TEcnaRun.h:446
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Double_t * fT1d_ev_ev
Definition: TEcnaRun.h:445
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootSigCorss ( )

Definition at line 4453 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4454 {
4455  if (fTagSigCorss[0] == 1 )
4456  {
4457  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4458  {
4459  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4460  fT1d_sig_cor_ss[j0StexEcha];
4461  }
4462  }
4463 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t * fT1d_sig_cor_ss
Definition: TEcnaRun.h:470
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootSSp ( const Int_t &  argNbSampWrite)

Definition at line 4113 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4114 {
4115  if (fTagSSp[0] == 1 )
4116  {
4117  for (Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4118  {
4119  for (Int_t i0Sample=0; i0Sample<argNbSampWrite; i0Sample++)
4120  {
4121  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4122  fT2d_sig[j0StexEcha][i0Sample];
4123  }
4124  }
4125  }
4126 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Double_t ** fT2d_sig
Definition: TEcnaRun.h:430
Int_t * fTagSSp
Definition: TEcnaRun.h:432
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootStinNumbers ( )

Definition at line 4026 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4027 {
4028  if (fTagStinNumbers[0] == 1 )
4029  {
4030  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4031  {
4032  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4033  fT1d_StexStinFromIndex[j0StexStinEcna];
4034  }
4035  }
4036 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
TEcnaNArrayD fMatHis
Int_t MaxStinEcnaInStex()
Int_t * fT1d_StexStinFromIndex
Definition: TEcnaRun.h:423
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TEcnaRun::TRootTno ( )

Definition at line 4377 of file TEcnaRun.cc.

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

Referenced by WriteRootFile().

4378 {
4379  if (fTagTno[0] == 1 )
4380  {
4381  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4382  {
4383  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4384  fT1d_evsamp_of_sigevt[j0StexEcha];
4385  }
4386  }
4387 }
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t * fTagTno
Definition: TEcnaRun.h:451
TEcnaNArrayD fMatHis
Double_t * fT1d_evsamp_of_sigevt
Definition: TEcnaRun.h:450
Int_t MaxCrysEcnaInStex()
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Bool_t TEcnaRun::WriteNewRootFile ( const TString &  TypAna)

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

3070  {
3071 //Write a new Root file. File name automatically generated by fCnaWrite->fMakeResultsFileName()
3072 //called here.
3073 
3074  Bool_t ok_write = kFALSE;
3075 
3081 
3082  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
3085 
3086  const Text_t *FileShortName = (const Text_t *)fNewRootFileNameShort.Data();
3087 
3089  std::cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << std::endl
3090  << " " << fNewRootFileNameShort.Data() << std::endl;}
3091 
3092  ok_write = WriteRootFile(FileShortName, fNbSampForCalc);
3093 
3094  return ok_write;
3095 }
Int_t fStex
Definition: TEcnaHeader.h:56
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:610
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
TString fStopDate
Definition: TEcnaHeader.h:61
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3018
Int_t fNbSampForCalc
Definition: TEcnaRun.h:408
Int_t fFlagPrint
Definition: TEcnaRun.h:509
TString fStartDate
Definition: TEcnaHeader.h:60
Int_t fFirstReqEvtNumber
Definition: TEcnaHeader.h:53
TString fNewRootFileNameShort
Definition: TEcnaRun.h:401
time_t fStartTime
Definition: TEcnaHeader.h:58
time_t fStopTime
Definition: TEcnaHeader.h:59
Int_t fLastReqEvtNumber
Definition: TEcnaHeader.h:54
tuple cout
Definition: gather_cfg.py:121
Int_t fRunNumber
Definition: TEcnaHeader.h:52
TString GetRootFileNameShort()
Definition: TEcnaWrite.cc:386
TString fNewRootFileName
Definition: TEcnaRun.h:400
void fMakeResultsFileName()
Definition: TEcnaWrite.cc:640
TString GetRootFileName()
Definition: TEcnaWrite.cc:385
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:388
Bool_t TEcnaRun::WriteRootFile ( )

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

3018  {
3019 //Write the Root file.
3020 //File name automatically generated by fCnaWrite->fMakeResultsFileName()
3021 //previously called in GetReadyToCompute().
3022 
3023  Bool_t ok_write = kFALSE;
3024 
3025  //============================= check number of found events
3026  Int_t nCountEvts = 0;
3027 
3028  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
3029  {for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
3030  {nCountEvts += fT2d_NbOfEvts[i0StexEcha][i0Sample];}}
3031 
3032  if ( nCountEvts <= 0 )
3033  {
3034  //============== no write if no event found
3035  std::cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data()
3036  << ". File will not be written." << std::endl;
3037  ok_write = kTRUE;
3038  }
3039  else
3040  {
3042  std::cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << std::endl
3043  << " " << fCnaWrite->GetRootFileName().Data() << std::endl;}
3044 
3045  const Text_t *FileShortName = (const Text_t *)fCnaWrite->GetRootFileNameShort().Data();
3046  ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples);
3047 
3048  if( ok_write == kTRUE )
3049  {
3051  {std::cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data()
3052  << std::endl;}
3053  }
3054  else
3055  {
3056  std::cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data()
3057  << fTTBELL << std::endl;
3058  }
3059  }
3060  return ok_write;
3061 } // end of WriteRootFile()
Int_t fCodePrintNoComment
Definition: TEcnaRun.h:510
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t fNbOfSamples
Definition: TEcnaHeader.h:51
Bool_t WriteRootFile()
Definition: TEcnaRun.cc:3018
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t MaxCrysEcnaInStex()
tuple cout
Definition: gather_cfg.py:121
TString GetRootFileNameShort()
Definition: TEcnaWrite.cc:386
Int_t ** fT2d_NbOfEvts
Definition: TEcnaRun.h:419
TString GetRootFileName()
Definition: TEcnaWrite.cc:385
TEcnaWrite * fCnaWrite
Definition: TEcnaRun.h:388
TString fTTBELL
Definition: TEcnaRun.h:376
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
Bool_t TEcnaRun::WriteRootFile ( const Text_t *  name,
Int_t &  argNbSampWrite 
)

Definition at line 3111 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, cmsHarvester::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, 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().

3112 {
3113 //Write the Root file
3114 
3115  const Text_t* file_name = name;
3116 
3117  Bool_t ok_write = kFALSE;
3118 
3119  if ( fOpenRootFile )
3120  {
3121  std::cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open."
3122  << fTTBELL << std::endl;
3123  }
3124  else
3125  {
3126  // List of the different element types and associated parameters as ordered in the ROOT file (smaller -> larger)
3127  // ==========
3128  //
3129  // WARNING *** HERE SIZES ARE THESE FOR THE BARREL (1700 Xtals) and for 10 samples ***
3130  //
3131  // Nb of Type of element Type Type Size Comment
3132  // elements Number Name
3133  //
3134  // 1 fMatHis(1,StexStin) ( 0) cTypNumbers 1*( 1, 68) = 68
3135 
3136  // 1 fMatHis(1,StexStin) (12) cTypAvPed 1*( 1, 68) = 68
3137  // 1 fMatHis(1,StexStin) ( 3) cTypAvTno 1*( 1, 68) = 68
3138  // 1 fMatHis(1,StexStin) ( 4) cTypAvLfn 1*( 1, 68) = 68
3139  // 1 fMatHis(1,StexStin) ( 5) cTypAvHfn 1*( 1, 68) = 68
3140  // 1 fMatHis(1,StexStin) (13) cTypAvMeanCorss 1*( 1, 68) = 68
3141  // 1 fMatHis(1,StexStin) (14) cTypAvSigCorss 1*( 1, 68) = 68
3142 
3143  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3144  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3145  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3146  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3147  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3148  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3149 
3150  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3151  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3152 
3153  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3154  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3155  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3156 
3157  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3158  // StexEcha fMatMat(sample, sample ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3159 
3160  // StexEcha fMatHis(sample, bin_evt) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3161 
3162  // 1 fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3163  // 1 fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3164 
3165  // 1 fMatMat(StexEcha, StexEcha) ( 6) cTypHfCov 1*(1700,1700) = 2 890 000 // (06/05/08)
3166  // 1 fMatMat(StexEcha, StexEcha) ( 7) cTypHfCor 1*(1700,1700) = 2 890 000 // (06/05/08)
3167 
3168 
3169  //......................................................................................................
3170 
3171  OpenRootFile(file_name, "RECREATE");
3172 
3173  TString typ_name = "?";
3174  Int_t v_nb_times = 0;
3175  Int_t v_dim_one = 0;
3176  Int_t v_dim_two = 0;
3177  Int_t v_size = 0;
3178  Int_t v_tot = 0;
3179  Int_t v_tot_writ = 0;
3180 
3181  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3182  //
3183  // ===> no general method and no translation to TEcnaWrite
3184  // because the fT1d.. and fT2d... arrays
3185  // are attributes of TEcnaRun (calls to the "TRootXXXX" methods)
3186  //
3187  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3188 
3189  //-------------------------- Stin numbers
3190  // 1 fMatHis(1,Stin) ( 0) cTypNumbers 1*( 1, 68) = 68
3191 
3192  Int_t MaxCar = fgMaxCar;
3193  typ_name.Resize(MaxCar);
3194  typ_name = "StinNumbers";
3195  v_nb_times = fFileHeader->fStinNumbersCalc;
3196  v_dim_one = 1;
3197  v_dim_two = fEcal->MaxStinEcnaInStex();
3198  v_size = v_nb_times*v_dim_one*v_dim_two;
3199  v_tot += v_size;
3200 
3202  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3203  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3204  << std::setw(9) << v_size;}
3205 
3206  for (Int_t i = 0; i < v_nb_times; i++)
3207  {
3208  if ( fTagStinNumbers[0] == 1 )
3209  {
3212  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3214  TRootStinNumbers();
3215  gCnaRootFile->fCnaResultsTree->Fill();
3216  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3217  }
3218  }
3219  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3220 
3221  //-------------------------- Average Pedestals (1 value per Stin)
3222  // 1 fMatHis(1, StexStin) (12) cTypAvPed 1*(1, 68) = 68
3223 
3224  MaxCar = fgMaxCar;
3225  typ_name.Resize(MaxCar);
3226  typ_name = "AvPed";
3227  v_nb_times = fFileHeader->fAvPedCalc;
3228  v_dim_one = 1;
3229  v_dim_two = fEcal->MaxStinEcnaInStex();
3230  v_size = v_nb_times*v_dim_one*v_dim_two;
3231  v_tot += v_size;
3232 
3234  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3235  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3236  << std::setw(9) << v_size;}
3237 
3238  for (Int_t i = 0; i < v_nb_times; i++)
3239  {
3240  if ( fTagAvPed[0] == 1 )
3241  {
3244  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3246  TRootAvPed();
3247  gCnaRootFile->fCnaResultsTree->Fill();
3248  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3249  }
3250  }
3251  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3252 
3253  //-------------------------- Average Total noise
3254  // StexEcha fMatHis(1, StexStin) ( 3) cTypAvTno 1*(1, 68) = 68
3255 
3256  MaxCar = fgMaxCar;
3257  typ_name.Resize(MaxCar);
3258  typ_name = "AvTno";
3259  v_nb_times = fFileHeader->fAvTnoCalc;
3260  v_dim_one = 1;
3261  v_dim_two = fEcal->MaxStinEcnaInStex();
3262  v_size = v_nb_times*v_dim_one*v_dim_two;
3263  v_tot += v_size;
3264 
3266  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3267  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3268  << std::setw(9) << v_size;}
3269 
3270  for (Int_t i = 0; i < v_nb_times; i++)
3271  {
3272  if ( fTagAvTno[0] == 1 )
3273  {
3276  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3278  TRootAvTno();
3279  gCnaRootFile->fCnaResultsTree->Fill();
3280  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3281  }
3282  }
3283  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3284 
3285  //-------------------------- Average Low frequency noise
3286  // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*(1, 68) = 68
3287 
3288  MaxCar = fgMaxCar;
3289  typ_name.Resize(MaxCar);
3290  typ_name = "AvLfn";
3291  v_nb_times = fFileHeader->fAvLfnCalc;
3292  v_dim_one = 1;
3293  v_dim_two = fEcal->MaxStinEcnaInStex();
3294  v_size = v_nb_times*v_dim_one*v_dim_two;
3295  v_tot += v_size;
3296 
3298  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3299  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3300  << std::setw(9) << v_size;}
3301 
3302  for (Int_t i = 0; i < v_nb_times; i++)
3303  {
3304  if ( fTagAvLfn[0] == 1 )
3305  {
3308  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3310  TRootAvLfn();
3311  gCnaRootFile->fCnaResultsTree->Fill();
3312  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3313  }
3314  }
3315  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3316 
3317  //-------------------------- Average High frequency noise
3318  // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*(1, 68) = 68
3319 
3320  MaxCar = fgMaxCar;
3321  typ_name.Resize(MaxCar);
3322  typ_name = "AvHfn";
3323  v_nb_times = fFileHeader->fAvHfnCalc;
3324  v_dim_one = 1;
3325  v_dim_two = fEcal->MaxStinEcnaInStex();
3326  v_size = v_nb_times*v_dim_one*v_dim_two;
3327  v_tot += v_size;
3328 
3330  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3331  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3332  << std::setw(9) << v_size;}
3333 
3334  for (Int_t i = 0; i < v_nb_times; i++)
3335  {
3336  if ( fTagAvHfn[0] == 1 )
3337  {
3340  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3342  TRootAvHfn();
3343  gCnaRootFile->fCnaResultsTree->Fill();
3344  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3345  }
3346  }
3347  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3348 
3349  //-------------------------- Average mean cor(s,s)
3350  // 1 fMatHis(1, StexStin) (13) cTypAvMeanCorss 1*(1, 68) = 68
3351 
3352  MaxCar = fgMaxCar;
3353  typ_name.Resize(MaxCar);
3354  typ_name = "AvMeanCorss";
3355  v_nb_times = fFileHeader->fAvMeanCorssCalc;
3356  v_dim_one = 1;
3357  v_dim_two = fEcal->MaxStinEcnaInStex();
3358  v_size = v_nb_times*v_dim_one*v_dim_two;
3359  v_tot += v_size;
3360 
3362  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3363  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3364  << std::setw(9) << v_size;}
3365 
3366  for (Int_t i = 0; i < v_nb_times; i++)
3367  {
3368  if ( fTagAvMeanCorss[0] == 1 )
3369  {
3372  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3374  TRootAvEvCorss();
3375  gCnaRootFile->fCnaResultsTree->Fill();
3376  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3377  }
3378  }
3379  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3380 
3381  //-------------------------- Average sigma of cor(s,s)
3382  // 1 fMatHis(1, StexStin) (14) cTypAvSigCorss 1*(1, 68) = 68
3383 
3384  MaxCar = fgMaxCar;
3385  typ_name.Resize(MaxCar);
3386  typ_name = "AvSigCorss";
3387  v_nb_times = fFileHeader->fAvSigCorssCalc;
3388  v_dim_one = 1;
3389  v_dim_two = fEcal->MaxStinEcnaInStex();
3390  v_size = v_nb_times*v_dim_one*v_dim_two;
3391  v_tot += v_size;
3392 
3394  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3395  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3396  << std::setw(9) << v_size;}
3397 
3398  for (Int_t i = 0; i < v_nb_times; i++)
3399  {
3400  if ( fTagAvSigCorss[0] == 1 )
3401  {
3404  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3406  TRootAvSigCorss();
3407  gCnaRootFile->fCnaResultsTree->Fill();
3408  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3409  }
3410  }
3411  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3412 
3413  //-------------------------- Expectation values of the expectation values of the samples (pedestals)
3414  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3415 
3416  MaxCar = fgMaxCar;
3417  typ_name.Resize(MaxCar);
3418  typ_name = "Ped";
3419  v_nb_times = fFileHeader->fPedCalc;
3420  v_dim_one = 1;
3421  v_dim_two = fEcal->MaxCrysEcnaInStex();
3422  v_size = v_nb_times*v_dim_one*v_dim_two;
3423  v_tot += v_size;
3424 
3426  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3427  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3428  << std::setw(9) << v_size;}
3429 
3430  for (Int_t i = 0; i < v_nb_times; i++)
3431  {
3432  if ( fTagPed[0] == 1 )
3433  {
3436  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3438  TRootPed();
3439  gCnaRootFile->fCnaResultsTree->Fill();
3440  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3441  }
3442  }
3443  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3444 
3445  //-------------------------- Expectation values of the sigmas the samples
3446  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3447 
3448  MaxCar = fgMaxCar;
3449  typ_name.Resize(MaxCar);
3450  typ_name = "Tno";
3451  v_nb_times = fFileHeader->fTnoCalc;
3452  v_dim_one = 1;
3453  v_dim_two = fEcal->MaxCrysEcnaInStex();
3454  v_size = v_nb_times*v_dim_one*v_dim_two;
3455  v_tot += v_size;
3456 
3458  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3459  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3460  << std::setw(9) << v_size;}
3461 
3462  for (Int_t i = 0; i < v_nb_times; i++)
3463  {
3464  if ( fTagTno[0] == 1 )
3465  {
3468  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3470  TRootTno();
3471  gCnaRootFile->fCnaResultsTree->Fill();
3472  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3473  }
3474  }
3475  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3476 
3477  //-------------------------- Expectation values of the correlations between the samples
3478  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3479 
3480  MaxCar = fgMaxCar;
3481  typ_name.Resize(MaxCar);
3482  typ_name = "MeanCorss";
3483  v_nb_times = fFileHeader->fMeanCorssCalc;
3484  v_dim_one = 1;
3485  v_dim_two = fEcal->MaxCrysEcnaInStex();
3486  v_size = v_nb_times*v_dim_one*v_dim_two;
3487  v_tot += v_size;
3488 
3490  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3491  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3492  << std::setw(9) << v_size;}
3493 
3494  for (Int_t i = 0; i < v_nb_times; i++)
3495  {
3496  if ( fTagMeanCorss[0] == 1 )
3497  {
3500  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3502  TRootMeanCorss();
3503  gCnaRootFile->fCnaResultsTree->Fill();
3504  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3505  }
3506  }
3507  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3508 
3509  //-------------------------- Sigmas of the expectation values of the samples
3510  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3511 
3512  MaxCar = fgMaxCar;
3513  typ_name.Resize(MaxCar);
3514  typ_name = "Lfn";
3515  v_nb_times = fFileHeader->fLfnCalc;
3516  v_dim_one = 1;
3517  v_dim_two = fEcal->MaxCrysEcnaInStex();
3518  v_size = v_nb_times*v_dim_one*v_dim_two;
3519  v_tot += v_size;
3520 
3522  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3523  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3524  << std::setw(9) << v_size;}
3525 
3526  for (Int_t i = 0; i < v_nb_times; i++)
3527  {
3528  if ( fTagLfn[0] == 1 )
3529  {
3532  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3534  TRootLfn();
3535  gCnaRootFile->fCnaResultsTree->Fill();
3536  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3537  }
3538  }
3539  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3540 
3541  //-------------------------- Sigmas of the sigmas of the samples
3542  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3543 
3544  MaxCar = fgMaxCar;
3545  typ_name.Resize(MaxCar);
3546  typ_name = "Hfn";
3547  v_nb_times = fFileHeader->fHfnCalc;
3548  v_dim_one = 1;
3549  v_dim_two = fEcal->MaxCrysEcnaInStex();
3550  v_size = v_nb_times*v_dim_one*v_dim_two;
3551  v_tot += v_size;
3552 
3554  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3555  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3556  << std::setw(9) << v_size;}
3557 
3558  for (Int_t i = 0; i < v_nb_times; i++)
3559  {
3560  if ( fTagHfn[0] == 1 )
3561  {
3564  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3566  TRootHfn();
3567  gCnaRootFile->fCnaResultsTree->Fill();
3568  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3569  }
3570  }
3571  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3572 
3573  //-------------------------- Sigmas of the correlations between the samples
3574  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3575 
3576  MaxCar = fgMaxCar;
3577  typ_name.Resize(MaxCar);
3578  typ_name = "SigCorss";
3579  v_nb_times = fFileHeader->fSigCorssCalc;
3580  v_dim_one = 1;
3581  v_dim_two = fEcal->MaxCrysEcnaInStex();
3582  v_size = v_nb_times*v_dim_one*v_dim_two;
3583  v_tot += v_size;
3584 
3586  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3587  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3588  << std::setw(9) << v_size;}
3589 
3590  for (Int_t i = 0; i < v_nb_times; i++)
3591  {
3592  if ( fTagSigCorss[0] == 1 )
3593  {
3596  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3598  TRootSigCorss();
3599  gCnaRootFile->fCnaResultsTree->Fill();
3600  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3601  }
3602  }
3603  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3604 
3605  //----- Mean Covariances between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3606  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3607 
3608  MaxCar = fgMaxCar;
3609  typ_name.Resize(MaxCar);
3610  typ_name = "LFccMoStins";
3611  v_nb_times = fFileHeader->fLFccMoStinsCalc;
3612  v_dim_one = fEcal->MaxStinEcnaInStex();
3613  v_dim_two = fEcal->MaxStinEcnaInStex();
3614  v_size = v_nb_times*v_dim_one*v_dim_two;
3615  v_tot += v_size;
3616 
3618  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3619  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3620  << std::setw(9) << v_size;}
3621 
3622  for (Int_t i = 0; i < v_nb_times; i++)
3623  {
3624  if ( fTagLFccMoStins[0] == 1 )
3625  {
3628  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3630  TRootLFccMoStins();
3631  gCnaRootFile->fCnaResultsTree->Fill();
3632  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3633  }
3634  }
3635  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3636 
3637  //----- Mean Correlations between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3638  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3639 
3640  MaxCar = fgMaxCar;
3641  typ_name.Resize(MaxCar);
3642  typ_name = "HFccMoStins";
3643  v_nb_times = fFileHeader->fHFccMoStinsCalc;
3644  v_dim_one = fEcal->MaxStinEcnaInStex();
3645  v_dim_two = fEcal->MaxStinEcnaInStex();
3646  v_size = v_nb_times*v_dim_one*v_dim_two;
3647  v_tot += v_size;
3648 
3650  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3651  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3652  << std::setw(9) << v_size;}
3653 
3654  for (Int_t i = 0; i < v_nb_times; i++)
3655  {
3656  if ( fTagHFccMoStins[0] == 1 )
3657  {
3660  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3662  TRootHFccMoStins();
3663  gCnaRootFile->fCnaResultsTree->Fill();
3664  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3665  }
3666  }
3667  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3668 
3669  //-------------------------- Numbers of found events (NbOfEvts)
3670  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3671 
3672  MaxCar = fgMaxCar;
3673  typ_name.Resize(MaxCar);
3674  typ_name = "NbOfEvts";
3675  v_nb_times = fFileHeader->fNbOfEvtsCalc;
3676  v_dim_one = fEcal->MaxCrysEcnaInStex();
3677  v_dim_two = argNbSampWrite;
3678  v_size = v_nb_times*v_dim_one*v_dim_two;
3679  v_tot += v_size;
3680 
3682  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3683  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3684  << std::setw(9) << v_size;}
3685 
3686  for (Int_t i = 0; i < v_nb_times; i++)
3687  {
3688  if ( fTagNbOfEvts[0] == 1 )
3689  {
3692  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3694  TRootNbOfEvts(argNbSampWrite);
3695  gCnaRootFile->fCnaResultsTree->Fill();
3696  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3697  }
3698  }
3699  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3700 
3701  //-------------------------- Expectation values of the samples
3702  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3703 
3704  MaxCar = fgMaxCar;
3705  typ_name.Resize(MaxCar);
3706  typ_name = "MSp";
3707  v_nb_times = fFileHeader->fMSpCalc;
3708  v_dim_one = fEcal->MaxCrysEcnaInStex();
3709  v_dim_two = argNbSampWrite;
3710  v_size = v_nb_times*v_dim_one*v_dim_two;
3711  v_tot += v_size;
3712 
3714  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3715  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3716  << std::setw(9) << v_size;}
3717 
3718  for (Int_t i = 0; i < v_nb_times; i++)
3719  {
3720  if ( fTagMSp[0] == 1 )
3721  {
3724  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3726  TRootMSp(argNbSampWrite);
3727  gCnaRootFile->fCnaResultsTree->Fill();
3728  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3729  }
3730  }
3731  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3732 
3733  //-------------------------- Sigmas of the samples
3734  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3735 
3736  MaxCar = fgMaxCar;
3737  typ_name.Resize(MaxCar);
3738  typ_name = "SSp";
3739  v_nb_times = fFileHeader->fSSpCalc;
3740  v_dim_one = fEcal->MaxCrysEcnaInStex();
3741  v_dim_two = argNbSampWrite;
3742  v_size = v_nb_times*v_dim_one*v_dim_two;
3743  v_tot += v_size;
3744 
3746  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3747  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3748  << std::setw(9) << v_size;}
3749 
3750  for (Int_t i = 0; i < v_nb_times; i++)
3751  {
3752  if ( fTagSSp[0] == 1 )
3753  {
3756  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3758  TRootSSp(argNbSampWrite);
3759  gCnaRootFile->fCnaResultsTree->Fill();
3760  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3761  }
3762  }
3763  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3764 
3765  //-------------------------- Covariances between samples
3766 
3767  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3768 
3769  MaxCar = fgMaxCar;
3770  typ_name.Resize(MaxCar);
3771  typ_name = "CovCss";
3772  v_nb_times = fFileHeader->fCovCssCalc;
3773  v_dim_one = argNbSampWrite;
3774  v_dim_two = argNbSampWrite;
3775  v_size = v_nb_times*v_dim_one*v_dim_two;
3776  v_tot += v_size;
3777 
3779  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3780  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3781  << std::setw(9) << v_size;}
3782 
3783  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3784  {
3785  if ( fTagCovCss[i0StexEcha] == 1 )
3786  {
3788  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3789  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3791  TRootCovCss(i0StexEcha, argNbSampWrite);
3792  gCnaRootFile->fCnaResultsTree->Fill();
3793  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3794  {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3795  }
3796  }
3797  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3798 
3799  //-------------------------- Correlations between samples
3800  // StexEcha fMatMat(sample, sample) ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3801 
3802  MaxCar = fgMaxCar;
3803  typ_name.Resize(MaxCar);
3804  typ_name = "CorCss";
3805  v_nb_times = fFileHeader->fCorCssCalc;
3806  v_dim_one = argNbSampWrite;
3807  v_dim_two = argNbSampWrite;
3808  v_size = v_nb_times*v_dim_one*v_dim_two;
3809  v_tot += v_size;
3810 
3812  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3813  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3814  << std::setw(9) << v_size;}
3815 
3816  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3817  {
3818  if ( fTagCorCss[i0StexEcha] == 1 )
3819  {
3821  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3822  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3824  TRootCorCss(i0StexEcha, argNbSampWrite);
3825  gCnaRootFile->fCnaResultsTree->Fill();
3826  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3827  {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3828  }
3829  }
3830  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3831 
3832  //-------------------------- Samples as a function of event = events distributions
3833  // StexEcha fMatHis(sample, bins) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3834 
3835  MaxCar = fgMaxCar;
3836  typ_name.Resize(MaxCar);
3837  typ_name = "AdcEvt";
3838  v_nb_times = fFileHeader->fAdcEvtCalc;
3839  v_dim_one = argNbSampWrite;
3840  v_dim_two = fFileHeader->fReqNbOfEvts;
3841  v_size = v_nb_times*v_dim_one*v_dim_two;
3842  v_tot += v_size;
3843 
3845  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3846  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3847  << std::setw(9) << v_size;}
3848 
3849  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3850  {
3851  if ( fTagAdcEvt[i0StexEcha] == 1 )
3852  {
3854  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3855  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3857  TRootAdcEvt(i0StexEcha, argNbSampWrite);
3858  gCnaRootFile->fCnaResultsTree->Fill();
3859  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments )
3860  {std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3861  }
3862  }
3863  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3864 
3865  //-------------------------- Low Frequency Covariances between StexEchas
3866  // sample fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3867 
3868  MaxCar = fgMaxCar;
3869  typ_name.Resize(MaxCar);
3870  typ_name = "LfCov";
3871  v_nb_times = fFileHeader->fLfCovCalc;
3872  v_dim_one = fEcal->MaxCrysEcnaInStex();
3873  v_dim_two = fEcal->MaxCrysEcnaInStex();
3874  v_size = v_nb_times*v_dim_one*v_dim_two;
3875  v_tot += v_size;
3876 
3878  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3879  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3880  << std::setw(9) << v_size;}
3881 
3882  for (Int_t i = 0; i < v_nb_times; i++)
3883  { //=================================== Record type EB
3884  if ( fTagLfCov[0] == 1 )
3885  {
3888  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3890  TRootLfCov();
3891  gCnaRootFile->fCnaResultsTree->Fill();
3892  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3893  }
3894  }
3895  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3896 
3897  //-------------------------- Low Frequency Correlations between StexEchas
3898  // sample fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3899 
3900  MaxCar = fgMaxCar;
3901  typ_name.Resize(MaxCar);
3902  typ_name = "LfCor";
3903  v_nb_times = fFileHeader->fLfCorCalc;
3904  v_dim_one = fEcal->MaxCrysEcnaInStex();
3905  v_dim_two = fEcal->MaxCrysEcnaInStex();
3906  v_size = v_nb_times*v_dim_one*v_dim_two;
3907  v_tot += v_size;
3908 
3910  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3911  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3912  << std::setw(9) << v_size;}
3913 
3914  for (Int_t i = 0; i < v_nb_times; i++)
3915  {
3916  if ( fTagLfCor[0] == 1 )
3917  {
3920  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3922  TRootLfCor();
3923  gCnaRootFile->fCnaResultsTree->Fill();
3924  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3925  }
3926  }
3927  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3928 
3929  //-------------------------- High Frequency Covariances between StexEchas
3930  // sample fMatMat(StexEcha, StexEcha) (6) cTypHfCov 1*(1700,1700) = 2 890 000
3931 
3932  MaxCar = fgMaxCar;
3933  typ_name.Resize(MaxCar);
3934  typ_name = "HfCov";
3935  v_nb_times = fFileHeader->fHfCovCalc;
3936  v_dim_one = fEcal->MaxCrysEcnaInStex();
3937  v_dim_two = fEcal->MaxCrysEcnaInStex();
3938  v_size = v_nb_times*v_dim_one*v_dim_two;
3939  v_tot += v_size;
3940 
3942  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3943  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3944  << std::setw(9) << v_size;}
3945 
3946  for (Int_t i = 0; i < v_nb_times; i++)
3947  {
3948  if ( fTagHfCov[0] == 1 )
3949  {
3952  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3954  TRootHfCov();
3955  gCnaRootFile->fCnaResultsTree->Fill();
3956  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3957  }
3958  }
3959  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3960 
3961  //-------------------------- High Frequency Correlations between StexEchas
3962  // sample fMatMat(StexEcha, StexEcha) (7) cTypHfCor 1*(1700,1700) = 2 890 000
3963 
3964  MaxCar = fgMaxCar;
3965  typ_name.Resize(MaxCar);
3966  typ_name = "HfCor";
3967  v_nb_times = fFileHeader->fHfCorCalc;
3968  v_dim_one = fEcal->MaxCrysEcnaInStex();
3969  v_dim_two = fEcal->MaxCrysEcnaInStex();
3970  v_size = v_nb_times*v_dim_one*v_dim_two;
3971  v_tot += v_size;
3972 
3974  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(18) << typ_name << ": " << std::setw(4) << v_nb_times
3975  << " * (" << std::setw(4) << v_dim_one << "," << std::setw(4) << v_dim_two << ") = "
3976  << std::setw(9) << v_size;}
3977 
3978  for (Int_t i = 0; i < v_nb_times; i++)
3979  {
3980  if ( fTagHfCor[0] == 1 )
3981  {
3984  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3986  TRootHfCor();
3987  gCnaRootFile->fCnaResultsTree->Fill();
3988  if( i == 0 && fFlagPrint == fCodePrintAllComments ){std::cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3989  }
3990  }
3991  if(fFlagPrint == fCodePrintAllComments){std::cout << std::endl;}
3992 
3993  //---------------------------------------------- WRITING
3994  //...................................... file
3995  gCnaRootFile->fRootFile->Write();
3996  //...................................... header
3997  fFileHeader->Write();
3998 
3999  //...................................... status message
4001  std::cout << "*TEcnaRun::WriteRootFile(...)> " << std::setw(20) << "TOTAL: "
4002  << std::setw(21) << "CALCULATED = " << std::setw(9) << v_tot
4003  << " => WRITTEN ON FILE = " << std::setw(9) << v_tot_writ << std::endl;}
4004 
4006  std::cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << std::endl
4007  << " " << fCnaParPaths->ResultsRootFilePath().Data()
4008  << std::endl;}
4009 
4010  ok_write = kTRUE;
4011 
4012  //...................................... close
4013  CloseRootFile(file_name);
4014  }
4015  return ok_write;
4016 } //-------------- End of WriteRootFile(...) -----------------------
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
void TRootAdcEvt(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4065
int i
Definition: DBlmapReader.cc:9
Int_t * fTagCorCss
Definition: TEcnaRun.h:442
Int_t fHFccMoStinsCalc
Definition: TEcnaHeader.h:83
void TRootHfn()
Definition: TEcnaRun.cc:4434
Int_t * fTagLFccMoStins
Definition: TEcnaRun.h:496
Int_t fAvLfnCalc
Definition: TEcnaHeader.h:73
Int_t fSSpCalc
Definition: TEcnaHeader.h:71
Bool_t fOpenRootFile
Definition: TEcnaRun.h:395
Int_t * fTagStinNumbers
Definition: TEcnaRun.h:424
Int_t * fTagLfCor
Definition: TEcnaRun.h:482
void TRootSigCorss()
Definition: TEcnaRun.cc:4453
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
void TRootSSp(const Int_t &)
Definition: TEcnaRun.cc:4113
Int_t fHfnCalc
Definition: TEcnaHeader.h:88
void TRootLfCor()
Definition: TEcnaRun.cc:4252
void TRootLFccMoStins()
Definition: TEcnaRun.cc:4135
TEcnaHeader * fFileHeader
Definition: TEcnaRun.h:383
Int_t * fTagCovCss
Definition: TEcnaRun.h:437
Int_t fAvMeanCorssCalc
Definition: TEcnaHeader.h:92
void TRootCovCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4316
Int_t * fTagPed
Definition: TEcnaRun.h:446
void TRootAvTno()
Definition: TEcnaRun.cc:4178
Int_t fHfCorCalc
Definition: TEcnaHeader.h:79
void SetSizeHis(Int_t, Int_t)
void TRootAvLfn()
Definition: TEcnaRun.cc:4195
Int_t fReqNbOfEvts
Definition: TEcnaHeader.h:55
Int_t * fTagAvTno
Definition: TEcnaRun.h:453
Int_t * fTagHfn
Definition: TEcnaRun.h:466
void TRootHfCor()
Definition: TEcnaRun.cc:4294
Int_t fMSpCalc
Definition: TEcnaHeader.h:70
void TRootAvEvCorss()
Definition: TEcnaRun.cc:4491
Int_t fNbOfEvtsCalc
Definition: TEcnaHeader.h:67
Int_t * fTagSSp
Definition: TEcnaRun.h:432
R__EXTERN TEcnaRootFile * gCnaRootFile
Definition: TEcnaRootFile.h:68
Int_t fMeanCorssCalc
Definition: TEcnaHeader.h:86
Bool_t CloseRootFile(const Text_t *)
Definition: TEcnaRun.cc:2972
void TRootStinNumbers()
Definition: TEcnaRun.cc:4026
void TRootHFccMoStins()
Definition: TEcnaRun.cc:4157
void TRootMSp(const Int_t &)
Definition: TEcnaRun.cc:4092
Int_t fHfCovCalc
Definition: TEcnaHeader.h:78
Int_t * fTagTno
Definition: TEcnaRun.h:451
Int_t * fTagAvLfn
Definition: TEcnaRun.h:463
TEcnaNArrayD fMatHis
CnaResultTyp fTypOfCnaResult
Int_t * fTagLfn
Definition: TEcnaRun.h:461
void TRootAvHfn()
Definition: TEcnaRun.cc:4213
Int_t fCorCssCalc
Definition: TEcnaHeader.h:77
void TRootPed()
Definition: TEcnaRun.cc:4359
void TRootTno()
Definition: TEcnaRun.cc:4377
void TRootCorCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4337
Int_t fAvTnoCalc
Definition: TEcnaHeader.h:72
TEcnaParPaths * fCnaParPaths
Definition: TEcnaRun.h:387
Int_t * fTagAvSigCorss
Definition: TEcnaRun.h:473
Int_t fPedCalc
Definition: TEcnaHeader.h:84
Int_t * fTagHfCor
Definition: TEcnaRun.h:491
Int_t * fTagNbOfEvts
Definition: TEcnaRun.h:421
Int_t * fTagAvPed
Definition: TEcnaRun.h:448
void TRootLfn()
Definition: TEcnaRun.cc:4415
void TRootLfCov()
Definition: TEcnaRun.cc:4231
Int_t fFlagPrint
Definition: TEcnaRun.h:509
Int_t fAvHfnCalc
Definition: TEcnaHeader.h:74
Int_t * fTagHFccMoStins
Definition: TEcnaRun.h:500
Bool_t OpenRootFile(const Text_t *, const TString &)
Definition: TEcnaRun.cc:2929
Int_t * fTagAvMeanCorss
Definition: TEcnaRun.h:458
Int_t * fTagLfCov
Definition: TEcnaRun.h:478
void SetSizeMat(Int_t, Int_t)
void ReSet(Int_t)
Int_t fAvPedCalc
Definition: TEcnaHeader.h:91
void TRootAvSigCorss()
Definition: TEcnaRun.cc:4510
Int_t * fTagHfCov
Definition: TEcnaRun.h:487
Int_t * fTagAvHfn
Definition: TEcnaRun.h:468
Int_t * fTagSigCorss
Definition: TEcnaRun.h:471
TString ResultsRootFilePath()
Int_t fLfCorCalc
Definition: TEcnaHeader.h:81
Int_t * fTagMSp
Definition: TEcnaRun.h:428
Int_t fAdcEvtCalc
Definition: TEcnaHeader.h:69
Int_t fTnoCalc
Definition: TEcnaHeader.h:85
Int_t MaxCrysEcnaInStex()
void TRootNbOfEvts(const Int_t &)
Definition: TEcnaRun.cc:4044
Int_t fLfCovCalc
Definition: TEcnaHeader.h:80
Int_t fLFccMoStinsCalc
Definition: TEcnaHeader.h:82
Int_t * fTagAdcEvt
Definition: TEcnaRun.h:417
void TRootMeanCorss()
Definition: TEcnaRun.cc:4396
Int_t fgMaxCar
Definition: TEcnaRun.h:369
tuple cout
Definition: gather_cfg.py:121
Int_t MaxStinEcnaInStex()
Int_t fSigCorssCalc
Definition: TEcnaHeader.h:89
Int_t fLfnCalc
Definition: TEcnaHeader.h:87
void TRootHfCov()
Definition: TEcnaRun.cc:4273
Int_t fStinNumbersCalc
Definition: TEcnaHeader.h:66
TString fTTBELL
Definition: TEcnaRun.h:376
TTree * fCnaResultsTree
Definition: TEcnaRootFile.h:40
Int_t * fTagMeanCorss
Definition: TEcnaRun.h:456
Int_t fAvSigCorssCalc
Definition: TEcnaHeader.h:93
Int_t fCovCssCalc
Definition: TEcnaHeader.h:76
TFile * fRootFile
Definition: TEcnaRootFile.h:36
TEcnaParEcal * fEcal
Definition: TEcnaRun.h:384
void TRootAvPed()
Definition: TEcnaRun.cc:4472

Member Data Documentation

Int_t TEcnaRun::fBuildEvtNotSkipped
private

Definition at line 405 of file TEcnaRun.h.

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

Int_t TEcnaRun::fCdelete
private

Definition at line 374 of file TEcnaRun.h.

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

Int_t TEcnaRun::fCnaCommand
private

Definition at line 371 of file TEcnaRun.h.

Referenced by Init().

Int_t TEcnaRun::fCnaError
private

Definition at line 371 of file TEcnaRun.h.

Referenced by Init().

TEcnaParCout* TEcnaRun::fCnaParCout
private

Definition at line 386 of file TEcnaRun.h.

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

TEcnaParPaths* TEcnaRun::fCnaParPaths
private
TEcnaWrite* TEcnaRun::fCnaWrite
private

Definition at line 388 of file TEcnaRun.h.

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

Int_t TEcnaRun::fCnew
private
Int_t TEcnaRun::fCodePrintAllComments
private
Int_t TEcnaRun::fCodePrintComments
private

Definition at line 510 of file TEcnaRun.h.

Referenced by Init(), and PrintComments().

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

Definition at line 510 of file TEcnaRun.h.

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

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

Definition at line 507 of file TEcnaRun.h.

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

Definition at line 369 of file TEcnaRun.h.

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

Int_t TEcnaRun::fMaxMsgIndexForMiscDiag
private

Definition at line 380 of file TEcnaRun.h.

Referenced by Init().

Int_t TEcnaRun::fMemoReadNumberOfEventsforSamples
private

Definition at line 412 of file TEcnaRun.h.

Referenced by Init().

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

Definition at line 379 of file TEcnaRun.h.

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

Int_t TEcnaRun::fNbSampForCalc
private
Int_t TEcnaRun::fNbSampForFic
private

Definition at line 407 of file TEcnaRun.h.

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

TString TEcnaRun::fNewRootFileName
private

Definition at line 400 of file TEcnaRun.h.

Referenced by GetNewRootFileName(), and WriteNewRootFile().

TString TEcnaRun::fNewRootFileNameShort
private

Definition at line 401 of file TEcnaRun.h.

Referenced by GetNewRootFileNameShort(), and WriteNewRootFile().

Int_t TEcnaRun::fNumberOfEvents
private
TEcnaObject* TEcnaRun::fObjectManager
private

Definition at line 382 of file TEcnaRun.h.

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

Bool_t TEcnaRun::fOpenRootFile
private

Definition at line 395 of file TEcnaRun.h.

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

Int_t TEcnaRun::fReadyToReadData
private

Definition at line 396 of file TEcnaRun.h.

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

TString TEcnaRun::fRootFileName
private

Definition at line 398 of file TEcnaRun.h.

Referenced by GetRootFileName(), and ReadSampleAdcValues().

TString TEcnaRun::fRootFileNameShort
private

Definition at line 399 of file TEcnaRun.h.

Referenced by GetRootFileNameShort(), and ReadSampleAdcValues().

Int_t TEcnaRun::fSpecialStexStinNotIndexed
private

Definition at line 403 of file TEcnaRun.h.

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

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

Definition at line 404 of file TEcnaRun.h.

Referenced by GetSampleAdcValues(), and Init().

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

Definition at line 457 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_av_hifn
private

Definition at line 467 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_av_lofn
private

Definition at line 462 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_av_mped
private

Definition at line 447 of file TEcnaRun.h.

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

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

Definition at line 452 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_ev
private

Definition at line 427 of file TEcnaRun.h.

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

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

Definition at line 445 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_evevt_of_sigsamp
private

Definition at line 465 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_evsamp_of_sigevt
private

Definition at line 450 of file TEcnaRun.h.

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

Int_t* TEcnaRun::fT1d_NbOfEvts
private

Definition at line 420 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT1d_sig
private

Definition at line 431 of file TEcnaRun.h.

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

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

Definition at line 460 of file TEcnaRun.h.

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

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

Definition at line 505 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_hf_cor
private

Definition at line 490 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_hf_cov
private

Definition at line 486 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_hfcc_mostins
private

Definition at line 499 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_lf_cor
private

Definition at line 481 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_lf_cov
private

Definition at line 477 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT2d1_lfcc_mostins
private

Definition at line 495 of file TEcnaRun.h.

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

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

Definition at line 430 of file TEcnaRun.h.

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

Int_t** TEcnaRun::fT2dCrysNumbersTable
private

Definition at line 504 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT3d1_AdcValues
private

Definition at line 416 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT3d1_cor_ss
private

Definition at line 441 of file TEcnaRun.h.

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

Double_t* TEcnaRun::fT3d1_cov_ss
private

Definition at line 436 of file TEcnaRun.h.

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

Double_t** TEcnaRun::fT3d2_AdcValues
private

Definition at line 415 of file TEcnaRun.h.

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

Double_t** TEcnaRun::fT3d2_cor_ss
private

Definition at line 440 of file TEcnaRun.h.

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

Double_t** TEcnaRun::fT3d2_cov_ss
private

Definition at line 435 of file TEcnaRun.h.

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

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