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: 16/02/2011 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_cna_1.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 20 of file TEcnaRun.cc.

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

Definition at line 27 of file TEcnaRun.cc.

References TEcnaObject::GetPointerValue(), and TEcnaObject::RegisterPointer().

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

Definition at line 78 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaObject::GetPointerValue(), and TEcnaObject::RegisterPointer().

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

Definition at line 298 of file TEcnaRun.cc.

References gather_cfg::cout.

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

Definition at line 327 of file TEcnaRun.cc.

References gather_cfg::cout, and i.

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

References gather_cfg::cout.

2134 {
2135 // Calculation of the average
2136 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the High Frequency Noise
2137 
2138  //... preliminary calculation of the High Frequency Noise if not done yet
2139  if ( fTagHfn[0] != 1 ){HighFrequencyNoise(); fTagHfn[0]=0;}
2140  //................... Allocation av_hifn + init to zero (mandatory)
2141  if( fT1d_av_hifn == 0 ){fT1d_av_hifn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2142  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2143  {if( fT1d_av_hifn[i0StexStinEcna] != (Double_t)0 )
2144  {fMiscDiag[44]++; fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;}}
2145 
2146  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageHighFrequencyNoise()" << endl;}
2148  cout << " Calculation, for all the "
2149  << fStinName.Data() << "s, of the average High Frequency Noise" << endl;}
2150 
2151  //................... Calculation
2152  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2153  {
2154  Int_t n1StexStinEcna = i0StexStinEcna+1;
2155  fT1d_av_hifn[i0StexStinEcna] = (Double_t)0;
2156  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2157  {
2158  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2159 
2160  if( fStexName == "SM " )
2161  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2162 
2163  if( fStexName == "Dee" )
2164  {
2165  //---------------- Special translation for mixed SCEcna (29 and 32)
2166  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2167  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2168  Int_t n1StinEcha = i0StinEcha+1;
2169  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2170  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2171  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2172  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2173  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2174  {fT1d_av_hifn[i0StexStinEcna] += fT1d_evevt_of_sigsamp[i0StexEcha];}
2175  }
2176  }
2177  Double_t xdivis = (Double_t)0.;
2178  if( fStexName == "SM " )
2179  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2180  if( fStexName == "Dee" )
2181  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2182 
2183  fT1d_av_hifn[i0StexStinEcna] = fT1d_av_hifn[i0StexStinEcna]/xdivis;
2184  }
2185  fTagAvHfn[0] = 1; fFileHeader->fAvHfnCalc++;
2186 }
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:1749
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 2073 of file TEcnaRun.cc.

References gather_cfg::cout.

2074 {
2075 // Calculation of the average
2076 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Low Frequency Noise
2077 
2078  //... preliminary calculation of the Low Frequency Noise if not done yet
2079  if ( fTagLfn[0] != 1 ){LowFrequencyNoise(); fTagLfn[0]=0;}
2080  //................... Allocation av_lofn + init to zero (mandatory)
2081  if( fT1d_av_lofn == 0 ){fT1d_av_lofn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2082  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2083  {if( fT1d_av_lofn[i0StexStinEcna] != (Double_t)0 )
2084  {fMiscDiag[43]++; fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;}}
2085 
2086  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageLowFrequencyNoise()" << endl;}
2088  cout << " Calculation, for all the "
2089  << fStinName.Data() << "s, of the average Low Frequency Noise" << endl;}
2090 
2091  //................... Calculation
2092  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2093  {
2094  Int_t n1StexStinEcna = i0StexStinEcna+1;
2095  fT1d_av_lofn[i0StexStinEcna] = (Double_t)0;
2096  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2097  {
2098  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2099 
2100  if( fStexName == "SM " )
2101  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2102 
2103  if( fStexName == "Dee" )
2104  {
2105  //---------------- Special translation for mixed SCEcna (29 and 32)
2106  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2107  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2108  Int_t n1StinEcha = i0StinEcha+1;
2109  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2110  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2111  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2112  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2113  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2114  {fT1d_av_lofn[i0StexStinEcna] += fT1d_sigevt_of_evsamp[i0StexEcha];}
2115  }
2116  }
2117  Double_t xdivis = (Double_t)0.;
2118  if( fStexName == "SM " )
2119  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2120  if( fStexName == "Dee" )
2121  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2122 
2123  fT1d_av_lofn[i0StexStinEcna] = fT1d_av_lofn[i0StexStinEcna]/xdivis;
2124  }
2125  fTagAvLfn[0] = 1; fFileHeader->fAvLfnCalc++;
2126 }
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:1679
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 2193 of file TEcnaRun.cc.

References gather_cfg::cout.

2194 {
2195 // Calculation of the average
2196 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the mean cor(s,s)
2197 
2198  //... preliminary calculation of the mean cor(s,s) if not done yet
2200  //................... Allocation av_ev_corss + init to zero (mandatory)
2201  if( fT1d_av_ev_corss == 0 ){fT1d_av_ev_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2202  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2203  {if( fT1d_av_ev_corss[i0StexStinEcna] != (Double_t)0 )
2204  {fMiscDiag[45]++; fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;}}
2205 
2206  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageMeanCorrelationsBetweenSamples()" << endl;}
2208  cout << " Calculation, for all the "
2209  << fStinName.Data() << "s, of the average mean cor(s,s)" << endl;}
2210 
2211  //................... Calculation
2212  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2213  {
2214  Int_t n1StexStinEcna = i0StexStinEcna+1;
2215  fT1d_av_ev_corss[i0StexStinEcna] = (Double_t)0;
2216  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2217  {
2218  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2219 
2220  if( fStexName == "SM " )
2221  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2222 
2223  if( fStexName == "Dee" )
2224  {
2225  //---------------- Special translation for mixed SCEcna (29 and 32)
2226  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2227  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2228  Int_t n1StinEcha = i0StinEcha+1;
2229  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2230  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2231  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2232  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2233  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2234  {fT1d_av_ev_corss[i0StexStinEcna] += fT1d_ev_cor_ss[i0StexEcha];}
2235  }
2236  }
2237  Double_t xdivis = (Double_t)0.;
2238  if( fStexName == "SM " )
2239  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2240  if( fStexName == "Dee" )
2241  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2242 
2243  fT1d_av_ev_corss[i0StexStinEcna] = fT1d_av_ev_corss[i0StexStinEcna]/xdivis;
2244  }
2246 }
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:1821
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 1952 of file TEcnaRun.cc.

References gather_cfg::cout.

1953 {
1954 // Calculation of the average
1955 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Pedestals
1956 
1957  //... preliminary calculation of the Pedestals if not done yet
1958  if ( fTagPed[0] != 1 ){Pedestals(); fTagPed[0]=0;}
1959  //................... Allocation av_mped + init to zero (mandatory)
1960  if( fT1d_av_mped == 0 ){fT1d_av_mped = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
1961  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1962  {if( fT1d_av_mped[i0StexStinEcna] != (Double_t)0 )
1963  {fMiscDiag[41]++; fT1d_av_mped[i0StexStinEcna] = (Double_t)0;}}
1964 
1965  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AveragePedestals()" << endl;}
1967  cout << " Calculation, for all the "
1968  << fStinName.Data() << "s, of the average Pedestals" << endl;}
1969 
1970  //................... Calculation
1971  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
1972  {
1973  Int_t n1StexStinEcna = i0StexStinEcna+1;
1974  fT1d_av_mped[i0StexStinEcna] = (Double_t)0;
1975  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
1976  {
1977  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
1978 
1979  if( fStexName == "SM " )
1980  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1981 
1982  if( fStexName == "Dee" )
1983  {
1984  //---------------- Special translation for mixed SCEcna (29 and 32)
1985  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
1986  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
1987  Int_t n1StinEcha = i0StinEcha+1;
1988  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
1989  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
1990  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
1991  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
1992  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
1993  {fT1d_av_mped[i0StexStinEcna] += fT1d_ev_ev[i0StexEcha];}
1994  }
1995  }
1996  Double_t xdivis = (Double_t)0.;
1997  if( fStexName == "SM " )
1998  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
1999  if( fStexName == "Dee" )
2000  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2001 
2002  fT1d_av_mped[i0StexStinEcna] = fT1d_av_mped[i0StexStinEcna]/xdivis;
2003  }
2004 
2005  fTagAvPed[0] = 1; fFileHeader->fAvPedCalc++;
2006 }
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:1581
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 2253 of file TEcnaRun.cc.

References gather_cfg::cout.

2254 {
2255 // Calculation of the average
2256 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the sigma of cor(s,s)
2257 
2258  //... preliminary calculation of the sigma of cor(s,s) if not done yet
2260  //................... Allocation av_sig_corss + init to zero (mandatory)
2261  if( fT1d_av_sig_corss == 0 ){fT1d_av_sig_corss = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2262  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2263  {if( fT1d_av_sig_corss[i0StexStinEcna] != (Double_t)0 )
2264  {fMiscDiag[46]++; fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;}}
2265 
2266  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageSigmaOfCorrelationsBetweenSamples()" << endl;}
2268  cout << " Calculation, for all the "
2269  << fStinName.Data() << "s, of the average sigma of cor(s,s)" << endl;}
2270 
2271  //................... Calculation
2272  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2273  {
2274  Int_t n1StexStinEcna = i0StexStinEcna+1;
2275  fT1d_av_sig_corss[i0StexStinEcna] = (Double_t)0;
2276  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2277  {
2278  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2279 
2280  if( fStexName == "SM " )
2281  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2282 
2283  if( fStexName == "Dee" )
2284  {
2285  //---------------- Special translation for mixed SCEcna (29 and 32)
2286  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2287  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2288  Int_t n1StinEcha = i0StinEcha+1;
2289  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2290  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2291  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2292  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2293  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2294  {fT1d_av_sig_corss[i0StexStinEcna] += fT1d_sig_cor_ss[i0StexEcha];}
2295  }
2296  }
2297  Double_t xdivis = (Double_t)0.;
2298  if( fStexName == "SM " )
2299  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2300  if( fStexName == "Dee" )
2301  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2302 
2303  fT1d_av_sig_corss[i0StexStinEcna] = fT1d_av_sig_corss[i0StexStinEcna]/xdivis;
2304  }
2306 }
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:1887
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 2013 of file TEcnaRun.cc.

References gather_cfg::cout.

2014 {
2015 // Calculation of the average
2016 // (over the Stin's 0 to fEcal->MaxStinInStex()) of the Total Noise
2017 
2018  //... preliminary calculation of the averaged Total Noise if not done yet
2019  if ( fTagTno[0] != 1 ){TotalNoise(); fTagTno[0]=0;}
2020  //................... Allocation av_totn + init to zero (mandatory)
2021  if( fT1d_av_totn == 0 ){fT1d_av_totn = new Double_t[fEcal->MaxStinEcnaInStex()]; fCnew++;}
2022  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2023  {if( fT1d_av_totn[i0StexStinEcna] != (Double_t)0 )
2024  {fMiscDiag[42]++; fT1d_av_totn[i0StexStinEcna] = (Double_t)0;}}
2025 
2026  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::AverageTotalNoise()" << endl;}
2028  cout << " Calculation, for all the "
2029  << fStinName.Data() << "s, of the average total Noise" << endl;}
2030 
2031  //................... Calculation
2032  for(Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2033  {
2034  Int_t n1StexStinEcna = i0StexStinEcna+1;
2035  fT1d_av_totn[i0StexStinEcna] = (Double_t)0;
2036  for(Int_t i0StinEcha = 0; i0StinEcha < fEcal->MaxCrysInStin(); i0StinEcha++)
2037  {
2038  Int_t i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(n1StexStinEcna, i0StinEcha);
2039 
2040  if( fStexName == "SM " )
2041  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2042 
2043  if( fStexName == "Dee" )
2044  {
2045  //---------------- Special translation for mixed SCEcna (29 and 32)
2046  // Xtal 11 of SCEcna 29 -> Xtal 11 of SCEcna 10
2047  // Xtal 11 of SCEcna 32 -> Xtal 11 of SCEcna 11
2048  Int_t n1StinEcha = i0StinEcha+1;
2049  if( n1StexStinEcna == 10 && n1StinEcha == 11 )
2050  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(29, i0StinEcha);}
2051  if( n1StexStinEcna == 11 && n1StinEcha == 11 )
2052  {i0StexEcha = fEcalNumbering->Get0StexEchaFrom1StexStinAnd0StinEcha(32, i0StinEcha);}
2053  if( !( (n1StexStinEcna == 29 || n1StexStinEcna == 32) && n1StinEcha == 11 ) )
2054  {fT1d_av_totn[i0StexStinEcna] += fT1d_evsamp_of_sigevt[i0StexEcha];}
2055  }
2056  }
2057  Double_t xdivis = (Double_t)0.;
2058  if( fStexName == "SM " )
2059  {xdivis = (Double_t)fEcal->MaxCrysInStin();}
2060  if( fStexName == "Dee" )
2061  {xdivis = (Double_t)fEcalNumbering->MaxCrysInStinEcna(fFileHeader->fStex, n1StexStinEcna, "TEcnaRun");}
2062 
2063  fT1d_av_totn[i0StexStinEcna] = fT1d_av_totn[i0StexStinEcna]/xdivis;
2064  }
2065  fTagAvTno[0] = 1; fFileHeader->fAvTnoCalc++;
2066 }
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:1626
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 2970 of file TEcnaRun.cc.

References TEcnaRootFile::CloseFile(), gather_cfg::cout, and gCnaRootFile.

2970  {
2971 //Close the Root file
2972 
2973  TString s_name;
2974  s_name = fCnaParPaths->ResultsRootFilePath();
2975  s_name.Append('/');
2976  s_name.Append(name);
2977 
2978  Bool_t ok_close = kFALSE;
2979 
2980  if (fOpenRootFile == kTRUE )
2981  {
2983 
2985  cout << "*TEcnaRun::CloseRootFile> ROOT file " << s_name.Data() << " closed." << endl;}
2986 
2987  // delete gCnaRootFile; gCnaRootFile = 0; fCdelete++;
2988 
2989  fOpenRootFile = kFALSE;
2990  ok_close = kTRUE;
2991  }
2992  else
2993  {
2994  cout << "*TEcnaRun::CloseRootFile(...)> No close since no file is open."
2995  << fTTBELL << endl;
2996  }
2997  return ok_close;
2998 }
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 1507 of file TEcnaRun.cc.

References gather_cfg::cout, i, j, and mathSSE::sqrt().

1508 {
1509 //Calculation of the correlations between samples for all the StexEchas
1510 
1511  //... preliminary calculation of the covariances if not done yet.
1512  // Test only the first tag since the cov are computed globaly
1513  // but set all the tags to 0 because we don't want to write
1514  // the covariances in the result ROOT file
1515  if ( fTagCovCss[0] != 1 ){CovariancesBetweenSamples();
1516  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1517  {fTagCovCss[j0StexEcha] = 0;}}
1518 
1519  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CorrelationsBetweenSamples()" << endl;}
1521  cout << " Calculation: correlations between samples"
1522  << " for each channel." << endl;}
1523 
1524  //................... Allocations cor_ss
1525  if( fT3d_cor_ss == 0){
1526  const Int_t n_samp = fNbSampForCalc;
1527  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1528  fT3d_cor_ss = new Double_t**[n_StexEcha]; fCnew++;
1529  fT3d2_cor_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1530  fT3d1_cor_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1531  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1532  fT3d_cor_ss[i] = &fT3d2_cor_ss[0] + i*n_samp;
1533  for(Int_t j = 0 ; j < n_samp ; j++){
1534  fT3d2_cor_ss[n_samp*i+j] = &fT3d1_cor_ss[0]+n_samp*(n_samp*i+j);}}
1535  }
1536 
1537  //..................... calculation of the correlations (=init)
1538  //......................computation of half of the matrix, diagonal included (verif = 1)
1539 
1540  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1541  {
1542  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1543  {
1544  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample ; j0Sample++)
1545  {
1546  if( (fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample] > 0) &&
1547  (fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample] > 0) )
1548  {
1549  fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample]/
1550  ( sqrt(fT3d_cov_ss[j0StexEcha][i0Sample][i0Sample])*sqrt(fT3d_cov_ss[j0StexEcha][j0Sample][j0Sample]) );
1551  }
1552  else
1553  {
1554  (fT3d_cor_ss)[j0StexEcha][i0Sample][j0Sample] = (Double_t)0; // prevoir compteur + fTTBELL
1555  }
1556  fT3d_cor_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cor_ss[j0StexEcha][i0Sample][j0Sample];
1557  }
1558  }
1559  fTagCorCss[j0StexEcha] = 1; fFileHeader->fCorCssCalc++;
1560  }
1561 }
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:1447
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 1447 of file TEcnaRun.cc.

References gather_cfg::cout, i, and j.

1448 {
1449  //Calculation of the covariances between samples for all the StexEchas
1450 
1451  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::CovariancesBetweenSamples()" << endl;}
1453  cout << " Calculation: covariances between samples"
1454  << " for each channel." << endl;}
1455 
1456  //................... Allocations cov_ss
1457  if( fT3d_cov_ss == 0 ){
1458  const Int_t n_samp = fNbSampForCalc;
1459  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1460  fT3d_cov_ss = new Double_t**[n_StexEcha]; fCnew++;
1461  fT3d2_cov_ss = new Double_t*[n_StexEcha*n_samp]; fCnew++;
1462  fT3d1_cov_ss = new Double_t[n_StexEcha*n_samp*n_samp]; fCnew++;
1463  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1464  fT3d_cov_ss[i] = &fT3d2_cov_ss[0] + i*n_samp;
1465  for(Int_t j = 0 ; j < n_samp ; j++){
1466  fT3d2_cov_ss[n_samp*i+j] = &fT3d1_cov_ss[0]+n_samp*(n_samp*i+j);}}
1467  }
1468 
1469  //.................. Calculation (= init)
1470  //.................. computation of half of the matrix, diagonal included)
1471 
1472  //... preliminary calculation of the expectation values if not done yet.
1473  // The tag is set to 1 after call to the method. It is reset to 0
1474  // because the expectation values must not be written in the result ROOT file
1475  // (since the tag was equal to 0)
1476  // Results in array fT2d_ev[j0StexEcha][i0Sample]
1477  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1478 
1479 
1480  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
1481  {
1482  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1483  {
1484  for (Int_t j0Sample = 0 ; j0Sample <= i0Sample; j0Sample++)
1485  {
1486  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] = (Double_t)0;
1487  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1488  {
1489  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] +=
1490  (fT3d_AdcValues[j0StexEcha][i0Sample][i_event] - fT2d_ev[j0StexEcha][i0Sample])
1491  *(fT3d_AdcValues[j0StexEcha][j0Sample][i_event] - fT2d_ev[j0StexEcha][j0Sample]);
1492  }
1493  fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample] /= (Double_t)fNumberOfEvents;
1494  fT3d_cov_ss[j0StexEcha][j0Sample][i0Sample] = fT3d_cov_ss[j0StexEcha][i0Sample][j0Sample];
1495  }
1496  }
1497  fTagCovCss[j0StexEcha] = 1; fFileHeader->fCovCssCalc++;
1498  }
1499 }
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:1327
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 1297 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

1298 {
1299  // long time, big file
1300 
1303 }
void HighFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2638
void LowFrequencyCorrelationsBetweenChannels()
Definition: TEcnaRun.cc:2438
void TEcnaRun::Expert2Calculations ( )

Definition at line 1305 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

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

Definition at line 3101 of file TEcnaRun.cc.

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

Definition at line 3102 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

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

Definition at line 134 of file TEcnaRun.cc.

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

Definition at line 1217 of file TEcnaRun.cc.

References gather_cfg::cout.

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

1218 {
1219 //
1220  // MAKE THE RESULTS FILE NAME and
1221  // CHECK OF THE NUMBER OF FOUND EVENTS AND init fNumberOfEvents
1222  // (number used to compute the average values over the events)
1223  // The number of events fNumberOfEvents is extracted from the array fT2d_NbOfEvts[]
1224  // which has been filled by the GetSampleAdcValues(...) method
1225 
1226  //..................... Making of the Root File name that will be written
1231 
1232  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
1233 
1234  //..................... Checking numbers of found events channel by channel
1235  if( fT2d_NbOfEvts != 0 )
1236  {
1239  }
1240  else
1241  {
1242  cout << "*TEcnaRun::GetReadyToCompute()> no data? fT2d_NbOfEvts = " << fT2d_NbOfEvts << endl;
1243  }
1244 }
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 505 of file TEcnaRun.cc.

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

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

References dtNoiseDBValidation_cfg::cerr, and gather_cfg::cout.

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

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

Definition at line 1184 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

1184 {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 836 of file TEcnaRun.cc.

References gather_cfg::cout.

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

References gather_cfg::cout, and mathSSE::sqrt().

2639 {
2640 //Calculation of the High Frequency Correlations between channels
2641 
2642  //... preliminary calculation of the covariances if not done yet.
2643  if ( fTagHfCov[0] != 1 )
2645 
2646  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyCorrelationsBetweenChannels()" << endl;}
2648  cout << " Calculation of the High Frequency Correlations between channels" << endl
2649  << " Starting allocation. "
2650  << endl;}
2651 
2652  //................. allocation fT2d_hf_cor + init to zero (mandatory)
2653  if( fT2d_hf_cor == 0 ){
2654  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2655  fT2d_hf_cor = new Double_t*[n_StexEcha]; fCnew++;
2656  fT2d1_hf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2657  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2658  fT2d_hf_cor[i0StexEcha] = &fT2d1_hf_cor[0] + i0StexEcha*n_StexEcha;}
2659  }
2660 
2661  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2662  {
2663  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2664  {
2665  if( fT2d_hf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2666  {fMiscDiag[24]++; fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2667  }
2668  }
2669 
2670  //................. calculation
2671  //........................... computation of half of the matrix, diagonal included
2672 
2673  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2674  {
2675  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2676  || ( fFlagSubDet == "EB") )
2677  {
2678  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2679  {
2680  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2681  || ( fFlagSubDet == "EB") )
2682  {
2683  if( fT2d_hf_cov[i0StexEcha][i0StexEcha] > 0
2684  && fT2d_hf_cov[j0StexEcha][j0StexEcha] > 0 )
2685  {
2686  fT2d_hf_cor[i0StexEcha][j0StexEcha] =
2687  fT2d_hf_cov[i0StexEcha][j0StexEcha]/
2688  ( (Double_t)sqrt(fT2d_hf_cov[i0StexEcha][i0StexEcha]) *
2689  (Double_t)sqrt(fT2d_hf_cov[j0StexEcha][j0StexEcha]) );
2690  }
2691  else
2692  {
2693  fT2d_hf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2694  }
2695 
2696  fT2d_hf_cor[j0StexEcha][i0StexEcha] = fT2d_hf_cor[i0StexEcha][j0StexEcha];
2697  }
2698  }
2699  }
2700  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[HFN Cor], ";}
2701  }
2702  cout << endl;
2703 
2704  fTagHfCor[0] = 1; fFileHeader->fHfCorCalc++;
2705 }
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:2521
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 2521 of file TEcnaRun.cc.

References gather_cfg::cout.

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

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

Definition at line 2822 of file TEcnaRun.cc.

References gather_cfg::cout, and i.

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

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

Definition at line 1749 of file TEcnaRun.cc.

References gather_cfg::cout, i, and mathSSE::sqrt().

1750 {
1751 // Calculation, for each channel, of the mean (over the events)
1752 // of the ADC sigmas (over the samples 0 to fNbSampForCalc-1)
1753 
1754  //................... Allocation fT1d_evevt_of_sigsamp + init to zero (mandatory)
1755  if( fT1d_evevt_of_sigsamp == 0 ){
1756  fT1d_evevt_of_sigsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1757  }
1758  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1759  {
1760  if( fT1d_evevt_of_sigsamp[i0StexEcha] != (Double_t)0 )
1761  {fMiscDiag[14]++; fT1d_evevt_of_sigsamp[i0StexEcha] = (Double_t)0;}
1762  }
1763 
1764  //................... Allocations mean_over_samples, sigma_over_sample
1765  TVectorD mean_over_samples(fNumberOfEvents);
1766  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1767  TVectorD sigma_over_samples(fNumberOfEvents);
1768  for(Int_t i=0; i<fNumberOfEvents; i++){sigma_over_samples(i)=(Double_t)0.;}
1769 
1770  //..................... Calculation
1771  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::HighFrequencyNoise()" << endl;}
1773  cout << " Calculation, for each channel, of the sigma (over the events)" << endl
1774  << " of the ADC expectation values (over the samples 1 to "
1775  << fNbSampForCalc << ")." << endl;}
1776 
1777  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1778  {
1779  //..................... Calculation of the sigma over samples
1780  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1781  {
1782  // Calculation, for each event, of the mean over the samples
1783  mean_over_samples(n_event) = (Double_t)0.;
1784  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1785  {mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];}
1786  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1787 
1788  // Calculation, for each event, of the sigma over the samples
1789  Double_t var_over_samples = (Double_t)0;
1790  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1791  {Double_t deviation = fT3d_AdcValues[i0StexEcha][i0Sample][n_event] - mean_over_samples(n_event);
1792  var_over_samples += deviation*deviation;}
1793  var_over_samples /= (Double_t)fNbSampForCalc;
1794 
1795  if( var_over_samples < 0)
1796  {cout << "!TEcnaRun::HighFrequencyNoise() *** ERROR ***> Negative variance! " << fTTBELL << endl;}
1797  else
1798  {sigma_over_samples(n_event) = sqrt(var_over_samples);}
1799  }
1800 
1801  //....... Calculation of the mean over the events of the sigma over samples
1802  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1803  {fT1d_evevt_of_sigsamp[i0StexEcha] += sigma_over_samples(n_event);}
1804 
1805  fT1d_evevt_of_sigsamp[i0StexEcha] /= (Double_t)fNumberOfEvents;
1806  }
1807  fTagHfn[0] = 1; fFileHeader->fHfnCalc++;
1808 }
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 gCnaRootFile.

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:71
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 2438 of file TEcnaRun.cc.

References gather_cfg::cout, and mathSSE::sqrt().

2439 {
2440 //Calculation of the Low Frequency Correlations between channels
2441 
2442  //... preliminary calculation of the covariances if not done yet.
2443  if ( fTagLfCov[0] != 1 )
2445 
2446  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyCorrelationsBetweenChannels()" << endl;}
2448  cout << " Calculation of the Low Frequency Correlations between channels" << endl
2449  << " Starting allocation. "
2450  << endl;}
2451 
2452  //................. allocation fT2d_lf_cor + init to zero (mandatory)
2453  if( fT2d_lf_cor == 0 ){
2454  const Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
2455  fT2d_lf_cor = new Double_t*[n_StexEcha]; fCnew++;
2456  fT2d1_lf_cor = new Double_t[n_StexEcha*n_StexEcha]; fCnew++;
2457  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
2458  fT2d_lf_cor[i0StexEcha] = &fT2d1_lf_cor[0] + i0StexEcha*n_StexEcha;}
2459  }
2460 
2461  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2462  {
2463  for (Int_t j0StexEcha = 0 ; j0StexEcha < fEcal->MaxCrysEcnaInStex() ; j0StexEcha++)
2464  {
2465  if( fT2d_lf_cor[i0StexEcha][j0StexEcha] != (Double_t)0 )
2466  {fMiscDiag[22]++; fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0;}
2467  }
2468  }
2469 
2470  //................. calculation
2471  //........................... computation of half of the matrix, diagonal included
2472  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
2473  {
2474  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, i0StexEcha) > 0)
2475  || ( fFlagSubDet == "EB") )
2476  {
2477  for (Int_t j0StexEcha = 0 ; j0StexEcha <= i0StexEcha ; j0StexEcha++)
2478  {
2479  if( (fFlagSubDet == "EE" && fEcalNumbering->StexEchaForCons(fFileHeader->fStex, j0StexEcha) > 0)
2480  || ( fFlagSubDet == "EB") )
2481  {
2482  if( fT2d_lf_cov[i0StexEcha][i0StexEcha] > 0
2483  && fT2d_lf_cov[j0StexEcha][j0StexEcha] > 0 )
2484  {
2485  fT2d_lf_cor[i0StexEcha][j0StexEcha] =
2486  fT2d_lf_cov[i0StexEcha][j0StexEcha]/
2487  ( (Double_t)sqrt( fT2d_lf_cov[i0StexEcha][i0StexEcha]*
2488  fT2d_lf_cov[j0StexEcha][j0StexEcha] ) );
2489  }
2490  else
2491  {
2492  fT2d_lf_cor[i0StexEcha][j0StexEcha] = (Double_t)0.;
2493  }
2494  fT2d_lf_cor[j0StexEcha][i0StexEcha] = fT2d_lf_cor[i0StexEcha][j0StexEcha];
2495  }
2496  }
2497  }
2498  if( i0StexEcha%100 == 0 ){cout << i0StexEcha << "[LFN Cor], ";}
2499  }
2500  cout << endl;
2501 
2502  fTagLfCor[0] = 1; fFileHeader->fLfCorCalc++;
2503 }
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:2333
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 2333 of file TEcnaRun.cc.

References gather_cfg::cout.

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

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

Definition at line 2724 of file TEcnaRun.cc.

References gather_cfg::cout, and i.

2725 {
2726 //Calculation of the mean Low Frequency Correlations
2727 //between channels for each Stin
2728 
2729  //... preliminary calculation of the Low Frequency Cor(c,c) if not done yet
2730  // Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
2732 
2733  //..... mean fT2d_lfcc_mostins for each pair (Stin_X,Stin_Y)
2734  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2736  cout << " Calculation of the mean, for each "
2737  << fStinName.Data() << ", of the" << endl
2738  << " Low Frequency Correlations between channels." << endl;}
2739 
2740  //................. allocation fT2d_lfcc_mostins + init to zero (mandatory)
2741  if( fT2d_lfcc_mostins == 0 ){
2742  const Int_t n_Stin = fEcal->MaxStinEcnaInStex();
2743  fT2d_lfcc_mostins = new Double_t*[n_Stin]; fCnew++;
2744  fT2d1_lfcc_mostins = new Double_t[n_Stin*n_Stin]; fCnew++;
2745  for(Int_t i0StexStinEcna = 0 ; i0StexStinEcna < n_Stin ; i0StexStinEcna++){
2746  fT2d_lfcc_mostins[i0StexStinEcna] = &fT2d1_lfcc_mostins[0] + i0StexStinEcna*n_Stin;}
2747  }
2748 
2749  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2750  {
2751  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2752  {
2753  if( fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] != (Double_t)0 )
2754  {fMiscDiag[31]++; fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;}
2755  }
2756  }
2757 
2758  //..... Calculation of the mean LF Cor(c,c) for each pair (Stin_X,Stin_Y)
2759  //
2760  // ! => Warning: this matrix is NOT symmetric => take N*N elements
2761  // Only (Stin,Stin) matrix is symmetric.
2762  // (StinEcha,StinEcha) matrix inside a (Stin,Stin) element is NOT symmetric
2763  // (except for the (Stin,Stin) DIAGONAL elements)
2764  // Then:
2765  // 1D array half_LFccMos[N*N] to put the (channel,channel) correlations
2766 
2767  Int_t ndim = (Int_t)(fEcal->MaxCrysInStin()*fEcal->MaxCrysInStin());
2768 
2769  TVectorD half_LFccMos(ndim); for(Int_t i=0; i<ndim; i++){half_LFccMos(i)=(Double_t)0.;}
2770 
2771  //..................... Calculation
2772  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()" << endl;}
2774  cout << " Calculation, for each "
2775  << fStinName.Data() << ", of the mean " << endl
2776  << " Low Frequency cor(c,c)." << endl;}
2777 
2778  for(Int_t i0StexStinEcna=0; i0StexStinEcna<fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
2779  {
2780  for(Int_t j0StexStinEcna=0; j0StexStinEcna<fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
2781  {
2782  //................... .Copy the Mean Correlations(c,c') in 1D vector half_LFccMos()
2783  Int_t i_count = 0;
2784  for(Int_t i0StinCrys=0; i0StinCrys<fEcal->MaxCrysInStin(); i0StinCrys++)
2785  {
2786  Int_t i0StexEcha = i0StexStinEcna*fEcal->MaxCrysInStin() + i0StinCrys;
2787  for(Int_t j0StinCrys=0; j0StinCrys<fEcal->MaxCrysInStin(); j0StinCrys++)
2788  {
2789  Int_t j0StexEcha = j0StexStinEcna*fEcal->MaxCrysInStin() + j0StinCrys;
2790  if( (i0StexEcha>= 0 && i0StexEcha < fEcal->MaxCrysEcnaInStex()) &&
2791  (j0StexEcha>= 0 && j0StexEcha < fEcal->MaxCrysEcnaInStex()) )
2792  {half_LFccMos(i_count) = fT2d_lf_cor[i0StexEcha][j0StexEcha]; i_count++;}
2793  else
2794  {cout << "!TEcnaRun::LowFrequencyMeanCorrelationsBetweenStins()> Channel number out of range."
2795  << "i0StexEcha = " << i0StexEcha <<", j0StexEcha = " << j0StexEcha << fTTBELL << endl; }
2796  }
2797  }
2798  //...... Calculation of the mean absolute values of the LF mean Correlations(c,c')
2799  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] = (Double_t)0;
2800  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
2801  {
2802  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] += fabs(half_LFccMos(i_rcor));
2803  }
2804  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna] /= (Double_t)ndim;
2805  }
2806  if( i0StexStinEcna%10 == 0 ){cout << i0StexStinEcna << "[LFN MCtt], ";}
2807  }
2808  cout << endl;
2809 
2811 } // ------- 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:2438
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 2719 of file TEcnaRun.cc.

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

Definition at line 1679 of file TEcnaRun.cc.

References gather_cfg::cout, i, and mathSSE::sqrt().

1680 {
1681 // Calculation, for each channel, of the sigma (over the events)
1682 // of the ADC expectation values (over the samples 0 to fNbSampForCalc-1)
1683 
1684  //................... Allocation fT1d_sigevt_of_evsamp + init to zero (mandatory)
1685  if( fT1d_sigevt_of_evsamp == 0 ){
1686  fT1d_sigevt_of_evsamp = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;
1687  }
1688  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1689  {
1690  if( fT1d_sigevt_of_evsamp[i0StexEcha] != (Double_t)0 )
1691  {fMiscDiag[13]++; fT1d_sigevt_of_evsamp[i0StexEcha] = (Double_t)0;}
1692  }
1693 
1694  //................... Allocation mean_over_samples
1695  TVectorD mean_over_samples(fNumberOfEvents);
1696  for(Int_t i=0; i<fNumberOfEvents; i++){mean_over_samples(i)=(Double_t)0.;}
1697 
1698  //..................... Calculation
1699  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::LowFrequencyNoise()" << endl;}
1701  cout << " Calculation, for each channel, of the sigma (over the events)" << endl
1702  << " of the ADC expectation values (over the samples 1 to "
1703  << fNbSampForCalc << ")." << endl;}
1704 
1705  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1706  {
1707  // Calculation of the mean over the events of the mean over the samples
1708  Double_t mean_over_events = (Double_t)0;
1709  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1710  {
1711  // Calculation, for each event, of the mean over the samples
1712  mean_over_samples(n_event) = (Double_t)0.;
1713  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1714  {
1715  mean_over_samples(n_event) += fT3d_AdcValues[i0StexEcha][i0Sample][n_event];
1716  }
1717  mean_over_samples(n_event) /= (Double_t)fNbSampForCalc;
1718 
1719  mean_over_events += mean_over_samples(n_event);
1720  }
1721  mean_over_events /= (Double_t)fNumberOfEvents;
1722 
1723  // Calculation of the sigma over the events of the mean over the samples
1724  Double_t var = (Double_t)0;
1725  for (Int_t n_event = 0; n_event < fNumberOfEvents; n_event++)
1726  {
1727  Double_t ecart = mean_over_samples(n_event) - mean_over_events;
1728  var += ecart*ecart;
1729  }
1730  var /= (Double_t)fNumberOfEvents;
1731 
1732  fT1d_sigevt_of_evsamp[i0StexEcha] = sqrt(var);
1733  }
1734  fTagLfn[0] = 1; fFileHeader->fLfnCalc++;
1735 }
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 1821 of file TEcnaRun.cc.

References gather_cfg::cout, and i.

1822 {
1823  // Calculation, for all the channels, of the expectation values
1824  // of the correlations between the first fNbSampForCalc samples
1825 
1826  //... preliminary calculation of the correlations if not done yet
1827  // (test only the first element since the cor are computed globaly)
1828  if ( fTagCorCss[0] != 1 ){CorrelationsBetweenSamples(); fTagCorCss[0]=0;}
1829 
1830  //................... Allocations ev_cor_ss + init to zero (mandatory)
1831  if( fT1d_ev_cor_ss == 0 ){
1832  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1833  fT1d_ev_cor_ss = new Double_t[n_StexEcha]; fCnew++;
1834  }
1835  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1836  {
1837  if( fT1d_ev_cor_ss[i0StexEcha] != (Double_t)0 )
1838  {fMiscDiag[15]++; fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;}
1839  }
1840 
1841  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
1842  // ( half of (them minus the diagonal) )
1843  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1844 
1845  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
1846 
1847  //..................... Calculation
1848  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::MeanCorrelationsBetweenSamples()" << endl;}
1850  cout << " Calculation, for all the channels, of the expectation values of the" << endl
1851  << " correlations between the first " << fNbSampForCalc << " samples." << endl;}
1852 
1853  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1854  {
1855  //..................... half_cor_ss() array filling
1856  Int_t i_count = 0;
1857  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1858  {
1859  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1860  {
1861  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1862  i_count++;
1863  }
1864  }
1865  //...................... mean cor(s,s') calculation
1866  fT1d_ev_cor_ss[i0StexEcha] = (Double_t)0;
1867  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1868  {
1869  fT1d_ev_cor_ss[i0StexEcha] += half_cor_ss(i_rcor);
1870  }
1871  fT1d_ev_cor_ss[i0StexEcha] /= (Double_t)ndim;
1872  }
1874 }
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:1507
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 2927 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaRootFile::fRootFileStatus, gCnaRootFile, TEcnaRootFile::OpenR(), TEcnaRootFile::OpenW(), TEcnaRootFile::ReStart(), and ntuplemaker::status.

2927  {
2928 //Open the Root file
2929 
2930  Bool_t ok_open = kFALSE;
2931 
2932  TString s_name;
2933  s_name = fCnaParPaths->ResultsRootFilePath();
2934  s_name.Append('/');
2935  s_name.Append(name);
2936 
2937  //gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); fCnew++;
2938 
2939  Long_t iCnaRootFile = fObjectManager->GetPointerValue("TEcnaRootFile");
2940  if( iCnaRootFile == 0 )
2941  {
2942  gCnaRootFile = new TEcnaRootFile(fObjectManager, s_name.Data(), status); /* Anew("gCnaRootFile");*/
2943  }
2944  else
2945  {
2946  gCnaRootFile = (TEcnaRootFile*)iCnaRootFile;
2947  gCnaRootFile->ReStart(s_name.Data(), status);
2948  }
2949 
2950  if ( gCnaRootFile->fRootFileStatus == "RECREATE" ){ok_open = gCnaRootFile->OpenW();}
2951  if ( gCnaRootFile->fRootFileStatus == "READ" ){ok_open = gCnaRootFile->OpenR();}
2952 
2953  if (!ok_open) // unable to open file
2954  {
2955  cout << "TEcnaRun::OpenRootFile> Cannot open file " << s_name.Data() << endl;
2956  }
2957  else
2958  {
2960  {cout << "*TEcnaRun::OpenRootFile> Open ROOT file OK for file " << s_name.Data() << endl;}
2961  fOpenRootFile = kTRUE;
2962  }
2963  return ok_open;
2964 }
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:230
void TEcnaRun::Pedestals ( )

Definition at line 1581 of file TEcnaRun.cc.

References gather_cfg::cout.

1582 {
1583 // Calculation, for each channel, of the expectation values
1584 // (over the samples 0 to fNbSampForCalc-1) of the ADC expectation values
1585 // (over the events)
1586 
1587  //... preliminary calculation of the expectation values if not done yet
1588  if ( fTagMSp[0] != 1 ){SampleMeans(); fTagMSp[0]=0;}
1589 
1590  //................... Allocation ev_ev + init to zero (mandatory)
1591  if( fT1d_ev_ev == 0 ){fT1d_ev_ev = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1592  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1593  {if( fT1d_ev_ev[i0StexEcha] != (Double_t)0 )
1594  {fMiscDiag[11]++; fT1d_ev_ev[i0StexEcha] = (Double_t)0;}}
1595 
1596  //..................... Calculation
1597  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::Pedestals()" << endl;}
1599  cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1600  << fNbSampForCalc << ")" << endl
1601  << " of the ADC expectation values (over the events)." << endl;}
1602 
1603  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1604  {
1605  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1606  {
1607  fT1d_ev_ev[i0StexEcha] += fT2d_ev[i0StexEcha][i0Sample];
1608  }
1609  fT1d_ev_ev[i0StexEcha] /= fNbSampForCalc;
1610  }
1611  fTagPed[0] = 1; fFileHeader->fPedCalc++;
1612 }
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:1327
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 4542 of file TEcnaRun.cc.

References gather_cfg::cout.

4543 {
4544 // Set flags to authorize printing of the comments of all the methods
4545 
4547  cout << "*TEcnaRun::PrintAllComments()> All the comments will be printed" << endl;
4548 }
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 4526 of file TEcnaRun.cc.

References gather_cfg::cout.

4527 {
4528 // Set flags to authorize printing of some comments concerning initialisations (default)
4529 
4531  cout << "*TEcnaRun::PrintComments()> Warnings and some comments on init will be printed" << endl;
4532 }
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 4550 of file TEcnaRun.cc.

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

Definition at line 4534 of file TEcnaRun.cc.

References gather_cfg::cout.

4535 {
4536 // Set flags to authorize printing of warnings
4537 
4539  cout << "*TEcnaRun::PrintWarnings()> Warnings will be printed" << endl;
4540 }
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 1055 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

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

Definition at line 1057 of file TEcnaRun.cc.

References gather_cfg::cout, TEcnaRead::DataExist(), TEcnaRead::FileParameters(), TEcnaRead::GetRootFileName(), TEcnaRead::GetRootFileNameShort(), TEcnaRead::GetStartDate(), TEcnaRead::GetStartTime(), TEcnaRead::GetStexStinFromIndex(), TEcnaRead::GetStopDate(), TEcnaRead::GetStopTime(), i, j, TEcnaRead::LookAtRootFile(), TEcnaRead::PrintNoComment(), TEcnaRead::ReadNumberOfEventsForSamples(), TEcnaRead::ReadSampleAdcValuesSameFile(), and TEcnaRead::ReadStinNumbers().

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

Definition at line 1327 of file TEcnaRun.cc.

References gather_cfg::cout, and i.

1328 {
1329 // Calculation of the expectation values over events
1330 // for the samples 0 to fNbSampForCalc and for all the StexEchas
1331 
1332  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleMeans() " << endl;}
1334  cout << " Calculation: sample expectation values over the events"
1335  << " for each channel." << endl;}
1336 
1337  //................... Allocation fT2d_ev
1338  if ( fT2d_ev == 0 ){
1339  Int_t n_samp = fNbSampForCalc;
1340  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1341  fT2d_ev = new Double_t*[n_StexEcha]; fCnew++;
1342  fT1d_ev = new Double_t[n_StexEcha*n_samp]; fCnew++;
1343  for(Int_t i = 0 ; i < n_StexEcha ; i++){
1344  fT2d_ev[i] = &fT1d_ev[0] + i*n_samp;}
1345  }
1346  //................... init fT2d_ev to zero
1347  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1348  {
1349  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1350  {
1351  if( fT2d_ev[i0StexEcha][i0Sample] != (Double_t)0 )
1352  {fMiscDiag[1]++; fT2d_ev[i0StexEcha][i0Sample] = (Double_t)0;}
1353  }
1354  }
1355 
1356  //................... Calculation
1357  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1358  {
1359  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1360  {
1361  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1362  {
1363  fT2d_ev[i0StexEcha][i0Sample] += fT3d_AdcValues[i0StexEcha][i0Sample][i_event];
1364  }
1365  fT2d_ev[i0StexEcha][i0Sample] /= fNumberOfEvents;
1366  }
1367  }
1368  fTagMSp[0] = 1; fFileHeader->fMSpCalc++;
1369 }
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 1379 of file TEcnaRun.cc.

References gather_cfg::cout, and mathSSE::sqrt().

1380 {
1381 //Calculation of the sigmas of the samples for all the StexEchas
1382 
1383  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SampleSigmas()" << endl;}
1385  cout << " Calculation: sample ADC sigmas over the events "
1386  << " for each channel." << endl;}
1387 
1388  //... preliminary calculation of the expectation values if not done yet.
1389  // The tag is set to 1 after call to the method. It is reset to 0
1390  // because the expectation values must not be written in the result ROOT file
1391  // (since the tag was equal to 0)
1392  if(fTagMSp[0] != 1){SampleMeans(); fTagMSp[0] = 0;}
1393 
1394  //................... Allocation fT2d_sig
1395  if( fT2d_sig == 0){
1396  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1397  Int_t n_samp = fNbSampForCalc;
1398  fT2d_sig = new Double_t*[n_StexEcha]; fCnew++;
1399  fT1d_sig = new Double_t[n_StexEcha*n_samp]; fCnew++;
1400  for(Int_t i0StexEcha = 0 ; i0StexEcha < n_StexEcha ; i0StexEcha++){
1401  fT2d_sig[i0StexEcha] = &fT1d_sig[0] + i0StexEcha*n_samp;}
1402  }
1403  // ................... init fT2d_sig to zero
1404  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1405  {
1406  for(Int_t i0Sample=0; i0Sample<fNbSampForCalc; i0Sample++)
1407  {
1408  if( fT2d_sig[i0StexEcha][i0Sample] != (Double_t)0 )
1409  {fMiscDiag[2]++; fT2d_sig[i0StexEcha][i0Sample] = (Double_t)0;}
1410  }
1411  }
1412 
1413  //................... Calculation
1414  for (Int_t i0StexEcha = 0 ; i0StexEcha < fEcal->MaxCrysEcnaInStex() ; i0StexEcha++)
1415  {
1416  for (Int_t i0Sample = 0 ; i0Sample < fNbSampForCalc ; i0Sample++)
1417  {
1418  Double_t variance = (Double_t)0.;
1419  for( Int_t i_event = 0; i_event < fNumberOfEvents; i_event++ )
1420  {
1421  Double_t ecart = fT3d_AdcValues[i0StexEcha][i0Sample][i_event] - fT2d_ev[i0StexEcha][i0Sample];
1422  variance += ecart*ecart;
1423  }
1424  variance /= fNumberOfEvents;
1425  fT2d_sig[i0StexEcha][i0Sample] = sqrt(variance);
1426  }
1427  }
1428  fTagSSp[0] = 1; fFileHeader->fSSpCalc++;
1429 }
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:1327
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 1255 of file TEcnaRun.cc.

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

1256 {
1257 //3D histo of the sample ADC values for all the triples (StexEcha, sample, event)
1258 
1259  // The histo is already in fT3d_AdcValues[][][]
1260  // this method sets the "Tag", increment the "f...Calc" (and must be kept for that)
1261  // f...Calc > 0 => allow writing on file.
1262 
1264  for( Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1265  {fTagAdcEvt[i0StexEcha] = 1; fFileHeader->fAdcEvtCalc++;}
1266 }
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.

276 {
277  // Set Subdetector (EB or EE)
278 
279  Int_t MaxCar = fgMaxCar;
280  fFlagSubDet.Resize(MaxCar);
281  fFlagSubDet = SubDet.Data();
282 
283  fEcal = 0; fEcal = new TEcnaParEcal(fFlagSubDet.Data()); //fCnew++;
284  fEcalNumbering = 0; fEcalNumbering = new TEcnaNumbering(fFlagSubDet.Data(), fEcal); //fCnew++;
285  fCnaWrite = 0;
286  fCnaWrite =
288 
289  if( fFlagSubDet == "EB" ){fStexName = "SM "; fStinName = "tower";}
290  if( fFlagSubDet == "EE" ){fStexName = "Dee"; fStinName = " SC ";}
291 }
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 1887 of file TEcnaRun.cc.

References gather_cfg::cout, i, and mathSSE::sqrt().

1888 {
1889  //Calculation of the sigmas of the (sample,sample) correlations for all the StexEchas
1890 
1891  //... preliminary calculation of the mean cor(s,s') if not done yet
1892  // (test only the first element since the cor are computed globaly)
1893  // Results available in array fT1d_ev_cor_ss[i0StexEcha]
1895 
1896  //................... Allocations sig_cor_ss + init to zero
1897  if( fT1d_sig_cor_ss == 0 ){
1898  Int_t n_StexEcha = fEcal->MaxCrysEcnaInStex();
1899  fT1d_sig_cor_ss = new Double_t[n_StexEcha]; fCnew++;
1900  }
1901  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1902  {
1903  if( fT1d_sig_cor_ss[i0StexEcha] != (Double_t)0 )
1904  {fMiscDiag[16]++; fT1d_sig_cor_ss[i0StexEcha] = (Double_t)0;}
1905  }
1906 
1907  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::SigmasOfCorrelationsBetweenSamples()" << endl;}
1909  cout << " Calculation of the sigmas of the (sample,sample)" << endl
1910  << " correlations for all the channels." << endl;}
1911 
1912  //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
1913  // (half of them minus the diagonal)
1914  Int_t ndim = (Int_t)(fNbSampForCalc*(fNbSampForCalc - 1)/2);
1915 
1916  TVectorD half_cor_ss(ndim); for(Int_t i=0; i<ndim; i++){half_cor_ss(i)=(Double_t)0.;}
1917 
1918  //.................. Calculation
1919  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1920  {
1921  //..................... half_cor_ss() array filling
1922  Int_t i_count = 0;
1923  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1924  {
1925  for (Int_t j0Sample = 0; j0Sample < i0Sample; j0Sample++)
1926  {
1927  half_cor_ss(i_count) = fT3d_cor_ss[i0StexEcha][i0Sample][j0Sample];
1928  i_count++;
1929  }
1930  }
1931 
1932  //...................... sigma of cor(s,s') calculation
1933  Double_t var = (Double_t)0;
1934  for(Int_t i_rcor = 0; i_rcor < ndim; i_rcor++)
1935  {
1936  Double_t ecart = half_cor_ss(i_rcor) - fT1d_ev_cor_ss[i0StexEcha];
1937  var += ecart*ecart;
1938  }
1939  var /= (Double_t)ndim;
1940  fT1d_sig_cor_ss[i0StexEcha] = sqrt(var);
1941  }
1943 }
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:1821
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 1276 of file TEcnaRun.cc.

Referenced by TEcnaGui::Calculations().

1277 {
1278  SampleMeans();
1279  SampleSigmas();
1281 
1282  Pedestals(); // => mean over Xtal's
1283  TotalNoise();
1288 
1289  AveragePedestals(); // Average => mean over Stin's (Tower if EB, SC if EE)
1295 }
void AverageTotalNoise()
Definition: TEcnaRun.cc:2013
void TotalNoise()
Definition: TEcnaRun.cc:1626
void SigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1887
void AverageMeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2193
void AverageLowFrequencyNoise()
Definition: TEcnaRun.cc:2073
void SampleMeans()
Definition: TEcnaRun.cc:1327
void LowFrequencyNoise()
Definition: TEcnaRun.cc:1679
void AverageSigmaOfCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:2253
void MeanCorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1821
void SampleSigmas()
Definition: TEcnaRun.cc:1379
void AveragePedestals()
Definition: TEcnaRun.cc:1952
void HighFrequencyNoise()
Definition: TEcnaRun.cc:1749
void AverageHighFrequencyNoise()
Definition: TEcnaRun.cc:2133
void Pedestals()
Definition: TEcnaRun.cc:1581
void CorrelationsBetweenSamples()
Definition: TEcnaRun.cc:1507
void TEcnaRun::StartStopDate ( const TString &  c_startdate,
const TString &  c_stopdate 
)

Definition at line 1204 of file TEcnaRun.cc.

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

1205 {
1206 // Put the start an stop date (if they exist) in fFileHeader class attributes.
1207 
1208  fFileHeader->fStartDate = c_startdate;
1209  fFileHeader->fStopDate = c_stopdate;
1210 }
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 1196 of file TEcnaRun.cc.

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

1197 {
1198 // Put the start an stop time (if they exist) in fFileHeader class attributes.
1199 
1200  fFileHeader->fStartTime = t_startime;
1201  fFileHeader->fStopTime = t_stoptime;
1202 }
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 1626 of file TEcnaRun.cc.

References gather_cfg::cout.

1627 {
1628 // Calculation, for each channel, of the expectation values
1629 // (over the samples 0 to fNbSampForCalc-1) of the sigmas
1630 // (over the events)
1631 
1632  //... preliminary calculation of the sigmas if not done yet
1633  if ( fTagSSp[0] != 1 ){SampleSigmas(); fTagSSp[0]=0;}
1634 
1635  //................... Allocation ev_ev + init to zero (mandatory)
1636  if( fT1d_evsamp_of_sigevt == 0 ){fT1d_evsamp_of_sigevt = new Double_t[fEcal->MaxCrysEcnaInStex()]; fCnew++;}
1637  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1638  {if( fT1d_evsamp_of_sigevt[i0StexEcha] != (Double_t)0 )
1639  {fMiscDiag[12]++; fT1d_evsamp_of_sigevt[i0StexEcha] = (Double_t)0;}}
1640 
1641  //..................... Calculation
1642  if(fFlagPrint != fCodePrintNoComment){cout << "*TEcnaRun::TotalNoise()" << endl;}
1644  cout << " Calculation, for all the channels, of the expectation values (over the samples 1 to "
1645  << fNbSampForCalc << ")" << endl
1646  << " of the ADC expectation values (over the events)." << endl;}
1647 
1648  for(Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
1649  {
1650  for (Int_t i0Sample = 0; i0Sample < fNbSampForCalc; i0Sample++)
1651  {
1652  if( fT2d_sig[i0StexEcha][i0Sample] < 0)
1653  {
1654  cout << "!TEcnaRun::TotalNoise() *** ERROR ***> Negative sigma!"
1655  << fTTBELL << endl;
1656  }
1657  else
1658  {
1659  fT1d_evsamp_of_sigevt[i0StexEcha] += fT2d_sig[i0StexEcha][i0Sample];
1660  }
1661  }
1662  fT1d_evsamp_of_sigevt[i0StexEcha] /= fNbSampForCalc;
1663  }
1664  fTagTno[0] = 1; fFileHeader->fTnoCalc++;
1665 }
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:1379
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 4063 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4064 {
4065  if (fTagAdcEvt[user_StexEcha] == 1 )
4066  {
4067  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4068  {
4069  //...................... all the bins set to zero
4070  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4071  {
4072  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) = (Double_t)0.;
4073  }
4074  //...................... fill the non-zero bins
4075  for (Int_t j_bin = 0; j_bin < fFileHeader->fReqNbOfEvts; j_bin++)
4076  {
4077  gCnaRootFile->fCnaIndivResult->fMatHis(i0Sample, j_bin) =
4078  fT3d_AdcValues[user_StexEcha][i0Sample][j_bin];
4079  }
4080  }
4081  }
4082 }
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 4489 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4490 {
4491  if (fTagAvMeanCorss[0] == 1 ) // test 1st elt only since global calc
4492  {
4493  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4494  {
4495  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4496  fT1d_av_ev_corss[j0StexStinEcna];
4497  }
4498  }
4499 }
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 4211 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4212 {
4213  if (fTagAvHfn[0] == 1 )
4214  {
4215  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4216  {
4217  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4218  fT1d_av_hifn[j0StexStinEcna];
4219  }
4220  }
4221 }
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 4193 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4194 {
4195  if (fTagAvLfn[0] == 1 )
4196  {
4197  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4198  {
4199  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4200  fT1d_av_lofn[j0StexStinEcna];
4201  }
4202  }
4203 }
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 4470 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4471 {
4472  if (fTagAvPed[0] == 1 )
4473  {
4474  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4475  {
4476  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4477  fT1d_av_mped[j0StexStinEcna];
4478  }
4479  }
4480 }
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 4508 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4509 {
4510  if (fTagAvSigCorss[0] == 1 ) // test 1st elt only since global calc
4511  {
4512  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4513  {
4514  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4515  fT1d_av_sig_corss[j0StexStinEcna];
4516  }
4517  }
4518 }
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 4176 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4177 {
4178  if (fTagAvTno[0] == 1 )
4179  {
4180  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4181  {
4182  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4183  fT1d_av_totn[j0StexStinEcna];
4184  }
4185  }
4186 }
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 4335 of file TEcnaRun.cc.

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

4336 {
4337  if (fTagCorCss[user_StexEcha] == 1 )
4338  {
4339  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4340  {
4341  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4342  {
4343  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4344  fT3d_cor_ss[user_StexEcha][i0Sample][j0Sample];
4345  }
4346  }
4347  }
4348 }
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 4314 of file TEcnaRun.cc.

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

4315 {
4316  if (fTagCovCss[user_StexEcha] == 1 )
4317  {
4318  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4319  {
4320  for (Int_t j0Sample = 0; j0Sample < argNbSampWrite; j0Sample++)
4321  {
4322  gCnaRootFile->fCnaIndivResult->fMatMat(i0Sample, j0Sample) =
4323  fT3d_cov_ss[user_StexEcha][i0Sample][j0Sample];
4324  }
4325  }
4326  }
4327 }
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 4155 of file TEcnaRun.cc.

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

4156 {
4157  if (fTagHFccMoStins[0] == 1 )
4158  {
4159  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4160  {
4161  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4162  {
4163  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4164  fT2d_hfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4165  }
4166  }
4167  }
4168 }
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 4292 of file TEcnaRun.cc.

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

4293 {
4294  if (fTagHfCor[0] == 1 )
4295  {
4296  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4297  {
4298  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4299  {
4300  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4301  fT2d_hf_cor[i0StexEcha][j0StexEcha];
4302  }
4303  }
4304  }
4305 }
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 4271 of file TEcnaRun.cc.

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

4272 {
4273  if (fTagHfCov[0] == 1 )
4274  {
4275  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4276  {
4277  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4278  {
4279  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4280  fT2d_hf_cov[i0StexEcha][j0StexEcha];
4281  }
4282  }
4283  }
4284 }
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 4432 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4433 {
4434  if (fTagHfn[0] == 1 )
4435  {
4436  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4437  {
4438  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4439  fT1d_evevt_of_sigsamp[j0StexEcha];
4440  }
4441  }
4442 }
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 4133 of file TEcnaRun.cc.

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

4134 {
4135  if (fTagLFccMoStins[0] == 1 )
4136  {
4137  for (Int_t i0StexStinEcna = 0; i0StexStinEcna < fEcal->MaxStinEcnaInStex(); i0StexStinEcna++)
4138  {
4139  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4140  {
4141  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexStinEcna, j0StexStinEcna) =
4142  fT2d_lfcc_mostins[i0StexStinEcna][j0StexStinEcna];
4143  }
4144  }
4145  }
4146 }
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 4250 of file TEcnaRun.cc.

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

4251 {
4252  if (fTagLfCor[0] == 1 )
4253  {
4254  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4255  {
4256  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4257  {
4258  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4259  fT2d_lf_cor[i0StexEcha][j0StexEcha];
4260  }
4261  }
4262  }
4263 }
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 4229 of file TEcnaRun.cc.

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

4230 {
4231  if (fTagLfCov[0] == 1 )
4232  {
4233  for (Int_t i0StexEcha = 0; i0StexEcha < fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
4234  {
4235  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4236  {
4237  gCnaRootFile->fCnaIndivResult->fMatMat(i0StexEcha, j0StexEcha) =
4238  fT2d_lf_cov[i0StexEcha][j0StexEcha];
4239  }
4240  }
4241  }
4242 }
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 4413 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4414 {
4415  if (fTagLfn[0] == 1 )
4416  {
4417  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4418  {
4419  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4420  fT1d_sigevt_of_evsamp[j0StexEcha];
4421  }
4422  }
4423 }
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 4394 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4395 {
4396  if (fTagMeanCorss[0] == 1 )
4397  {
4398  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4399  {
4400  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4401  fT1d_ev_cor_ss[j0StexEcha];
4402  }
4403  }
4404 }
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 4090 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4091 {
4092  if (fTagMSp[0] == 1 )
4093  {
4094  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4095  {
4096  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4097  {
4098  gCnaRootFile->fCnaIndivResult->fMatHis( j0StexEcha, i0Sample) =
4099  fT2d_ev[j0StexEcha][i0Sample];
4100  }
4101  }
4102  }
4103 }
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 4042 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4043 {
4044  if (fTagNbOfEvts[0] == 1 )
4045  {
4046  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4047  {
4048  for (Int_t i0Sample = 0; i0Sample < argNbSampWrite; i0Sample++)
4049  {
4050  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4051  fT2d_NbOfEvts[j0StexEcha][i0Sample];
4052  }
4053  }
4054  }
4055 }
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 4357 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4358 {
4359  if (fTagPed[0] == 1 )
4360  {
4361  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4362  {
4363  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4364  fT1d_ev_ev[j0StexEcha];
4365  }
4366  }
4367 }
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 4451 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4452 {
4453  if (fTagSigCorss[0] == 1 )
4454  {
4455  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4456  {
4457  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4458  fT1d_sig_cor_ss[j0StexEcha];
4459  }
4460  }
4461 }
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 4111 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4112 {
4113  if (fTagSSp[0] == 1 )
4114  {
4115  for (Int_t j0StexEcha=0; j0StexEcha<fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4116  {
4117  for (Int_t i0Sample=0; i0Sample<argNbSampWrite; i0Sample++)
4118  {
4119  gCnaRootFile->fCnaIndivResult->fMatHis(j0StexEcha, i0Sample) =
4120  fT2d_sig[j0StexEcha][i0Sample];
4121  }
4122  }
4123  }
4124 }
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 4024 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4025 {
4026  if (fTagStinNumbers[0] == 1 )
4027  {
4028  for (Int_t j0StexStinEcna = 0; j0StexStinEcna < fEcal->MaxStinEcnaInStex(); j0StexStinEcna++)
4029  {
4030  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexStinEcna) =
4031  fT1d_StexStinFromIndex[j0StexStinEcna];
4032  }
4033  }
4034 }
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 4375 of file TEcnaRun.cc.

References TEcnaRootFile::fCnaIndivResult, TEcnaResultType::fMatHis, and gCnaRootFile.

4376 {
4377  if (fTagTno[0] == 1 )
4378  {
4379  for (Int_t j0StexEcha = 0; j0StexEcha < fEcal->MaxCrysEcnaInStex(); j0StexEcha++)
4380  {
4381  gCnaRootFile->fCnaIndivResult->fMatHis(0, j0StexEcha) =
4382  fT1d_evsamp_of_sigevt[j0StexEcha];
4383  }
4384  }
4385 }
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 3068 of file TEcnaRun.cc.

References gather_cfg::cout.

Referenced by TEcnaGui::Calculations().

3068  {
3069 //Write a new Root file. File name automatically generated by fCnaWrite->fMakeResultsFileName()
3070 //called here.
3071 
3072  Bool_t ok_write = kFALSE;
3073 
3079 
3080  fCnaWrite->fMakeResultsFileName(); // set fRootFileName, fRootFileNameShort
3083 
3084  const Text_t *FileShortName = (const Text_t *)fNewRootFileNameShort.Data();
3085 
3087  cout << "*TEcnaRun::WriteNewRootFile()> Results are going to be written in the ROOT file: " << endl
3088  << " " << fNewRootFileNameShort.Data() << endl;}
3089 
3090  ok_write = WriteRootFile(FileShortName, fNbSampForCalc);
3091 
3092  return ok_write;
3093 }
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:3016
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 3016 of file TEcnaRun.cc.

References gather_cfg::cout.

3016  {
3017 //Write the Root file.
3018 //File name automatically generated by fCnaWrite->fMakeResultsFileName()
3019 //previously called in GetReadyToCompute().
3020 
3021  Bool_t ok_write = kFALSE;
3022 
3023  //============================= check number of found events
3024  Int_t nCountEvts = 0;
3025 
3026  for(Int_t i0StexEcha=0; i0StexEcha<fEcal->MaxCrysEcnaInStex(); i0StexEcha++)
3027  {for(Int_t i0Sample=0; i0Sample<fFileHeader->fNbOfSamples; i0Sample++)
3028  {nCountEvts += fT2d_NbOfEvts[i0StexEcha][i0Sample];}}
3029 
3030  if ( nCountEvts <= 0 )
3031  {
3032  //============== no write if no event found
3033  cout << "!TEcnaRun::WriteRootFile()> No event found for file " << fCnaWrite->GetRootFileNameShort().Data()
3034  << ". File will not be written." << endl;
3035  ok_write = kTRUE;
3036  }
3037  else
3038  {
3040  cout << "*TEcnaRun::WriteRootFile()> Results are going to be written in the ROOT file: " << endl
3041  << " " << fCnaWrite->GetRootFileName().Data() << endl;}
3042 
3043  const Text_t *FileShortName = (const Text_t *)fCnaWrite->GetRootFileNameShort().Data();
3044  ok_write = WriteRootFile(FileShortName, fFileHeader->fNbOfSamples);
3045 
3046  if( ok_write == kTRUE )
3047  {
3049  {cout << "*TEcnaRun::WriteRootFile()> Writing OK for file " << fCnaWrite->GetRootFileName().Data()
3050  << endl;}
3051  }
3052  else
3053  {
3054  cout << "!TEcnaRun::WriteRootFile()> Writing FAILLED for file " << fCnaWrite->GetRootFileName().Data()
3055  << fTTBELL << endl;
3056  }
3057  }
3058  return ok_write;
3059 } // 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:3016
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 3109 of file TEcnaRun.cc.

References 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, TEcnaRootFile::fCnaIndivResult, TEcnaRootFile::fCnaResultsTree, cmsPerfSuiteHarvest::file_name, TEcnaResultType::fIthElement, TEcnaResultType::fMatHis, TEcnaResultType::fMatMat, TEcnaRootFile::fRootFile, TEcnaResultType::fTypOfCnaResult, gCnaRootFile, i, mergeVDriftHistosByStation::name, TEcnaNArrayD::ReSet(), TEcnaResultType::SetSizeHis(), and TEcnaResultType::SetSizeMat().

3110 {
3111 //Write the Root file
3112 
3113  const Text_t* file_name = name;
3114 
3115  Bool_t ok_write = kFALSE;
3116 
3117  if ( fOpenRootFile )
3118  {
3119  cout << "!TEcnaRun::WriteRootFile(...) *** ERROR ***> Writing on file already open."
3120  << fTTBELL << endl;
3121  }
3122  else
3123  {
3124  // List of the different element types and associated parameters as ordered in the ROOT file (smaller -> larger)
3125  // ==========
3126  //
3127  // WARNING *** HERE SIZES ARE THESE FOR THE BARREL (1700 Xtals) and for 10 samples ***
3128  //
3129  // Nb of Type of element Type Type Size Comment
3130  // elements Number Name
3131  //
3132  // 1 fMatHis(1,StexStin) ( 0) cTypNumbers 1*( 1, 68) = 68
3133 
3134  // 1 fMatHis(1,StexStin) (12) cTypAvPed 1*( 1, 68) = 68
3135  // 1 fMatHis(1,StexStin) ( 3) cTypAvTno 1*( 1, 68) = 68
3136  // 1 fMatHis(1,StexStin) ( 4) cTypAvLfn 1*( 1, 68) = 68
3137  // 1 fMatHis(1,StexStin) ( 5) cTypAvHfn 1*( 1, 68) = 68
3138  // 1 fMatHis(1,StexStin) (13) cTypAvMeanCorss 1*( 1, 68) = 68
3139  // 1 fMatHis(1,StexStin) (14) cTypAvSigCorss 1*( 1, 68) = 68
3140 
3141  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3142  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3143  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3144  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3145  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3146  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3147 
3148  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3149  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3150 
3151  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3152  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3153  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3154 
3155  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3156  // StexEcha fMatMat(sample, sample ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3157 
3158  // StexEcha fMatHis(sample, bin_evt) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3159 
3160  // 1 fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3161  // 1 fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3162 
3163  // 1 fMatMat(StexEcha, StexEcha) ( 6) cTypHfCov 1*(1700,1700) = 2 890 000 // (06/05/08)
3164  // 1 fMatMat(StexEcha, StexEcha) ( 7) cTypHfCor 1*(1700,1700) = 2 890 000 // (06/05/08)
3165 
3166 
3167  //......................................................................................................
3168 
3169  OpenRootFile(file_name, "RECREATE");
3170 
3171  TString typ_name = "?";
3172  Int_t v_nb_times = 0;
3173  Int_t v_dim_one = 0;
3174  Int_t v_dim_two = 0;
3175  Int_t v_size = 0;
3176  Int_t v_tot = 0;
3177  Int_t v_tot_writ = 0;
3178 
3179  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3180  //
3181  // ===> no general method and no translation to TEcnaWrite
3182  // because the fT1d.. and fT2d... arrays
3183  // are attributes of TEcnaRun (calls to the "TRootXXXX" methods)
3184  //
3185  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3186 
3187  //-------------------------- Stin numbers
3188  // 1 fMatHis(1,Stin) ( 0) cTypNumbers 1*( 1, 68) = 68
3189 
3190  Int_t MaxCar = fgMaxCar;
3191  typ_name.Resize(MaxCar);
3192  typ_name = "StinNumbers";
3193  v_nb_times = fFileHeader->fStinNumbersCalc;
3194  v_dim_one = 1;
3195  v_dim_two = fEcal->MaxStinEcnaInStex();
3196  v_size = v_nb_times*v_dim_one*v_dim_two;
3197  v_tot += v_size;
3198 
3200  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3201  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3202  << setw(9) << v_size;}
3203 
3204  for (Int_t i = 0; i < v_nb_times; i++)
3205  {
3206  if ( fTagStinNumbers[0] == 1 )
3207  {
3210  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3212  TRootStinNumbers();
3213  gCnaRootFile->fCnaResultsTree->Fill();
3214  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3215  }
3216  }
3217  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3218 
3219  //-------------------------- Average Pedestals (1 value per Stin)
3220  // 1 fMatHis(1, StexStin) (12) cTypAvPed 1*(1, 68) = 68
3221 
3222  MaxCar = fgMaxCar;
3223  typ_name.Resize(MaxCar);
3224  typ_name = "AvPed";
3225  v_nb_times = fFileHeader->fAvPedCalc;
3226  v_dim_one = 1;
3227  v_dim_two = fEcal->MaxStinEcnaInStex();
3228  v_size = v_nb_times*v_dim_one*v_dim_two;
3229  v_tot += v_size;
3230 
3232  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3233  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3234  << setw(9) << v_size;}
3235 
3236  for (Int_t i = 0; i < v_nb_times; i++)
3237  {
3238  if ( fTagAvPed[0] == 1 )
3239  {
3242  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3244  TRootAvPed();
3245  gCnaRootFile->fCnaResultsTree->Fill();
3246  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3247  }
3248  }
3249  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3250 
3251  //-------------------------- Average Total noise
3252  // StexEcha fMatHis(1, StexStin) ( 3) cTypAvTno 1*(1, 68) = 68
3253 
3254  MaxCar = fgMaxCar;
3255  typ_name.Resize(MaxCar);
3256  typ_name = "AvTno";
3257  v_nb_times = fFileHeader->fAvTnoCalc;
3258  v_dim_one = 1;
3259  v_dim_two = fEcal->MaxStinEcnaInStex();
3260  v_size = v_nb_times*v_dim_one*v_dim_two;
3261  v_tot += v_size;
3262 
3264  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3265  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3266  << setw(9) << v_size;}
3267 
3268  for (Int_t i = 0; i < v_nb_times; i++)
3269  {
3270  if ( fTagAvTno[0] == 1 )
3271  {
3274  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3276  TRootAvTno();
3277  gCnaRootFile->fCnaResultsTree->Fill();
3278  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3279  }
3280  }
3281  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3282 
3283  //-------------------------- Average Low frequency noise
3284  // 1 fMatHis(1, StexStin) ( 4) cTypAvLfn 1*(1, 68) = 68
3285 
3286  MaxCar = fgMaxCar;
3287  typ_name.Resize(MaxCar);
3288  typ_name = "AvLfn";
3289  v_nb_times = fFileHeader->fAvLfnCalc;
3290  v_dim_one = 1;
3291  v_dim_two = fEcal->MaxStinEcnaInStex();
3292  v_size = v_nb_times*v_dim_one*v_dim_two;
3293  v_tot += v_size;
3294 
3296  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3297  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3298  << setw(9) << v_size;}
3299 
3300  for (Int_t i = 0; i < v_nb_times; i++)
3301  {
3302  if ( fTagAvLfn[0] == 1 )
3303  {
3306  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3308  TRootAvLfn();
3309  gCnaRootFile->fCnaResultsTree->Fill();
3310  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3311  }
3312  }
3313  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3314 
3315  //-------------------------- Average High frequency noise
3316  // 1 fMatHis(1, StexStin) ( 5) cTypAvHfn 1*(1, 68) = 68
3317 
3318  MaxCar = fgMaxCar;
3319  typ_name.Resize(MaxCar);
3320  typ_name = "AvHfn";
3321  v_nb_times = fFileHeader->fAvHfnCalc;
3322  v_dim_one = 1;
3323  v_dim_two = fEcal->MaxStinEcnaInStex();
3324  v_size = v_nb_times*v_dim_one*v_dim_two;
3325  v_tot += v_size;
3326 
3328  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3329  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3330  << setw(9) << v_size;}
3331 
3332  for (Int_t i = 0; i < v_nb_times; i++)
3333  {
3334  if ( fTagAvHfn[0] == 1 )
3335  {
3338  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3340  TRootAvHfn();
3341  gCnaRootFile->fCnaResultsTree->Fill();
3342  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3343  }
3344  }
3345  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3346 
3347  //-------------------------- Average mean cor(s,s)
3348  // 1 fMatHis(1, StexStin) (13) cTypAvMeanCorss 1*(1, 68) = 68
3349 
3350  MaxCar = fgMaxCar;
3351  typ_name.Resize(MaxCar);
3352  typ_name = "AvMeanCorss";
3353  v_nb_times = fFileHeader->fAvMeanCorssCalc;
3354  v_dim_one = 1;
3355  v_dim_two = fEcal->MaxStinEcnaInStex();
3356  v_size = v_nb_times*v_dim_one*v_dim_two;
3357  v_tot += v_size;
3358 
3360  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3361  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3362  << setw(9) << v_size;}
3363 
3364  for (Int_t i = 0; i < v_nb_times; i++)
3365  {
3366  if ( fTagAvMeanCorss[0] == 1 )
3367  {
3370  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3372  TRootAvEvCorss();
3373  gCnaRootFile->fCnaResultsTree->Fill();
3374  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3375  }
3376  }
3377  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3378 
3379  //-------------------------- Average sigma of cor(s,s)
3380  // 1 fMatHis(1, StexStin) (14) cTypAvSigCorss 1*(1, 68) = 68
3381 
3382  MaxCar = fgMaxCar;
3383  typ_name.Resize(MaxCar);
3384  typ_name = "AvSigCorss";
3385  v_nb_times = fFileHeader->fAvSigCorssCalc;
3386  v_dim_one = 1;
3387  v_dim_two = fEcal->MaxStinEcnaInStex();
3388  v_size = v_nb_times*v_dim_one*v_dim_two;
3389  v_tot += v_size;
3390 
3392  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3393  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3394  << setw(9) << v_size;}
3395 
3396  for (Int_t i = 0; i < v_nb_times; i++)
3397  {
3398  if ( fTagAvSigCorss[0] == 1 )
3399  {
3402  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3404  TRootAvSigCorss();
3405  gCnaRootFile->fCnaResultsTree->Fill();
3406  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3407  }
3408  }
3409  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3410 
3411  //-------------------------- Expectation values of the expectation values of the samples (pedestals)
3412  // 1 fMatHis(1,StexEcha) (16) cTypPed 1*( 1,1700) = 1 700
3413 
3414  MaxCar = fgMaxCar;
3415  typ_name.Resize(MaxCar);
3416  typ_name = "Ped";
3417  v_nb_times = fFileHeader->fPedCalc;
3418  v_dim_one = 1;
3419  v_dim_two = fEcal->MaxCrysEcnaInStex();
3420  v_size = v_nb_times*v_dim_one*v_dim_two;
3421  v_tot += v_size;
3422 
3424  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3425  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3426  << setw(9) << v_size;}
3427 
3428  for (Int_t i = 0; i < v_nb_times; i++)
3429  {
3430  if ( fTagPed[0] == 1 )
3431  {
3434  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3436  TRootPed();
3437  gCnaRootFile->fCnaResultsTree->Fill();
3438  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3439  }
3440  }
3441  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3442 
3443  //-------------------------- Expectation values of the sigmas the samples
3444  // 1 fMatHis(1,StexEcha) (17) cTypTno 1*( 1,1700) = 1 700
3445 
3446  MaxCar = fgMaxCar;
3447  typ_name.Resize(MaxCar);
3448  typ_name = "Tno";
3449  v_nb_times = fFileHeader->fTnoCalc;
3450  v_dim_one = 1;
3451  v_dim_two = fEcal->MaxCrysEcnaInStex();
3452  v_size = v_nb_times*v_dim_one*v_dim_two;
3453  v_tot += v_size;
3454 
3456  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3457  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3458  << setw(9) << v_size;}
3459 
3460  for (Int_t i = 0; i < v_nb_times; i++)
3461  {
3462  if ( fTagTno[0] == 1 )
3463  {
3466  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3468  TRootTno();
3469  gCnaRootFile->fCnaResultsTree->Fill();
3470  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3471  }
3472  }
3473  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3474 
3475  //-------------------------- Expectation values of the correlations between the samples
3476  // 1 fMatHis(1,StexEcha) (10) cTypMeanCorss 1*( 1,1700) = 1 700
3477 
3478  MaxCar = fgMaxCar;
3479  typ_name.Resize(MaxCar);
3480  typ_name = "MeanCorss";
3481  v_nb_times = fFileHeader->fMeanCorssCalc;
3482  v_dim_one = 1;
3483  v_dim_two = fEcal->MaxCrysEcnaInStex();
3484  v_size = v_nb_times*v_dim_one*v_dim_two;
3485  v_tot += v_size;
3486 
3488  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3489  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3490  << setw(9) << v_size;}
3491 
3492  for (Int_t i = 0; i < v_nb_times; i++)
3493  {
3494  if ( fTagMeanCorss[0] == 1 )
3495  {
3498  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3500  TRootMeanCorss();
3501  gCnaRootFile->fCnaResultsTree->Fill();
3502  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3503  }
3504  }
3505  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3506 
3507  //-------------------------- Sigmas of the expectation values of the samples
3508  // 1 fMatHis(1,StexEcha) (18) cTypLfn 1*( 1,1700) = 1 700
3509 
3510  MaxCar = fgMaxCar;
3511  typ_name.Resize(MaxCar);
3512  typ_name = "Lfn";
3513  v_nb_times = fFileHeader->fLfnCalc;
3514  v_dim_one = 1;
3515  v_dim_two = fEcal->MaxCrysEcnaInStex();
3516  v_size = v_nb_times*v_dim_one*v_dim_two;
3517  v_tot += v_size;
3518 
3520  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3521  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3522  << setw(9) << v_size;}
3523 
3524  for (Int_t i = 0; i < v_nb_times; i++)
3525  {
3526  if ( fTagLfn[0] == 1 )
3527  {
3530  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3532  TRootLfn();
3533  gCnaRootFile->fCnaResultsTree->Fill();
3534  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3535  }
3536  }
3537  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3538 
3539  //-------------------------- Sigmas of the sigmas of the samples
3540  // 1 fMatHis(1,StexEcha) (19) cTypHfn 1*( 1,1700) = 1 700
3541 
3542  MaxCar = fgMaxCar;
3543  typ_name.Resize(MaxCar);
3544  typ_name = "Hfn";
3545  v_nb_times = fFileHeader->fHfnCalc;
3546  v_dim_one = 1;
3547  v_dim_two = fEcal->MaxCrysEcnaInStex();
3548  v_size = v_nb_times*v_dim_one*v_dim_two;
3549  v_tot += v_size;
3550 
3552  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3553  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3554  << setw(9) << v_size;}
3555 
3556  for (Int_t i = 0; i < v_nb_times; i++)
3557  {
3558  if ( fTagHfn[0] == 1 )
3559  {
3562  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3564  TRootHfn();
3565  gCnaRootFile->fCnaResultsTree->Fill();
3566  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3567  }
3568  }
3569  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3570 
3571  //-------------------------- Sigmas of the correlations between the samples
3572  // 1 fMatHis(1,StexEcha) (11) cTypSigCorss 1*( 1,1700) = 1 700
3573 
3574  MaxCar = fgMaxCar;
3575  typ_name.Resize(MaxCar);
3576  typ_name = "SigCorss";
3577  v_nb_times = fFileHeader->fSigCorssCalc;
3578  v_dim_one = 1;
3579  v_dim_two = fEcal->MaxCrysEcnaInStex();
3580  v_size = v_nb_times*v_dim_one*v_dim_two;
3581  v_tot += v_size;
3582 
3584  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3585  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3586  << setw(9) << v_size;}
3587 
3588  for (Int_t i = 0; i < v_nb_times; i++)
3589  {
3590  if ( fTagSigCorss[0] == 1 )
3591  {
3594  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3596  TRootSigCorss();
3597  gCnaRootFile->fCnaResultsTree->Fill();
3598  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3599  }
3600  }
3601  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3602 
3603  //----- Mean Covariances between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3604  // 1 fMatMat(Stin,Stin) (23) cTypLFccMoStins 1*( 68, 68) = 4 624
3605 
3606  MaxCar = fgMaxCar;
3607  typ_name.Resize(MaxCar);
3608  typ_name = "LFccMoStins";
3609  v_nb_times = fFileHeader->fLFccMoStinsCalc;
3610  v_dim_one = fEcal->MaxStinEcnaInStex();
3611  v_dim_two = fEcal->MaxStinEcnaInStex();
3612  v_size = v_nb_times*v_dim_one*v_dim_two;
3613  v_tot += v_size;
3614 
3616  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3617  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3618  << setw(9) << v_size;}
3619 
3620  for (Int_t i = 0; i < v_nb_times; i++)
3621  {
3622  if ( fTagLFccMoStins[0] == 1 )
3623  {
3626  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3628  TRootLFccMoStins();
3629  gCnaRootFile->fCnaResultsTree->Fill();
3630  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3631  }
3632  }
3633  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3634 
3635  //----- Mean Correlations between StexEchas (averaged over samples) for all (Stin_X,Stin_Y)
3636  // 1 fMatMat(Stin,Stin) (24) cTypHFccMoStins 1*( 68, 68) = 4 624
3637 
3638  MaxCar = fgMaxCar;
3639  typ_name.Resize(MaxCar);
3640  typ_name = "HFccMoStins";
3641  v_nb_times = fFileHeader->fHFccMoStinsCalc;
3642  v_dim_one = fEcal->MaxStinEcnaInStex();
3643  v_dim_two = fEcal->MaxStinEcnaInStex();
3644  v_size = v_nb_times*v_dim_one*v_dim_two;
3645  v_tot += v_size;
3646 
3648  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3649  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3650  << setw(9) << v_size;}
3651 
3652  for (Int_t i = 0; i < v_nb_times; i++)
3653  {
3654  if ( fTagHFccMoStins[0] == 1 )
3655  {
3658  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3660  TRootHFccMoStins();
3661  gCnaRootFile->fCnaResultsTree->Fill();
3662  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3663  }
3664  }
3665  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3666 
3667  //-------------------------- Numbers of found events (NbOfEvts)
3668  // 1 fMatHis(StexEcha, sample) (15) cTypNbOfEvts 1*(1700, 10) = 17 000
3669 
3670  MaxCar = fgMaxCar;
3671  typ_name.Resize(MaxCar);
3672  typ_name = "NbOfEvts";
3673  v_nb_times = fFileHeader->fNbOfEvtsCalc;
3674  v_dim_one = fEcal->MaxCrysEcnaInStex();
3675  v_dim_two = argNbSampWrite;
3676  v_size = v_nb_times*v_dim_one*v_dim_two;
3677  v_tot += v_size;
3678 
3680  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3681  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3682  << setw(9) << v_size;}
3683 
3684  for (Int_t i = 0; i < v_nb_times; i++)
3685  {
3686  if ( fTagNbOfEvts[0] == 1 )
3687  {
3690  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3692  TRootNbOfEvts(argNbSampWrite);
3693  gCnaRootFile->fCnaResultsTree->Fill();
3694  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3695  }
3696  }
3697  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3698 
3699  //-------------------------- Expectation values of the samples
3700  // 1 fMatHis(StexEcha, sample) ( 1) cTypMSp 1*(1700, 10) = 17 000
3701 
3702  MaxCar = fgMaxCar;
3703  typ_name.Resize(MaxCar);
3704  typ_name = "MSp";
3705  v_nb_times = fFileHeader->fMSpCalc;
3706  v_dim_one = fEcal->MaxCrysEcnaInStex();
3707  v_dim_two = argNbSampWrite;
3708  v_size = v_nb_times*v_dim_one*v_dim_two;
3709  v_tot += v_size;
3710 
3712  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3713  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3714  << setw(9) << v_size;}
3715 
3716  for (Int_t i = 0; i < v_nb_times; i++)
3717  {
3718  if ( fTagMSp[0] == 1 )
3719  {
3722  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3724  TRootMSp(argNbSampWrite);
3725  gCnaRootFile->fCnaResultsTree->Fill();
3726  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3727  }
3728  }
3729  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3730 
3731  //-------------------------- Sigmas of the samples
3732  // 1 fMatHis(StexEcha, sample) ( 2) cTypSSp 1*(1700, 10) = 17 000
3733 
3734  MaxCar = fgMaxCar;
3735  typ_name.Resize(MaxCar);
3736  typ_name = "SSp";
3737  v_nb_times = fFileHeader->fSSpCalc;
3738  v_dim_one = fEcal->MaxCrysEcnaInStex();
3739  v_dim_two = argNbSampWrite;
3740  v_size = v_nb_times*v_dim_one*v_dim_two;
3741  v_tot += v_size;
3742 
3744  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3745  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3746  << setw(9) << v_size;}
3747 
3748  for (Int_t i = 0; i < v_nb_times; i++)
3749  {
3750  if ( fTagSSp[0] == 1 )
3751  {
3754  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3756  TRootSSp(argNbSampWrite);
3757  gCnaRootFile->fCnaResultsTree->Fill();
3758  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3759  }
3760  }
3761  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3762 
3763  //-------------------------- Covariances between samples
3764 
3765  // StexEcha fMatMat(sample, sample) ( 8) cTypCovCss 1700*( 10, 10) = 170 000
3766 
3767  MaxCar = fgMaxCar;
3768  typ_name.Resize(MaxCar);
3769  typ_name = "CovCss";
3770  v_nb_times = fFileHeader->fCovCssCalc;
3771  v_dim_one = argNbSampWrite;
3772  v_dim_two = argNbSampWrite;
3773  v_size = v_nb_times*v_dim_one*v_dim_two;
3774  v_tot += v_size;
3775 
3777  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3778  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3779  << setw(9) << v_size;}
3780 
3781  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3782  {
3783  if ( fTagCovCss[i0StexEcha] == 1 )
3784  {
3786  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3787  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3789  TRootCovCss(i0StexEcha, argNbSampWrite);
3790  gCnaRootFile->fCnaResultsTree->Fill();
3791  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3792  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3793  }
3794  }
3795  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3796 
3797  //-------------------------- Correlations between samples
3798  // StexEcha fMatMat(sample, sample) ( 9) cTypCorCss 1700*( 10, 10) = 170 000
3799 
3800  MaxCar = fgMaxCar;
3801  typ_name.Resize(MaxCar);
3802  typ_name = "CorCss";
3803  v_nb_times = fFileHeader->fCorCssCalc;
3804  v_dim_one = argNbSampWrite;
3805  v_dim_two = argNbSampWrite;
3806  v_size = v_nb_times*v_dim_one*v_dim_two;
3807  v_tot += v_size;
3808 
3810  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3811  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3812  << setw(9) << v_size;}
3813 
3814  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3815  {
3816  if ( fTagCorCss[i0StexEcha] == 1 )
3817  {
3819  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3820  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3822  TRootCorCss(i0StexEcha, argNbSampWrite);
3823  gCnaRootFile->fCnaResultsTree->Fill();
3824  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments)
3825  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3826  }
3827  }
3828  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3829 
3830  //-------------------------- Samples as a function of event = events distributions
3831  // StexEcha fMatHis(sample, bins) (20) cTypAdcEvt, 1700*( 10, 150) = 2 550 000
3832 
3833  MaxCar = fgMaxCar;
3834  typ_name.Resize(MaxCar);
3835  typ_name = "AdcEvt";
3836  v_nb_times = fFileHeader->fAdcEvtCalc;
3837  v_dim_one = argNbSampWrite;
3838  v_dim_two = fFileHeader->fReqNbOfEvts;
3839  v_size = v_nb_times*v_dim_one*v_dim_two;
3840  v_tot += v_size;
3841 
3843  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3844  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3845  << setw(9) << v_size;}
3846 
3847  for (Int_t i0StexEcha = 0; i0StexEcha < v_nb_times; i0StexEcha++)
3848  {
3849  if ( fTagAdcEvt[i0StexEcha] == 1 )
3850  {
3852  gCnaRootFile->fCnaIndivResult->fIthElement = i0StexEcha;
3853  gCnaRootFile->fCnaIndivResult->SetSizeHis(v_dim_one,v_dim_two);
3855  TRootAdcEvt(i0StexEcha, argNbSampWrite);
3856  gCnaRootFile->fCnaResultsTree->Fill();
3857  if( i0StexEcha == 0 && fFlagPrint == fCodePrintAllComments )
3858  {cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3859  }
3860  }
3861  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3862 
3863  //-------------------------- Low Frequency Covariances between StexEchas
3864  // sample fMatMat(StexEcha, StexEcha) (21) cTypLfCov 1*(1700,1700) = 2 890 000
3865 
3866  MaxCar = fgMaxCar;
3867  typ_name.Resize(MaxCar);
3868  typ_name = "LfCov";
3869  v_nb_times = fFileHeader->fLfCovCalc;
3870  v_dim_one = fEcal->MaxCrysEcnaInStex();
3871  v_dim_two = fEcal->MaxCrysEcnaInStex();
3872  v_size = v_nb_times*v_dim_one*v_dim_two;
3873  v_tot += v_size;
3874 
3876  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3877  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3878  << setw(9) << v_size;}
3879 
3880  for (Int_t i = 0; i < v_nb_times; i++)
3881  { //=================================== Record type EB
3882  if ( fTagLfCov[0] == 1 )
3883  {
3886  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3888  TRootLfCov();
3889  gCnaRootFile->fCnaResultsTree->Fill();
3890  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3891  }
3892  }
3893  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3894 
3895  //-------------------------- Low Frequency Correlations between StexEchas
3896  // sample fMatMat(StexEcha, StexEcha) (22) cTypLfCor 1*(1700,1700) = 2 890 000
3897 
3898  MaxCar = fgMaxCar;
3899  typ_name.Resize(MaxCar);
3900  typ_name = "LfCor";
3901  v_nb_times = fFileHeader->fLfCorCalc;
3902  v_dim_one = fEcal->MaxCrysEcnaInStex();
3903  v_dim_two = fEcal->MaxCrysEcnaInStex();
3904  v_size = v_nb_times*v_dim_one*v_dim_two;
3905  v_tot += v_size;
3906 
3908  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3909  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3910  << setw(9) << v_size;}
3911 
3912  for (Int_t i = 0; i < v_nb_times; i++)
3913  {
3914  if ( fTagLfCor[0] == 1 )
3915  {
3918  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3920  TRootLfCor();
3921  gCnaRootFile->fCnaResultsTree->Fill();
3922  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3923  }
3924  }
3925  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3926 
3927  //-------------------------- High Frequency Covariances between StexEchas
3928  // sample fMatMat(StexEcha, StexEcha) (6) cTypHfCov 1*(1700,1700) = 2 890 000
3929 
3930  MaxCar = fgMaxCar;
3931  typ_name.Resize(MaxCar);
3932  typ_name = "HfCov";
3933  v_nb_times = fFileHeader->fHfCovCalc;
3934  v_dim_one = fEcal->MaxCrysEcnaInStex();
3935  v_dim_two = fEcal->MaxCrysEcnaInStex();
3936  v_size = v_nb_times*v_dim_one*v_dim_two;
3937  v_tot += v_size;
3938 
3940  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3941  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3942  << setw(9) << v_size;}
3943 
3944  for (Int_t i = 0; i < v_nb_times; i++)
3945  {
3946  if ( fTagHfCov[0] == 1 )
3947  {
3950  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3952  TRootHfCov();
3953  gCnaRootFile->fCnaResultsTree->Fill();
3954  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3955  }
3956  }
3957  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3958 
3959  //-------------------------- High Frequency Correlations between StexEchas
3960  // sample fMatMat(StexEcha, StexEcha) (7) cTypHfCor 1*(1700,1700) = 2 890 000
3961 
3962  MaxCar = fgMaxCar;
3963  typ_name.Resize(MaxCar);
3964  typ_name = "HfCor";
3965  v_nb_times = fFileHeader->fHfCorCalc;
3966  v_dim_one = fEcal->MaxCrysEcnaInStex();
3967  v_dim_two = fEcal->MaxCrysEcnaInStex();
3968  v_size = v_nb_times*v_dim_one*v_dim_two;
3969  v_tot += v_size;
3970 
3972  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
3973  << " * (" << setw(4) << v_dim_one << "," << setw(4) << v_dim_two << ") = "
3974  << setw(9) << v_size;}
3975 
3976  for (Int_t i = 0; i < v_nb_times; i++)
3977  {
3978  if ( fTagHfCor[0] == 1 )
3979  {
3982  gCnaRootFile->fCnaIndivResult->SetSizeMat(v_dim_one,v_dim_two);
3984  TRootHfCor();
3985  gCnaRootFile->fCnaResultsTree->Fill();
3986  if( i == 0 && fFlagPrint == fCodePrintAllComments ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
3987  }
3988  }
3989  if(fFlagPrint == fCodePrintAllComments){cout << endl;}
3990 
3991  //---------------------------------------------- WRITING
3992  //...................................... file
3993  gCnaRootFile->fRootFile->Write();
3994  //...................................... header
3995  fFileHeader->Write();
3996 
3997  //...................................... status message
3999  cout << "*TEcnaRun::WriteRootFile(...)> " << setw(20) << "TOTAL: "
4000  << setw(21) << "CALCULATED = " << setw(9) << v_tot
4001  << " => WRITTEN ON FILE = " << setw(9) << v_tot_writ << endl;}
4002 
4004  cout << "*TEcnaRun::WriteRootFile(...)> Write OK in file " << file_name << " in directory:" << endl
4005  << " " << fCnaParPaths->ResultsRootFilePath().Data()
4006  << endl;}
4007 
4008  ok_write = kTRUE;
4009 
4010  //...................................... close
4011  CloseRootFile(file_name);
4012  }
4013  return ok_write;
4014 } //-------------- End of WriteRootFile(...) -----------------------
TEcnaResultType * fCnaIndivResult
Definition: TEcnaRootFile.h:45
TEcnaNArrayD fMatMat
void TRootAdcEvt(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4063
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:4432
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:4451
Int_t fCodePrintAllComments
Definition: TEcnaRun.h:510
void TRootSSp(const Int_t &)
Definition: TEcnaRun.cc:4111
Int_t fHfnCalc
Definition: TEcnaHeader.h:88
void TRootLfCor()
Definition: TEcnaRun.cc:4250
void TRootLFccMoStins()
Definition: TEcnaRun.cc:4133
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:4314
Int_t * fTagPed
Definition: TEcnaRun.h:446
void TRootAvTno()
Definition: TEcnaRun.cc:4176
Int_t fHfCorCalc
Definition: TEcnaHeader.h:79
void SetSizeHis(Int_t, Int_t)
void TRootAvLfn()
Definition: TEcnaRun.cc:4193
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:4292
Int_t fMSpCalc
Definition: TEcnaHeader.h:70
void TRootAvEvCorss()
Definition: TEcnaRun.cc:4489
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:2970
void TRootStinNumbers()
Definition: TEcnaRun.cc:4024
void TRootHFccMoStins()
Definition: TEcnaRun.cc:4155
void TRootMSp(const Int_t &)
Definition: TEcnaRun.cc:4090
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:4211
Int_t fCorCssCalc
Definition: TEcnaHeader.h:77
void TRootPed()
Definition: TEcnaRun.cc:4357
void TRootTno()
Definition: TEcnaRun.cc:4375
void TRootCorCss(const Int_t &, const Int_t &)
Definition: TEcnaRun.cc:4335
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:4413
void TRootLfCov()
Definition: TEcnaRun.cc:4229
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:2927
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:4508
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:4042
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:4394
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:4271
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:4470

Member Data Documentation

Int_t TEcnaRun::fBuildEvtNotSkipped
private

Definition at line 405 of file TEcnaRun.h.

Int_t TEcnaRun::fCdelete
private

Definition at line 374 of file TEcnaRun.h.

Int_t TEcnaRun::fCnaCommand
private

Definition at line 371 of file TEcnaRun.h.

Int_t TEcnaRun::fCnaError
private

Definition at line 371 of file TEcnaRun.h.

TEcnaParCout* TEcnaRun::fCnaParCout
private

Definition at line 386 of file TEcnaRun.h.

TEcnaParPaths* TEcnaRun::fCnaParPaths
private

Definition at line 387 of file TEcnaRun.h.

TEcnaWrite* TEcnaRun::fCnaWrite
private

Definition at line 388 of file TEcnaRun.h.

Int_t TEcnaRun::fCnew
private

Definition at line 373 of file TEcnaRun.h.

Int_t TEcnaRun::fCodePrintAllComments
private

Definition at line 510 of file TEcnaRun.h.

Int_t TEcnaRun::fCodePrintComments
private

Definition at line 510 of file TEcnaRun.h.

Int_t TEcnaRun::fCodePrintNoComment
private

Definition at line 510 of file TEcnaRun.h.

Int_t TEcnaRun::fCodePrintWarnings
private

Definition at line 510 of file TEcnaRun.h.

TEcnaParEcal* TEcnaRun::fEcal
private

Definition at line 384 of file TEcnaRun.h.

TEcnaNumbering* TEcnaRun::fEcalNumbering
private

Definition at line 385 of file TEcnaRun.h.

std::ofstream TEcnaRun::fFcout_f
private

Definition at line 507 of file TEcnaRun.h.

TEcnaHeader* TEcnaRun::fFileHeader
private

Definition at line 383 of file TEcnaRun.h.

Int_t TEcnaRun::fFlagPrint
private

Definition at line 509 of file TEcnaRun.h.

TString TEcnaRun::fFlagSubDet
private

Definition at line 392 of file TEcnaRun.h.

Int_t TEcnaRun::fgMaxCar
private

Definition at line 369 of file TEcnaRun.h.

Int_t TEcnaRun::fMaxMsgIndexForMiscDiag
private

Definition at line 380 of file TEcnaRun.h.

Int_t TEcnaRun::fMemoReadNumberOfEventsforSamples
private

Definition at line 412 of file TEcnaRun.h.

Int_t* TEcnaRun::fMiscDiag
private

Definition at line 378 of file TEcnaRun.h.

Int_t TEcnaRun::fNbOfMiscDiagCounters
private

Definition at line 379 of file TEcnaRun.h.

Int_t TEcnaRun::fNbSampForCalc
private

Definition at line 408 of file TEcnaRun.h.

Int_t TEcnaRun::fNbSampForFic
private

Definition at line 407 of file TEcnaRun.h.

TString TEcnaRun::fNewRootFileName
private

Definition at line 400 of file TEcnaRun.h.

TString TEcnaRun::fNewRootFileNameShort
private

Definition at line 401 of file TEcnaRun.h.

Int_t TEcnaRun::fNumberOfEvents
private

Definition at line 410 of file TEcnaRun.h.

TEcnaObject* TEcnaRun::fObjectManager
private

Definition at line 382 of file TEcnaRun.h.

Bool_t TEcnaRun::fOpenRootFile
private

Definition at line 395 of file TEcnaRun.h.

Int_t TEcnaRun::fReadyToReadData
private

Definition at line 396 of file TEcnaRun.h.

TString TEcnaRun::fRootFileName
private

Definition at line 398 of file TEcnaRun.h.

TString TEcnaRun::fRootFileNameShort
private

Definition at line 399 of file TEcnaRun.h.

Int_t TEcnaRun::fSpecialStexStinNotIndexed
private

Definition at line 403 of file TEcnaRun.h.

TString TEcnaRun::fStexName
private

Definition at line 393 of file TEcnaRun.h.

Int_t TEcnaRun::fStinIndexBuilt
private

Definition at line 404 of file TEcnaRun.h.

TString TEcnaRun::fStinName
private

Definition at line 393 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_ev_corss
private

Definition at line 457 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_hifn
private

Definition at line 467 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_lofn
private

Definition at line 462 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_mped
private

Definition at line 447 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_sig_corss
private

Definition at line 472 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_av_totn
private

Definition at line 452 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_ev
private

Definition at line 427 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_ev_cor_ss
private

Definition at line 455 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_ev_ev
private

Definition at line 445 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_evevt_of_sigsamp
private

Definition at line 465 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_evsamp_of_sigevt
private

Definition at line 450 of file TEcnaRun.h.

Int_t* TEcnaRun::fT1d_NbOfEvts
private

Definition at line 420 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_sig
private

Definition at line 431 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_sig_cor_ss
private

Definition at line 470 of file TEcnaRun.h.

Double_t* TEcnaRun::fT1d_sigevt_of_evsamp
private

Definition at line 460 of file TEcnaRun.h.

Int_t* TEcnaRun::fT1d_StexStinFromIndex
private

Definition at line 423 of file TEcnaRun.h.

Int_t* TEcnaRun::fT1dCrysNumbersTable
private

Definition at line 505 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_hf_cor
private

Definition at line 490 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_hf_cov
private

Definition at line 486 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_hfcc_mostins
private

Definition at line 499 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_lf_cor
private

Definition at line 481 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_lf_cov
private

Definition at line 477 of file TEcnaRun.h.

Double_t* TEcnaRun::fT2d1_lfcc_mostins
private

Definition at line 495 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_ev
private

Definition at line 426 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_hf_cor
private

Definition at line 489 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_hf_cov
private

Definition at line 485 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_hfcc_mostins
private

Definition at line 498 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_lf_cor
private

Definition at line 480 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_lf_cov
private

Definition at line 476 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_lfcc_mostins
private

Definition at line 494 of file TEcnaRun.h.

Int_t** TEcnaRun::fT2d_NbOfEvts
private

Definition at line 419 of file TEcnaRun.h.

Double_t** TEcnaRun::fT2d_sig
private

Definition at line 430 of file TEcnaRun.h.

Int_t** TEcnaRun::fT2dCrysNumbersTable
private

Definition at line 504 of file TEcnaRun.h.

Double_t* TEcnaRun::fT3d1_AdcValues
private

Definition at line 416 of file TEcnaRun.h.

Double_t* TEcnaRun::fT3d1_cor_ss
private

Definition at line 441 of file TEcnaRun.h.

Double_t* TEcnaRun::fT3d1_cov_ss
private

Definition at line 436 of file TEcnaRun.h.

Double_t** TEcnaRun::fT3d2_AdcValues
private

Definition at line 415 of file TEcnaRun.h.

Double_t** TEcnaRun::fT3d2_cor_ss
private

Definition at line 440 of file TEcnaRun.h.

Double_t** TEcnaRun::fT3d2_cov_ss
private

Definition at line 435 of file TEcnaRun.h.

Double_t*** TEcnaRun::fT3d_AdcValues
private

Definition at line 414 of file TEcnaRun.h.

Double_t*** TEcnaRun::fT3d_cor_ss
private

Definition at line 439 of file TEcnaRun.h.

Double_t*** TEcnaRun::fT3d_cov_ss
private

Definition at line 434 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAdcEvt
private

Definition at line 417 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvHfn
private

Definition at line 468 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvLfn
private

Definition at line 463 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvMeanCorss
private

Definition at line 458 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvPed
private

Definition at line 448 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvSigCorss
private

Definition at line 473 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagAvTno
private

Definition at line 453 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagCorCss
private

Definition at line 442 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagCovCss
private

Definition at line 437 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagHFccMoStins
private

Definition at line 500 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagHfCor
private

Definition at line 491 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagHfCov
private

Definition at line 487 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagHfn
private

Definition at line 466 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagLFccMoStins
private

Definition at line 496 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagLfCor
private

Definition at line 482 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagLfCov
private

Definition at line 478 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagLfn
private

Definition at line 461 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagMeanCorss
private

Definition at line 456 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagMSp
private

Definition at line 428 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagNbOfEvts
private

Definition at line 421 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagPed
private

Definition at line 446 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagSigCorss
private

Definition at line 471 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagSSp
private

Definition at line 432 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagStinNumbers
private

Definition at line 424 of file TEcnaRun.h.

Int_t* TEcnaRun::fTagTno
private

Definition at line 451 of file TEcnaRun.h.

TString TEcnaRun::fTTBELL
private

Definition at line 376 of file TEcnaRun.h.