CMS 3D CMS Logo

TCnaRunEB Class Reference

#include <CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TCnaRunEB.h>

List of all members.

Public Member Functions

Bool_t BuildEventDistributions (const Int_t &, const Int_t &, const Int_t &, const Int_t &, const Double_t &)
Bool_t CloseRootFile (Text_t *)
void ComputeCorrectionFactorsToCorss ()
void ComputeCorrectionFactorsToCovss ()
void ComputeCorrectionsToSamplesFromCovss (const Int_t &)
void ComputeCorrelationsBetweenChannels ()
void ComputeCorrelationsBetweenChannelsMeanOverSamples ()
void ComputeCorrelationsBetweenSamples ()
void ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels ()
void ComputeCovariancesBetweenChannels ()
void ComputeCovariancesBetweenChannelsMeanOverSamples ()
void ComputeCovariancesBetweenSamples ()
void ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels ()
void ComputeExpectationValuesOfCorrelationsBetweenSamples ()
void ComputeExpectationValuesOfExpectationValuesOfSamples ()
void ComputeExpectationValuesOfSamples ()
void ComputeExpectationValuesOfSigmasOfSamples ()
void ComputeSigmasOfCorrelationsBetweenSamples ()
void ComputeSigmasOfExpectationValuesOfSamples ()
void ComputeSigmasOfSigmasOfSamples ()
void ComputeVariancesOfSamples ()
TString GetAnalysisName ()
Int_t GetFirstTakenEvent ()
Int_t GetNentries ()
Int_t GetNumberOfTakenEvents ()
void GetPathForResultsAsciiFiles (const TString)
void GetPathForResultsAsciiFiles ()
void GetPathForResultsRootFiles (const TString)
void GetPathForResultsRootFiles ()
void GetReadyToCompute ()
void GetReadyToReadData (TString, const Int_t &, Int_t &, Int_t &, const Int_t &, const Int_t &)
void GetReadyToReadData (TString, const Int_t &, Int_t &, Int_t &, const Int_t &)
TString GetRootFileNameShort ()
Int_t GetRunNumber ()
Int_t GetSMNumber ()
void Init ()
void MakeHistosOfSampleDistributions ()
void MakeHistosOfSamplesAsFunctionOfEvent ()
Bool_t OpenRootFile (Text_t *, TString)
TCnaRunEBoperator= (const TCnaRunEB &)
Int_t PickupNumberOfEvents (const Int_t &, const Int_t &)
void PrintAllComments ()
void PrintComments ()
void PrintNoComment ()
void PrintWarnings ()
void StartStopDate (TString, TString)
void StartStopTime (time_t, time_t)
 TCnaRunEB (const TCnaRunEB &)
 TCnaRunEB ()
void TRootCorCorrecCovCss (const Int_t &)
void TRootCorCss (const Int_t &)
void TRootCorMosccMot ()
void TRootCorSccMos ()
void TRootCovCorrecCovCss (const Int_t &)
void TRootCovCss (const Int_t &)
void TRootCovMosccMot ()
void TRootCovSccMos ()
void TRootEv ()
void TRootEvCorCss ()
void TRootEvEv ()
void TRootEvSig ()
void TRootEvts (const Int_t &)
void TRootEvtsXmax (const Int_t &)
void TRootEvtsXmin (const Int_t &)
void TRootLastEvtNumber ()
void TRootSampTime (const Int_t &)
void TRootSigCorCss ()
void TRootSigEv ()
void TRootSigSig ()
void TRootSvCorrecCovCss ()
void TRootTowerNumbers ()
void TRootVar ()
void WriteAsciiCnaChannelTable ()
void WriteAsciiCorCorrecCovCss (const Int_t &)
void WriteAsciiCorrelationsBetweenSamples (const Int_t &)
void WriteAsciiCovariancesBetweenSamples (const Int_t &)
void WriteAsciiCovCorrecCovCss (const Int_t &)
void WriteAsciiExpectationValuesOfCorrelationsBetweenSamples ()
void WriteAsciiExpectationValuesOfSamples ()
void WriteAsciiSigmasOfCorrelationsBetweenSamples ()
void WriteAsciiSvCorrecCovCss ()
void WriteAsciiVariancesOfSamples ()
Bool_t WriteRootFile (Text_t *)
Bool_t WriteRootFile ()
virtual ~TCnaRunEB ()

Private Member Functions

void fAsciiFileWriteHeader (const Int_t &)
void fCopy (const TCnaRunEB &)
void fMakeResultsFileName (const Int_t &)
void fT1dWriteAscii (const Int_t &, const Int_t &, const Int_t &)
void fT2dWriteAscii (const Int_t &, const Int_t &, const Int_t &)

Private Attributes

TString fAsciiFileName
TString fAsciiFileNameShort
Int_t fCdelete
TString fCfgResultsAsciiFilePath
TString fCfgResultsRootFilePath
Int_t fCnaCommand
Int_t fCnaError
Int_t fCnew
Int_t fCodeCorCorrecCovCss
Int_t fCodeCorCss
Int_t fCodeCorMosccMot
Int_t fCodeCorresp
Int_t fCodeCorScc
Int_t fCodeCorSccMos
Int_t fCodeCovCorrecCovCss
Int_t fCodeCovCss
Int_t fCodeCovMosccMot
Int_t fCodeCovScc
Int_t fCodeCovSccMos
Int_t fCodeEv
Int_t fCodeEvCorCss
Int_t fCodeEvEv
Int_t fCodeEvSig
Int_t fCodeEvts
Int_t fCodeHeaderAscii
Int_t fCodePrintAllComments
Int_t fCodePrintComments
Int_t fCodePrintNoComment
Int_t fCodePrintWarnings
Int_t fCodeRoot
Int_t fCodeSampTime
Int_t fCodeSigCorCss
Int_t fCodeSigEv
Int_t fCodeSigSig
Int_t fCodeSvCorrecCovCss
Int_t fCodeVar
Int_t fDim_name
ifstream fFcin_ra
ifstream fFcin_rr
ofstream fFcout_f
TString fFileForResultsAsciiFilePath
TString fFileForResultsRootFilePath
TCnaHeaderEBfFileHeader
Int_t fFlagPrint
Int_t fgMaxCar
Double_t * fjustap_1d_cc
Double_t * fjustap_1d_ev
Double_t * fjustap_1d_ss
Double_t * fjustap_1d_var
Double_t ** fjustap_2d_cc
Double_t ** fjustap_2d_ev
Double_t ** fjustap_2d_ss
Double_t ** fjustap_2d_var
Int_t fMaxMsgIndexForMiscDiag
Int_t * fMiscDiag
Int_t fNbChanByLine
Int_t fNbOfMiscDiagCounters
Int_t fNbSampByLine
Bool_t fOpenRootFile
Int_t fReadyToReadData
TString fRootFileName
TString fRootFileNameShort
Int_t fSectChanSizeX
Int_t fSectChanSizeY
Int_t fSectSampSizeX
Int_t fSectSampSizeY
Int_t fSpecialSMTowerNotIndexed
Double_t * fT1d_ev
Double_t * fT1d_ev_cor_ss
Double_t * fT1d_ev_ev
Double_t * fT1d_ev_sig
Int_t * fT1d_EvtNbInLoop
Double_t * fT1d_his_s
Int_t * fT1d_LastEvtNumber
Double_t * fT1d_sig_cor_ss
Double_t * fT1d_sig_ev
Double_t * fT1d_sig_sig
Int_t * fT1d_SMtowFromIndex
Double_t * fT1d_var
Double_t * fT1d_xmax
Double_t * fT1d_xmin
Int_t * fT1dCrysNumbersTable
Double_t * fT2d1_cor_cc_mos
Double_t * fT2d1_cor_moscc_mot
Double_t * fT2d1_cov_cc_mos
Double_t * fT2d1_cov_moscc_mot
Double_t * fT2d1_sv_correc_covss_s
Double_t ** fT2d_cor_cc_mos
Double_t ** fT2d_cor_moscc_mot
Double_t ** fT2d_cov_cc_mos
Double_t ** fT2d_cov_moscc_mot
Double_t ** fT2d_ev
Int_t ** fT2d_EvtNbInLoop
Double_t ** fT2d_his_s
Int_t ** fT2d_LastEvtNumber
Double_t ** fT2d_sv_correc_covss_s
Double_t ** fT2d_var
Double_t ** fT2d_xmax
Double_t ** fT2d_xmin
Int_t ** fT2dCrysNumbersTable
Double_t * fT3d1_cor_cc
Double_t * fT3d1_cor_correc_covss_s
Double_t * fT3d1_cor_ss
Double_t * fT3d1_cov_cc
Double_t * fT3d1_cov_correc_covss_s
Double_t * fT3d1_cov_ss
Double_t * fT3d1_distribs
Double_t ** fT3d2_cor_cc
Double_t ** fT3d2_cor_correc_covss_s
Double_t ** fT3d2_cor_ss
Double_t ** fT3d2_cov_cc
Double_t ** fT3d2_cov_correc_covss_s
Double_t ** fT3d2_cov_ss
Double_t ** fT3d2_distribs
Double_t *** fT3d_cor_cc
Double_t *** fT3d_cor_correc_covss_s
Double_t *** fT3d_cor_ss
Double_t *** fT3d_cov_cc
Double_t *** fT3d_cov_correc_covss_s
Double_t *** fT3d_cov_ss
Double_t *** fT3d_distribs
Double_t *** fT3d_his_s
Int_t * fTagCorCorrecCovCss
Int_t * fTagCorCss
Int_t * fTagCorMosccMot
Int_t * fTagCorScc
Int_t * fTagCorSccMos
Int_t * fTagCovCorrecCovCss
Int_t * fTagCovCss
Int_t * fTagCovMosccMot
Int_t * fTagCovScc
Int_t * fTagCovSccMos
Int_t * fTagEv
Int_t * fTagEvCorCss
Int_t * fTagEvEv
Int_t * fTagEvSig
Int_t * fTagEvtNbInLoop
Int_t * fTagEvts
Int_t * fTagLastEvtNumber
Int_t * fTagSampTime
Int_t * fTagSigCorCss
Int_t * fTagSigEv
Int_t * fTagSigSig
Int_t * fTagSvCorrecCovCss
Int_t * fTagTowerNumbers
Int_t * fTagVar
Int_t fTowerIndexBuilt
TString fTTBELL
Int_t fUserSamp
Int_t fUserSMEcha
TDistribfVal_dat2
TDistrib ** fVal_data


Detailed Description

Definition at line 39 of file TCnaRunEB.h.


Constructor & Destructor Documentation

TCnaRunEB::TCnaRunEB (  ) 

TCnaRunEB::TCnaRunEB ( const TCnaRunEB dcop  ) 

Definition at line 1152 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, and lat::endl().

01153 {
01154   cout << "*TCnaRunEB::TCnaRunEB(const TCnaRunEB& dcop)> "
01155        << " It is time to write a copy constructor" << endl
01156        << " type an integer value and then RETURN to continue"
01157        << endl;
01158   
01159   { Int_t cintoto;  cin >> cintoto; }
01160   
01161 }

TCnaRunEB::~TCnaRunEB (  )  [virtual]

Definition at line 1182 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintWarnings, fFileHeader, fFlagPrint, fjustap_1d_cc, fjustap_1d_ev, fjustap_1d_ss, fjustap_1d_var, fjustap_2d_cc, fjustap_2d_ev, fjustap_2d_ss, fjustap_2d_var, fMiscDiag, fNbOfMiscDiagCounters, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_ev_sig, fT1d_EvtNbInLoop, fT1d_his_s, fT1d_LastEvtNumber, fT1d_sig_cor_ss, fT1d_sig_ev, fT1d_sig_sig, fT1d_SMtowFromIndex, fT1d_var, fT1d_xmax, fT1d_xmin, fT1dCrysNumbersTable, fT2d1_cor_cc_mos, fT2d1_cor_moscc_mot, fT2d1_cov_cc_mos, fT2d1_cov_moscc_mot, fT2d1_sv_correc_covss_s, fT2d_cor_cc_mos, fT2d_cor_moscc_mot, fT2d_cov_cc_mos, fT2d_cov_moscc_mot, fT2d_ev, fT2d_EvtNbInLoop, fT2d_his_s, fT2d_LastEvtNumber, fT2d_sv_correc_covss_s, fT2d_var, fT2d_xmax, fT2d_xmin, fT2dCrysNumbersTable, fT3d1_cor_cc, fT3d1_cor_correc_covss_s, fT3d1_cor_ss, fT3d1_cov_cc, fT3d1_cov_correc_covss_s, fT3d1_cov_ss, fT3d1_distribs, fT3d2_cor_cc, fT3d2_cor_correc_covss_s, fT3d2_cor_ss, fT3d2_cov_cc, fT3d2_cov_correc_covss_s, fT3d2_cov_ss, fT3d2_distribs, fT3d_cor_cc, fT3d_cor_correc_covss_s, fT3d_cor_ss, fT3d_cov_cc, fT3d_cov_correc_covss_s, fT3d_cov_ss, fT3d_distribs, fT3d_his_s, fTagCorCorrecCovCss, fTagCorCss, fTagCorMosccMot, fTagCorScc, fTagCorSccMos, fTagCovCorrecCovCss, fTagCovCss, fTagCovMosccMot, fTagCovScc, fTagCovSccMos, fTagEv, fTagEvCorCss, fTagEvEv, fTagEvSig, fTagEvtNbInLoop, fTagEvts, fTagLastEvtNumber, fTagSampTime, fTagSigCorCss, fTagSigEv, fTagSigSig, fTagSvCorrecCovCss, fTagTowerNumbers, fTagVar, fTTBELL, fVal_dat2, fVal_data, and i.

01183 {
01184   //Destructor
01185   
01186   if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments ||
01187      fFlagPrint == fCodePrintWarnings )
01188     {
01189       cout << "*TCnaRunEB::~TCnaRunEB()> Entering destructor." << endl;
01190     }
01191 
01192   if(fFlagPrint == fCodePrintAllComments)
01193     {
01194       Int_t misc_czero = 0;
01195       for(Int_t i = 0; i < fNbOfMiscDiagCounters; i++)
01196         {
01197           if( fMiscDiag[i] != 0 )
01198             {
01199               cout << "                          fMiscDiag Counter "
01200                    << setw(3) << i << " = " << setw(9) << fMiscDiag[i]
01201                    << " (INFO: alloc on non zero freed zone) " << endl;
01202             }
01203           else
01204             {
01205               misc_czero++;
01206             }
01207         }
01208       cout << "                          Nb of fMiscDiag counters at zero: "
01209            << misc_czero << " (total nb of counters: "
01210            << fNbOfMiscDiagCounters << ")" << endl;
01211     }
01212 
01213   if (fMiscDiag                != 0){delete [] fMiscDiag;                 fCdelete++;}
01214   
01215   if (fFileHeader              != 0){delete fFileHeader;                  fCdelete++;}
01216   
01217   if (fT1d_SMtowFromIndex      != 0){delete [] fT1d_SMtowFromIndex;       fCdelete++;}
01218   
01219   if (fVal_data                != 0){delete [] fVal_data;                 fCdelete++;}
01220   if (fVal_dat2                != 0){delete [] fVal_dat2;                 fCdelete++;}
01221 
01222   if (fT2d_LastEvtNumber       != 0){delete [] fT2d_LastEvtNumber;        fCdelete++;}
01223   if (fT1d_LastEvtNumber       != 0){delete [] fT1d_LastEvtNumber;        fCdelete++;}
01224 
01225   if (fT2d_EvtNbInLoop         != 0){delete [] fT2d_EvtNbInLoop;          fCdelete++;}
01226   if (fT1d_EvtNbInLoop         != 0){delete [] fT1d_EvtNbInLoop;          fCdelete++;}
01227 
01228   if (fT3d_distribs            != 0){delete [] fT3d_distribs;             fCdelete++;}
01229   if (fT3d2_distribs           != 0){delete [] fT3d2_distribs;            fCdelete++;}
01230   if (fT3d1_distribs           != 0){delete [] fT3d1_distribs;            fCdelete++;}
01231 
01232   if (fT2d_ev                  != 0){delete [] fT2d_ev;                   fCdelete++;}
01233   if (fT1d_ev                  != 0){delete [] fT1d_ev;                   fCdelete++;}
01234 
01235   if (fT2d_var                 != 0){delete [] fT2d_var;                  fCdelete++;}
01236   if (fT1d_var                 != 0){delete [] fT1d_var;                  fCdelete++;}
01237 
01238   if (fT3d_his_s               != 0){delete [] fT3d_his_s;                fCdelete++;}
01239   if (fT2d_his_s               != 0){delete [] fT2d_his_s;                fCdelete++;}
01240   if (fT1d_his_s               != 0){delete [] fT1d_his_s;                fCdelete++;}
01241 
01242   if (fT2d_xmin                != 0){delete [] fT2d_xmin;                 fCdelete++;}
01243   if (fT1d_xmin                != 0){delete [] fT1d_xmin;                 fCdelete++;}
01244   if (fT2d_xmax                != 0){delete [] fT2d_xmax;                 fCdelete++;}
01245   if (fT1d_xmax                != 0){delete [] fT1d_xmax;                 fCdelete++;}
01246 
01247   if (fT3d_cov_ss              != 0){delete [] fT3d_cov_ss;               fCdelete++;}
01248   if (fT3d2_cov_ss             != 0){delete [] fT3d2_cov_ss;              fCdelete++;}
01249   if (fT3d1_cov_ss             != 0){delete [] fT3d1_cov_ss;              fCdelete++;}
01250 
01251   if (fT3d_cor_ss              != 0){delete [] fT3d_cor_ss;               fCdelete++;}
01252   if (fT3d2_cor_ss             != 0){delete [] fT3d2_cor_ss;              fCdelete++;}
01253   if (fT3d1_cor_ss             != 0){delete [] fT3d1_cor_ss;              fCdelete++;}
01254 
01255   if (fT3d_cov_cc              != 0){delete [] fT3d_cov_cc;               fCdelete++;}
01256   if (fT3d2_cov_cc             != 0){delete [] fT3d2_cov_cc;              fCdelete++;}
01257   if (fT3d1_cov_cc             != 0){delete [] fT3d1_cov_cc;              fCdelete++;}
01258 
01259   if (fT3d_cor_cc              != 0){delete [] fT3d_cor_cc;               fCdelete++;}
01260   if (fT3d2_cor_cc             != 0){delete [] fT3d2_cor_cc;              fCdelete++;}
01261   if (fT3d1_cor_cc             != 0){delete [] fT3d1_cor_cc;              fCdelete++;}
01262 
01263   if (fT2d_cov_cc_mos          != 0){delete [] fT2d_cov_cc_mos;           fCdelete++;}
01264   if (fT2d1_cov_cc_mos         != 0){delete [] fT2d1_cov_cc_mos;          fCdelete++;}
01265 
01266   if (fT2d_cor_cc_mos          != 0){delete [] fT2d_cor_cc_mos;           fCdelete++;}
01267   if (fT2d1_cor_cc_mos         != 0){delete [] fT2d1_cor_cc_mos;          fCdelete++;}
01268 
01269   if (fT2d_cov_moscc_mot       != 0){delete [] fT2d_cov_moscc_mot;        fCdelete++;}
01270   if (fT2d1_cov_moscc_mot      != 0){delete [] fT2d1_cov_moscc_mot ;      fCdelete++;}
01271 
01272   if (fT2d_cor_moscc_mot       != 0){delete [] fT2d_cor_moscc_mot ;       fCdelete++;}
01273   if (fT2d1_cor_moscc_mot      != 0){delete [] fT2d1_cor_moscc_mot;       fCdelete++;}
01274 
01275   if (fT1d_ev_ev               != 0){delete [] fT1d_ev_ev;                fCdelete++;}
01276   if (fT1d_ev_sig              != 0){delete [] fT1d_ev_sig;               fCdelete++;}
01277   if (fT1d_ev_cor_ss           != 0){delete [] fT1d_ev_cor_ss;            fCdelete++;}
01278 
01279   if (fT1d_sig_ev              != 0){delete [] fT1d_sig_ev;               fCdelete++;}
01280   if (fT1d_sig_sig             != 0){delete [] fT1d_sig_sig;              fCdelete++;}
01281   if (fT1d_sig_cor_ss          != 0){delete [] fT1d_sig_cor_ss;           fCdelete++;}
01282 
01283   if (fT2d_sv_correc_covss_s   != 0){delete [] fT2d_sv_correc_covss_s;    fCdelete++;}
01284   if (fT2d1_sv_correc_covss_s  != 0){delete [] fT2d1_sv_correc_covss_s;   fCdelete++;}
01285 
01286   if (fT3d_cov_correc_covss_s  != 0){delete [] fT3d_cov_correc_covss_s;   fCdelete++;}
01287   if (fT3d2_cov_correc_covss_s != 0){delete [] fT3d2_cov_correc_covss_s;  fCdelete++;}
01288   if (fT3d1_cov_correc_covss_s != 0){delete [] fT3d1_cov_correc_covss_s;  fCdelete++;}
01289 
01290   if (fT3d_cor_correc_covss_s  != 0){delete [] fT3d_cor_correc_covss_s;   fCdelete++;}
01291   if (fT3d2_cor_correc_covss_s != 0){delete [] fT3d2_cor_correc_covss_s;  fCdelete++;}
01292   if (fT3d1_cor_correc_covss_s != 0){delete [] fT3d1_cor_correc_covss_s;  fCdelete++;} 
01293 
01294   if (fT2dCrysNumbersTable     != 0){delete [] fT2dCrysNumbersTable;      fCdelete++;}
01295   if (fT1dCrysNumbersTable     != 0){delete [] fT1dCrysNumbersTable;      fCdelete++;}
01296 
01297   if (fjustap_2d_ev            != 0){delete [] fjustap_2d_ev;             fCdelete++;}
01298   if (fjustap_1d_ev            != 0){delete [] fjustap_1d_ev;             fCdelete++;}
01299   if (fjustap_2d_var           != 0){delete [] fjustap_2d_var;            fCdelete++;}
01300   if (fjustap_1d_var           != 0){delete [] fjustap_1d_var;            fCdelete++;}
01301   if (fjustap_2d_cc            != 0){delete [] fjustap_2d_cc;             fCdelete++;}
01302   if (fjustap_1d_cc            != 0){delete [] fjustap_1d_cc;             fCdelete++;}
01303   if (fjustap_2d_ss            != 0){delete [] fjustap_2d_ss;             fCdelete++;}
01304   if (fjustap_1d_ss            != 0){delete [] fjustap_1d_ss;             fCdelete++;}
01305 
01306   if (fTagTowerNumbers         != 0){delete [] fTagTowerNumbers;          fCdelete++;}
01307   if (fTagLastEvtNumber        != 0){delete [] fTagLastEvtNumber;         fCdelete++;}
01308   if (fTagEvtNbInLoop          != 0){delete [] fTagEvtNbInLoop;           fCdelete++;}
01309   if (fTagSampTime             != 0){delete [] fTagSampTime;              fCdelete++;}
01310   if (fTagEv                   != 0){delete [] fTagEv;                    fCdelete++;}
01311   if (fTagVar                  != 0){delete [] fTagVar;                   fCdelete++;}
01312   if (fTagEvts                 != 0){delete [] fTagEvts;                  fCdelete++;}
01313 
01314   if (fTagCovCss               != 0){delete [] fTagCovCss;                fCdelete++;}
01315   if (fTagCorCss               != 0){delete [] fTagCorCss;                fCdelete++;}
01316 
01317   if (fTagCovScc               != 0){delete [] fTagCovScc;                fCdelete++;}
01318   if (fTagCorScc               != 0){delete [] fTagCorScc;                fCdelete++;}
01319   if (fTagCovSccMos            != 0){delete [] fTagCovSccMos;             fCdelete++;}
01320   if (fTagCorSccMos            != 0){delete [] fTagCorSccMos;             fCdelete++;}
01321 
01322   if (fTagCovMosccMot          != 0){delete [] fTagCovMosccMot;           fCdelete++;}
01323   if (fTagCorMosccMot          != 0){delete [] fTagCorMosccMot;           fCdelete++;}
01324 
01325   if (fTagEvEv                 != 0){delete [] fTagEvEv;                  fCdelete++;}
01326   if (fTagEvSig                != 0){delete [] fTagEvSig;                 fCdelete++;}
01327   if (fTagEvCorCss             != 0){delete [] fTagEvCorCss;              fCdelete++;}
01328 
01329   if (fTagSigEv                != 0){delete [] fTagSigEv;                 fCdelete++;}
01330   if (fTagSigSig               != 0){delete [] fTagSigSig;                fCdelete++;}
01331   if (fTagSigCorCss            != 0){delete [] fTagSigCorCss;             fCdelete++;}
01332 
01333   if (fTagSvCorrecCovCss       != 0){delete [] fTagSvCorrecCovCss;        fCdelete++;}
01334   if (fTagCovCorrecCovCss      != 0){delete [] fTagCovCorrecCovCss;       fCdelete++;}
01335   if (fTagCorCorrecCovCss      != 0){delete [] fTagCorCorrecCovCss;       fCdelete++;}
01336 
01337   if ( fCnew != fCdelete )
01338     {
01339       cout << "!TCnaRunEB::~TCnaRunEB()> WRONG MANAGEMENT OF MEMORY ALLOCATIONS: fCnew = "
01340            << fCnew << ", fCdelete = " << fCdelete << fTTBELL << endl;
01341     }
01342   else
01343     {
01344       // cout << "*TCnaRunEB::~TCnaRunEB()> Management of memory allocations: OK. fCnew = "
01345       //   << fCnew << ", fCdelete = " << fCdelete << endl;
01346     }
01347   
01348   if(fFlagPrint == fCodePrintComments || fFlagPrint == fCodePrintWarnings )
01349     {
01350       cout << "*TCnaRunEB::~TCnaRunEB()> Exiting destructor." << endl;
01351     }
01352   if(fFlagPrint == fCodePrintAllComments)
01353     {
01354       cout << "*TCnaRunEB::~TCnaRunEB()> Exiting destructor (this = " << this << ")." << endl
01355            << "~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#"
01356            << endl;
01357     }
01358 }


Member Function Documentation

Bool_t TCnaRunEB::BuildEventDistributions ( const Int_t &  ievent,
const Int_t &  SMtower,
const Int_t &  TowEcha,
const Int_t &  sample,
const Double_t &  adcvalue 
)

Definition at line 1782 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintAllComments, fCodePrintComments, TCnaHeaderEB::fEvtNbInLoopCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fLastEvtNumberCalc, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxCrysInTow, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fMaxTowInSM, TCnaHeaderEB::fNbOfTakenEvts, fReadyToReadData, fSpecialSMTowerNotIndexed, fT1d_SMtowFromIndex, fT2d_EvtNbInLoop, fT2d_LastEvtNumber, fT3d_distribs, fTagEvtNbInLoop, fTagLastEvtNumber, fTagTowerNumbers, fTowerIndexBuilt, TCnaHeaderEB::fTowerNumbersCalc, and fTTBELL.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::analyze().

01785 {
01786   //Building of the arrays fT1d_SMtowFromIndex[] and fT3d_distribs[][][]
01787   
01788   Bool_t ret_code = kFALSE;
01789   Int_t  i_SMtow  = SMtower-1;  // INDEX FOR SMTower = Number_of_the_tower_in_SM - 1
01790   Int_t  i_trouve = 0;
01791 
01792   if(fReadyToReadData == 1)  
01793     {
01794       if( SMtower>= 1 && SMtower <= fFileHeader->fMaxTowInSM )
01795         {      
01796           if( TowEcha >= 0 && TowEcha < fFileHeader->fMaxCrysInTow )
01797             {
01798               if( sample >= 0 && sample < fFileHeader->fMaxSampADC )
01799                 {
01800                   //..... Put the SMtower number in 1D array fT1d_SMtowFromIndex[] = tower index + 1
01801                   if(fT1d_SMtowFromIndex != 0)       // table fT1d_SMtowFromIndex[index] already allocated
01802                     {
01803                       ret_code = kTRUE;
01804 
01805                       // SMtower already indexed
01806                       if( SMtower == fT1d_SMtowFromIndex[i_SMtow] )
01807                         {
01808                           i_trouve = 1;
01809                         }
01810                   
01811                       // SMtower index not found: new SMtower
01812                       if (i_trouve != 1 )
01813                         {
01814                           if ( fT1d_SMtowFromIndex[i_SMtow] == fSpecialSMTowerNotIndexed )
01815                             {
01816                               fT1d_SMtowFromIndex[i_SMtow] = SMtower;
01817                               fFileHeader->fTowerNumbersCalc = 1;
01818                               fTagTowerNumbers[0] = 1;
01819                               fTowerIndexBuilt++;                      //  number of found towers
01820                           
01821                               if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments){
01822                                 cout << "*TCnaRunEB::BuildEventDistributions(...)> event " << ievent
01823                                      << " : first event for tower " << fT1d_SMtowFromIndex[i_SMtow]
01824                                      << " (" << fTowerIndexBuilt << " towers found)" << endl;}
01825                               ret_code = kTRUE;
01826                             }
01827                           else
01828                             {
01829                               cout << "!TCnaRunEB::BuildEventDistributions(...)> *** ERROR ***> IMPOSSIBILITY. " 
01830                                    << " SMtower= " << SMtower << ", fT1d_SMtowFromIndex[" << i_SMtow << "] = "
01831                                    << fT1d_SMtowFromIndex[i_SMtow]
01832                                    << ", fTowerIndexBuilt = " << fTowerIndexBuilt
01833                                    << fTTBELL << endl;
01834                               ret_code = kFALSE;
01835                             }
01836                         }
01837                     }
01838                   else
01839                     {
01840                       cout << "!TCnaRunEB, BuildEventDistributions *** ERROR ***> "
01841                            << " fT1d_SMtowFromIndex = " << fT1d_SMtowFromIndex
01842                            << " fT1d_SMtowFromIndex[] ALLOCATION NOT DONE" << fTTBELL << endl;
01843                       ret_code = kFALSE;
01844                     }
01845                 }
01846               else
01847                 {
01848                   cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01849                        << " sample number = " << sample << ". OUT OF BOUNDS"
01850                        << " (max = " << fFileHeader->fMaxSampADC << ")"
01851                        << fTTBELL << endl;
01852                   ret_code = kFALSE;
01853                 }
01854             }
01855           else
01856             {
01857               cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01858                    << " TowEcha number = " << TowEcha << ". OUT OF BOUNDS"
01859                    << " (max = " << fFileHeader->fMaxCrysInTow << ")"
01860                    << fTTBELL << endl;
01861               ret_code = kFALSE;
01862             }
01863         }
01864       else
01865         {
01866           cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01867                << " SMtower number = " << SMtower << ". OUT OF BOUNDS"
01868                << " (max = " << fFileHeader->fMaxTowInSM << ")"
01869                << fTTBELL << endl;
01870           ret_code = kFALSE;
01871         }
01872 
01873       //........ Filling of the 2D array of the event numbers in the data reading loop and 
01874       //         filling of the 3D array of the ADC sample values
01875 
01876       if( ret_code == kTRUE )
01877         {
01878           //............ 1) Conversion (tower,TowEcha) -> SMEcha
01879           Int_t SMEcha = i_SMtow*fFileHeader->fMaxCrysInTow + TowEcha;
01880           
01881           if( SMEcha >= 0 && SMEcha < fFileHeader->fMaxCrysInSM )
01882             {
01883               //............ 2) Increase of the nb of evts for (SMEcha,sample)
01884               (fT2d_LastEvtNumber[SMEcha][sample])++;     // value after first incrementation = 0
01885               fTagLastEvtNumber[0] = 1;
01886               fFileHeader->fLastEvtNumberCalc = 1;
01887               //if(fBuildEvtDistrib == 0){fBuildEvtDistrib = 1;} // set flag of building
01888               
01889               //............ 3) Filling of the array fT2d_EvtNbInLoop[tower][cna event number]
01890               Int_t k_event = fT2d_LastEvtNumber[SMEcha][sample];
01891 
01892               if ( k_event >= 0 && k_event < fFileHeader->fNbOfTakenEvts )
01893                 { 
01894                   fT2d_EvtNbInLoop[i_SMtow][k_event] = ievent;
01895                 }
01896               else
01897                 {
01898                   cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01899                        << " last event number = " << k_event << ". OUT OF BOUNDS"
01900                        << " (range = [0," << fFileHeader->fNbOfTakenEvts-1
01901                        << "]). Channel# = " << SMEcha << ", sample = " << sample
01902                        << fTTBELL << endl;
01903                   ret_code = kFALSE;
01904                 }
01905               fTagEvtNbInLoop[0] = 1;
01906               fFileHeader->fEvtNbInLoopCalc = 1;
01907               
01908               //............ 4) Filling of the 3D array of the ADC values
01909               if ( ievent >= 0 && ievent < fFileHeader->fNbOfTakenEvts )
01910                 {  
01911                   fT3d_distribs[SMEcha][sample][ievent] = adcvalue;
01912                 }
01913               else
01914                 {
01915                   cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01916                        << " event number = " << ievent << ". OUT OF BOUNDS"
01917                        << " (max = " << fFileHeader->fNbOfTakenEvts << ")"
01918                        << fTTBELL << endl;
01919                   ret_code = kFALSE;
01920                 }
01921             }
01922           else
01923             {
01924               cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> "
01925                    << " CHANNEL NUMBER OUT OF BOUNDS" << endl
01926                    << " SMEcha number = " << SMEcha
01927                    << " , SMtower = " << SMtower
01928                    << " , TowEcha = " << TowEcha
01929                    << " , fFileHeader->fMaxCrysInSM = " << fFileHeader->fMaxCrysInSM 
01930                    << fTTBELL << endl; 
01931               ret_code = kFALSE;
01932               // {Int_t cintoto; cout << "TAPER 0 POUR CONTINUER" << endl; cin >> cintoto;}
01933             }
01934         }
01935       else
01936         {
01937           cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> ret_code = kFALSE "
01938                << fTTBELL << endl;
01939         }
01940     }
01941   else
01942     {
01943       cout << "!TCnaRunEB::BuildEventDistributions(...) *** ERROR ***> GetReadyToReadData(...) not called."
01944            << fTTBELL << endl;
01945       ret_code = kFALSE;
01946     }
01947 
01948   if (ret_code == kFALSE)
01949     {
01950       cout << "*> ievent: " << ievent
01951            << ", SMtower: " << SMtower
01952            << ", TowEcha: " << TowEcha
01953            << ", sample: "  << sample
01954            << ", adcvalue: " << adcvalue << endl;
01955     } 
01956 
01957   return ret_code;
01958 }

Bool_t TCnaRunEB::CloseRootFile ( Text_t *  name  ) 

Definition at line 3745 of file TCnaRunEB.cc.

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

Referenced by WriteRootFile().

03745                                             {
03746 //Close the Root file
03747  
03748   Bool_t ok_close = kFALSE;
03749 
03750   if (fOpenRootFile == kTRUE ) 
03751     {
03752       gCnaRootFile->CloseFile();
03753 
03754       if(fFlagPrint == fCodePrintAllComments){
03755         cout << "*TCnaRunEB::CloseRootFile> Close ROOT file OK " << endl;}
03756 
03757       delete gCnaRootFile;                                     fCdelete++;
03758       fOpenRootFile = kFALSE;
03759       ok_close      = kTRUE;
03760     }
03761   else
03762     {
03763       cout << "*TCnaRunEB::CloseRootFile(...)> no close since no file is open"
03764            << fTTBELL << endl;
03765     }
03766 
03767   return ok_close;
03768 }

void TCnaRunEB::ComputeCorrectionFactorsToCorss (  ) 

Definition at line 3450 of file TCnaRunEB.cc.

References ComputeCorrectionFactorsToCovss(), ComputeCovariancesBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCorCorrecCovCssCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT3d1_cor_correc_covss_s, fT3d2_cor_correc_covss_s, fT3d_cor_correc_covss_s, fTagCorCorrecCovCss, fTagCovCorrecCovCss, fTagCovCss, i, and j.

03451 {
03452 // Calculation of the corrections factors to the (sample,sample)
03453 // correlations for all the SMEchas
03454   
03455   //................... Allocations correction correlations/covss + init to zero (mandatory)
03456   if( fT3d_cor_correc_covss_s == 0 ){
03457     Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
03458     Int_t n_samp = fFileHeader->fMaxSampADC;
03459     fT3d_cor_correc_covss_s  = new Double_t**[n_SMEcha];               fCnew++;
03460     fT3d2_cor_correc_covss_s = new  Double_t*[n_SMEcha*n_samp];        fCnew++;
03461     fT3d1_cor_correc_covss_s = new   Double_t[n_SMEcha*n_samp*n_samp]; fCnew++;
03462     for(Int_t i = 0 ; i < n_SMEcha ; i++){
03463       fT3d_cor_correc_covss_s[i] = &fT3d2_cor_correc_covss_s[0] + i*n_samp;
03464       for(Int_t j = 0 ; j < n_samp ; j++){
03465         fT3d2_cor_correc_covss_s[n_samp*i+j] =
03466           &fT3d1_cor_correc_covss_s[0]+n_samp*(n_samp*i+j);}}   
03467   }
03468  
03469   for(Int_t i_SMEcha = 0; i_SMEcha <fFileHeader->fMaxCrysInSM; i_SMEcha++)
03470     {  
03471       for(Int_t i_samp = 0; i_samp <fFileHeader->fMaxSampADC; i_samp++)
03472         {
03473           for(Int_t j_samp = 0; j_samp <fFileHeader->fMaxSampADC; j_samp++)
03474             {
03475               if( fT3d_cor_correc_covss_s[i_SMEcha][i_samp][j_samp] != (Double_t)0 )
03476                 {fMiscDiag[21]++; fT3d_cor_correc_covss_s[i_SMEcha][i_samp][j_samp] = (Double_t)0;}
03477             }
03478         }
03479     }
03480  
03481   //.. preliminary calculation of the covariances if not done yet
03482   //    (test only the first elt since the cov ara computed globaly)
03483   
03484   if ( fTagCovCss[0] != 1 ) { ComputeCovariancesBetweenSamples(); }
03485    
03486   //.. Calculation of the correction factor to the covariances (f_{jj'})
03487   //   if not done yet
03488   
03489   if ( fTagCovCorrecCovCss[0] != 1 ) ComputeCorrectionFactorsToCovss();
03490 
03491   if(fFlagPrint == fCodePrintAllComments){
03492     cout << "*TCnaRunEB::ComputeCorrectionFactorsToCorss>" << endl
03493          << "          Calculation of the correction factors to the"
03494          << " (sample,sample) correlations for all the SMEchas" << endl;}
03495 
03496   //...... Calculation of the correction factor to the correlations (g_{jj'})
03497   //       g_{jj'} = f_{jj'}/ ( sqrt(f_{jj} sqrt(f_{j'j'}) )
03498 
03499   for ( Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03500     {
03501       // to be done...
03502       fTagCorCorrecCovCss[i_SMEcha] = 1;         fFileHeader->fCorCorrecCovCssCalc++;
03503     }
03504 }

void TCnaRunEB::ComputeCorrectionFactorsToCovss (  ) 

Definition at line 3313 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, TCnaHeaderEB::fCovCorrecCovCssCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT3d1_cov_correc_covss_s, fT3d2_cov_correc_covss_s, fT3d_cov_correc_covss_s, fTagCovCorrecCovCss, fTagCovCss, i, and j.

Referenced by ComputeCorrectionFactorsToCorss().

03314 {
03315 //Calculation of the corrections factors
03316 //to the (sample,sample) covariances for all the SMEchas
03317   
03318   //................... Allocations correction covariances/covss + init to zero
03319   if (fT3d_cov_correc_covss_s == 0 ){
03320     Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
03321     Int_t n_samp = fFileHeader->fMaxSampADC;
03322     fT3d_cov_correc_covss_s  = new Double_t**[n_SMEcha];               fCnew++;
03323     fT3d2_cov_correc_covss_s = new  Double_t*[n_SMEcha*n_samp];        fCnew++;
03324     fT3d1_cov_correc_covss_s = new   Double_t[n_SMEcha*n_samp*n_samp]; fCnew++;
03325     for(Int_t i = 0 ; i < n_SMEcha ; i++){
03326       fT3d_cov_correc_covss_s[i] = &fT3d2_cov_correc_covss_s[0] + i*n_samp;
03327       for(Int_t j = 0 ; j < n_samp ; j++){
03328         fT3d2_cov_correc_covss_s[n_samp*i+j] =
03329           &fT3d1_cov_correc_covss_s[0]+n_samp*(n_samp*i+j);}}
03330   }
03331   
03332   for(Int_t i_SMEcha = 0; i_SMEcha <fFileHeader->fMaxCrysInSM; i_SMEcha++)
03333     {  
03334       for(Int_t i_samp = 0; i_samp <fFileHeader->fMaxSampADC; i_samp++)
03335         {
03336           for(Int_t j_samp = 0; j_samp <fFileHeader->fMaxSampADC; j_samp++)
03337             {
03338               if( fT3d_cov_correc_covss_s[i_SMEcha][i_samp][j_samp] != (Double_t)0 )
03339                 {fMiscDiag[18]++; fT3d_cov_correc_covss_s[i_SMEcha][i_samp][j_samp] = (Double_t)0;}
03340             }
03341         }
03342     }
03343   
03344   //.. preliminary calculation of the covariances if not done yet
03345   //    (test only the first elt since the cov ara computed globaly) 
03346   
03347   if ( fTagCovCss[0] != 1 ) { ComputeCovariancesBetweenSamples(); }
03348  
03349   if(fFlagPrint == fCodePrintAllComments){
03350     cout << "*TCnaRunEB::ComputeCorrectionFactorsToCovss>" << endl
03351          << "          Calculation of the correction factors to the"
03352          << " (sample,sample) covariances for all the SMEchas" << endl;}
03353 
03354  
03355   //.. Calculation of the sum (on mp_samp) of the covariances
03356   //   (sample m_samp , sample mp_samp) as a function of m_samp
03357   //   (array sum_cov[mp_samp])
03358 
03359   //........ ALLOCATION + init to zero (mandatory)
03360   Double_t** sum_cov   = new Double_t*[fFileHeader->fMaxCrysInSM];                         fCnew++;
03361   Double_t*  sum_cov12 = new Double_t[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC];  fCnew++;
03362   
03363   for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
03364     {sum_cov[i_SMEcha] = &sum_cov12[0] + i_SMEcha*fFileHeader->fMaxSampADC;}
03365   
03366   for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
03367     {
03368       for(Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxCrysInSM ; i_samp++)
03369         {
03370           if( sum_cov[i_SMEcha][i_samp] != (Double_t)0 )
03371             {fMiscDiag[19]++; sum_cov[i_SMEcha][i_samp] = (Double_t)0;}
03372         }
03373     }
03374   
03375   //........ CALCULATION
03376   for (Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03377     {
03378       // to be done...
03379     }
03380 
03381   //..... Calculation of the Double_t sum (on m_samp and mp_samp)
03382   //      of the covariances (sample m_samp , sample mp_samp)
03383   //      (number sum_sum_cov)
03384 
03385   //........ ALLOCATION + init to zerop (mandatory)
03386   Double_t*  sum_sum_cov = new Double_t[fFileHeader->fMaxCrysInSM];     fCnew++;
03387   for (Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03388     {sum_sum_cov[i_SMEcha] = (Double_t)0;}
03389 
03390   //........ CALCULATION
03391   for (Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03392     {     
03393       for (Int_t m_samp = 0; m_samp < fFileHeader->fMaxSampADC; m_samp++)
03394         {     
03395           sum_sum_cov[i_SMEcha] = sum_sum_cov[i_SMEcha] + sum_cov[i_SMEcha][m_samp];
03396         }
03397     }
03398   
03399   //... Calculation of the correction factors to the covariances (f_{jj'})
03400   //      f_{jj'} = 1 - c_{jj'}  
03401 
03402   //........ ALLOCATION + init to zero (mandatory)
03403   Double_t*** sum_cov_num1   = new Double_t**[fFileHeader->fMaxCrysInSM];                          fCnew++;
03404   Double_t**  sum_cov_num12  = new  Double_t*[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC]; fCnew++;
03405   Double_t*   sum_cov_num123 =
03406     new   Double_t[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC*fFileHeader->fMaxSampADC];   fCnew++;
03407 
03408   for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
03409     {
03410       sum_cov_num1[i_SMEcha] = &sum_cov_num12[0] + i_SMEcha*fFileHeader->fMaxSampADC;
03411       for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03412         {
03413           sum_cov_num12[i_SMEcha*fFileHeader->fMaxSampADC + i_samp] =
03414             &sum_cov_num123[0] + (i_SMEcha*fFileHeader->fMaxSampADC + i_samp)*fFileHeader->fMaxSampADC;
03415         }
03416     }
03417 
03418   for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
03419     {
03420       for(Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
03421         {
03422           for(Int_t j_samp = 0 ; j_samp < fFileHeader->fMaxSampADC ; j_samp++)
03423             {
03424               if( sum_cov_num1[i_SMEcha][i_samp][j_samp] != (Double_t)0 )
03425                 {fMiscDiag[20]++; sum_cov_num1[i_SMEcha][i_samp][j_samp] = (Double_t)0;}
03426             }
03427         }
03428     }
03429   
03430   //........ CALCULATION
03431   for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
03432     {
03433       // to be done...
03434       fTagCovCorrecCovCss[i_SMEcha] = 1;           fFileHeader->fCovCorrecCovCssCalc++;
03435     }
03436 
03437   delete [] sum_cov;                                fCdelete++;
03438   delete [] sum_cov12;                              fCdelete++;
03439   delete [] sum_sum_cov;                            fCdelete++;
03440   delete [] sum_cov_num1;                           fCdelete++;
03441   delete [] sum_cov_num12;                          fCdelete++;
03442   delete [] sum_cov_num123;                         fCdelete++;
03443 }

void TCnaRunEB::ComputeCorrectionsToSamplesFromCovss ( const Int_t &  nb_first_samples  ) 

Definition at line 3264 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, TCnaHeaderEB::fSvCorrecCovCssCalc, fT2d1_sv_correc_covss_s, fT2d_sv_correc_covss_s, fTagCovCss, fTagSvCorrecCovCss, and i.

03265 {
03266 // Calulation of the corrections coefficients to the sample values
03267 // for all the SMEchas from cov(s,s)
03268   
03269   //................... Allocations correction samples/covss + init to zero (mandatory)
03270   if( fT2d_sv_correc_covss_s == 0 ){
03271     Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
03272     Int_t n_samp = fFileHeader->fMaxSampADC;
03273     fT2d_sv_correc_covss_s = new Double_t*[n_SMEcha];                 fCnew++;
03274     fT2d1_sv_correc_covss_s = new  Double_t[n_SMEcha*n_samp];         fCnew++;  
03275     for(Int_t i = 0 ; i < n_SMEcha ; i++){
03276       fT2d_sv_correc_covss_s[i] = &fT2d1_sv_correc_covss_s[0] + i*n_samp;}
03277   }
03278 
03279   for(Int_t i_SMEcha = 0; i_SMEcha <fFileHeader->fMaxCrysInSM; i_SMEcha++)
03280     {  
03281       for(Int_t i_samp = 0; i_samp <fFileHeader->fMaxSampADC; i_samp++)
03282         {
03283           if( fT2d_sv_correc_covss_s[i_SMEcha][i_samp] != (Double_t)0 )
03284             {fMiscDiag[17]++; fT2d_sv_correc_covss_s[i_SMEcha][i_samp] = (Double_t)0;}
03285         }
03286     }
03287   
03288   if(fFlagPrint == fCodePrintAllComments){
03289     cout << "*TCnaRunEB::ComputeCorrectionsToSamplesFromCovss()>" << endl
03290          << "          Calculation of the correction coefficients to sample values"
03291          << " for all the SMEchas from the (sample,sample) covariances" << endl;}
03292 
03293   //.. preliminary calculation of the covariances if not done yet
03294   if ( fTagCovCss[0] != 1 ) { ComputeCovariancesBetweenSamples(); }
03295   
03296   //................. Calculation
03297   //----------------- Loop on the SMEchas 
03298   for(Int_t i_SMEcha = 0; i_SMEcha <fFileHeader->fMaxCrysInSM; i_SMEcha++)
03299     {
03300       // to be done...     
03301     }
03302 
03303   fTagSvCorrecCovCss[0] = 1;            fFileHeader->fSvCorrecCovCssCalc++;
03304 }

void TCnaRunEB::ComputeCorrelationsBetweenChannels (  ) 

Definition at line 2680 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenChannels(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCorSccCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT3d1_cor_cc, fT3d2_cor_cc, fT3d_cor_cc, fT3d_cov_cc, fTagCorScc, fTagCovScc, i, j, and funct::sqrt().

Referenced by ComputeCorrelationsBetweenChannelsMeanOverSamples().

02681 {
02682 //Calculation of the correlations between SMEchas for all the samples
02683   
02684   //... preliminary calculation of the covariances if not done yet.
02685   //    Test only the first tag since the cov are computed globaly
02686   //    but set all the tags to 0 because we want not to write
02687   //    the covariances in the result ROOT file  
02688   if ( fTagCovScc[0] != 1 ){ComputeCovariancesBetweenChannels();
02689   for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02690     {fTagCovScc[k_samp] = 0;}}
02691   
02692   //............ calculation of the correlations from the covariances
02693   
02694   if(fFlagPrint == fCodePrintAllComments){
02695     cout << "*TCnaRunEB::ComputeCorrelationsBetweenChannels()>"
02696          << " Calculation of the correlations between SMEchas"
02697          << " for all the samples." << endl;}
02698  
02699   //................... Allocations cor_cc
02700   if ( fT3d_cor_cc == 0 ){ 
02701     const Int_t n_samp = fFileHeader->fMaxSampADC;
02702     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02703     fT3d_cor_cc  = new Double_t**[n_samp];                    fCnew++;  
02704     fT3d2_cor_cc = new  Double_t*[n_samp*n_SMEcha];           fCnew++;  
02705     fT3d1_cor_cc = new   Double_t[n_samp*n_SMEcha*n_SMEcha];  fCnew++;  
02706     for(Int_t i = 0 ; i < n_samp ; i++){
02707       fT3d_cor_cc[i] = &fT3d2_cor_cc[0] + i*n_SMEcha;
02708       for(Int_t j = 0 ; j < n_SMEcha ; j++){
02709         fT3d2_cor_cc[n_SMEcha*i+j] = &fT3d1_cor_cc[0]+n_SMEcha*(n_SMEcha*i+j);}}
02710   }
02711   
02712   //........................... Calculation (=init)
02713   //........................... computation of half of the matrix, diagonal included (verif=1)
02714   for (Int_t n_samp = 0 ; n_samp < fFileHeader->fMaxSampADC ; n_samp++)
02715     {
02716       for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02717         {
02718           for (Int_t j_SMEcha = 0 ; j_SMEcha <= i_SMEcha ; j_SMEcha++)
02719             {
02720               if(  fT3d_cov_cc[n_samp][i_SMEcha][i_SMEcha] > 0
02721                    && fT3d_cov_cc[n_samp][j_SMEcha][j_SMEcha] > 0 )
02722                 {
02723                   fT3d_cor_cc[n_samp][i_SMEcha][j_SMEcha] =
02724                     fT3d_cov_cc[n_samp][i_SMEcha][j_SMEcha]/
02725                     (  (Double_t)sqrt(fT3d_cov_cc[n_samp][i_SMEcha][i_SMEcha]) *
02726                        (Double_t)sqrt(fT3d_cov_cc[n_samp][j_SMEcha][j_SMEcha])  );
02727                 }
02728               else
02729                 {
02730                   fT3d_cor_cc[n_samp][i_SMEcha][j_SMEcha] = (Double_t)0.;
02731                 }
02732 
02733               fT3d_cor_cc[n_samp][j_SMEcha][i_SMEcha] = fT3d_cor_cc[n_samp][i_SMEcha][j_SMEcha];
02734             }
02735         }
02736       fTagCorScc[n_samp] = 1;    fFileHeader->fCorSccCalc++;
02737     }
02738 }

void TCnaRunEB::ComputeCorrelationsBetweenChannelsMeanOverSamples (  ) 

Definition at line 2746 of file TCnaRunEB.cc.

References ComputeCorrelationsBetweenChannels(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCorSccMosCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT2d1_cor_cc_mos, fT2d_cor_cc_mos, fT3d_cor_cc, fTagCorScc, and fTagCorSccMos.

Referenced by ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels().

02747 {
02748 //Calculation of the correlations between SMEchas for all the samples
02749 // averaged over the samples
02750 
02751   //... preliminary calculation of the covariances if not done yet.
02752   //    Test only the first tag since the cov are computed globaly
02753   //    but set all the tags to 0 because we want not to write
02754   //    the covariances in the result ROOT file  
02755   if ( fTagCorScc[0] != 1 ){ComputeCorrelationsBetweenChannels();
02756   for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02757     {fTagCorScc[k_samp] = 0;}}
02758 
02759   //.................. Mean over the samples  
02760   if(fFlagPrint == fCodePrintAllComments){
02761     cout << "*TCnaRunEB::ComputeCorrelationsBetweenChannelsMeanOverSamples()>"
02762          << " Calculation of the correlations between SMEchas"
02763          << " Calculation of the average over the samples." << endl;}
02764 
02765   //................. allocation cor_cc_mos + init to zero (mandatory)
02766   if( fT2d_cor_cc_mos == 0 ){
02767     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02768     fT2d_cor_cc_mos   = new Double_t*[n_SMEcha];                   fCnew++;  
02769     fT2d1_cor_cc_mos  = new  Double_t[n_SMEcha*n_SMEcha];          fCnew++;  
02770     for(Int_t i_SMEcha = 0 ; i_SMEcha < n_SMEcha ; i_SMEcha++){
02771         fT2d_cor_cc_mos[i_SMEcha] = &fT2d1_cor_cc_mos[0] + i_SMEcha*n_SMEcha;} 
02772   }
02773 
02774   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02775     {
02776       for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02777         {
02778           if( fT2d_cor_cc_mos[i_SMEcha][j_SMEcha] != (Double_t)0 )
02779             {fMiscDiag[8]++; fT2d_cor_cc_mos[i_SMEcha][j_SMEcha] = (Double_t)0;}
02780         }
02781     }
02782   
02783   //................. Calculation of the mean over the samples
02784   
02785   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02786     {
02787       for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02788         {
02789           for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02790             {
02791               fT2d_cor_cc_mos[i_SMEcha][j_SMEcha] += fT3d_cor_cc[k_samp][i_SMEcha][j_SMEcha];
02792             }
02793           fT2d_cor_cc_mos[i_SMEcha][j_SMEcha] =
02794             fT2d_cor_cc_mos[i_SMEcha][j_SMEcha]/(Double_t)(fFileHeader->fMaxSampADC);
02795         } 
02796     }
02797   fTagCorSccMos[0] = 1;    fFileHeader->fCorSccMosCalc++;
02798 }

void TCnaRunEB::ComputeCorrelationsBetweenSamples (  ) 

Definition at line 2508 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCorCssCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT3d1_cor_ss, fT3d2_cor_ss, fT3d_cor_ss, fT3d_cov_ss, fTagCorCss, fTagCovCss, fVal_data, i, j, and TDistrib::StandardDeviation().

Referenced by ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), WriteAsciiCorrelationsBetweenSamples(), and EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02509 {
02510 //Calculation of the correlations between samples for all the SMEchas
02511 
02512   //... preliminary calculation of the covariances if not done yet.
02513   //    Test only the first tag since the cov are computed globaly
02514   //    but set all the tags to 0 because we want not to write
02515   //    the covariances in the result ROOT file    
02516   if ( fTagCovCss[0] != 1 ){ComputeCovariancesBetweenSamples();
02517   for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02518     {fTagCovCss[j_SMEcha] = 0;}}
02519   
02520   if(fFlagPrint == fCodePrintAllComments){
02521     cout << "*TCnaRunEB::ComputeCorrelationsBetweenSamples()>"
02522          << " Calculation of the correlations between samples"
02523          << " for all the SMEchas" << endl;}
02524 
02525   //................... Allocations cor_ss
02526   if( fT3d_cor_ss == 0){
02527     const Int_t n_samp = fFileHeader->fMaxSampADC;
02528     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02529     fT3d_cor_ss  = new Double_t**[n_SMEcha];                fCnew++;  
02530     fT3d2_cor_ss = new  Double_t*[n_SMEcha*n_samp];         fCnew++;  
02531     fT3d1_cor_ss = new   Double_t[n_SMEcha*n_samp*n_samp];  fCnew++;  
02532     for(Int_t i = 0 ; i < n_SMEcha ; i++){
02533       fT3d_cor_ss[i] = &fT3d2_cor_ss[0] + i*n_samp;
02534       for(Int_t j = 0 ; j < n_samp ; j++){
02535         fT3d2_cor_ss[n_samp*i+j] = &fT3d1_cor_ss[0]+n_samp*(n_samp*i+j);}}
02536   }
02537   
02538   //..................... calculation of the correlations (=init)
02539   //......................computation of half of the matrix, diagonal included (verif = 1)
02540     
02541  for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02542    {
02543      for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
02544        {
02545          for (Int_t j_samp = 0 ; j_samp <= i_samp ; j_samp++)
02546            {
02547              if((fT3d_cov_ss)[j_SMEcha][i_samp][i_samp] > 0
02548                 && (fT3d_cov_ss)[j_SMEcha][j_samp][j_samp] > 0 )
02549                {
02550                  fT3d_cor_ss[j_SMEcha][i_samp][j_samp] =
02551                    fT3d_cov_ss[j_SMEcha][i_samp][j_samp]/
02552                    (fVal_data[j_SMEcha][i_samp].StandardDeviation("corss1") *
02553                     fVal_data[j_SMEcha][j_samp].StandardDeviation("corss2"));
02554                }
02555              else
02556                {
02557                  (fT3d_cor_ss)[j_SMEcha][i_samp][j_samp] = (Double_t)0; // prevoir compteur + fTTBELL
02558                }
02559              fT3d_cor_ss[j_SMEcha][j_samp][i_samp] = fT3d_cor_ss[j_SMEcha][i_samp][j_samp];
02560            }
02561        }
02562      fTagCorCss[j_SMEcha] = 1;          fFileHeader->fCorCssCalc++;
02563    }
02564 }

void TCnaRunEB::ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels (  ) 

Definition at line 2871 of file TCnaRunEB.cc.

References ComputeCorrelationsBetweenChannelsMeanOverSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCorMosccMotCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInTow, TCnaHeaderEB::fMaxTowInSM, fMiscDiag, fT2d1_cor_moscc_mot, fT2d_cor_cc_mos, fT2d_cor_moscc_mot, fTagCorMosccMot, and fTagCorSccMos.

02872 {
02873 //Calculation of the correlations between SMEchas
02874 //for all the samples, averaged over the samples and
02875 //calculation of the mean of these correlations for all the towers
02876 
02877   //... preliminary calculation of the correlations averaged over samples (cor_moscc_mot) if not done yet
02878   //    Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
02879 
02880   if(fTagCorSccMos[0] != 1){ComputeCorrelationsBetweenChannelsMeanOverSamples(); fTagCorSccMos[0]= 0;}
02881 
02882   if(fFlagPrint == fCodePrintAllComments){
02883     cout << "*TCnaRunEB::ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels()>"
02884          << " Calculation of the averaged correlations between towers,"
02885          << " (average over the samples and over the channels)." << endl;}
02886 
02887   //................. allocation cor_moscc_mot + init to zero (mandatory)
02888   if( fT2d_cor_moscc_mot == 0 ){
02889     const Int_t n_tow = fFileHeader->fMaxTowInSM;
02890     fT2d_cor_moscc_mot  = new Double_t*[n_tow];                 fCnew++;
02891     fT2d1_cor_moscc_mot = new  Double_t[n_tow*n_tow];           fCnew++;  
02892     for(Int_t i_tow = 0 ; i_tow < n_tow ; i_tow++){
02893       fT2d_cor_moscc_mot[i_tow] = &fT2d1_cor_moscc_mot[0] + i_tow*n_tow;}
02894   }
02895   
02896   for(Int_t i_tow=0; i_tow<fFileHeader->fMaxTowInSM; i_tow++)
02897     {
02898       for(Int_t j_tow=0; j_tow<fFileHeader->fMaxTowInSM; j_tow++)
02899         {
02900           if( fT2d_cor_moscc_mot[i_tow][j_tow] != (Double_t)0 )
02901             {fMiscDiag[10]++; fT2d_cor_moscc_mot[i_tow][j_tow] = (Double_t)0;}
02902         }
02903     }
02904   
02905   //..... Calculation of the mean of the averaged over samples cor(c,c) for each pair (tower_X,tower_Y)
02906   
02907   for(Int_t i_tow=0; i_tow<fFileHeader->fMaxTowInSM; i_tow++)
02908     {
02909       for(Int_t j_tow=0; j_tow<fFileHeader->fMaxTowInSM; j_tow++)
02910         {
02911           //..... Calculation of the average values over the channels for the current (i_tow, j_tow)
02912           for(Int_t i_crys=0; i_crys<fFileHeader->fMaxCrysInTow; i_crys++)
02913             {
02914               Int_t i_SMEcha = i_tow*fFileHeader->fMaxCrysInTow + i_crys;
02915               for(Int_t j_crys=0; j_crys<fFileHeader->fMaxCrysInTow; j_crys++)
02916                 {
02917                   Int_t j_SMEcha = j_tow*fFileHeader->fMaxCrysInTow + j_crys; 
02918                   fT2d_cor_moscc_mot[i_tow][j_tow] += fT2d_cor_cc_mos[i_SMEcha][j_SMEcha];
02919                 }
02920             }
02921 
02922           fT2d_cor_moscc_mot[i_tow][j_tow] = fT2d_cor_moscc_mot[i_tow][j_tow]
02923             /((Double_t)(fFileHeader->fMaxCrysInTow*fFileHeader->fMaxCrysInTow));
02924         }
02925     }
02926   fTagCorMosccMot[0] = 1;    fFileHeader->fCorMosccMotCalc++;
02927 }

void TCnaRunEB::ComputeCovariancesBetweenChannels (  ) 

Definition at line 2573 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCovSccCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT3d1_cov_cc, fT3d2_cov_cc, fT3d_cov_cc, fTagCovScc, fVal_data, i, and j.

Referenced by ComputeCorrelationsBetweenChannels(), and ComputeCovariancesBetweenChannelsMeanOverSamples().

02574 {
02575 //Calculation of the covariances between SMEchas for all the samples
02576 
02577   if(fFlagPrint == fCodePrintAllComments){
02578     cout << "*TCnaRunEB::ComputeCovariancesBetweenChannels()>"
02579          << " Calculation of the covariances between SMEchas"
02580          << " for each sample." << endl;}
02581 
02582   //................... Allocations cov_cc
02583   if( fT3d_cov_cc == 0 ){
02584     const Int_t n_samp = fFileHeader->fMaxSampADC;
02585     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02586     fT3d_cov_cc  = new Double_t**[n_samp];                   fCnew++;  
02587     fT3d2_cov_cc = new  Double_t*[n_samp*n_SMEcha];          fCnew++;  
02588     fT3d1_cov_cc = new   Double_t[n_samp*n_SMEcha*n_SMEcha]; fCnew++;  
02589     for(Int_t i = 0 ; i < n_samp ; i++){
02590       fT3d_cov_cc[i] = &fT3d2_cov_cc[0] + i*n_SMEcha;
02591       for(Int_t j = 0 ; j < n_SMEcha ; j++){
02592         fT3d2_cov_cc[n_SMEcha*i+j] = &fT3d1_cov_cc[0]+n_SMEcha*(n_SMEcha*i+j);}}
02593   }
02594 
02595   //........ Calculation for each sample (=init)
02596   //...........................computation of half of the matrix, diagonal included
02597 
02598   for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02599     {
02600       for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02601         {
02602           for (Int_t j_SMEcha = 0 ; j_SMEcha <= i_SMEcha ; j_SMEcha++)
02603             {
02604               fT3d_cov_cc[k_samp][i_SMEcha][j_SMEcha]
02605                 = (fVal_data[i_SMEcha][k_samp]).Covariance(fVal_data[j_SMEcha][k_samp]);
02606               fT3d_cov_cc[k_samp][j_SMEcha][i_SMEcha] = fT3d_cov_cc[k_samp][i_SMEcha][j_SMEcha];              
02607             }
02608         }
02609       fTagCovScc[k_samp] = 1;              fFileHeader->fCovSccCalc++;
02610     }
02611 }

void TCnaRunEB::ComputeCovariancesBetweenChannelsMeanOverSamples (  ) 

Definition at line 2620 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenChannels(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCovSccMosCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT2d1_cov_cc_mos, fT2d_cov_cc_mos, fT3d_cov_cc, fTagCovScc, and fTagCovSccMos.

Referenced by ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels().

02621 {
02622 //Calculation of the covariances between SMEchas for all the samples
02623 //and averaged over the samples
02624 
02625   //... preliminary calculation of the covariances if not done yet.
02626   //    Test only the first tag since the cov are computed globaly
02627   //    but set all the tags to 0 because we want not to write
02628   //    the covariances in the result ROOT file    
02629   if ( fTagCovScc[0] != 1 ){ComputeCovariancesBetweenChannels();
02630   for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02631     {fTagCovScc[k_samp] = 0;}}
02632   
02633   if(fFlagPrint == fCodePrintAllComments){
02634     cout << "*TCnaRunEB::ComputeCovariancesBetweenChannelsMeanOverSamples()>"
02635          << " Calculation of the covariances between SMEchas,"
02636          << " Calculation of the average over the samples." << endl;}
02637 
02638   //.................. Mean over the samples
02639   //................. allocation cov_cc_mos + init to zero (mandatory)
02640   if( fT2d_cov_cc_mos == 0 ){
02641     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02642     fT2d_cov_cc_mos   = new Double_t*[n_SMEcha];                   fCnew++;
02643     fT2d1_cov_cc_mos  = new  Double_t[n_SMEcha*n_SMEcha];          fCnew++;
02644     for(Int_t i_SMEcha = 0 ; i_SMEcha < n_SMEcha ; i_SMEcha++){
02645         fT2d_cov_cc_mos[i_SMEcha] = &fT2d1_cov_cc_mos[0] + i_SMEcha*n_SMEcha;} 
02646   }
02647 
02648   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02649     {
02650       for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02651         {
02652           if( fT2d_cov_cc_mos[i_SMEcha][j_SMEcha] != (Double_t)0 )
02653             {fMiscDiag[7]++; fT2d_cov_cc_mos[i_SMEcha][j_SMEcha] = (Double_t)0;}
02654         }
02655     }
02656   
02657   //................. Calculation of the mean over the samples  
02658   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02659     {
02660       for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02661         {
02662           for (Int_t k_samp = 0 ; k_samp < fFileHeader->fMaxSampADC ; k_samp++)
02663             {
02664               fT2d_cov_cc_mos[i_SMEcha][j_SMEcha] =
02665                 fT2d_cov_cc_mos[i_SMEcha][j_SMEcha] + fT3d_cov_cc[k_samp][i_SMEcha][j_SMEcha];
02666             }
02667           fT2d_cov_cc_mos[i_SMEcha][j_SMEcha] =
02668             fT2d_cov_cc_mos[i_SMEcha][j_SMEcha]/(Double_t)(fFileHeader->fMaxSampADC);
02669         } 
02670     }
02671   fTagCovSccMos[0] = 1;    fFileHeader->fCovSccMosCalc++;
02672 }

void TCnaRunEB::ComputeCovariancesBetweenSamples (  ) 

Definition at line 2462 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCovCssCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT3d1_cov_ss, fT3d2_cov_ss, fT3d_cov_ss, fTagCovCss, fVal_data, i, and j.

Referenced by ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenSamples(), and WriteAsciiCovariancesBetweenSamples().

02463 {
02464   //Calculation of the covariances between samples for all the SMEchas
02465   
02466   if(fFlagPrint == fCodePrintAllComments){
02467     cout << "*TCnaRunEB::ComputeCovariancesBetweenSamples()>"
02468          << " Calculation of the covariances between samples"
02469          << " for all the SMEchas" << endl;}
02470   
02471   //................... Allocations cov_ss
02472   if( fT3d_cov_ss == 0 ){
02473     const Int_t n_samp = fFileHeader->fMaxSampADC;
02474     const Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02475     fT3d_cov_ss  = new Double_t**[n_SMEcha];                fCnew++;  
02476     fT3d2_cov_ss = new  Double_t*[n_SMEcha*n_samp];         fCnew++;  
02477     fT3d1_cov_ss = new   Double_t[n_SMEcha*n_samp*n_samp];  fCnew++;  
02478     for(Int_t i = 0 ; i < n_SMEcha ; i++){
02479       fT3d_cov_ss[i] = &fT3d2_cov_ss[0] + i*n_samp;
02480       for(Int_t j = 0 ; j < n_samp ; j++){
02481         fT3d2_cov_ss[n_samp*i+j] = &fT3d1_cov_ss[0]+n_samp*(n_samp*i+j);}}
02482   }
02483   
02484   //.................. Calculation (= init)
02485   //.................. computation of half of the matrix, diagonal included)
02486   for (Int_t j_SMEcha = 0 ; j_SMEcha < fFileHeader->fMaxCrysInSM ; j_SMEcha++)
02487     {
02488       for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
02489         {
02490           for (Int_t j_samp = 0 ; j_samp <= i_samp; j_samp++)
02491             {
02492               fT3d_cov_ss[j_SMEcha][i_samp][j_samp] =
02493                 (fVal_data[j_SMEcha][i_samp]).Covariance(fVal_data[j_SMEcha][j_samp]);
02494               fT3d_cov_ss[j_SMEcha][j_samp][i_samp] = fT3d_cov_ss[j_SMEcha][i_samp][j_samp];
02495             }
02496         }
02497       fTagCovCss[j_SMEcha] = 1;     fFileHeader->fCovCssCalc++;
02498     }
02499 }

void TCnaRunEB::ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels (  ) 

Definition at line 2807 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenChannelsMeanOverSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fCovMosccMotCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInTow, TCnaHeaderEB::fMaxTowInSM, fMiscDiag, fT2d1_cov_moscc_mot, fT2d_cov_cc_mos, fT2d_cov_moscc_mot, fTagCovMosccMot, and fTagCovSccMos.

02808 {
02809 //Calculation of the covariances between SMEchas
02810 //for all the samples, averaged over the samples and
02811 //calculation of the mean of these covariances for all the towers
02812 
02813 
02814   //... preliminary calculation of the covariances averaged over samples (cov_moscc_mot) if not done yet
02815   //    Only one tag (dim=1) to set to 0 (no write in the result ROOT file)
02816   if(fTagCovSccMos[0] != 1){ComputeCovariancesBetweenChannelsMeanOverSamples(); fTagCovSccMos[0]=0;}
02817 
02818   //..... mean of the cov_moscc_mot for each pair (tower_X,tower_Y)
02819   if(fFlagPrint == fCodePrintAllComments){
02820     cout << "*TCnaRunEB::ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels()>"
02821          << " Calculation of the averaged covariances between towers,"
02822          << " (average over the samples and over the channels)." << endl;}
02823 
02824   //................. allocation cov_moscc_mot + init to zero (mandatory)
02825   if( fT2d_cov_moscc_mot == 0 ){
02826     const Int_t n_tow = fFileHeader->fMaxTowInSM;
02827     fT2d_cov_moscc_mot  = new Double_t*[n_tow];                 fCnew++;
02828     fT2d1_cov_moscc_mot = new  Double_t[n_tow*n_tow];           fCnew++;  
02829     for(Int_t i_tow = 0 ; i_tow < n_tow ; i_tow++){
02830         fT2d_cov_moscc_mot[i_tow] = &fT2d1_cov_moscc_mot[0] + i_tow*n_tow;} 
02831   }
02832   
02833   for(Int_t i_tow=0; i_tow<fFileHeader->fMaxTowInSM; i_tow++)
02834     {
02835       for(Int_t j_tow=0; j_tow<fFileHeader->fMaxTowInSM; j_tow++)
02836         {
02837           if( fT2d_cov_moscc_mot[i_tow][j_tow] != (Double_t)0 )
02838             {fMiscDiag[9]++; fT2d_cov_moscc_mot[i_tow][j_tow] = (Double_t)0;}
02839         }
02840     }
02841   
02842   //..... Calculation of the mean of the averaged cov(c,c) over samples for each pair (tower_X,tower_Y)    
02843   for(Int_t i_tow=0; i_tow<fFileHeader->fMaxTowInSM; i_tow++)
02844     {
02845       for(Int_t j_tow=0; j_tow<fFileHeader->fMaxTowInSM; j_tow++)
02846         {
02847           for(Int_t i_crys=0; i_crys<fFileHeader->fMaxCrysInTow; i_crys++)
02848             {
02849               Int_t i_SMEcha = i_tow*fFileHeader->fMaxCrysInTow + i_crys;
02850               for(Int_t j_crys=0; j_crys<fFileHeader->fMaxCrysInTow; j_crys++)
02851                 {
02852                   Int_t j_SMEcha = j_tow*fFileHeader->fMaxCrysInTow + j_crys;
02853                   fT2d_cov_moscc_mot[i_tow][j_tow] += fT2d_cov_cc_mos[i_SMEcha][j_SMEcha];
02854                 }
02855             }
02856           fT2d_cov_moscc_mot[i_tow][j_tow] = fT2d_cov_moscc_mot[i_tow][j_tow]
02857             /((Double_t)(fFileHeader->fMaxCrysInTow*fFileHeader->fMaxCrysInTow));
02858         }
02859     }
02860   fTagCovMosccMot[0] = 1;                   fFileHeader->fCovMosccMotCalc++;
02861 }

void TCnaRunEB::ComputeExpectationValuesOfCorrelationsBetweenSamples (  ) 

Definition at line 3040 of file TCnaRunEB.cc.

References ComputeCorrelationsBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), TDistrib::ExpectationValue(), fCdelete, fCnew, fCodePrintAllComments, TCnaHeaderEB::fEvCorCssCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT1d_ev_cor_ss, fT3d_cor_ss, fTagCorCss, fTagEvCorCss, and TDistrib::Refill().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03041 {
03042   //Calculation of the expectation values of the (sample,sample) correlations for all the SMEchas 
03043   
03044   //... preliminary calculation of the correlationss if not done yet
03045   //    (test only the first element since the cor are computed globaly)
03046   if ( fTagCorCss[0] != 1 ){ComputeCorrelationsBetweenSamples(); fTagCorCss[0]=0;}
03047 
03048   //................... Allocations ev_cor_ss + init to zero (mandatory)
03049   if( fT1d_ev_cor_ss == 0 ){
03050     Int_t n_SMEcha =  fFileHeader->fMaxCrysInSM;
03051     fT1d_ev_cor_ss = new Double_t[n_SMEcha];               fCnew++;  
03052   }
03053   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03054     {
03055       if( fT1d_ev_cor_ss[i_SMEcha] != (Double_t)0 )
03056         {fMiscDiag[13]++; fT1d_ev_cor_ss[i_SMEcha] = (Double_t)0;}
03057     }
03058   
03059   //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
03060   //           (half of them minus the diagonal) 
03061   Int_t ndim = (Int_t)(fFileHeader->fMaxSampADC*(fFileHeader->fMaxSampADC - 1)/2);
03062 
03063   TVectorD  half_cor_ss(ndim);
03064 
03065   TDistrib* amplit = new TDistrib(ndim, half_cor_ss);      fCnew++;
03066   
03067   if(fFlagPrint == fCodePrintAllComments){
03068     cout << "*TCnaRunEB::ComputeExpectationValuesOfCorrelationsBetweenSamples()>" << endl
03069          << "          Calculation of the expectation values of the"
03070          << " (sample,sample) correlations for all the SMEchas" << endl;}
03071 
03072   //..................... Calculation
03073   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03074     {     
03075       Int_t i_count = 0;
03076       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03077         {
03078           for (Int_t j_samp = 0; j_samp < i_samp; j_samp++)
03079             {
03080               half_cor_ss(i_count) = fT3d_cor_ss[i_SMEcha][i_samp][j_samp];
03081               i_count++;
03082             }
03083         }
03084       
03085       Bool_t ok_refill = amplit->Refill(ndim, half_cor_ss);
03086       if(ok_refill == kTRUE){fT1d_ev_cor_ss[i_SMEcha] = amplit->ExpectationValue();}
03087     }
03088   delete amplit;                    fCdelete++;
03089   fTagEvCorCss[0] = 1;              fFileHeader->fEvCorCssCalc++;
03090 }

void TCnaRunEB::ComputeExpectationValuesOfExpectationValuesOfSamples (  ) 

Definition at line 2935 of file TCnaRunEB.cc.

References ComputeExpectationValuesOfSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), TDistrib::ExpectationValue(), fCdelete, fCnew, fCodePrintAllComments, TCnaHeaderEB::fEvEvCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT1d_ev_ev, fT2d_ev, fTagEv, fTagEvEv, and TDistrib::Refill().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02936 {
02937 //Calculation of the expectation values of the expectation values
02938 // of the samples for all the SMEchas 
02939 
02940   //... preliminary calculation of the expectation values if not done yet
02941   if ( fTagEv[0] != 1 ){ComputeExpectationValuesOfSamples(); fTagEv[0]=0; }
02942 
02943   //................... Allocation ev_ev + init to zero (mandatory)
02944   if( fT1d_ev_ev == 0 ){
02945     fT1d_ev_ev = new Double_t[fFileHeader->fMaxCrysInSM];                   fCnew++;
02946   }
02947    for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
02948      {
02949        if( fT1d_ev_ev[i_SMEcha] != (Double_t)0 )
02950          {fMiscDiag[11]++; fT1d_ev_ev[i_SMEcha] = (Double_t)0;}
02951      }
02952 
02953   //................... Allocations ch_ev, amplit
02954     TVectorD ch_ev(fFileHeader->fMaxSampADC);
02955     TDistrib* amplit   = new TDistrib(fFileHeader->fMaxSampADC, ch_ev);     fCnew++;  
02956   
02957   if(fFlagPrint == fCodePrintAllComments){
02958     cout << "*TCnaRunEB::ComputeExpectationValuesOfExpectationValuesOfSamples()>" << endl
02959          << "          Calculation of the expectation values of the"
02960          << " expectation values of the samples for all the SMEchas" << endl;}
02961 
02962   //..................... Calculation
02963   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
02964     {     
02965       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
02966         {
02967           ch_ev(i_samp) = fT2d_ev[i_SMEcha][i_samp];
02968         }
02969 
02970       Bool_t ok_refill = amplit->Refill(fFileHeader->fMaxSampADC, ch_ev);
02971       if(ok_refill == kTRUE){fT1d_ev_ev[i_SMEcha] = amplit->ExpectationValue();}
02972     }
02973   delete amplit;                        fCdelete++;
02974   fTagEvEv[0] = 1;                      fFileHeader->fEvEvCalc++;
02975 }

void TCnaRunEB::ComputeExpectationValuesOfSamples (  ) 

Definition at line 2193 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, TCnaHeaderEB::fEvCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT1d_ev, fT2d_ev, fTagEv, fVal_data, and i.

Referenced by ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeSigmasOfExpectationValuesOfSamples(), and EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02194 {
02195 //Calculation of the expectation values of the samples for all the SMEchas
02196 
02197   if(fFlagPrint == fCodePrintAllComments){
02198     cout << "*TCnaRunEB::ComputeExpectationValuesOfSamples()>"
02199          << " Calculation of the expectation values of the samples"
02200          << " for all the SMEchas" << endl;}
02201 
02202   //................... Allocation ev + init to zero
02203   if ( fT2d_ev == 0 ){
02204     Int_t n_samp = fFileHeader->fMaxSampADC;
02205     Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02206     fT2d_ev = new Double_t*[n_SMEcha];             fCnew++;  
02207     fT1d_ev = new  Double_t[n_SMEcha*n_samp];      fCnew++;   
02208     for(Int_t i = 0 ; i < n_SMEcha ; i++){
02209       fT2d_ev[i] = &fT1d_ev[0] + i*n_samp;}
02210   }
02211   
02212   for(Int_t i_SMEcha=0; i_SMEcha<fFileHeader->fMaxCrysInSM; i_SMEcha++)
02213     {
02214       for(Int_t i_samp=0; i_samp<fFileHeader->fMaxSampADC; i_samp++)
02215         {
02216           if( fT2d_ev[i_SMEcha][i_samp] != (Double_t)0 )
02217             {fMiscDiag[1]++; fT2d_ev[i_SMEcha][i_samp] = (Double_t)0;}
02218         } 
02219     }
02220   
02221   //................... Calculation
02222   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02223     {
02224       for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
02225         {         
02226           fT2d_ev[i_SMEcha][i_samp] = 
02227             ((fVal_data)[i_SMEcha][i_samp]).ExpectationValue();
02228         }
02229     }
02230   fTagEv[0] = 1;        fFileHeader->fEvCalc++;
02231 }

void TCnaRunEB::ComputeExpectationValuesOfSigmasOfSamples (  ) 

Definition at line 2983 of file TCnaRunEB.cc.

References ComputeVariancesOfSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), TDistrib::ExpectationValue(), fCdelete, fCnew, fCodePrintAllComments, TCnaHeaderEB::fEvSigCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT1d_ev_sig, fT2d_var, fTagEvSig, fTagVar, fTTBELL, TDistrib::Refill(), and funct::sqrt().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02984 {
02985 //Calculation of the expectation values of the sigmas
02986 // of the samples for all the SMEchas 
02987 
02988   //... preliminary calculation of the variances if not done yet
02989   if ( fTagVar[0] != 1 ){ComputeVariancesOfSamples(); fTagVar[0]=0; }
02990  
02991   //................... Allocation ev_sig + init to zero (mandatory)
02992   if( fT1d_ev_sig == 0 ){
02993     fT1d_ev_sig = new Double_t[fFileHeader->fMaxCrysInSM];              fCnew++;  
02994   }
02995    for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
02996      {
02997        if( fT1d_ev_sig[i_SMEcha] != (Double_t)0 )
02998          {fMiscDiag[12]++; fT1d_ev_sig[i_SMEcha] = (Double_t)0;}
02999      }
03000 
03001   //................... Allocations ch_sig, amplit
03002   TVectorD  ch_sig(fFileHeader->fMaxSampADC);  
03003   TDistrib* amplit   = new TDistrib(fFileHeader->fMaxSampADC, ch_sig);  fCnew++; 
03004  
03005   if(fFlagPrint == fCodePrintAllComments){
03006     cout << "*TCnaRunEB::ComputeExpectationValuesOfSigmasOfSamples()>" << endl
03007          << "          Calculation of the expectation values of the"
03008          << " sigmas of the samples for all the SMEchas" << endl;}
03009 
03010   //..................... Calculation
03011   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03012     {     
03013       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03014         {
03015           if (ch_sig(i_samp) >= (Double_t)0.)
03016             {
03017               ch_sig(i_samp) = (Double_t)sqrt(fT2d_var[i_SMEcha][i_samp]);
03018             }
03019           else
03020             {
03021               ch_sig(i_samp) = (Double_t)(-1.);
03022               cout << "!TCnaRunEB::ComputeExpectationValuesOfSigmasOfSamples() *** ERROR ***> " << endl
03023                    << "          Negative variance! Sigma forced to -1" << fTTBELL << endl;
03024             }
03025         }
03026 
03027       Bool_t ok_refill = amplit->Refill(fFileHeader->fMaxSampADC, ch_sig);
03028       if(ok_refill == kTRUE){fT1d_ev_sig[i_SMEcha] = amplit->ExpectationValue();}
03029     }
03030   delete amplit;                         fCdelete++;
03031   fTagEvSig[0] = 1;                      fFileHeader->fEvSigCalc++;
03032 }

void TCnaRunEB::ComputeSigmasOfCorrelationsBetweenSamples (  ) 

Definition at line 3204 of file TCnaRunEB.cc.

References ComputeCorrelationsBetweenSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, TCnaHeaderEB::fSigCorCssCalc, fT1d_sig_cor_ss, fT3d_cor_ss, fTagCorCss, fTagSigCorCss, TDistrib::Refill(), and TDistrib::StandardDeviation().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03205 {
03206   //Calculation of the sigmas of the (sample,sample) correlations for all the SMEchas
03207  
03208   //... preliminary calculation of the correlationss if not done yet
03209   //    (test only the first element since the cor are computed globaly)
03210   if ( fTagCorCss[0] != 1 ){ComputeCorrelationsBetweenSamples(); fTagCorCss[0]=0;}
03211 
03212   //................... Allocations sig_cor_ss + init to zero
03213   if( fT1d_sig_cor_ss == 0 ){
03214     Int_t n_SMEcha =  fFileHeader->fMaxCrysInSM;
03215     fT1d_sig_cor_ss = new Double_t[n_SMEcha];                fCnew++;  
03216   }
03217   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03218     {
03219       if( fT1d_sig_cor_ss[i_SMEcha] != (Double_t)0 )
03220         {fMiscDiag[16]++; fT1d_sig_cor_ss[i_SMEcha] = (Double_t)0;}
03221     }
03222 
03223   if(fFlagPrint == fCodePrintAllComments){
03224     cout << "*TCnaRunEB::ComputeSigmasOfCorrelationsBetweenSamples()>" << endl
03225          << "          Calculation of the sigmas of the (sample,sample)"
03226          << " correlations for all the cna_SMEchas" << endl;}
03227 
03228   //.......... 1D array half_cor_ss[N(N-1)/2] to put the N (sample,sample) correlations
03229   //           (half of them minus the diagonal)
03230   Int_t ndim = (Int_t)(fFileHeader->fMaxSampADC*(fFileHeader->fMaxSampADC - 1)/2);
03231   //Int_t ndim = (int)(fFileHeader->fMaxSampADC*(fFileHeader->fMaxSampADC - 1.)/2.);
03232 
03233   TVectorD  half_cor_ss(ndim);
03234 
03235   TDistrib* amplit      = new TDistrib(ndim, half_cor_ss);   fCnew++;
03236 
03237   //.................. Calculation
03238   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03239     {     
03240       Int_t i_count = 0;
03241       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03242         {
03243           for (Int_t j_samp = 0; j_samp < i_samp; j_samp++)
03244             {
03245               half_cor_ss(i_count) = fT3d_cor_ss[i_SMEcha][i_samp][j_samp];
03246               i_count++;
03247             }
03248         }
03249 
03250       Bool_t ok_refill = amplit->Refill(ndim, half_cor_ss);
03251       if(ok_refill == kTRUE){fT1d_sig_cor_ss[i_SMEcha] = amplit->StandardDeviation("SigmaCorss");}
03252     }
03253   delete amplit;                     fCdelete++;
03254   fTagSigCorCss[0] = 1;              fFileHeader->fSigCorCssCalc++;
03255 }

void TCnaRunEB::ComputeSigmasOfExpectationValuesOfSamples (  ) 

Definition at line 3098 of file TCnaRunEB.cc.

References ComputeExpectationValuesOfSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, TCnaHeaderEB::fSigEvCalc, fT1d_sig_ev, fT2d_ev, fTagEv, fTagSigEv, TDistrib::Refill(), and TDistrib::StandardDeviation().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03099 {
03100 //Calculation of the sigmas of the expectation values
03101 // of the samples for all the SMEchas 
03102   
03103   //... preliminary calculation of the expectation values if not done yet
03104   if ( fTagEv[0] != 1 ){ComputeExpectationValuesOfSamples(); fTagEv[0]=0; }
03105 
03106   //................... Allocation sig_ev + init to zero (mandatory)
03107   if( fT1d_sig_ev == 0 ){
03108     fT1d_sig_ev = new Double_t[fFileHeader->fMaxCrysInSM];               fCnew++;  
03109   }
03110 
03111   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03112     {
03113       if( fT1d_sig_ev[i_SMEcha] != (Double_t)0 )
03114         {fMiscDiag[14]++; fT1d_sig_ev[i_SMEcha] = (Double_t)0;}
03115     }
03116   
03117   //................... Allocations ch_ev, amplit
03118   TVectorD  ch_ev(fFileHeader->fMaxSampADC); 
03119   TDistrib* amplit   = new TDistrib(fFileHeader->fMaxSampADC, ch_ev);    fCnew++;
03120   
03121   if(fFlagPrint == fCodePrintAllComments){
03122     cout << "*TCnaRunEB::ComputeSigmasOfExpectationValuesOfSamples()>" << endl
03123          << "          Calculation of the sigmas of the"
03124          << " expectation values of the samples for all the SMEchas" << endl;}
03125 
03126   //..................... Calculation
03127   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03128     {     
03129       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03130         {
03131           ch_ev(i_samp) = fT2d_ev[i_SMEcha][i_samp];
03132         }
03133 
03134       Bool_t ok_refill = amplit->Refill(fFileHeader->fMaxSampADC, ch_ev);
03135       if(ok_refill == kTRUE){fT1d_sig_ev[i_SMEcha] = amplit->StandardDeviation();}
03136     }
03137   delete amplit;                        fCdelete++;
03138   fTagSigEv[0] = 1;                     fFileHeader->fSigEvCalc++;
03139 }

void TCnaRunEB::ComputeSigmasOfSigmasOfSamples (  ) 

Definition at line 3147 of file TCnaRunEB.cc.

References ComputeVariancesOfSamples(), GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, TCnaHeaderEB::fSigSigCalc, fT1d_sig_sig, fT2d_var, fTagSigSig, fTagVar, fTTBELL, TDistrib::Refill(), funct::sqrt(), and TDistrib::StandardDeviation().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03148 {
03149 //Calculation of the sigmas of the sigmas
03150 // of the samples for all the SMEchas 
03151 
03152   //... preliminary calculation of the variances if not done yet
03153   if ( fTagVar[0] != 1 ){ComputeVariancesOfSamples(); fTagVar[0]=0; }
03154 
03155   //................... Allocation sig_sig + init to zero (mandatory)
03156   if( fT1d_sig_sig == 0 ){
03157     fT1d_sig_sig = new Double_t[fFileHeader->fMaxCrysInSM];                fCnew++;
03158   } 
03159   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03160     {
03161       if( fT1d_sig_sig[i_SMEcha] != (Double_t)0 )
03162         {fMiscDiag[15]++; fT1d_sig_sig[i_SMEcha] = (Double_t)0;}
03163     }
03164   
03165   //................... Allocations ch_sig, amplit
03166   TVectorD  ch_sig(fFileHeader->fMaxSampADC);
03167   TDistrib* amplit = new TDistrib(fFileHeader->fMaxSampADC, ch_sig);       fCnew++;
03168   
03169   if(fFlagPrint == fCodePrintAllComments){
03170     cout << "*TCnaRunEB::ComputeSigmasOfSigmasOfSamples()>" << endl
03171          << "          Calculation of the sigmas of the"
03172          << " sigmas of the samples for all the SMEchas" << endl;}
03173 
03174   //..................... Calculation
03175   for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
03176     {     
03177       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
03178         {
03179           if (ch_sig(i_samp) >= (Double_t)0.)
03180             {
03181               ch_sig(i_samp) = (Double_t)sqrt(fT2d_var[i_SMEcha][i_samp]);
03182             }
03183           else
03184             {
03185               ch_sig(i_samp) = (Double_t)(-1.);
03186               cout << "!TCnaRunEB::ComputeSigmasOfSigmasOfSamples() *** ERROR ***> " << endl
03187                    << "          Negative variance! Sigma forced to -1" << fTTBELL << endl;
03188             }
03189         }
03190 
03191       Bool_t ok_refill = amplit->Refill(fFileHeader->fMaxSampADC, ch_sig);
03192       if(ok_refill == kTRUE){fT1d_sig_sig[i_SMEcha] = amplit->StandardDeviation();}
03193     }
03194   delete amplit;                         fCdelete++;
03195   fTagSigSig[0] = 1;                     fFileHeader->fSigSigCalc++;
03196 }

void TCnaRunEB::ComputeVariancesOfSamples (  ) 

Definition at line 2240 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCnew, fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, fT1d_var, fT2d_var, fTagVar, fVal_data, TCnaHeaderEB::fVarCalc, and TDistrib::VarianceValue().

Referenced by ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfSigmasOfSamples(), and EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02241 {
02242 //Calculation of the variances of the samples for all the SMEchas
02243   
02244   if(fFlagPrint == fCodePrintAllComments){
02245     cout << "*TCnaRunEB::ComputeVariancesOfSamples()>"
02246          << " Calculation of the variances of the samples"
02247          << " for all the SMEchas" << endl;}
02248   
02249   //................... Allocation var + init to zero
02250   if( fT2d_var == 0){
02251     Int_t n_SMEcha = fFileHeader->fMaxCrysInSM;
02252     Int_t n_samp = fFileHeader->fMaxSampADC;
02253     fT2d_var = new Double_t*[n_SMEcha];                fCnew++;        
02254     fT1d_var = new  Double_t[n_SMEcha*n_samp];         fCnew++;  
02255     for(Int_t i_SMEcha = 0 ; i_SMEcha < n_SMEcha ; i_SMEcha++){
02256       fT2d_var[i_SMEcha] = &fT1d_var[0] + i_SMEcha*n_samp;}
02257   }
02258   
02259   for(Int_t i_SMEcha=0; i_SMEcha<fFileHeader->fMaxCrysInSM; i_SMEcha++)
02260     {
02261       for(Int_t i_samp=0; i_samp<fFileHeader->fMaxSampADC; i_samp++)
02262         {
02263           if( fT2d_var[i_SMEcha][i_samp] != (Double_t)0 )
02264             {fMiscDiag[2]++; fT2d_var[i_SMEcha][i_samp] = (Double_t)0;}
02265         } 
02266     }
02267   
02268   //................... Calculation
02269   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02270     {
02271       for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
02272         {
02273           fT2d_var[i_SMEcha][i_samp] = 
02274             fVal_data[i_SMEcha][i_samp].VarianceValue();
02275         }
02276     }
02277   fTagVar[0] = 1;        fFileHeader->fVarCalc++;
02278 }

void TCnaRunEB::fAsciiFileWriteHeader ( const Int_t &  i_code  )  [private]

Definition at line 5843 of file TCnaRunEB.cc.

References lat::endl(), fAsciiFileName, fCodeHeaderAscii, fFcout_f, fFileHeader, TCnaHeaderEB::fFirstEvt, TCnaHeaderEB::fMaxCrysInTow, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fMaxTowInSM, TCnaHeaderEB::fNbOfTakenEvts, TCnaHeaderEB::fNentries, TCnaHeaderEB::fRunNumber, TCnaHeaderEB::fStartDate, TCnaHeaderEB::fStartTime, TCnaHeaderEB::fStopDate, TCnaHeaderEB::fStopTime, TCnaHeaderEB::fSuperModule, and TCnaHeaderEB::fTypAna.

Referenced by WriteAsciiCnaChannelTable(), WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), WriteAsciiCovCorrecCovCss(), WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteAsciiSvCorrecCovCss(), and WriteAsciiVariancesOfSamples().

05844 {
05845 //Ascii results file header writing  (private). Called by the WriteAscii...() methods
05846   
05847   //-----------------------------------------------
05848   //
05849   //     opening of the ASCII results file
05850   //     and writing of its header
05851   //
05852   //-----------------------------------------------
05853   
05854   fFcout_f.open(fAsciiFileName);
05855   
05856   fFcout_f << "*** File: " << fAsciiFileName
05857            << " *** " << endl << endl;
05858   fFcout_f << "*Analysis name            : " << fFileHeader->fTypAna        << endl; 
05859   fFcout_f << "*Run number               : " << fFileHeader->fRunNumber     << endl;
05860   fFcout_f << "*First taken event        : " << fFileHeader->fFirstEvt      << endl;
05861   fFcout_f << "*Number of taken events   : " << fFileHeader->fNbOfTakenEvts << endl;
05862   fFcout_f << "*Super-module number      : " << fFileHeader->fSuperModule   << endl;
05863   fFcout_f << "*Time first taken event   : " << fFileHeader->fStartTime     << endl;
05864   fFcout_f << "*Time last  taken event   : " << fFileHeader->fStopTime      << endl;
05865   fFcout_f << "*Date first taken event   : " << fFileHeader->fStartDate     << endl;
05866   fFcout_f << "*Date last  taken event   : " << fFileHeader->fStopDate      << endl;
05867   fFcout_f << "*Number of entries        : " << fFileHeader->fNentries      << endl;
05868   fFcout_f << "*Max nb of towers in SM   : " << fFileHeader->fMaxTowInSM    << endl;
05869   fFcout_f << "*Max nb of Xtals in tower : " << fFileHeader->fMaxCrysInTow  << endl;
05870   fFcout_f << "*Max nb of samples ADC    : " << fFileHeader->fMaxSampADC    << endl;
05871   fFcout_f << endl; 
05872 
05873   //========================================================================= 
05874   //   closing of the results file if i_code = fCodeHeaderAscii only.
05875   //   closing is done in the fT1dWriteAscii() and fT2dWriteAscii() methods
05876   //   except for i_code = fCodeHeaderAscii
05877   //=========================================================================
05878   if(i_code == fCodeHeaderAscii) fFcout_f.close();
05879 }

void TCnaRunEB::fCopy ( const TCnaRunEB rund  )  [private]

Definition at line 967 of file TCnaRunEB.cc.

References fAsciiFileName, fAsciiFileNameShort, fCdelete, fCfgResultsAsciiFilePath, fCfgResultsRootFilePath, fCnew, fCodeCorCorrecCovCss, fCodeCorCss, fCodeCorMosccMot, fCodeCorScc, fCodeCorSccMos, fCodeCovCorrecCovCss, fCodeCovCss, fCodeCovMosccMot, fCodeCovScc, fCodeCovSccMos, fCodeEv, fCodeEvCorCss, fCodeEvts, fCodeHeaderAscii, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fCodeRoot, fCodeSampTime, fCodeSigCorCss, fCodeSvCorrecCovCss, fCodeVar, fDim_name, fFileForResultsAsciiFilePath, fFileForResultsRootFilePath, fFileHeader, fFlagPrint, fjustap_1d_cc, fjustap_1d_ev, fjustap_1d_ss, fjustap_1d_var, fjustap_2d_cc, fjustap_2d_ev, fjustap_2d_ss, fjustap_2d_var, fOpenRootFile, fRootFileName, fRootFileNameShort, fSectChanSizeX, fSectChanSizeY, fSectSampSizeX, fSectSampSizeY, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_ev_sig, fT1d_EvtNbInLoop, fT1d_his_s, fT1d_LastEvtNumber, fT1d_sig_cor_ss, fT1d_sig_ev, fT1d_sig_sig, fT1d_SMtowFromIndex, fT1d_var, fT1d_xmax, fT1d_xmin, fT1dCrysNumbersTable, fT2d1_cor_cc_mos, fT2d1_cor_moscc_mot, fT2d1_cov_cc_mos, fT2d1_cov_moscc_mot, fT2d1_sv_correc_covss_s, fT2d_cor_cc_mos, fT2d_cor_moscc_mot, fT2d_cov_cc_mos, fT2d_cov_moscc_mot, fT2d_ev, fT2d_EvtNbInLoop, fT2d_his_s, fT2d_LastEvtNumber, fT2d_sv_correc_covss_s, fT2d_var, fT2d_xmax, fT2d_xmin, fT2dCrysNumbersTable, fT3d1_cor_cc, fT3d1_cor_correc_covss_s, fT3d1_cor_ss, fT3d1_cov_cc, fT3d1_cov_correc_covss_s, fT3d1_cov_ss, fT3d1_distribs, fT3d2_cor_cc, fT3d2_cor_correc_covss_s, fT3d2_cor_ss, fT3d2_cov_cc, fT3d2_cov_correc_covss_s, fT3d2_cov_ss, fT3d2_distribs, fT3d_cor_cc, fT3d_cor_correc_covss_s, fT3d_cor_ss, fT3d_cov_cc, fT3d_cov_correc_covss_s, fT3d_cov_ss, fT3d_distribs, fT3d_his_s, fTagCorCorrecCovCss, fTagCorCss, fTagCorMosccMot, fTagCorScc, fTagCorSccMos, fTagCovCorrecCovCss, fTagCovCss, fTagCovMosccMot, fTagCovScc, fTagCovSccMos, fTagEv, fTagEvCorCss, fTagEvEv, fTagEvSig, fTagEvtNbInLoop, fTagEvts, fTagLastEvtNumber, fTagSigCorCss, fTagSigEv, fTagSigSig, fTagSvCorrecCovCss, fTagTowerNumbers, fTagVar, fUserSamp, fUserSMEcha, fVal_dat2, and fVal_data.

Referenced by operator=().

00968 {
00969 //Private copy
00970 
00971 #define NOCO
00972 #ifndef NOCO
00973   fFileHeader   = rund.fFileHeader;
00974   fOpenRootFile = rund.fOpenRootFile;
00975 
00976   fUserSamp     = rund.fUserSamp;
00977   fUserSMEcha     = rund.fUserSMEcha;
00978 
00979   fSectChanSizeX = rund.fSectChanSizeX;
00980   fSectChanSizeY = rund.fSectChanSizeY;
00981   fSectSampSizeX = rund.fSectSampSizeX;
00982   fSectSampSizeY = rund.fSectSampSizeY;
00983 
00984   fT1d_SMtowFromIndex = rund.fT1d_SMtowFromIndex;
00985 
00986   fT2d_EvtNbInLoop = rund.fT2d_EvtNbInLoop;
00987   fT1d_EvtNbInLoop = rund.fT1d_EvtNbInLoop;
00988 
00989   fT3d_distribs  = rund.fT3d_distribs;
00990   fT3d2_distribs = rund.fT3d2_distribs;
00991   fT3d1_distribs = rund.fT3d1_distribs;
00992 
00993   fVal_data     = rund.fVal_data;   
00994   fVal_dat2     = rund.fVal_dat2;
00995 
00996   fT2d_LastEvtNumber = rund.fT2d_LastEvtNumber;
00997   fT1d_LastEvtNumber = rund.fT1d_LastEvtNumber;
00998 
00999   fT2d_ev      = rund.fT2d_ev;
01000   fT1d_ev      = rund.fT1d_ev;
01001 
01002   fT2d_var     = rund.fT2d_var;
01003   fT1d_var     = rund.fT1d_var;
01004 
01005   fT3d_his_s   = rund.fT3d_his_s;
01006   fT2d_his_s   = rund.fT2d_his_s;
01007   fT1d_his_s   = rund.fT1d_his_s;
01008 
01009   fT2d_xmin    = rund.fT2d_xmin;
01010   fT1d_xmin    = rund.fT1d_xmin;
01011   fT2d_xmax    = rund.fT2d_xmax; 
01012   fT1d_xmax    = rund.fT1d_xmax;   
01013 
01014   fT3d_cov_ss  = rund.fT3d_cov_ss;
01015   fT3d2_cov_ss = rund.fT3d2_cov_ss;
01016   fT3d1_cov_ss = rund.fT3d1_cov_ss;
01017 
01018   fT3d_cor_ss  = rund.fT3d_cor_ss;
01019   fT3d2_cor_ss = rund.fT3d2_cor_ss;
01020   fT3d1_cor_ss = rund.fT3d1_cor_ss;
01021 
01022   fT3d_cov_cc  = rund.fT3d_cov_cc;
01023   fT3d2_cov_cc = rund.fT3d2_cov_cc;
01024   fT3d1_cov_cc = rund.fT3d1_cov_cc;
01025 
01026   fT3d_cor_cc  = rund.fT3d_cor_cc;
01027   fT3d2_cor_cc = rund.fT3d2_cor_cc;
01028   fT3d1_cor_cc = rund.fT3d1_cor_cc;
01029 
01030   fT2d_cov_cc_mos  = rund.fT2d_cov_cc_mos;
01031   fT2d1_cov_cc_mos = rund.fT2d1_cov_cc_mos;
01032 
01033   fT2d_cor_cc_mos  = rund.fT2d_cor_cc_mos;
01034   fT2d1_cor_cc_mos = rund.fT2d1_cor_cc_mos;
01035 
01036   fT2d_cov_moscc_mot  = rund.fT2d_cov_moscc_mot;
01037   fT2d1_cov_moscc_mot = rund.fT2d1_cov_moscc_mot;
01038 
01039   fT2d_cor_moscc_mot  = rund.fT2d_cor_moscc_mot;
01040   fT2d1_cor_moscc_mot = rund.fT2d1_cor_moscc_mot;
01041 
01042   fT1d_ev_ev     = rund.fT1d_ev_ev;
01043   fT1d_ev_sig    = rund.fT1d_ev_sig;
01044   fT1d_ev_cor_ss = rund.fT1d_ev_cor_ss;
01045 
01046   fT1d_sig_ev     = rund.fT1d_sig_ev;
01047   fT1d_sig_sig    = rund.fT1d_sig_sig;
01048   fT1d_sig_cor_ss = rund.fT1d_sig_cor_ss;
01049 
01050   fT2d_sv_correc_covss_s = rund.fT2d_sv_correc_covss_s;
01051   fT2d1_sv_correc_covss_s = rund.fT2d1_sv_correc_covss_s;
01052 
01053   fT3d_cov_correc_covss_s  = rund.fT3d_cov_correc_covss_s;
01054   fT3d2_cov_correc_covss_s = rund.fT3d2_cov_correc_covss_s;
01055   fT3d1_cov_correc_covss_s = rund.fT3d1_cov_correc_covss_s;
01056 
01057   fT3d_cor_correc_covss_s  = rund.fT3d_cor_correc_covss_s;
01058   fT3d2_cor_correc_covss_s = rund.fT3d2_cor_correc_covss_s;
01059   fT3d1_cor_correc_covss_s = rund.fT3d1_cor_correc_covss_s;
01060 
01061   fT2dCrysNumbersTable  = rund.fT2dCrysNumbersTable;
01062   fT1dCrysNumbersTable  = rund.fT1dCrysNumbersTable;
01063 
01064   fjustap_2d_ev  = rund.fjustap_2d_ev;
01065   fjustap_1d_ev  = rund.fjustap_1d_ev;
01066 
01067   fjustap_2d_var = rund.fjustap_2d_var;
01068   fjustap_1d_var = rund.fjustap_1d_var;
01069 
01070   fjustap_2d_cc  = rund.fjustap_2d_cc;
01071   fjustap_1d_cc  = rund.fjustap_1d_cc;
01072 
01073   fjustap_2d_ss  = rund.fjustap_2d_ss;
01074   fjustap_1d_ss  = rund.fjustap_1d_ss;
01075 
01076   //........................................ Codes   
01077   fCodeHeaderAscii     = rund.fCodeHeaderAscii;
01078   fCodeRoot            = rund.fCodeRoot;
01079   fCodeSampTime        = rund.fCodeSampTime;  
01080   fCodeEv              = rund.fCodeEv;  
01081   fCodeVar             = rund.fCodeVar;  
01082   fCodeEvts            = rund.fCodeEvts;
01083   fCodeCovCss          = rund.fCodeCovCss;
01084   fCodeCorCss          = rund.fCodeCorCss;
01085   fCodeCovScc          = rund.fCodeCovScc;
01086   fCodeCorScc          = rund.fCodeCorScc;
01087   fCodeCovSccMos       = rund.fCodeCovSccMos;
01088   fCodeCorSccMos       = rund.fCodeCorSccMos;
01089   fCodeCovMosccMot     = rund.fCodeCovMosccMot;
01090   fCodeCorMosccMot     = rund.fCodeCorMosccMot;
01091   fCodeEvCorCss        = rund.fCodeEvCorCss;
01092   fCodeSigCorCss       = rund.fCodeSigCorCss;
01093   fCodeSvCorrecCovCss  = rund.fCodeSvCorrecCovCss;
01094   fCodeCovCorrecCovCss = rund.fCodeCovCorrecCovCss;
01095   fCodeCorCorrecCovCss = rund.fCodeCorCorrecCovCss;
01096   fCodePrintComments    = rund.fCodePrintComments;
01097   fCodePrintWarnings    = rund.fCodePrintWarnings;
01098   fCodePrintAllComments = rund.fCodePrintAllComments;
01099   fCodePrintNoComment   = rund.fCodePrintNoComment;
01100 
01101   //.................................................. Tags
01102   fTagTowerNumbers  = rund.fTagTowerNumbers;
01103   fTagLastEvtNumber = rund.fTagLastEvtNumber;
01104   fTagEvtNbInLoop   = rund.fTagEvtNbInLoop;
01105   fTagEv            = rund.fTagEv;
01106   fTagVar           = rund.fTagVar;
01107   fTagEvts          = rund.fTagEvts;
01108   fTagCovCss        = rund.fTagCovCss;
01109   fTagCorCss        = rund.fTagCorCss;
01110   fTagCovScc        = rund.fTagCovScc;
01111   fTagCorScc        = rund.fTagCorScc;
01112   fTagCovSccMos     = rund.fTagCovSccMos;
01113   fTagCorSccMos     = rund.fTagCorSccMos;
01114   fTagCovMosccMot   = rund.fTagCovMosccMot;
01115   fTagCorMosccMot   = rund.fTagCorMosccMot;
01116   fTagEvEv          = rund.fTagEvEv;
01117   fTagEvSig         = rund.fTagEvSig;
01118   fTagEvCorCss      = rund.fTagEvCorCss;
01119   fTagSigEv         = rund.fTagSigEv;
01120   fTagSigSig        = rund.fTagSigSig;
01121   fTagSigCorCss     = rund.fTagSigCorCss;
01122   fTagSvCorrecCovCss  = rund.fTagSvCorrecCovCss;
01123   fTagCovCorrecCovCss = rund.fTagCovCorrecCovCss;
01124   fTagCorCorrecCovCss = rund.fTagCorCorrecCovCss;
01125   fFlagPrint          = rund.fFlagPrint;
01126 
01127   fRootFileName         = rund.fRootFileName;
01128   fRootFileNameShort    = rund.fRootFileNameShort;
01129   fAsciiFileName        = rund.fAsciiFileName;
01130   fAsciiFileNameShort   = rund.fAsciiFileNameShort;
01131 
01132   fDim_name             = rund.fDim_name;
01133 
01134   fCfgResultsRootFilePath  = rund.fCfgResultsRootFilePath;
01135   fCfgResultsAsciiFilePath = rund.fCfgResultsAsciiFilePath;
01136 
01137   fFileForResultsRootFilePath  = rund.fFileForResultsRootFilePath; 
01138   fFileForResultsAsciiFilePath = rund.fFileForResultsAsciiFilePath; 
01139 
01140   fCnew    = rund.fCnew;
01141   fCdelete = rund.fCdelete;
01142 #endif // NOCO
01143 }

void TCnaRunEB::fMakeResultsFileName ( const Int_t &  i_code  )  [private]

Definition at line 5494 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileName, fAsciiFileNameShort, fCdelete, fCfgResultsAsciiFilePath, fCfgResultsRootFilePath, fCnew, fCodeCorCorrecCovCss, fCodeCorCss, fCodeCorresp, fCodeCorSccMos, fCodeCovCorrecCovCss, fCodeCovCss, fCodeCovSccMos, fCodeEv, fCodeEvCorCss, fCodeEvts, fCodeHeaderAscii, fCodeRoot, fCodeSigCorCss, fCodeSvCorrecCovCss, fCodeVar, fDim_name, fFileHeader, TCnaHeaderEB::fFirstEvt, TCnaHeaderEB::fNbOfTakenEvts, fRootFileName, fRootFileNameShort, TCnaHeaderEB::fRunNumber, TCnaHeaderEB::fSuperModule, fTTBELL, TCnaHeaderEB::fTypAna, fUserSMEcha, and i.

Referenced by GetPathForResultsAsciiFiles(), GetPathForResultsRootFiles(), WriteAsciiCnaChannelTable(), WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), WriteAsciiCovCorrecCovCss(), WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteAsciiSvCorrecCovCss(), WriteAsciiVariancesOfSamples(), and WriteRootFile().

05495 {
05496 //Results filename making  (private)
05497   
05498   //----------------------------------------------------------------------
05499   //
05500   //     making of the name of the results file.
05501   //
05502   //     Put the names in the following class attributes:
05503   //
05504   //     fRootFileName,  fRootFileNameShort,
05505   //     fAsciiFileName, fAsciiFileNameShort
05506   //
05507   //     (Short means: without the directory path)
05508   //
05509   //     set indications (run number, type of quantity, ...)
05510   //     and add the extension ".ascii" or ".root"
05511   //     
05512   //     ROOT:  only one ROOT file:  i_code = fCodeRoot.
05513   //                                          All the types of quantities
05514   //
05515   //     ASCII: several ASCII files: i_code = code for one type of quantity
05516   //            each i_code which is not equal to fCodeRoot is also implicitly
05517   //            a code "fCodeAscii" (this last attribute is not in the class)
05518   //     
05519   //----------------------------------------------------------------------
05520   
05521   char* f_in       = new char[fDim_name];                 fCnew++;
05522   char* f_in_short = new char[fDim_name];                 fCnew++;
05523   
05524   //  switch (i_code){  
05525   
05526   //===================================  R O O T  =====================================
05527   if (i_code == fCodeRoot)
05528     {
05529       if(fCfgResultsRootFilePath == "?")
05530         {
05531           cout << "#TCnaRunEB::fMakeResultsFileName>  * * * W A R N I N G * * * " << endl << endl
05532                << "    Path for results .root file not defined. Default option will be used here:" << endl
05533                << "    your results files will be writen in your HOME directory." << endl << endl
05534                << "    In order to write the results file in the file FILE_NAME," << endl
05535                << "    you have to call the method GetPathForResultsRootFiles(TString FILE_NAME)" << endl 
05536                << "    where FILE_NAME is the complete name (/afs/etc...) of a configuration file" << endl 
05537                << "    which must have only one line containing the path of the .root result files." << endl
05538                << "    If the TString FILE_NAME is empty, the configuration file must be " << endl
05539                << "    in your HOME directory and must be called: cna_results_root.cfg" << endl
05540                << endl;
05541 
05542           TString home_path = gSystem->Getenv("HOME");
05543           fCfgResultsRootFilePath = home_path;      
05544         }
05545 
05546       if(fCfgResultsRootFilePath.BeginsWith("$HOME"))
05547         {
05548           fCfgResultsRootFilePath.Remove(0,5);
05549           Text_t *t_file_nohome = (Text_t *)fCfgResultsRootFilePath.Data(); //  /scratch0/cna/...
05550           
05551           TString home_path = gSystem->Getenv("HOME");
05552           fCfgResultsRootFilePath = home_path;             //  /afs/cern.ch/u/USER
05553           fCfgResultsRootFilePath.Append(t_file_nohome);   //  /afs/cern.ch/u/USER/scratch0/cna/...
05554         }
05555 
05556       sprintf(f_in, "%s/%s_%d_%d_%d_SM%d",
05557               fCfgResultsRootFilePath.Data(), fFileHeader->fTypAna.Data(),  fFileHeader->fRunNumber,
05558               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05559       sprintf(f_in_short, "%s_%d_%d_%d_SM%d",
05560               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05561               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05562     }
05563 
05564   //===================================  A S C I I  ===================================  
05565 
05566   if (i_code == fCodeHeaderAscii)
05567     {
05568       if(fCfgResultsAsciiFilePath == "?")
05569         {
05570           cout << "#TCnaRunEB::fMakeResultsFileName>  * * * W A R N I N G * * * " << endl << endl
05571                << "    Path for results .ascii file not defined. Default option will be used here:" << endl
05572                << "    your results files will be writen in your HOME directory." << endl << endl
05573                << "    In order to write the results file in the file FILE_NAME," << endl
05574                << "    you have to call the method GetPathForResultsAsciiFiles(TString FILE_NAME)" << endl 
05575                << "    where FILE_NAME is the complete name (/afs/etc...) of a configuration file" << endl 
05576                << "    which must have only one line containing the path of the .ascii result files." << endl
05577                << "    If the TString FILE_NAME is empty, the configuration file must be " << endl
05578                << "    in your HOME directory and must be called: cna_results_ascii.cfg" << endl
05579                << endl;
05580 
05581           TString home_path = gSystem->Getenv("HOME");
05582           fCfgResultsAsciiFilePath = home_path;  
05583         } 
05584       
05585       if(fCfgResultsAsciiFilePath.BeginsWith("$HOME"))
05586         {
05587           fCfgResultsAsciiFilePath.Remove(0,5);
05588           Text_t *t_file_nohome = (Text_t *)fCfgResultsAsciiFilePath.Data(); //  /scratch0/cna/...
05589           
05590           TString home_path = gSystem->Getenv("HOME");
05591           fCfgResultsAsciiFilePath = home_path;             //  /afs/cern.ch/u/USER
05592           fCfgResultsAsciiFilePath.Append(t_file_nohome);   //  /afs/cern.ch/u/USER/scratch0/cna/...
05593         }
05594      
05595       sprintf(f_in, "%s/%s_%d_header_%d_%d_SM%d",
05596               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05597               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05598       sprintf(f_in_short, "%s_%d_header_%d_%d_SM%d",
05599               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05600               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05601     }
05602 
05603   //------------------------------------------------------------------------------------------------------
05604   if (i_code == fCodeCorresp)
05605     {
05606       sprintf(f_in, "%s/%s_%d_%d_%d_SM%d_cna",
05607               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05608               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05609       sprintf(f_in_short, "%s_%d_%d_%d_SM%d_cna",
05610               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05611               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05612     }
05613 
05614   if (i_code == fCodeEv)
05615     {
05616       sprintf(f_in, "%s/%s_%d_ev_%d_%d_SM%d",
05617               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05618               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05619       sprintf(f_in_short, "%s_%d_ev_%d_%d_SM%d",
05620               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05621               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05622     }
05623   
05624   if (i_code == fCodeVar)
05625     {
05626       sprintf(f_in, "%s/%s_%d_var_%d_%d_SM%d",
05627               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05628               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05629       sprintf(f_in_short, "%s_%d_var_%d_%d_SM%d",
05630               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05631               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05632     }
05633   
05634   if( i_code == fCodeEvts)
05635     {
05636       sprintf(f_in, "%s/%s_%d_evts_s_c%d_%d_%d_SM%d",
05637               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber, fUserSMEcha,
05638               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05639       sprintf(f_in_short, "%s_%d_evts_s_c%d_%d_%d_SM%d",
05640               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber, fUserSMEcha,
05641               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05642     }
05643   
05644   if(  i_code == fCodeCovSccMos)
05645     {
05646       sprintf(f_in, "%s/%s_%d_cov_cc_mos_%d_%d_SM%d",
05647               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05648               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05649       sprintf(f_in_short, "%s_%d_cov_cc_mos_%d_%d_SM%d",
05650               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05651               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05652     }
05653   
05654   if ( i_code == fCodeCorSccMos)
05655     {
05656       sprintf(f_in, "%s/%s_%d_cor_cc_mos_%d_%d_SM%d",
05657               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05658               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05659       sprintf(f_in_short, "%s_%d_cor_cc_mos_%d_%d_SM%d",
05660               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05661               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05662     }
05663   
05664   if (i_code ==  fCodeCovCss)
05665     {
05666       sprintf(f_in, "%s/%s_%d_cov_ss_c%d_%d_%d_SM%d",
05667               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber, fUserSMEcha,
05668               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05669       sprintf(f_in_short, "%s_%d_cov_ss_c%d_%d_%d_SM%d",
05670               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber, fUserSMEcha,
05671               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05672     }
05673   
05674   if (i_code == fCodeCorCss)
05675     {
05676       sprintf(f_in, "%s/%s_%d_cor_ss_c%d_%d_%d_SM%d",
05677               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05678               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05679       sprintf(f_in_short, "%s_%d_cor_ss_c%d_%d_%d_SM%d",
05680               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05681               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05682     }
05683   
05684   if (i_code == fCodeEvCorCss)
05685     {
05686       sprintf(f_in, "%s/%s_%d_ev_cor_ss_%d_%d_SM%d",
05687               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05688               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05689       sprintf(f_in_short, "%s_%d_ev_cor_ss_%d_%d_SM%d",
05690               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05691               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05692     }
05693   
05694   if (i_code == fCodeSigCorCss)
05695     {
05696       sprintf(f_in, "%s/%s_%d_sig_cor_ss_%d_%d_SM%d",
05697               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05698               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05699       sprintf(f_in_short, "%s_%d_sig_cor_ss_%d_%d_SM%d",
05700               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05701               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05702     }
05703 
05704   if (i_code == fCodeSvCorrecCovCss)
05705     {
05706       sprintf(f_in, "%s/%s_%d_sv_correc_covss_%d_%d_SM%d",
05707               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05708               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05709       sprintf(f_in_short, "%s_%d_sv_correc_covss_%d_%d_SM%d",
05710               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05711               fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05712     }
05713   
05714   if (i_code == fCodeCovCorrecCovCss)
05715     {
05716       sprintf(f_in, "%s/%s_%d_cov_correc_covss_c%d_%d_%d_SM%d",
05717               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05718               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05719       sprintf(f_in_short, "%s_%d_cov_correc_covss_c%d_%d_%d_SM%d",
05720               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05721               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05722     }
05723 
05724   if (i_code == fCodeCorCorrecCovCss)
05725     {
05726       sprintf(f_in, "%s/%s_%d_cor_correc_covss_c%d_%d_%d_SM%d",
05727               fCfgResultsAsciiFilePath.Data(), fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05728               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05729       sprintf(f_in_short, "%s_%d_cor_correc_covss_c%d_%d_%d_SM%d",
05730               fFileHeader->fTypAna.Data(), fFileHeader->fRunNumber,
05731               fUserSMEcha, fFileHeader->fFirstEvt, fFileHeader->fNbOfTakenEvts, fFileHeader->fSuperModule);
05732     } 
05733 
05734   // default:
05735   //    cout << "*TCnaRunEB::fMakeResultsFileName(const Int_t&  i_code)> "
05736   //     << "wrong header code , i_code = " << i_code << endl; 
05737   //  }
05738 
05739   //======================================= f_name
05740   
05741   char* f_name = new char[fDim_name];                   fCnew++;
05742   
05743   for (Int_t i = 0 ; i < fDim_name ; i++)
05744     {
05745       f_name[i] = '\0';
05746     }
05747   
05748   Int_t ii = 0;
05749   for (Int_t i = 0 ; i < fDim_name ; i++)
05750     {
05751       if ( f_in[i] != '\0' ){f_name[i] = f_in[i]; ii++;}
05752       else {break;}  // va directement a f_name[ii] = '.';
05753     }
05754  
05755   if ( ii+5 < fDim_name )
05756     {
05757       //.......... writing of the file extension (.root or .ascii)
05758       
05759       //------------------------------------------- extension .ascii
05760       if ( i_code != fCodeRoot  || i_code == fCodeCorresp )
05761         {
05762           f_name[ii] = '.';   f_name[ii+1] = 'a';
05763           f_name[ii+2] = 's'; f_name[ii+3] = 'c';
05764           f_name[ii+4] = 'i'; f_name[ii+5] = 'i';
05765           
05766           fAsciiFileName = f_name;
05767         }
05768       //------------------------------------------- extension .root
05769       if ( i_code == fCodeRoot )
05770         {
05771           f_name[ii] = '.';   f_name[ii+1] = 'r';
05772           f_name[ii+2] = 'o'; f_name[ii+3] = 'o';  f_name[ii+4] = 't';
05773           
05774           fRootFileName = f_name;
05775         }
05776     }
05777   else
05778     {
05779       cout << "*TCnaRunEB::fMakeResultsFileName(...)> Name too long (for f_name)."
05780            << " No room enough for the extension. (ii = " << ii << ")"
05781            << fTTBELL << endl; 
05782     }
05783 
05784 
05785   //====================================== f_name_short
05786   
05787   char* f_name_short = new char[fDim_name];          fCnew++;
05788 
05789   for (Int_t i = 0 ; i < fDim_name ; i++)
05790     {
05791       f_name_short[i] = '\0';
05792     }
05793   
05794   ii = 0;
05795   for (Int_t i = 0 ; i < fDim_name ; i++)
05796     {
05797       if ( f_in_short[i] != '\0' ){f_name_short[i] = f_in_short[i]; ii++;}
05798       else {break;}  // va directement a f_name_short[ii] = '.';
05799     }
05800  
05801   if ( ii+5 < fDim_name )
05802     {
05803       //.......... writing of the file extension (.root or .ascii)
05804       
05805       //-------------------------------------------extension .ascii
05806       if ( i_code != fCodeRoot || i_code == fCodeCorresp )
05807         {
05808           f_name_short[ii] = '.';   f_name_short[ii+1] = 'a';
05809           f_name_short[ii+2] = 's'; f_name_short[ii+3] = 'c';
05810           f_name_short[ii+4] = 'i'; f_name_short[ii+5] = 'i';
05811           
05812           fAsciiFileNameShort = f_name_short;
05813         }
05814       
05815       //-------------------------------------------- extension .root
05816       if ( i_code == fCodeRoot )
05817         {
05818           f_name_short[ii] = '.';   f_name_short[ii+1] = 'r';
05819           f_name_short[ii+2] = 'o'; f_name_short[ii+3] = 'o';  f_name_short[ii+4] = 't';
05820           
05821           fRootFileNameShort = f_name_short;
05822         }
05823     }
05824   else
05825     {
05826       cout << "*TCnaRunEB::fMakeResultsFileName(...)> Name too long (for f_name_short)."
05827            << " No room enough for the extension. (ii = " << ii << ")"
05828            << fTTBELL  << endl; 
05829     }
05830 
05831     delete [] f_name;                                        fCdelete++;
05832     delete [] f_name_short;                                  fCdelete++;
05833 
05834     delete [] f_in;                                          fCdelete++;
05835     delete [] f_in_short;                                    fCdelete++;
05836 }

void TCnaRunEB::fT1dWriteAscii ( const Int_t &  i_code,
const Int_t &  i_lic1,
const Int_t &  i_lic2 
) [private]

Definition at line 5889 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileName, fCnew, fCodeEv, fCodeEvCorCss, fCodeEvts, fCodePrintAllComments, fCodeSigCorCss, fCodeSvCorrecCovCss, fCodeVar, fFcout_f, fFileHeader, fFlagPrint, fjustap_1d_ev, fjustap_1d_var, fjustap_2d_ev, fjustap_2d_var, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fNbBinsADC, fNbChanByLine, fNbSampByLine, fT1d_ev_cor_ss, fT1d_sig_cor_ss, fT1d_xmax, fT1d_xmin, fT2d_ev, fT2d_his_s, fT2d_sv_correc_covss_s, fT2d_var, fUserSMEcha, and i.

Referenced by WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteAsciiSvCorrecCovCss(), and WriteAsciiVariancesOfSamples().

05891 {
05892   //Writing of the values of a 2d array as a 1d array of 1d arrays (private)
05893   
05894   //----------------------------------------------------------------
05895   //
05896   //     The 2D Array TAB[d1][d2] is writen like this:
05897   //
05898   //     TAB[0][j]  ; j=1,d2 by lines of i_lic1 values
05899   //     TAB[1][j]  ; j=1,d2 by lines of i_lic1 values
05900   //     TAB[2][j]  ; j=1,d2 by lines of i_lic1 values  
05901   // 
05902   //      etc... ,      hence (if i_lic2 > 0 ):
05903   //     
05904   //     TAB[i][0]  ; i=1,d1 by lines of i_lic2 values
05905   //     TAB[i][1]  ; i=1,d1 by lines of i_lic2 values
05906   //     TAB[i][2]  ; i=1,d1 by lines of i_lic2 values  
05907   //
05908   //----------------------------------------------------------------
05909 
05910   fFcout_f << setiosflags(ios::showpoint | ios::uppercase);
05911   fFcout_f << setprecision(3) << setw(6);
05912   fFcout_f.setf(ios::dec, ios::basefield);
05913   fFcout_f.setf(ios::fixed, ios::floatfield);
05914   fFcout_f.setf(ios::left, ios::adjustfield);
05915   fFcout_f.setf(ios::right, ios::adjustfield);
05916   
05917   cout << setiosflags(ios::showpoint | ios::uppercase);
05918   cout << setprecision(3) << setw(6);
05919   cout.setf(ios::dec, ios::basefield);
05920   cout.setf(ios::fixed, ios::floatfield);
05921   cout.setf(ios::left, ios::adjustfield);
05922   cout.setf(ios::right, ios::adjustfield);
05923   
05924   Int_t limit   = 0;
05925   Int_t nb_elts = 0;
05926   Int_t i_lico  = 0;
05927   
05928   TString g_nam0 = "?";
05929   TString g_nam1 = "?";
05930   TString g_nam2 = "?";
05931   TString g_nam3 = "?";
05932   TString g_nam4 = "?";
05933   
05934   Int_t nb_pass = 2;
05935 
05936   //------------------------------------------------------------------------
05937   //  Reservation dynamique de 2 arrays Double_t** (pour ev et var) de
05938   //  dimensions les multiples de 5 juste au-dessus des dimensions de
05939   //  l'array 2D a ecrire (array de dimensions
05940   // (fFileHeader->fMaxSampADC,fFileHeader->fMaxCrysInSM))
05941   //------------------------------------------------------------------------
05942   //.... Determination des tailles multiples de fNbChanByLine ou fNbSampByLine
05943 
05944   Int_t justap_samp = 0;
05945   if ( fFileHeader->fMaxSampADC%fNbSampByLine == 0 ){
05946       justap_samp = fFileHeader->fMaxSampADC;}
05947   else{
05948       justap_samp = ((fFileHeader->fMaxSampADC/fNbSampByLine)+1)*fNbSampByLine;}
05949 
05950   Int_t justap_chan = 0;  
05951   if ( fFileHeader->fMaxCrysInSM%fNbChanByLine == 0 ){
05952       justap_chan = fFileHeader->fMaxCrysInSM;}
05953   else{
05954       justap_chan = ((fFileHeader->fMaxCrysInSM/fNbChanByLine)+1)*fNbChanByLine;}
05955   
05956   //................................. allocation fjustap_2d_ev
05957   if ( i_code == fCodeEv )
05958     {
05959       if( fjustap_2d_ev == 0 )
05960         {
05961           //................... Allocation
05962           fjustap_2d_ev = new Double_t*[justap_chan];              fCnew++;  
05963           fjustap_1d_ev = new  Double_t[justap_chan*justap_samp];  fCnew++;  
05964           for(Int_t i = 0 ; i < justap_chan ; i++){
05965             fjustap_2d_ev[i] = &fjustap_1d_ev[0] + i*justap_samp;}
05966         }
05967       //...................... Transfert des valeurs dans fjustap_2d_ev (=init)
05968       for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
05969         { 
05970           for(Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
05971             { 
05972               fjustap_2d_ev[i_SMEcha][i_samp]  = fT2d_ev[i_SMEcha][i_samp];
05973             }
05974         }      
05975       //............................... mise a zero du reste de l'array (=init)
05976       for(Int_t i_SMEcha = fFileHeader->fMaxCrysInSM; i_SMEcha < justap_chan; i_SMEcha++)
05977         {
05978           for(Int_t i_samp = fFileHeader->fMaxSampADC; i_samp < justap_samp; i_samp++)
05979             {
05980               fjustap_2d_ev[i_SMEcha][i_samp] = (Double_t)0;
05981             }
05982         }      
05983     }
05984 
05985   //...... Allocation fjustap_2d_var (meme tableau pour corrections samples => a clarifier)
05986 
05987   if ( i_code == fCodeVar || i_code == fCodeSvCorrecCovCss )
05988     {
05989       if(fjustap_2d_var == 0)
05990         {
05991           //................... Allocation
05992           fjustap_2d_var = new Double_t*[justap_chan];             fCnew++;  
05993           fjustap_1d_var = new  Double_t[justap_chan*justap_samp]; fCnew++;  
05994           for(Int_t i = 0 ; i < justap_chan ; i++){
05995             fjustap_2d_var[i] = &fjustap_1d_var[0] + i*justap_samp;}
05996         }
05997       //...................... Transfert des valeurs dans les fjustap_2d_var (=init)
05998       for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
05999         { 
06000           for(Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
06001             {
06002               if (i_code == fCodeVar){
06003                 fjustap_2d_var[i_SMEcha][i_samp] = fT2d_var[i_SMEcha][i_samp];}
06004               if (i_code == fCodeSvCorrecCovCss){
06005                 fjustap_2d_var[i_SMEcha][i_samp] =
06006                   fT2d_sv_correc_covss_s[i_SMEcha][i_samp];}
06007             }
06008         }
06009       //............................... mise a zero du reste de l'array (=init)
06010       for(Int_t i_SMEcha = fFileHeader->fMaxCrysInSM; i_SMEcha < justap_chan; i_SMEcha++)
06011         {
06012           for(Int_t i_samp = fFileHeader->fMaxSampADC; i_samp < justap_samp; i_samp++)
06013             {
06014               fjustap_2d_var[i_SMEcha][i_samp] = (Double_t)0;
06015             }
06016         }
06017     }
06018 
06019   //------------------------------------------------------------------------
06020 
06021  //................ Ecriture de la taille des lignes
06022   if( i_code == fCodeEv || i_code == fCodeVar || i_code == fCodeSvCorrecCovCss )
06023     {
06024       fFcout_f << "*TCnaRunEB> sample sectors, nb of channels by line = "
06025                << fNbChanByLine <<endl;
06026       fFcout_f << "*TCnaRunEB> channel sectors, nb of samples by line = "
06027                << fNbSampByLine <<endl;
06028     }
06029   if( i_code == fCodeEvCorCss || i_code == fCodeSigCorCss)
06030     {
06031       fFcout_f << "*TCnaRunEB> sample sectors, nb of channels by line = "
06032                << fNbChanByLine <<endl;
06033     }
06034 
06035   fFcout_f << endl;
06036   //.......................................................................
06037 
06038   if ( i_code == fCodeEvts || i_code == fCodeEvCorCss 
06039        || i_code == fCodeSigCorCss ) {nb_pass = 1;}
06040   
06041   for(Int_t i_pass = 0 ; i_pass < nb_pass ; i_pass++)
06042     {
06043       if(i_pass == 0)
06044         {
06045           i_lico  = i_lic1;
06046           limit   = justap_samp;
06047           
06048           if( i_code == fCodeEv  ||
06049               i_code == fCodeVar ||
06050               i_code == fCodeSvCorrecCovCss )
06051             {
06052               limit   = justap_samp;
06053               nb_elts = justap_chan;
06054               g_nam1  = "sample";
06055               g_nam2  = "channel";
06056             }
06057           if(i_code == fCodeEvCorCss || i_code == fCodeSigCorCss )
06058             {
06059               limit   = 1;
06060               nb_elts = justap_chan;
06061               g_nam1  = "channel";
06062             }
06063           if ( i_code == fCodeEvts )
06064             {
06065               limit   = fFileHeader->fMaxSampADC;
06066               nb_elts = fFileHeader->fNbBinsADC;
06067               g_nam0  = "channel";
06068               g_nam1  = "sample";
06069               g_nam2  = "bins";
06070               g_nam3  = "xmin=";
06071               g_nam4  = "xmax=";
06072             }
06073         }
06074       
06075       if(i_pass == 1)
06076         {
06077           i_lico  = i_lic2;
06078           limit   = justap_chan;
06079           nb_elts = justap_samp;
06080           g_nam1  = "channel";
06081           g_nam2  = "sample";
06082         }
06083       
06084       if(i_lico > nb_elts){i_lico = nb_elts;}
06085       
06086       for (Int_t i_dim = 0 ; i_dim < limit ; i_dim++)
06087         {
06088           //  switch (i_code){
06089 
06090           if ( i_code ==  fCodeEv)
06091             {
06092               fFcout_f << "*TCnaRunEB> expectation values, ";
06093             }
06094           
06095           if ( i_code ==  fCodeVar)
06096             {
06097               fFcout_f << "*TCnaRunEB> variances, ";
06098             }
06099           
06100           if ( i_code ==  fCodeSvCorrecCovCss)
06101             {
06102               fFcout_f
06103                 << "*TCnaRunEB> Sample value correction coefficients, ";
06104             }
06105 
06106           if ( i_code ==  fCodeEvCorCss)
06107             {
06108               fFcout_f
06109                 << "*TCnaRunEB> expectation values of the"
06110                 << " (sample,sample) correlations, ";
06111             }
06112                   
06113           if ( i_code ==  fCodeSigCorCss)
06114             {
06115               fFcout_f << "*TCnaRunEB> sigmas of the"
06116                        << " (sample,sample) correlations, ";
06117             }
06118          
06119           if ( i_code ==  fCodeEvts)
06120             {
06121               fFcout_f << "*TCnaRunEB> numbers of events, ";
06122             }
06123           
06124             //default:
06125             // cout << "*TCnaRunEB::fT1dWriteAscii(const Int_t& i_code)> "
06126             //   << "wrong code , i_code = " << i_code << endl; 
06127             // }
06128           
06129           if(i_code == fCodeEvts)
06130             {
06131               fFcout_f << g_nam0 << " "
06132                                << fUserSMEcha << ", "
06133                                << g_nam1 << " " 
06134                                << i_dim  << ", "
06135                                << g_nam2 << " 0 to 99";
06136             }
06137           if(i_code == fCodeEv  ||
06138              i_code == fCodeVar ||
06139              i_code == fCodeSvCorrecCovCss)
06140             {
06141               fFcout_f << g_nam1 << " " << i_dim << ", " << g_nam2
06142                                << " 0 to " << nb_elts - 1;
06143             }
06144           if ( i_code == fCodeEvCorCss || i_code == fCodeSigCorCss)
06145             {
06146               fFcout_f << g_nam1 << " 0 to " << nb_elts - 1;
06147             }
06148           if(i_code == fCodeEvts)
06149             {
06150               fFcout_f << ", " << g_nam3 << " "
06151                                << (fT1d_xmin)[i_dim]
06152                                << " , " << g_nam4 << " "
06153                                << (fT1d_xmax)[i_dim];
06154             }
06155           
06156           fFcout_f << " :" << endl;
06157           
06158           Int_t k_lec = 1;  // indice pour gestion saut de ligne
06159           
06160           for (Int_t i_elt = 0 ; i_elt < nb_elts ; i_elt++)
06161             {
06162               fFcout_f.width(8);
06163               
06164               //  switch (i_code){
06165               
06166               if ( i_code ==  fCodeEv)
06167                 {
06168                   switch (i_pass){
06169                   case 0:
06170                     fFcout_f << (fjustap_2d_ev)[i_elt][i_dim];
06171                     break;
06172                   case 1:
06173                     fFcout_f << (fjustap_2d_ev)[i_dim][i_elt];
06174                     break;
06175                   }
06176                 }
06177               
06178               if ( i_code ==   fCodeVar || i_code == fCodeSvCorrecCovCss)
06179                 {
06180                   switch (i_pass){
06181                   case 0:
06182                     fFcout_f << fjustap_2d_var[i_elt][i_dim];
06183                     break;
06184                   case 1:
06185                     fFcout_f << fjustap_2d_var[i_dim][i_elt];
06186                     break;
06187                   }
06188                 }  
06189               
06190               if ( i_code ==  fCodeEvCorCss)
06191                 {
06192                   fFcout_f << fT1d_ev_cor_ss[i_elt];
06193                 }  
06194                       
06195               if ( i_code ==  fCodeSigCorCss)
06196                 {
06197                   fFcout_f << fT1d_sig_cor_ss[i_elt];
06198                 }  
06199               
06200               if ( i_code ==  fCodeEvts)
06201                 {
06202                   fFcout_f << fT2d_his_s[i_dim][i_elt];
06203                 }  
06204                       
06205               //  default:
06206               //  cout << "*TCnaRunEB::fT1dWriteAscii(const Int_t& i_code)> "
06207               //     << "wrong code , i_code = " << i_code << endl; 
06208               //  }
06209               
06210               fFcout_f << "  "; 
06211               
06212               if ( k_lec >= i_lico )
06213                 { 
06214                   fFcout_f << endl;       
06215                   k_lec = 1;
06216                 }
06217               else
06218                 { 
06219                   k_lec++;
06220                 }             
06221             }
06222         }
06223     }
06224   fFcout_f << endl;
06225 
06226   //................ closing of the results file      
06227   fFcout_f.close();
06228 
06229   if(fFlagPrint == fCodePrintAllComments){
06230     cout << "*TCnaRunEB> The results have been writen in the ASCII file: "
06231          << fAsciiFileName << endl;}
06232 } 

void TCnaRunEB::fT2dWriteAscii ( const Int_t &  i_code,
const Int_t &  i_pasx_arg,
const Int_t &  i_pasy_arg 
) [private]

Definition at line 6243 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileName, fCdelete, fCnew, fCodeCorCorrecCovCss, fCodeCorCss, fCodeCorScc, fCodeCorSccMos, fCodeCovCorrecCovCss, fCodeCovCss, fCodeCovScc, fCodeCovSccMos, fCodePrintAllComments, fFcout_f, fFileHeader, fFlagPrint, fjustap_1d_cc, fjustap_1d_ss, fjustap_2d_cc, fjustap_2d_ss, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fSectChanSizeX, fSectSampSizeX, fT2d_cor_cc_mos, fT2d_cov_cc_mos, fT3d_cor_cc, fT3d_cor_correc_covss_s, fT3d_cor_ss, fT3d_cov_cc, fT3d_cov_correc_covss_s, fT3d_cov_ss, fUserSamp, fUserSMEcha, TEBNumbering::GetSMTowFromSMEcha(), TEBNumbering::GetTowEchaFromSMEcha(), i, and j.

Referenced by WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), and WriteAsciiCovCorrecCovCss().

06246 {
06247 //Writing of a matrix by sectors (private)
06248 
06249   Int_t i_pasx = i_pasx_arg;           // taille secteur en x
06250   Int_t i_pasy = i_pasy_arg;           // taille secteur en y
06251   
06252   //------------ formatage des nombres en faisant appel a la classe ios
06253   
06254   fFcout_f << setiosflags(ios::showpoint | ios::uppercase);
06255   fFcout_f.setf(ios::dec, ios::basefield);
06256   fFcout_f.setf(ios::fixed, ios::floatfield);
06257   fFcout_f.setf(ios::left, ios::adjustfield);
06258   fFcout_f.setf(ios::right, ios::adjustfield);
06259   fFcout_f << setprecision(3) << setw(6);
06260   
06261   cout << setiosflags(ios::showpoint | ios::uppercase);
06262   cout.setf(ios::dec, ios::basefield);
06263   cout.setf(ios::fixed, ios::floatfield);
06264   cout.setf(ios::left, ios::adjustfield);
06265   cout.setf(ios::right, ios::adjustfield);
06266   cout << setprecision(3) << setw(6);  
06267 
06268   //--------------------- fin du formatage standard C++ -------------------
06269 
06270   //-----------------------------------------------------------------------
06271   //  Reservation dynamique d'un array Double_t** de dimensions
06272   //  les multiples de 5 juste au-dessus des dimensions de l'array 2D
06273   //  a ecrire ( array de dimensions
06274   //  (fFileHeader->fMaxSampADC,fFileHeader->fMaxSampADC)
06275   //  (fFileHeader->fMaxCrysInSM,fFileHeader->fMaxCrysInSM) )
06276   //-----------------------------------------------------------------------
06277   // Determination des tailles multiples de fSectChanSizeX ou fSectSampSizeX
06278 
06279   //*************** channels (NON UTILISE APPARAMENT. A REVOIR )******
06280   Int_t justap_chan = 0;
06281 
06282   if ( fFileHeader->fMaxCrysInSM%fSectChanSizeX == 0 ){
06283       justap_chan = fFileHeader->fMaxCrysInSM;}
06284   else{
06285       justap_chan=((fFileHeader->fMaxCrysInSM/fSectChanSizeX)+1)*fSectChanSizeX;}
06286 
06287   //....................... Allocation fjustap_2d_cc
06288 
06289   if ( i_code == fCodeCovScc || i_code == fCodeCorScc||
06290        i_code == fCodeCovSccMos || i_code == fCodeCorSccMos ){
06291     if(fjustap_2d_cc == 0)
06292       {
06293         //................... Allocation
06294         fjustap_2d_cc = new Double_t*[justap_chan];              fCnew++;  
06295         fjustap_1d_cc = new  Double_t[justap_chan*justap_chan];  fCnew++;  
06296         for(Int_t i = 0 ; i < justap_chan ; i++){
06297           fjustap_2d_cc[i] = &fjustap_1d_cc[0] + i*justap_chan;}
06298       }
06299   
06300     //............................... Transfert des valeurs dans fjustap_2d_cc  (=init)
06301     for(Int_t i = 0; i < fFileHeader->fMaxCrysInSM; i++){
06302       for(Int_t j = 0; j < fFileHeader->fMaxCrysInSM; j++){
06303         if ( i_code == fCodeCovScc ){
06304           fjustap_2d_cc[i][j] = fT3d_cov_cc[fUserSamp][i][j];}
06305         if ( i_code == fCodeCorScc ){
06306           fjustap_2d_cc[i][j] = fT3d_cor_cc[fUserSamp][i][j];}
06307         if ( i_code == fCodeCovSccMos ){
06308           fjustap_2d_cc[i][j] = fT2d_cov_cc_mos[i][j];}
06309         if ( i_code == fCodeCorSccMos ){
06310           fjustap_2d_cc[i][j] = fT2d_cor_cc_mos[i][j];}
06311       }
06312     }
06313     
06314     //.......................... mise a zero du reste de la matrice (=init)
06315     for(Int_t i = fFileHeader->fMaxCrysInSM; i < justap_chan; i++){
06316       for(Int_t j = fFileHeader->fMaxCrysInSM; j < justap_chan; j++){
06317         fjustap_2d_cc[i][j] = (Double_t)0.;}}
06318   }
06319 
06320   //************************************ Samples ***************************
06321   Int_t justap_samp = 0;
06322   
06323   if ( fFileHeader->fMaxSampADC%fSectSampSizeX == 0 ){
06324     justap_samp = fFileHeader->fMaxSampADC;}
06325   else{
06326     justap_samp=((fFileHeader->fMaxSampADC/fSectSampSizeX)+1)*fSectSampSizeX;}
06327 
06328   //....................... allocation fjustap_2d_ss
06329 
06330   if (i_code == fCodeCovCss          || i_code == fCodeCorCss ||
06331       i_code == fCodeCovCorrecCovCss || i_code == fCodeCorCorrecCovCss){
06332     if(fjustap_2d_ss == 0)
06333       {
06334         //................... Allocation
06335         fjustap_2d_ss = new Double_t*[justap_samp];              fCnew++;  
06336         fjustap_1d_ss = new  Double_t[justap_samp*justap_samp];  fCnew++;  
06337         for(Int_t i = 0 ; i < justap_samp ; i++){
06338           fjustap_2d_ss[i] = &fjustap_1d_ss[0] + i*justap_samp;}
06339       }
06340   //.............................. Transfert des valeurs dans fjustap_2d_ss (=init)
06341   for(Int_t i = 0; i < fFileHeader->fMaxSampADC; i++){
06342     for(Int_t j = 0; j < fFileHeader->fMaxSampADC; j++){
06343       if( i_code == fCodeCovCss ){
06344         fjustap_2d_ss[i][j] = fT3d_cov_ss[fUserSMEcha][i][j];}
06345       if( i_code == fCodeCorCss ){
06346         fjustap_2d_ss[i][j] = fT3d_cor_ss[fUserSMEcha][i][j];}
06347       if( i_code == fCodeCovCorrecCovCss ){
06348         fjustap_2d_ss[i][j] = fT3d_cov_correc_covss_s[fUserSMEcha][i][j];}
06349       if( i_code == fCodeCorCorrecCovCss ){
06350         fjustap_2d_ss[i][j] = fT3d_cor_correc_covss_s[fUserSMEcha][i][j];}
06351     }
06352   }
06353   //.......................... mise a zero du reste de la matrice (=init)
06354   for(Int_t i = fFileHeader->fMaxSampADC; i < justap_samp; i++){
06355     for(Int_t j = fFileHeader->fMaxSampADC; j < justap_samp; j++){
06356       fjustap_2d_ss[i][j] = (Double_t)0.;}}
06357   }
06358  
06359   //-------------------------------------------------------------------
06360 
06361   TEBNumbering* MyNumbering = new TEBNumbering();    fCnew++;
06362 
06363   //..................... impressions + initialisations selon i_code
06364   
06365   Int_t isx_max = 0;    
06366   Int_t isy_max = 0;
06367   
06368   if(i_code == fCodeCovScc)
06369     {
06370       fFcout_f << "*TCnaRunEB> Covariance matrix between SMEchas "
06371                << "for sample number " << fUserSamp;
06372       //    isx_max = fFileHeader->fMaxCrysInSM;
06373       //    isy_max = fFileHeader->fMaxCrysInSM;
06374       isx_max = justap_chan;
06375       isy_max = justap_chan;
06376     }
06377   if(i_code == fCodeCorScc)
06378     {
06379       fFcout_f << "*TCnaRunEB> Correlation matrix between SMEchas "
06380                << "for sample number " << fUserSamp;
06381       //     isx_max = fFileHeader->fMaxCrysInSM;
06382       //     isy_max = fFileHeader->fMaxCrysInSM;
06383       isx_max = justap_chan;
06384       isy_max = justap_chan;
06385     }
06386   
06387   if(i_code == fCodeCovSccMos)
06388     {
06389       fFcout_f << "*TCnaRunEB> Covariance matrix between SMEchas "
06390                << "averaged on the samples ";
06391       //    isx_max = fFileHeader->fMaxCrysInSM;
06392       //    isy_max = fFileHeader->fMaxCrysInSM;
06393       isx_max = justap_chan;
06394       isy_max = justap_chan;
06395     }
06396   if(i_code == fCodeCorSccMos)
06397     {
06398       fFcout_f << "*TCnaRunEB> Correlation matrix between SMEchas "
06399                << "averaged on the samples ";
06400       //     isx_max = fFileHeader->fMaxCrysInSM;
06401       //     isy_max = fFileHeader->fMaxCrysInSM;
06402       isx_max = justap_chan;
06403       isy_max = justap_chan;
06404     }
06405 
06406   if(i_code == fCodeCovCss)
06407     {
06408       fFcout_f << "*TCnaRunEB> Covariance matrix between samples "
06409                << "for SMEcha number " << fUserSMEcha
06410                << " (SMTow " << MyNumbering->GetSMTowFromSMEcha(fUserSMEcha)
06411                << " , TowEcha " << MyNumbering->GetTowEchaFromSMEcha(fUserSMEcha) << ")";
06412       //    isx_max = fFileHeader->fMaxSampADC;
06413       //    isy_max = fFileHeader->fMaxSampADC;
06414       isx_max = justap_samp;
06415       isy_max = justap_samp;
06416     }
06417   if(i_code == fCodeCorCss)
06418     { 
06419       fFcout_f << "*TCnaRunEB> Correlation matrix between samples "
06420                << "for SMEcha number " << fUserSMEcha
06421                << " (SMTow " << MyNumbering->GetSMTowFromSMEcha(fUserSMEcha) 
06422                << " , TowEcha " << MyNumbering->GetTowEchaFromSMEcha(fUserSMEcha) << ")";
06423       //      isx_max = fFileHeader->fMaxSampADC;
06424       //      isy_max = fFileHeader->fMaxSampADC;
06425       isx_max = justap_samp;
06426       isy_max = justap_samp;
06427     }
06428  
06429   if(i_code == fCodeCovCorrecCovCss)
06430     { 
06431       fFcout_f << "*TCnaRunEB> Correction factors to the covariances "
06432                << "between samples for SMEcha number " << fUserSMEcha
06433                << " (SMTow " << MyNumbering->GetSMTowFromSMEcha(fUserSMEcha)
06434                << " , TowEcha " << MyNumbering->GetTowEchaFromSMEcha(fUserSMEcha) << ")";
06435       //      isx_max = fFileHeader->fMaxSampADC;
06436       //      isy_max = fFileHeader->fMaxSampADC;
06437       isx_max = justap_samp;
06438       isy_max = justap_samp;
06439     }
06440   
06441   if(i_code == fCodeCorCorrecCovCss)
06442     { 
06443       fFcout_f << "*TCnaRunEB> Correction factors to the correlations "
06444                << "between samples for SMEcha number " << fUserSMEcha
06445                << " (SMTow " << MyNumbering->GetSMTowFromSMEcha(fUserSMEcha)
06446                << " , TowEcha " << MyNumbering->GetTowEchaFromSMEcha(fUserSMEcha) << ")";
06447       //      isx_max = fFileHeader->fMaxSampADC;
06448       //      isy_max = fFileHeader->fMaxSampADC;
06449       isx_max = justap_samp;
06450       isy_max = justap_samp;
06451     }
06452  
06453   fFcout_f << endl;
06454 
06455   //............... Calcul des nombres de secteurs selon x
06456   //                i_pasx  = taille secteur en x 
06457   //                isx_max = taille de la matrice en x
06458   //                n_sctx  = nombre de secteurs en x
06459   //
06460   if(i_pasx > isx_max){i_pasx = isx_max;}  
06461   Int_t n_sctx;
06462   Int_t max_verix; 
06463   n_sctx = isx_max/i_pasx;
06464   max_verix = n_sctx*i_pasx; 
06465   if(max_verix < isx_max){ n_sctx++;}
06466 
06467   //............... Calcul des nombres de secteurs selon y
06468   //                i_pasy  = taille secteur en y
06469   //                isy_max = taille de la matrice en y
06470   //                n_scty  = nombre de secteurs en x
06471   //
06472   if(i_pasy > isy_max){i_pasy = isy_max;} 
06473   Int_t n_scty;
06474   Int_t max_veriy; 
06475   n_scty = isy_max/i_pasy;
06476   max_veriy = n_scty*i_pasy; 
06477   if(max_veriy < isy_max){ n_scty++;}
06478 
06479 
06480   //................ Ecriture de la taille et du nombre des secteurs
06481   if( i_code == fCodeCovCss || i_code == fCodeCorCss ||
06482       i_code == fCodeCovCorrecCovCss ||  i_code == fCodeCorCorrecCovCss)
06483     {
06484       fFcout_f << "*TCnaRunEB> sector size = " << fSectSampSizeX 
06485                << " , number of sectors = " << n_sctx << " x " << n_scty
06486                <<endl;
06487     }
06488  if( i_code == fCodeCovScc     || i_code == fCodeCorScc ||
06489      i_code == fCodeCovSccMos  || i_code == fCodeCorSccMos )
06490     {
06491       fFcout_f << "*TCnaRunEB> sector size = " << fSectChanSizeX 
06492                << " , number of sectors = " << n_sctx << " x " << n_scty
06493                << endl;
06494     }
06495   fFcout_f << endl;
06496 
06497   //............... impression matrice par secteurs i_pas x i_pas  
06498   //........................... boucles pour display des secteurs 
06499   Int_t   ix_inf = -i_pasx;
06500   
06501   for(Int_t nsx = 0 ; nsx < n_sctx ; nsx++)
06502     { 
06503       //......................... calcul limites secteur
06504       ix_inf = ix_inf + i_pasx;
06505       Int_t   ix_sup = ix_inf + i_pasx; 
06506       
06507       Int_t   iy_inf = -i_pasy;
06508       
06509       for(Int_t nsy = 0 ; nsy < n_scty ; nsy++)
06510         {       
06511           iy_inf = iy_inf + i_pasy;          
06512           Int_t   iy_sup = iy_inf + i_pasy;
06513           
06514           //......................... display du secteur (nsx,nsy)
06515           
06516           if(i_code == fCodeCovScc || i_code == fCodeCovCss ||
06517              i_code == fCodeCovCorrecCovCss || i_code == fCodeCorCorrecCovCss )
06518             {fFcout_f << "        ";}
06519           if(i_code == fCodeCorScc || i_code == fCodeCorCss)
06520             {fFcout_f << "      ";}
06521           
06522           for (Int_t iy_c = iy_inf ; iy_c < iy_sup ; iy_c++)
06523             {
06524               if(i_code == fCodeCovScc || i_code == fCodeCovSccMos || i_code == fCodeCovCss ||
06525                  i_code == fCodeCovCorrecCovCss ||
06526                  i_code == fCodeCorCorrecCovCss)
06527                 {fFcout_f.width(8);}
06528               if(i_code == fCodeCorScc || i_code == fCodeCorSccMos || i_code == fCodeCorCss)
06529                 {fFcout_f.width(6);}
06530               fFcout_f << iy_c << "  ";
06531             }     
06532           fFcout_f << endl << endl;
06533           
06534           for (Int_t ix_c = ix_inf ; ix_c < ix_sup ; ix_c++)
06535             { 
06536               if(i_code == fCodeCovScc|| i_code == fCodeCovSccMos || i_code == fCodeCovCss ||
06537                  i_code == fCodeCovCorrecCovCss ||
06538                  i_code == fCodeCorCorrecCovCss)
06539                 {fFcout_f.width(8);}
06540               if(i_code == fCodeCorScc || i_code == fCodeCorSccMos || i_code == fCodeCorCss)
06541                 {fFcout_f.width(6);}
06542               fFcout_f << ix_c << "   ";
06543               
06544               for (Int_t iy_c = iy_inf ; iy_c < iy_sup ; iy_c++)
06545                 {
06546                   if(i_code == fCodeCovScc          ||
06547                      i_code == fCodeCovSccMos       ||
06548                      i_code == fCodeCovCss          ||
06549                      i_code == fCodeCovCorrecCovCss || 
06550                      i_code == fCodeCorCorrecCovCss ){
06551                     fFcout_f.width(8);}
06552 
06553                   if(i_code == fCodeCorScc || i_code == fCodeCorSccMos ||  i_code == fCodeCorCss){
06554                     fFcout_f.width(6);}
06555                   
06556                   if( i_code == fCodeCovScc ||  i_code == fCodeCovSccMos || i_code == fCodeCorScc){
06557                     fFcout_f << fjustap_2d_cc[ix_c][iy_c] << "  ";}
06558                   
06559                   if ( i_code == fCodeCovCss          ||
06560                        i_code == fCodeCorCss          ||
06561                        i_code == fCodeCovCorrecCovCss ||
06562                        i_code == fCodeCorCorrecCovCss )
06563                     {
06564                       fFcout_f << fjustap_2d_ss[ix_c][iy_c] << "  ";
06565                     }
06566                 }
06567               fFcout_f << endl;
06568             }
06569           fFcout_f << endl;
06570         }
06571     }
06572 
06573   //........... closing of the results file
06574   
06575   fFcout_f.close();
06576   
06577   if(fFlagPrint == fCodePrintAllComments){
06578     cout << "*TCnaRunEB> The results have been writen in the ASCII file: "
06579          << fAsciiFileName << endl;}
06580 
06581   delete MyNumbering;                      fCdelete++;
06582 }

TString TCnaRunEB::GetAnalysisName (  ) 

Definition at line 6603 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fTypAna.

06603 {return fFileHeader->fTypAna;}

Int_t TCnaRunEB::GetFirstTakenEvent (  ) 

Definition at line 6605 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fFirstEvt.

06605 {return fFileHeader->fFirstEvt;}

Int_t TCnaRunEB::GetNentries (  ) 

Definition at line 6608 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fNentries.

06608 {return fFileHeader->fNentries;}

Int_t TCnaRunEB::GetNumberOfTakenEvents (  ) 

Definition at line 6606 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fNbOfTakenEvts.

06606 {return fFileHeader->fNbOfTakenEvts;}

void TCnaRunEB::GetPathForResultsAsciiFiles ( const   TString  ) 

Definition at line 3612 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCfgResultsAsciiFilePath, fCnaCommand, fCnaError, fCodeHeaderAscii, fFcin_ra, fFileForResultsAsciiFilePath, fgMaxCar, fMakeResultsFileName(), and fTTBELL.

03613 {
03614   // Init fCfgResultsAsciiFilePath and get it from the file named argFileName
03615   // argFileName = complete name of the file (/afs/cern.ch/...)
03616   // if string is empty, file name = "cna_results_ascii.cfg"
03617   // and file located in $HOME user's directory (default)
03618 
03619   Int_t MaxCar = fgMaxCar;
03620   fCfgResultsAsciiFilePath.Resize(MaxCar);
03621   fCfgResultsAsciiFilePath = "?";
03622 
03623   //..... put the name of the ascii file (containing the paths for CNA treatements)
03624   //      in the string cFileNameForCnaPaths and in class attribute fFileForResultsAsciiFilePath
03625 
03626   if ( argFileName == "" )
03627     {
03628       string cFileNameForCnaPaths = "cna_results_ascii.cfg";     // config file name
03629       TString s_file_name = cFileNameForCnaPaths.c_str();
03630       Text_t *t_file_name = (Text_t *)s_file_name.Data();
03631       
03632       TString s_path_name = gSystem->Getenv("HOME");       // get user's home directory path
03633       
03634       fFileForResultsAsciiFilePath = s_path_name;
03635       fFileForResultsAsciiFilePath.Append('/');
03636       fFileForResultsAsciiFilePath.Append(t_file_name);
03637     }
03638   else
03639     {
03640       fFileForResultsAsciiFilePath = argFileName.Data();
03641     }
03642 
03643   //........ Reading of the paths in the file named fFileForResultsAsciiFilePath.Data()
03644   //
03645 
03646   fFcin_ra.open(fFileForResultsAsciiFilePath.Data());
03647   if(fFcin_ra.fail() == kFALSE)
03648     {
03649       fFcin_ra.clear();
03650       string xResultsFileP;
03651       fFcin_ra >> xResultsFileP;
03652       fCfgResultsAsciiFilePath = xResultsFileP.c_str();
03653 
03654       fCnaCommand++;
03655       cout << "   *CNA [" << fCnaCommand << "]> Automatic registration of cna paths -> " << endl
03656            << "    Results .ascii files: " << fCfgResultsAsciiFilePath.Data() << endl;
03657       fFcin_ra.close();
03658       
03659       //.........................Making of the results .ascii file name (TCnaRunEB specific)
03660       fMakeResultsFileName(fCodeHeaderAscii);
03661     }
03662   else
03663     {
03664       fFcin_ra.clear();
03665       fCnaError++;
03666       cout << fTTBELL << endl
03667            << " ***************************************************************************** " << endl;
03668       cout << "   !CNA(TCnaRunEB) (" << fCnaError << ") *** ERROR *** " << endl << endl
03669            << "    "
03670            << fFileForResultsAsciiFilePath.Data() << ": file not found. " << endl
03671            << "    "
03672            << endl << endl
03673            << "    "
03674            << " The file " << fFileForResultsAsciiFilePath.Data()
03675            << " is a configuration file for the CNA and"
03676            << " must contain one line with the following syntax:" << endl << endl
03677            << "    "
03678            << "   path of the results .ascii files ($HOME/etc...) " << endl
03679            << "    "
03680            << "          (without slash at the end of line)" << endl
03681            << endl << endl
03682            << "    "
03683            << " EXAMPLE:" << endl << endl
03684            << "    "
03685            << "  $HOME/scratch0/cna/results_ascii_files" << endl << endl
03686            << " ***************************************************************************** "
03687            << fTTBELL << endl;
03688 
03689       fFcin_ra.close();
03690     }
03691 }

void TCnaRunEB::GetPathForResultsAsciiFiles (  ) 

Definition at line 3607 of file TCnaRunEB.cc.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03608 {
03609   GetPathForResultsAsciiFiles("");
03610 }

void TCnaRunEB::GetPathForResultsRootFiles ( const   TString  ) 

Definition at line 3525 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCfgResultsRootFilePath, fCnaCommand, fCnaError, fCodeRoot, fFcin_rr, fFileForResultsRootFilePath, fgMaxCar, fMakeResultsFileName(), and fTTBELL.

03526 {
03527   // Init fCfgResultsRootFilePath and get it from the file named argFileName
03528   // argFileName = complete name of the file (/afs/cern.ch/...)
03529   // if string is empty, file name = "cna_results_root.cfg" and file located in $HOME user's directory (default)
03530 
03531   Int_t MaxCar = fgMaxCar;
03532   fCfgResultsRootFilePath.Resize(MaxCar);
03533   fCfgResultsRootFilePath            = "?";
03534 
03535   //..... put the name of the ascii file (containing the paths for CNA treatements)
03536   //      in the string cFileNameForCnaPaths and in class attribute fFileForResultsRootFilePath
03537 
03538   if ( argFileName == "" )
03539     {
03540       string cFileNameForCnaPaths = "cna_results_root.cfg";     // config file name
03541       TString s_file_name = cFileNameForCnaPaths.c_str();
03542       Text_t *t_file_name = (Text_t *)s_file_name.Data();
03543       
03544       TString s_path_name = gSystem->Getenv("HOME");       // get user's home directory path
03545       
03546       fFileForResultsRootFilePath = s_path_name;
03547       fFileForResultsRootFilePath.Append('/');
03548       fFileForResultsRootFilePath.Append(t_file_name);
03549     }
03550   else
03551     {
03552       fFileForResultsRootFilePath = argFileName.Data();
03553     }
03554 
03555   //........ Reading of the paths in the file named fFileForResultsRootFilePath.Data()
03556   //
03557 
03558   fFcin_rr.open(fFileForResultsRootFilePath.Data());
03559   if(fFcin_rr.fail() == kFALSE)
03560     {
03561       fFcin_rr.clear();
03562       string xResultsFileP;
03563       fFcin_rr >> xResultsFileP;
03564       fCfgResultsRootFilePath = xResultsFileP.c_str();
03565 
03566       fCnaCommand++;
03567       cout << "   *CNA [" << fCnaCommand << "]> Automatic registration of cna paths -> " << endl
03568            << "    Results .root files: " << fCfgResultsRootFilePath.Data() << endl;
03569       fFcin_rr.close();
03570 
03571       //.............. Making of the results .root file name (TCnaRunEB specific)
03572       fMakeResultsFileName(fCodeRoot);
03573     }
03574   else
03575     {
03576       fFcin_rr.clear();
03577       fCnaError++;
03578       cout << fTTBELL << endl
03579            << " ***************************************************************************** " << endl;
03580       cout << "   !CNA(TCnaRunEB) (" << fCnaError << ") *** ERROR *** " << endl << endl
03581            << "    "
03582            << fFileForResultsRootFilePath.Data() << ": file not found. " << endl
03583            << "    "
03584            << endl << endl
03585            << "    "
03586            << " The file " << fFileForResultsRootFilePath.Data()
03587            << " is a configuration file for the CNA and"
03588            << " must contain one line with the following syntax:" << endl << endl
03589            << "    "
03590            << "   path of the results .root files ($HOME/etc...) " << endl
03591            << "    "
03592            << "          (without slash at the end of line)" << endl
03593            << endl << endl
03594            << "    "
03595            << " EXAMPLE:" << endl << endl
03596            << "    "
03597            << "  $HOME/scratch0/cna/results_root_files" << endl << endl
03598            << " ***************************************************************************** "
03599            << fTTBELL << endl;
03600 
03601       fFcin_rr.close();
03602     }
03603 }

void TCnaRunEB::GetPathForResultsRootFiles (  ) 

Definition at line 3520 of file TCnaRunEB.cc.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03521 {
03522   GetPathForResultsRootFiles("");
03523 }

void TCnaRunEB::GetReadyToCompute (  ) 

Definition at line 1971 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fCodePrintComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fNbOfTakenEvts, fT2d_LastEvtNumber, fT3d2_distribs, fTTBELL, fVal_dat2, fVal_data, and TDistrib::Resize().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

01972 {
01973 //Building of the TDistrib objects for CNA calculations
01974 
01975   //----------------------------------------------------------------------
01976   //
01977   //       recuperation des valeurs et mise dans les objets
01978   //       "distributions d'evenements"  ( classe TDistrib )
01979   //
01980   //  fT3d_distribs[SMEcha][sample][event] -> fVal_Data[SMEcha][sample]
01981   //
01982   //----------------------------------------------------------------------  
01983 
01984 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
01985    if(fFlagPrint == fCodePrintAllComments)
01986     { 
01987       cout << endl << "%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%"
01988            << endl << "*TCnaRunEB::GetReadyToCompute()> (this = " << this << ") " << endl;
01989     }
01990 #define TOBJ
01991 #ifndef TOBJ 
01992 
01993   //......... Essai utilisation TClonesArray --> NE MARCHE PAS ENCORE:
01994   //
01995   //TCnaRunEB.cxx: In method `void TCnaRunEB::GetReadyToCompute ()':
01996   //<internal>:1333: too many arguments to function `void *operator new 
01997   //(unsigned int)'
01998   //TCnaRunEB.cxx:1333: at this point in file
01999   // 1333 = ancien numero de la ligne ou il y a : new(fVal_dat2[i_new]) etc...
02000 
02001   Int_t maxichan = fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC;
02002   TObjArray fVal_dat2(maxichan);
02003   
02004   for (Int_t i_chan = 0 ; i_chan < fFileHeader->fMaxCrysInSM ; i_chan++)
02005     { 
02006       for (Int_t n_sampl = 0 ; n_sampl < fFileHeader->fMaxSampADC ; n_sampl++)
02007         {       
02008           Int_t i_new = (fFileHeader->fMaxSampADC)*i_chan + n_sampl;
02009           fVal_dat2[i_new] = new
02010             TDistrib(fFileHeader->fNbOfTakenEvts, fT3d2_distribs[i_new]);  fCnew++;
02011         }
02012     }
02013 
02014 #endif // TOBJ
02015 
02016 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
02017 
02018   //-------------------- declaration des objets fVal_data[][]
02019    
02020   //....................................................................
02021   //
02022   //    TDistrib = "distribution d'evenements" = objet comprenant:
02023   //
02024   //    (1) un nombre d'evenements (Int_t nmax) 
02025   //    (2) un tableau de valeurs de dimension le nombre
02026   //        d'evenements ( Double_t valeurs[nmax] ).
02027   //
02028   //    Il y a une distribution d'evenements par echantillon et par voie.
02029   //    On a donc un tableau 2d fVal_data[][] de distributions qu'on va
02030   //    initialiser ci-dessous a partir du tableau 3d
02031   //    fT3d_distribs[][][].
02032   //
02033   //    PS: on est oblige de passer par un objet temporaire (pdata_temp)
02034   //        pour pouvoir appeler le constructeur avec arguments et faire
02035   //        ensuite fVal_data[i_SMEcha][n_sampl] = pdata_temp;
02036   //        (utilisation de la surcharge de l'operateur=
02037   //         de la classe TDistrib)
02038   //......................................................................
02039   
02040   if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments ){
02041     cout << "*TCnaRunEB::GetReadyToCompute()> Starting TDistrib object allocations"
02042          << endl;}
02043   
02044   // !!!!! ALLOC DYNAMIQUE D'UN TABLEAU 2D d'objets de classe "TDistrib"
02045   //  alloc dynamique de fVal_data** ou fVal_data[d1][d2]
02046   //  sous forme de tableau 1D de valeurs fVal_dat2[d1xd2]
02047   //  et de tableau d'adresses 1D fVal_data[d1]  
02048   
02049   fVal_data = new TDistrib*[fFileHeader->fMaxCrysInSM];                          fCnew++; 
02050   fVal_dat2 = new  TDistrib[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC]; fCnew++;
02051   
02052   // calcul des pointeurs du tableau 1D fVal_data[d1]    ( GetReadyToCompute() )
02053   
02054   for( Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++ )
02055     {
02056       fVal_data[i_SMEcha] = &fVal_dat2[0] + i_SMEcha*fFileHeader->fMaxSampADC;
02057     }
02058   
02059   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!      ( GetReadyToCompute() )
02060   
02061   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02062     { 
02063       for (Int_t n_sampl = 0 ; n_sampl < fFileHeader->fMaxSampADC ; n_sampl++)
02064         {       
02065           //.............. standard C++
02066           //      TDistrib  pdata_temp( fFileHeader->fNbOfTakenEvts,
02067           //            *((fT3d_distribs)+
02068           //              (fFileHeader->fMaxSampADC)*i_SMEcha +n_sampl) ); 
02069           
02070           //................  CINT-ROOT
02071 
02072           TDistrib*     pdata_temp =
02073             new TDistrib( fFileHeader->fNbOfTakenEvts,
02074                           fT3d2_distribs[(fFileHeader->fMaxSampADC)*i_SMEcha
02075                                          + n_sampl] );                           fCnew++;
02076           
02077           // Utilisation de la surcharge de l'operateur= de la classe TDistrib
02078           // fVal_data[i_SMEcha][n_sampl] = pdata_temp;  // standard C++
02079           
02080           fVal_data[i_SMEcha][n_sampl] = pdata_temp[0];  // CINT-ROOT
02081           delete pdata_temp;                fCdelete++;  // CINT-ROOT
02082         }
02083     }
02084 
02085   if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments ){
02086     cout << "*TCnaRunEB::GetReadyToCompute()> TDistrib object allocations done."
02087          << endl;}
02088 
02089 #define RESZ
02090 #ifndef RESZ
02091   //------------- Resize of the TDistrib fVal_data to the effective max nb of evts    ( GetReadyToCompute() )
02092   //
02093   //   Finally, no resize since it masks cases with wrong numbers of events
02094   //
02095   Int_t  nb_of_resize = 0;
02096   Bool_t ok_resize    = kFALSE;
02097 
02098   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02099     { 
02100       for (Int_t n_sampl = 0 ; n_sampl < fFileHeader->fMaxSampADC ; n_sampl++)
02101         {
02102           ok_resize = kFALSE;
02103           Int_t  nb_evts   = fT2d_LastEvtNumber[i_SMEcha][n_sampl]+1;
02104           ok_resize = fVal_data[i_SMEcha][n_sampl].Resize(nb_evts);
02105           if ( ok_resize == kTRUE ) {nb_of_resize++;}
02106         }
02107     }
02108 
02109   if (nb_of_resize != 0)
02110     {
02111       cout << "!TCnaRunEB::GetReadyToCompute()> " 
02112            << "INFO/warning =!=!=!=!=!=> a resize of TDistrib distribution has been done in "
02113            << nb_of_resize << " cases " << endl
02114            << "                               (could be due to incorrect numbers of events in data)"
02115            << fTTBELL << endl;
02116     }
02117   else
02118     {
02119       if(fFlagPrint == fCodePrintAllComments){
02120         cout << "!TCnaRunEB::GetReadyToCompute()> " 
02121              << "INFO =+=+=+=+=+=> TDistrib distributions: no resize has been done." << endl;}
02122     }
02123 
02124   //-----------------------------------------------------------------------------------------------
02125 #endif // RESZ
02126 
02127   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
02128 }  

void TCnaRunEB::GetReadyToReadData ( TString  typ_ana,
const Int_t &  run_number,
Int_t &  nfirst,
Int_t &  nevents,
const Int_t &  super_module,
const Int_t &  nentries 
)

Definition at line 1386 of file TCnaRunEB.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fFileHeader, TCnaHeaderEB::fFirstEvt, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TEBParameters::fMaxCrysInTow, TCnaHeaderEB::fMaxCrysInTow, TEBParameters::fMaxSampADC, TCnaHeaderEB::fMaxSampADC, TEBParameters::fMaxTowInSM, TCnaHeaderEB::fMaxTowInSM, fMiscDiag, fNbChanByLine, TCnaHeaderEB::fNbOfTakenEvts, fNbSampByLine, TCnaHeaderEB::fNentries, fReadyToReadData, TCnaHeaderEB::fRunNumber, fSectChanSizeX, fSectChanSizeY, fSectSampSizeX, fSectSampSizeY, fSpecialSMTowerNotIndexed, TCnaHeaderEB::fSuperModule, fT1d_EvtNbInLoop, fT1d_LastEvtNumber, fT1d_SMtowFromIndex, fT2d_EvtNbInLoop, fT2d_LastEvtNumber, fT3d1_distribs, fT3d2_distribs, fT3d_distribs, fTagCorCorrecCovCss, fTagCorCss, fTagCorMosccMot, fTagCorScc, fTagCorSccMos, fTagCovCorrecCovCss, fTagCovCss, fTagCovMosccMot, fTagCovScc, fTagCovSccMos, fTagEv, fTagEvCorCss, fTagEvEv, fTagEvSig, fTagEvtNbInLoop, fTagEvts, fTagLastEvtNumber, fTagSampTime, fTagSigCorCss, fTagSigEv, fTagSigSig, fTagSvCorrecCovCss, fTagTowerNumbers, fTagVar, fTTBELL, and TCnaHeaderEB::fTypAna.

01389 {
01390 //Preparation of the data reading. Set part of the header
01391 
01392   //************** CHECK OF ARGUMENTS: nfirst_arg and nevents_arg
01393 
01394   if ( nfirst < nentries )
01395     {
01396       //--------------------- test of positivity of nfirst_arg
01397       if (nfirst < 0 )
01398         {
01399           if (fFlagPrint != fCodePrintNoComment){
01400             cout << "!TCnaRunEB::GetReadyToReadData(...) > WARNING/CORRECTION:" << endl
01401                  << "! The fisrt taken event number is negative ( = " << nfirst << "). Forced to zero."
01402                  << fTTBELL << endl;}
01403           nfirst = 0;
01404         }
01405 
01406       //-------- test of compatibility between the last taken event number
01407       //         and the number of entries
01408 
01409       Int_t   last_taken_event = nfirst + nevents - 1;
01410       Int_t   nevents_anc      = nevents;    
01411 
01412       if( last_taken_event > (nentries - 1) )
01413         {
01414           nevents = nentries - nfirst -1;
01415           if (fFlagPrint != fCodePrintNoComment){
01416             cout << endl << "!TCnaRunEB::GetReadyToReadData(...)> WARNING/CORRECTION:" << endl
01417                  << "! The number of events (nevents = " << nevents_anc << ") is too large." << endl
01418                  << "! Number of last event = nfirst + nevents - 1 = " << nfirst << " + " << nevents_anc
01419                  << " - 1 = " << last_taken_event << " > number of entries - 1 = " << nentries-1 << ". "
01420                  << endl << "! Number of events forced to the value: nb of events ="
01421                  << " nb of entries - first event number - 1 = "
01422                  << nevents << "." << endl
01423                  << "! WARNING ===> THIS MODIFICATION WILL BE TRANSFERED TO THE RESULT FILE NAME"
01424                  << " (ROOT and ASCII FILES)."
01425                  << fTTBELL << endl << endl;}
01426         }
01427       
01428       //-----------------------------------------------------------------------------
01429  
01430       Text_t *h_name  = "CnaHeader";   //==> voir cette question avec FXG
01431       Text_t *h_title = "CnaHeader";   //==> voir cette question avec FXG
01432 
01433       TEBParameters* MyEcal = new TEBParameters();  fCnew++;
01434       Int_t n_tow  = MyEcal->fMaxTowInSM;
01435       Int_t n_crys = MyEcal->fMaxCrysInTow;
01436       Int_t n_samp = MyEcal->fMaxSampADC; 
01437       delete MyEcal;                                  fCdelete++;
01438 
01439       if ( n_tow > 0  &&  n_crys > 0  &&  n_samp> 0 ) 
01440         {
01441           fFileHeader = new TCnaHeaderEB(h_name,       h_title ,
01442                                          typ_ana,      run_number,  nfirst,    nevents,
01443                                          super_module, nentries);
01444           
01445           // After this call to TCnaHeaderEB, we have:
01446           //     fFileHeader->fTypAna        = typ_ana
01447           //     fFileHeader->fRunNumber     = run_number
01448           //     fFileHeader->fFirstEvt      = nfirst
01449           //     fFileHeader->fNbOfTakenEvts = nevents
01450           //     fFileHeader->fSuperModule   = super_module
01451           //     fFileHeader->fNentries      = nentries
01452           
01453           // fFileHeader->Print();
01454 
01455           // {Int_t cintoto; cout << "taper 0 pour continuer" << endl; cin >> cintoto;}
01456           
01457           //  fFileHeader->SetName("CnaHeader");              *======> voir FXG
01458           //  fFileHeader->SetTitle("CnaHeader");
01459           
01460           //......................................... allocation tags + init of them
01461           
01462           fTagTowerNumbers    = new Int_t[1]; fCnew++; fTagTowerNumbers[0]    = (Int_t)0;
01463           fTagLastEvtNumber   = new Int_t[1]; fCnew++; fTagLastEvtNumber[0]   = (Int_t)0;
01464           fTagEvtNbInLoop     = new Int_t[1]; fCnew++; fTagEvtNbInLoop[0]     = (Int_t)0;
01465 
01466           fTagSampTime        = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01467           for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagSampTime[iz] = (Int_t)0;}
01468 
01469           fTagEv              = new Int_t[1]; fCnew++; fTagEv[0]              = (Int_t)0;
01470           fTagVar             = new Int_t[1]; fCnew++; fTagVar[0]             = (Int_t)0;
01471  
01472           fTagEvts            = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01473           for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagEvts[iz]   = (Int_t)0;}
01474 
01475           fTagCovCss          = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01476           for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagCovCss[iz] = (Int_t)0;}
01477 
01478           fTagCorCss          = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01479           for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagCorCss[iz] = (Int_t)0;}
01480 
01481           fTagCovScc          = new Int_t[fFileHeader->fMaxSampADC];  fCnew++;
01482           for (Int_t iz=0; iz<fFileHeader->fMaxSampADC; iz++){fTagCovScc[iz]  = (Int_t)0;}
01483 
01484           fTagCorScc          = new Int_t[fFileHeader->fMaxSampADC];  fCnew++; 
01485           for (Int_t iz=0; iz<fFileHeader->fMaxSampADC; iz++){fTagCorScc[iz]  = (Int_t)0;}
01486 
01487           fTagCovSccMos       = new Int_t[1]; fCnew++;     fTagCovSccMos[0]    = (Int_t)0;
01488           fTagCorSccMos       = new Int_t[1]; fCnew++;     fTagCorSccMos[0]    = (Int_t)0;
01489           fTagCovMosccMot     = new Int_t[1]; fCnew++;     fTagCovMosccMot[0]  = (Int_t)0;
01490           fTagCorMosccMot     = new Int_t[1]; fCnew++;     fTagCorMosccMot[0]  = (Int_t)0;
01491 
01492           fTagEvEv            = new Int_t[1]; fCnew++;     fTagEvEv[0]         = (Int_t)0;
01493           fTagEvSig           = new Int_t[1]; fCnew++;     fTagEvSig[0]        = (Int_t)0;
01494           fTagEvCorCss        = new Int_t[1]; fCnew++;     fTagEvCorCss[0]     = (Int_t)0; 
01495 
01496           fTagSigEv           = new Int_t[1]; fCnew++;     fTagSigEv[0]        = (Int_t)0; 
01497           fTagSigSig          = new Int_t[1]; fCnew++;     fTagSigSig[0]       = (Int_t)0; 
01498           fTagSigCorCss       = new Int_t[1]; fCnew++;     fTagSigCorCss[0]    = (Int_t)0; 
01499 
01500           fTagSvCorrecCovCss  = new Int_t[1]; fCnew++;     fTagSvCorrecCovCss[0]        = (Int_t)0; 
01501 
01502           fTagCovCorrecCovCss = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01503            for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagCovCorrecCovCss[iz] = (Int_t)0;}
01504 
01505           fTagCorCorrecCovCss = new Int_t[fFileHeader->fMaxCrysInSM]; fCnew++;
01506            for (Int_t iz=0; iz<fFileHeader->fMaxCrysInSM; iz++){fTagCorCorrecCovCss[iz] = (Int_t)0;}
01507 
01508           //====================================================================================
01509           //
01510           //   allocation for fT1d_SMtowFromIndex[] and init to fSpecialSMTowerNotIndexed
01511           //
01512           //====================================================================================
01513 
01514           if(fT1d_SMtowFromIndex == 0)
01515             {
01516               fT1d_SMtowFromIndex = new Int_t[fFileHeader->fMaxTowInSM];          fCnew++;
01517             }
01518           for ( Int_t i_tow = 0; i_tow < fFileHeader->fMaxTowInSM; i_tow++ )
01519             {
01520               fT1d_SMtowFromIndex[i_tow] = fSpecialSMTowerNotIndexed;
01521             }
01522           
01523           //------------------------------------------------------------------
01524           
01525           //====================================================================================
01526           //
01527           //   allocation of the 3D array fT3d_distribs[channel][sample][events] (ADC values)
01528           //
01529           //   This array is filled in the BuildEventDistributions(...) method
01530           //
01531           //====================================================================================
01532           
01533           if(fT3d_distribs == 0)
01534             {
01535               //............ Allocation for the 3d array 
01536               fT3d_distribs   =
01537                 new Double_t**[fFileHeader->fMaxCrysInSM];                         fCnew++;  
01538               fT3d2_distribs  =
01539                 new  Double_t*[fFileHeader->fMaxCrysInSM*
01540                                fFileHeader->fMaxSampADC];                          fCnew++;  
01541               fT3d1_distribs  =
01542                 new   Double_t[fFileHeader->fMaxCrysInSM*
01543                                fFileHeader->fMaxSampADC*
01544                                fFileHeader->fNbOfTakenEvts];                       fCnew++;
01545               
01546               for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++){
01547                 fT3d_distribs[i_SMEcha] = &fT3d2_distribs[0] + i_SMEcha*fFileHeader->fMaxSampADC;
01548                 for(Int_t j_samp = 0 ; j_samp < fFileHeader->fMaxSampADC ; j_samp++){
01549                   fT3d2_distribs[fFileHeader->fMaxSampADC*i_SMEcha + j_samp] = &fT3d1_distribs[0]+
01550                     fFileHeader->fNbOfTakenEvts*(fFileHeader->fMaxSampADC*i_SMEcha+j_samp);}}
01551             }
01552           
01553           //................................. Init to zero
01554           for (Int_t iza=0; iza<fFileHeader->fMaxCrysInSM; iza++)
01555             {
01556               for (Int_t izb=0; izb<fFileHeader->fMaxSampADC; izb++)
01557                 {
01558                   for (Int_t izc=0; izc<fFileHeader->fNbOfTakenEvts; izc++)
01559                     {
01560                       if( fT3d_distribs[iza][izb][izc] != (Double_t)0 )
01561                         {
01562                           fMiscDiag[0]++;
01563                           fT3d_distribs[iza][izb][izc] = (Double_t)0;
01564                         }
01565                     }
01566                 }
01567             }     
01568           
01569           //====================================================================================
01570           //
01571           //   allocation of the 2D array fT2d_LastEvtNumber[channel][sample] (Max nb of evts)
01572           //
01573           //====================================================================================
01574           
01575           if (fT2d_LastEvtNumber == 0)
01576             {
01577               fT2d_LastEvtNumber  = new Int_t*[fFileHeader->fMaxCrysInSM];           fCnew++;
01578               fT1d_LastEvtNumber  = new  Int_t[fFileHeader->fMaxCrysInSM*
01579                                                fFileHeader->fMaxSampADC];            fCnew++;
01580               
01581               for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
01582                 {
01583                   fT2d_LastEvtNumber[i_SMEcha] =
01584                     &fT1d_LastEvtNumber[0] + i_SMEcha*fFileHeader->fMaxSampADC;
01585                 }
01586               
01587               //................ Init the array to -1
01588               for(Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
01589                 {
01590                   for(Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC ; i_samp++)
01591                     {
01592                       fT2d_LastEvtNumber[i_SMEcha][i_samp] = -1;
01593                     }
01594                 }
01595             }
01596           else
01597             {
01598               cerr << "!TCnaRunEB::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_LastEvtNumber!"
01599                    << " Pointer already not NULL " << fTTBELL << endl;
01600               {Int_t cintoto; cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"
01601                                    << endl; cin >> cintoto;}
01602             }
01603           
01604           //========================================================================================
01605           //
01606           //   allocation of the 2D array fT2d_EvtNbInLoop[tower][cna evt number] (evt nb in loop)
01607           //
01608           //========================================================================================
01609           
01610           if (fT2d_EvtNbInLoop == 0)
01611             {
01612               fT2d_EvtNbInLoop  = new Int_t*[fFileHeader->fMaxTowInSM];          fCnew++;
01613               fT1d_EvtNbInLoop  = new  Int_t[fFileHeader->fMaxTowInSM*
01614                                              fFileHeader->fNbOfTakenEvts];       fCnew++;
01615               
01616               for(Int_t i_tow = 0 ; i_tow < fFileHeader->fMaxTowInSM ; i_tow++)
01617                 {
01618                   fT2d_EvtNbInLoop[i_tow] =
01619                     &fT1d_EvtNbInLoop[0] + i_tow*fFileHeader->fNbOfTakenEvts;
01620                 }
01621               
01622               //................ init the array to -1
01623               for(Int_t i_tow = 0 ; i_tow < fFileHeader->fMaxTowInSM ; i_tow++)
01624                 {
01625                   for(Int_t i_cna_evt = 0 ; i_cna_evt < fFileHeader->fNbOfTakenEvts ; i_cna_evt++)
01626                     {
01627                       fT2d_EvtNbInLoop[i_tow][i_cna_evt] = -1;
01628                     }
01629                 }             
01630             }
01631           else
01632             {
01633               cerr << "!TCnaRunEB::GetReadyToReadData(...)> *** ERROR *** No allocation for fT2d_EvtNbInLoop!"
01634                    << " Pointer already not NULL " << fTTBELL << endl;
01635               {Int_t cintoto; cout << "Enter: 0 and RETURN to continue or: CTRL C to exit"
01636                                    << endl; cin >> cintoto;}
01637             }
01638         }
01639       else
01640         {
01641           cerr << endl
01642                << "!TCnaRunEB::GetReadyToReadData(...)> "
01643                << " *** ERROR *** " << endl
01644                << " --------------------------------------------------"
01645                << endl
01646                << " NULL or NEGATIVE values for arguments" << endl
01647                << " with expected positive values:"        << endl
01648                << " Number of towers in SuperModule = " << fFileHeader->fMaxTowInSM  << endl
01649                << " Number of crystals in tower     = " << fFileHeader->fMaxCrysInTow << endl
01650                << " Number of samples by channel    = " << fFileHeader->fMaxSampADC << endl
01651                << endl
01652                << endl
01653                << " hence, no memory allocation for array member has been performed." << endl;
01654           
01655           cout << "Enter: 0 and RETURN to continue or: CTRL C to exit";
01656           Int_t toto;
01657           cin >> toto;
01658         }
01659 
01660       
01661       //    CI-DESSOUS: REPRENDRE LES VALEURS NUMERIQUES  A PARTIR DE TEBParameters
01662 
01663       //#####################################################################################
01664       //
01665       //..................... (for ASCII files writing methods only) ..............
01666       //
01667       //                DEFINITION OF THE SECTOR SIZES
01668       //       FOR THE CORRELATION AND COVARIANCE MATRICES DISPLAY
01669       //
01670       //            MUST BE A DIVISOR OF THE TOTAL NUMBER.
01671       //            ======================================
01672       //
01673       //     Examples:
01674       //      
01675       //      (1)       25 channels => size = 25 or 5 (divisors of 25)
01676       //
01677       //                25 => matrix = 1 x 1 sector  of size (25 x 25)
01678       //                             = (1 x 1) x (25 x 25) = 1 x 625 = 625 
01679       //                 5 => matrix = 5 x 5 sectors of size (5 x 5)
01680       //                             = (5 x 5) x ( 5 x  5) = 25 x 25 = 625 
01681       //
01682       //      (2)       10 samples  => size = 10, 5 or 2 (divisors of 10)
01683       //
01684       //                10 => matrix = 1 X 1 sectors of size (10 x 10) 
01685       //                             = (1 x 1) x (10 x 10) =  1 x 100 = 100
01686       //                 5 => matrix = 2 x 2 sectors of size (5 x 5) 
01687       //                             = (2 x 2) x ( 5 x  5) =  4 x  25 = 100
01688       //                 2 => matrix = 5 x 5 sectors of size (2 x 2) 
01689       //                             = (5 x 5) x ( 2 x  2) = 25 x  4  = 100
01690       //
01691       //........................................................................
01692       fSectChanSizeX = 5;      // => 25 crystals by tower
01693       fSectChanSizeY = 5;
01694       fSectSampSizeX = 10;      // test beam Nov 2004 => 10 samples
01695       fSectSampSizeY = 10;
01696       
01697       //........................................................................
01698       //
01699       //                DEFINITION OF THE NUMBER OF VALUES BY LINE
01700       //                for the Expectation Values, Variances and.
01701       //                Event distributions by (channel,sample)
01702       //
01703       //               MUST BE A DIVISOR OF THE TOTAL NUMBER.
01704       //               ======================================
01705       //
01706       //     Examples: 
01707       //                1) For expectation values and variances:
01708       //
01709       //                25 channels => size = 5
01710       //                => sample sector = 5 lines of 5 values
01711       //                                 = 5 x 5 = 25 values 
01712       //
01713       //                10 samples  => size = 10
01714       //                => channel sector = 1 lines of 10 values
01715       //                                  = 1 x 10 = 10 values
01716       //
01717       //                2) For event distributions:
01718       //
01719       //                100 bins  => size = 10
01720       //                => sample sector = 10 lines of 10 values
01721       //                                 = 10 x 10 = 100 values
01722       //
01723       //........................................................................
01724       fNbChanByLine = 5;   // => 25 crystals by tower
01725       fNbSampByLine = 10;  // => 10 samples     
01726       
01727       //.............. (for ASCII files writing methods - END - ) ..................
01728     }
01729   else
01730     {
01731       cout << "!TCnaRunEB::GetReadyToReadData(...) *** ERROR ***> "
01732            << " The first taken event number is greater than the number of entries - 1."
01733            << fTTBELL << endl;
01734     }
01735   
01736   if(fFlagPrint == fCodePrintAllComments || fFlagPrint == fCodePrintComments ){
01737     cout << endl;
01738     cout << "*TCnaRunEB::GetReadyToReadData(...)>" << endl
01739          << "          The method has been called with the following argument values:"  << endl
01740          << "          Analysis name          = "
01741          << fFileHeader->fTypAna << endl
01742          << "          Run number             = "
01743          << fFileHeader->fRunNumber << endl
01744          << "          Number of entries      = "
01745          << fFileHeader->fNentries << endl
01746          << "          First taken event      = "
01747          << fFileHeader->fFirstEvt << endl
01748          << "          Number of taken events = "
01749          << fFileHeader->fNbOfTakenEvts << endl
01750          << "          SuperModule number     = "
01751          << fFileHeader->fSuperModule << endl
01752          << "          Number of towers in SM = "
01753          << fFileHeader->fMaxTowInSM   << endl
01754          << "          Number of crystals in tower  = "
01755          << fFileHeader->fMaxCrysInTow  << endl
01756          << "          Number of samples by channel = "
01757          << fFileHeader->fMaxSampADC  << endl
01758          << endl;}
01759 
01760   fReadyToReadData = 1;                        // set flag
01761 
01762   if(fFlagPrint == fCodePrintAllComments){
01763     cout << "*TCnaRunEB::GetReadyToReadData(...)> Leaving the method"
01764          << endl; }
01765 } // end of GetReadyToReadData

void TCnaRunEB::GetReadyToReadData ( TString  typ_ana,
const Int_t &  run_number,
Int_t &  nfirst,
Int_t &  nevents,
const Int_t &  super_module 
)

Definition at line 1372 of file TCnaRunEB.cc.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::analyze().

01375 {
01376 //Preparation of the data reading. Set part of the header. No Nentries as argument.
01377 //Use default value = 999999 and call method with all the arguments (see below)
01378 
01379   Int_t nentries = 999999999;
01380 
01381   GetReadyToReadData(typ_ana, run_number, nfirst, nevents, super_module, nentries);
01382 
01383 }

TString TCnaRunEB::GetRootFileNameShort (  ) 

Definition at line 6601 of file TCnaRunEB.cc.

References fRootFileNameShort.

06601 {return fRootFileNameShort;}

Int_t TCnaRunEB::GetRunNumber (  ) 

Definition at line 6604 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fRunNumber.

06604 {return fFileHeader->fRunNumber;}

Int_t TCnaRunEB::GetSMNumber (  ) 

Definition at line 6607 of file TCnaRunEB.cc.

References fFileHeader, and TCnaHeaderEB::fSuperModule.

06607 {return fFileHeader->fSuperModule;}

void TCnaRunEB::Init ( void   ) 

Definition at line 730 of file TCnaRunEB.cc.

References fAsciiFileName, fAsciiFileNameShort, fCdelete, fCnaCommand, fCnaError, fCnew, fCodeCorCorrecCovCss, fCodeCorCss, fCodeCorMosccMot, fCodeCorresp, fCodeCorScc, fCodeCorSccMos, fCodeCovCorrecCovCss, fCodeCovCss, fCodeCovMosccMot, fCodeCovScc, fCodeCovSccMos, fCodeEv, fCodeEvCorCss, fCodeEvts, fCodeHeaderAscii, fCodePrintAllComments, fCodePrintComments, fCodePrintNoComment, fCodePrintWarnings, fCodeRoot, fCodeSampTime, fCodeSigCorCss, fCodeSvCorrecCovCss, fCodeVar, fDim_name, fFileHeader, fFlagPrint, fgMaxCar, fjustap_1d_cc, fjustap_1d_ev, fjustap_1d_ss, fjustap_1d_var, fjustap_2d_cc, fjustap_2d_ev, fjustap_2d_ss, fjustap_2d_var, fMaxMsgIndexForMiscDiag, fMiscDiag, fNbOfMiscDiagCounters, fOpenRootFile, fReadyToReadData, fRootFileName, fRootFileNameShort, fSectChanSizeX, fSectChanSizeY, fSectSampSizeX, fSectSampSizeY, fSpecialSMTowerNotIndexed, fT1d_ev, fT1d_ev_cor_ss, fT1d_ev_ev, fT1d_ev_sig, fT1d_EvtNbInLoop, fT1d_his_s, fT1d_LastEvtNumber, fT1d_sig_cor_ss, fT1d_sig_ev, fT1d_sig_sig, fT1d_SMtowFromIndex, fT1d_var, fT1d_xmax, fT1d_xmin, fT1dCrysNumbersTable, fT2d1_cor_cc_mos, fT2d1_cor_moscc_mot, fT2d1_cov_cc_mos, fT2d1_cov_moscc_mot, fT2d1_sv_correc_covss_s, fT2d_cor_cc_mos, fT2d_cor_moscc_mot, fT2d_cov_cc_mos, fT2d_cov_moscc_mot, fT2d_ev, fT2d_EvtNbInLoop, fT2d_his_s, fT2d_LastEvtNumber, fT2d_sv_correc_covss_s, fT2d_var, fT2d_xmax, fT2d_xmin, fT2dCrysNumbersTable, fT3d1_cor_cc, fT3d1_cor_correc_covss_s, fT3d1_cor_ss, fT3d1_cov_cc, fT3d1_cov_correc_covss_s, fT3d1_cov_ss, fT3d1_distribs, fT3d2_cor_cc, fT3d2_cor_correc_covss_s, fT3d2_cor_ss, fT3d2_cov_cc, fT3d2_cov_correc_covss_s, fT3d2_cov_ss, fT3d2_distribs, fT3d_cor_cc, fT3d_cor_correc_covss_s, fT3d_cor_ss, fT3d_cov_cc, fT3d_cov_correc_covss_s, fT3d_cov_ss, fT3d_distribs, fT3d_his_s, fTagCorCorrecCovCss, fTagCorCss, fTagCorMosccMot, fTagCorScc, fTagCorSccMos, fTagCovCorrecCovCss, fTagCovCss, fTagCovMosccMot, fTagCovScc, fTagCovSccMos, fTagEv, fTagEvCorCss, fTagEvEv, fTagEvSig, fTagEvtNbInLoop, fTagEvts, fTagLastEvtNumber, fTagSampTime, fTagSigCorCss, fTagSigEv, fTagSigSig, fTagSvCorrecCovCss, fTagTowerNumbers, fTagVar, fTowerIndexBuilt, fTTBELL, fUserSamp, fUserSMEcha, fVal_dat2, fVal_data, and TCnaParameters::GetCodePrint().

00731 {
00732 //Initialisation
00733 
00734   fCnew       = 0;
00735   fCdelete    = 0;
00736   fCnaCommand = 0;
00737   fCnaError   = 0;
00738 
00739   fTTBELL = '\007';   //   "BIP!"
00740 
00741   //........................... TString file names init
00742   fgMaxCar  = (Int_t)512;
00743 
00744   Int_t MaxCar = fgMaxCar;
00745   fRootFileName.Resize(MaxCar);
00746   fRootFileName      = "?";
00747 
00748   MaxCar = fgMaxCar;
00749   fRootFileNameShort.Resize(MaxCar);
00750   fRootFileNameShort = "?";
00751 
00752   MaxCar = fgMaxCar;
00753   fAsciiFileName.Resize(MaxCar);
00754   fAsciiFileName      = "?";
00755 
00756   MaxCar = fgMaxCar;
00757   fAsciiFileNameShort.Resize(MaxCar);
00758   fAsciiFileNameShort = "?";
00759 
00760   fDim_name = fgMaxCar;
00761 
00762   //................................................... Code Print
00763 
00764   TCnaParameters* MyParameters = new TCnaParameters();      fCnew++;
00765 
00766   fCodePrintNoComment   = MyParameters->GetCodePrint("NoComment");
00767   fCodePrintWarnings    = MyParameters->GetCodePrint("Warnings ");      // => default value
00768   fCodePrintComments    = MyParameters->GetCodePrint("Comments");
00769   fCodePrintAllComments = MyParameters->GetCodePrint("AllComments");
00770 
00771   delete MyParameters;                                      fCdelete++;
00772 
00773   fMiscDiag = 0;
00774 
00775   //................ MiscDiag counters .................
00776   fMaxMsgIndexForMiscDiag = (Int_t)10;
00777   fNbOfMiscDiagCounters   = (Int_t)50;
00778 
00779   fMiscDiag   = new Int_t[fNbOfMiscDiagCounters];       fCnew++;
00780   for (Int_t iz=0; iz<fNbOfMiscDiagCounters; iz++){fMiscDiag[iz] = (Int_t)0;}
00781 
00782   //............................. init pointers
00783 
00784   fT3d_distribs  = 0;
00785   fT3d2_distribs = 0;
00786   fT3d1_distribs = 0;
00787 
00788   fVal_data  = 0;
00789   fVal_dat2  = 0;
00790 
00791   fT2d_EvtNbInLoop = 0;
00792   fT1d_EvtNbInLoop = 0;
00793 
00794   fT1d_SMtowFromIndex = 0;
00795 
00796   fT2d_LastEvtNumber = 0;
00797   fT1d_LastEvtNumber = 0; 
00798 
00799   fT2d_ev        = 0;
00800   fT1d_ev        = 0;
00801   fT2d_var       = 0;
00802   fT1d_var       = 0;
00803 
00804   fT3d_his_s     = 0;
00805   fT2d_his_s     = 0;
00806   fT1d_his_s     = 0;
00807 
00808   fT2d_xmin      = 0;
00809   fT1d_xmin      = 0;
00810 
00811   fT2d_xmax      = 0;
00812   fT1d_xmax      = 0;
00813 
00814   fT3d_cov_ss    = 0;
00815   fT3d2_cov_ss   = 0;
00816   fT3d1_cov_ss   = 0;
00817 
00818   fT3d_cor_ss    = 0;
00819   fT3d2_cor_ss   = 0;
00820   fT3d1_cor_ss   = 0;
00821 
00822   fT3d_cov_cc    = 0;
00823   fT3d2_cov_cc   = 0;
00824   fT3d1_cov_cc   = 0;
00825 
00826   fT3d_cor_cc    = 0;
00827   fT3d2_cor_cc   = 0;
00828   fT3d1_cor_cc   = 0;
00829 
00830   fT2d_cov_cc_mos  = 0;
00831   fT2d1_cov_cc_mos = 0;
00832 
00833   fT2d_cor_cc_mos  = 0;
00834   fT2d1_cor_cc_mos = 0;
00835 
00836   fT2d_cov_moscc_mot  = 0;
00837   fT2d1_cov_moscc_mot = 0;
00838 
00839   fT2d_cor_moscc_mot  = 0;
00840   fT2d1_cor_moscc_mot = 0;
00841 
00842   fT1d_ev_ev     = 0;
00843   fT1d_ev_sig    = 0;
00844   fT1d_ev_cor_ss = 0;
00845 
00846   fT1d_sig_ev     = 0;
00847   fT1d_sig_sig    = 0;
00848   fT1d_sig_cor_ss = 0;
00849 
00850   fT2d_sv_correc_covss_s  = 0;
00851   fT2d1_sv_correc_covss_s = 0;
00852 
00853   fT3d_cov_correc_covss_s  = 0;
00854   fT3d2_cov_correc_covss_s = 0;
00855   fT3d1_cov_correc_covss_s = 0;
00856 
00857   fT3d_cor_correc_covss_s  = 0;
00858   fT3d2_cor_correc_covss_s = 0;
00859   fT3d1_cor_correc_covss_s = 0;
00860 
00861   fT2dCrysNumbersTable = 0;
00862   fT1dCrysNumbersTable = 0;
00863 
00864   fjustap_2d_ev  = 0;
00865   fjustap_1d_ev  = 0;
00866 
00867   fjustap_2d_var = 0;
00868   fjustap_1d_var = 0;
00869 
00870   fjustap_2d_cc  = 0;
00871   fjustap_1d_cc  = 0;
00872 
00873   fjustap_2d_ss  = 0;
00874   fjustap_1d_ss  = 0;
00875 
00876   //............................... codes (all the values must be different)
00877 
00878   fCodeHeaderAscii     =  0;
00879   fCodeRoot            =  1; 
00880   fCodeCorresp         =  2; 
00881 
00882   fCodeSampTime        =  3;
00883 
00884   fCodeEv              =  4;  
00885   fCodeVar             =  5;  
00886   fCodeEvts            =  6;
00887 
00888   fCodeCovCss          =  7;
00889   fCodeCorCss          =  8;
00890   fCodeCovScc          =  9;
00891   fCodeCorScc          = 10;
00892   fCodeCovSccMos       = 11;
00893   fCodeCorSccMos       = 12;
00894 
00895   fCodeCovMosccMot     = 13;
00896   fCodeCorMosccMot     = 14;
00897 
00898   fCodeEvCorCss        = 15; 
00899   fCodeSigCorCss       = 16; 
00900   
00901   fCodeSvCorrecCovCss  = 17;
00902   fCodeCovCorrecCovCss = 18;
00903   fCodeCorCorrecCovCss = 19;
00904 
00905   //.............................................................................. codes (end)
00906 
00907   //................................ tags
00908   fTagTowerNumbers    = 0;
00909   fTagLastEvtNumber   = 0;
00910   fTagEvtNbInLoop     = 0;
00911 
00912   fTagSampTime        = 0;
00913 
00914   fTagEv              = 0;
00915   fTagVar             = 0;
00916   fTagEvts            = 0;
00917 
00918   fTagCovCss          = 0;
00919   fTagCorCss          = 0;
00920 
00921   fTagCovScc          = 0;
00922   fTagCorScc          = 0;
00923   fTagCovSccMos       = 0;
00924   fTagCorSccMos       = 0;
00925 
00926   fTagCovMosccMot     = 0;
00927   fTagCorMosccMot     = 0;
00928 
00929   fTagEvEv            = 0;
00930   fTagEvSig           = 0;
00931   fTagEvCorCss        = 0;
00932 
00933   fTagSigEv           = 0;
00934   fTagSigSig          = 0;
00935   fTagSigCorCss       = 0;
00936 
00937   fTagSvCorrecCovCss  = 0;
00938   fTagCovCorrecCovCss = 0;
00939   fTagCorCorrecCovCss = 0;
00940 
00941   //.............................................. Miscellaneous
00942   
00943   fFlagPrint = fCodePrintWarnings;
00944 
00945   fFileHeader = new TCnaHeaderEB();    fCnew++;
00946   
00947   fOpenRootFile  = kFALSE;
00948   
00949   fReadyToReadData = 0;
00950 
00951   fSectChanSizeX = 0;
00952   fSectChanSizeY = 0;
00953   fSectSampSizeX = 0;
00954   fSectSampSizeY = 0;
00955 
00956   fUserSamp   = 0;
00957   fUserSMEcha = 0;
00958 
00959   fSpecialSMTowerNotIndexed = -1;
00960 
00961   fTowerIndexBuilt = 0;
00962 
00963 }

void TCnaRunEB::MakeHistosOfSampleDistributions (  ) 

Definition at line 2287 of file TCnaRunEB.cc.

References TestMuL1L2Filter_cff::cerr, GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCdelete, fCnew, fCodePrintAllComments, fCodePrintNoComment, TCnaHeaderEB::fEvtsCalc, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fMiscDiag, TCnaHeaderEB::fNbBinsADC, fT1d_his_s, fT1d_xmax, fT1d_xmin, fT2d_his_s, fT2d_xmax, fT2d_xmin, fT3d_his_s, fTagEvts, fTTBELL, fVal_data, TEBNumbering::GetSMTowFromSMEcha(), TEBNumbering::GetTowEchaFromSMEcha(), and i1.

02288 {
02289 //Histograms of the ADC distributions for all the pairs (SMEcha,sample)
02290 
02291   if(fFlagPrint == fCodePrintAllComments){
02292     cout << "*TCnaRunEB::MakeHistosOfSampleDistributions()>"
02293          << " Histograms of ADC distributions for all the pairs (SMEcha,sample)"
02294          << endl;}
02295 
02296   //................... Allocation his_s + init to zero
02297 
02298   if (fT3d_his_s == 0 )
02299     {
02300       //............ Allocation fT3d_his_s 
02301       fT3d_his_s = new Double_t**[fFileHeader->fMaxCrysInSM];                          fCnew++;   
02302       fT2d_his_s = new  Double_t*[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC]; fCnew++;   
02303       fT1d_his_s = new   Double_t[fFileHeader->fMaxCrysInSM*
02304                                   fFileHeader->fMaxSampADC*
02305                                   fFileHeader->fNbBinsADC];                            fCnew++;
02306 
02307       for(Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++){
02308           fT3d_his_s[i_SMEcha] = &fT2d_his_s[0] + i_SMEcha*fFileHeader->fMaxSampADC;
02309           for(Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++){
02310             fT2d_his_s[i_SMEcha*fFileHeader->fMaxSampADC + i_samp] = &fT1d_his_s[0]
02311               + (i_SMEcha*fFileHeader->fMaxSampADC + i_samp)*fFileHeader->fNbBinsADC;}}
02312     }
02313 
02314   for(Int_t i_SMEcha=0; i_SMEcha<fFileHeader->fMaxCrysInSM; i_SMEcha++)
02315     {
02316       for(Int_t i_samp=0; i_samp<fFileHeader->fMaxSampADC; i_samp++)
02317         {
02318           for(Int_t i_bin=0; i_bin<fFileHeader->fNbBinsADC; i_bin++)
02319             {
02320               if( fT3d_his_s[i_SMEcha][i_samp][i_bin] != (Double_t)0 )
02321                 {fMiscDiag[3]++; fT3d_his_s[i_SMEcha][i_samp][i_bin] = (Double_t)0;}
02322             }
02323         } 
02324     }
02325   
02326   //.................................. Allocations xmin, xmax + init to zero
02327   if( fT1d_xmin == 0 )
02328     {
02329       fT2d_xmin = new Double_t*[fFileHeader->fMaxCrysInSM];                           fCnew++;
02330       fT1d_xmin = new  Double_t[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC];  fCnew++;
02331       for (Int_t i1 = 0; i1 < fFileHeader->fMaxCrysInSM; i1++){
02332         fT2d_xmin[i1] = &fT1d_xmin[0] + i1*fFileHeader->fMaxSampADC;}
02333     }
02334   
02335   if( fT1d_xmax == 0 )
02336     {
02337       fT2d_xmax = new Double_t*[fFileHeader->fMaxCrysInSM];                           fCnew++;
02338       fT1d_xmax = new  Double_t[fFileHeader->fMaxCrysInSM*fFileHeader->fMaxSampADC];  fCnew++;
02339       for (Int_t i1 = 0; i1 < fFileHeader->fMaxCrysInSM; i1++){
02340         fT2d_xmax[i1] = &fT1d_xmax[0] + i1*fFileHeader->fMaxSampADC;}
02341     } 
02342   
02343   for(Int_t i_SMEcha=0; i_SMEcha<fFileHeader->fMaxCrysInSM; i_SMEcha++)
02344     {
02345       for(Int_t i_samp=0; i_samp<fFileHeader->fMaxSampADC; i_samp++)
02346         {
02347           if( fT2d_xmin[i_SMEcha][i_samp] != (Double_t)0 )
02348             {fMiscDiag[4]++; fT2d_xmin[i_SMEcha][i_samp] = (Double_t)0;}
02349  
02350           if( fT2d_xmax[i_SMEcha][i_samp] != (Double_t)0 )
02351             {fMiscDiag[5]++; fT2d_xmax[i_SMEcha][i_samp] = (Double_t)0;}  
02352         } 
02353     }
02354   
02355   Double_t xmin = 0;
02356   Double_t xmax = 0;
02357 
02358   //............. alloc dynamique de s_histo + init to zero
02359   Double_t*  s_histo = new Double_t[fFileHeader->fNbBinsADC];  fCnew++;  
02360   for(Int_t i_bin=0; i_bin<fFileHeader->fNbBinsADC; i_bin++)
02361     {
02362       if( s_histo[i_bin] != (Double_t)0 ){fMiscDiag[6]++; s_histo[i_bin] = (Double_t)0;}
02363     }
02364 
02365   Int_t total_underflow = 0;
02366   Int_t total_overflow  = 0;
02367 
02368   Int_t nb_null_sample_chan = 0;
02369   Int_t nb_null_sample_all  = 0;
02370 
02371   TEBNumbering* MyNumbering = new TEBNumbering();            fCnew++;
02372 
02373   for (Int_t SMEcha = 0; SMEcha < fFileHeader->fMaxCrysInSM; SMEcha++)
02374     {
02375       Int_t n_underflow = 0;
02376       Int_t n_overflow  = 0;
02377       Int_t nb_null_sample_cases = 0;
02378       
02379       for (Int_t i_samp = 0 ; i_samp < fFileHeader->fMaxSampADC; i_samp++)
02380         {
02381           Int_t range_null = 0;
02382           ((fVal_data)[SMEcha][i_samp]).
02383             HistoDistrib(fFileHeader->fNbBinsADC, xmin, xmax,
02384                          &s_histo[0], range_null, n_underflow, n_overflow);
02385 
02386           if ( n_underflow !=0 ){total_underflow++;}
02387           if ( n_overflow  !=0 ){total_overflow++;}
02388  
02389           if (range_null != 0 )
02390             {
02391               nb_null_sample_cases++;
02392               nb_null_sample_all++;
02393             }
02394 
02395           fT2d_xmin[SMEcha][i_samp]= xmin;
02396           fT2d_xmax[SMEcha][i_samp]= xmax;
02397           
02398           for ( Int_t i_bin = 0 ; i_bin < fFileHeader->fNbBinsADC ; i_bin++)
02399             {
02400               fT3d_his_s[SMEcha][i_samp][i_bin] = s_histo[i_bin];
02401             }
02402         } // end of loop on samples
02403       
02404       if ( nb_null_sample_cases != 0 )
02405         {
02406           nb_null_sample_chan++;
02407           if(fFlagPrint == fCodePrintAllComments)
02408             {
02409               Int_t SMTow   = MyNumbering->GetSMTowFromSMEcha(SMEcha);
02410               Int_t TowEcha = MyNumbering->GetTowEchaFromSMEcha(SMEcha);
02411 
02412               cerr << "!TCnaRunEB::MakeHistosOfSampleDistributions()> WARNING/INFO:"
02413                    << " possibility of empty histo in " << nb_null_sample_cases << " case(s)"
02414                    << " for SMEcha " << SMEcha << " (tower: " << SMTow
02415                    << ", TowEcha: " << TowEcha << ")"
02416                    << fTTBELL << endl;
02417             }
02418         } 
02419       fTagEvts[SMEcha] = 1;     fFileHeader->fEvtsCalc++;
02420     } // end of loop on SMEchas
02421   
02422   if ( nb_null_sample_all != 0 )
02423     {    
02424       if(fFlagPrint != fCodePrintNoComment)
02425         {
02426           cerr << "!TCnaRunEB::MakeHistosOfSampleDistributions()> WARNING/INFO:"
02427                << " possibility of empty histo in " << nb_null_sample_all << " case(s)"
02428                << " concerning " << nb_null_sample_chan << " SMEcha(s)" << fTTBELL << endl;
02429         } 
02430     }
02431 
02432   if (total_underflow != 0)
02433     {
02434       if(fFlagPrint != fCodePrintNoComment)
02435         {
02436           cerr << "!TCnaRunEB::MakeHistosOfSampleDistributions()> WARNING/INFO: "
02437                << total_underflow << " underflow(s) have been detected"
02438                << fTTBELL << endl;
02439         }
02440     }
02441 
02442   if (total_overflow != 0)
02443     {
02444       if(fFlagPrint != fCodePrintNoComment)
02445         {
02446           cerr << "!TCnaRunEB::MakeHistosOfSampleDistributions()> WARNING/INFO: "
02447                << total_overflow << " overflow(s) have been detected"
02448                << fTTBELL << endl;
02449         }
02450     }
02451 
02452   delete [] s_histo;        fCdelete++;
02453   delete MyNumbering;       fCdelete++;      
02454 }

void TCnaRunEB::MakeHistosOfSamplesAsFunctionOfEvent (  ) 

Definition at line 2167 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintAllComments, fFileHeader, fFlagPrint, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fSampTimeCalc, and fTagSampTime.

02168 {
02169 //Making of the histograms of the sample value as a funtion of the event number
02170 //for all the pairs (SMEcha, samples)
02171 
02172   if(fFlagPrint == fCodePrintAllComments){
02173     cout << "*TCnaRunEB::MakeHistosOfSamplesAsFunctionOfEvent()>"
02174          << " Making of the histograms of the sample value as a funtion of"
02175          << " the event number for all the pairs (SMEcha, samples)" << endl;}
02176 
02177   // In fact, the histo is already in fT3d_distribs[][][fFileHeader->fNbOfTakenEvts]
02178   // this method sets only the "Tag" and increment the "Calc" (and must be kept for that)
02179 
02180   for (Int_t i_SMEcha = 0 ; i_SMEcha < fFileHeader->fMaxCrysInSM ; i_SMEcha++)
02181     {
02182       fTagSampTime[i_SMEcha] = 1;        fFileHeader->fSampTimeCalc++;
02183     }
02184 }

Bool_t TCnaRunEB::OpenRootFile ( Text_t *  name,
TString  status 
)

Definition at line 3703 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCfgResultsRootFilePath, fCnew, fCodePrintAllComments, fFlagPrint, fOpenRootFile, TCnaRootFile::fRootFileStatus, gCnaRootFile, TCnaRootFile::OpenR(), and TCnaRootFile::OpenW().

Referenced by WriteRootFile().

03703                                                            {
03704 //Open the Root file
03705 
03706   TString s_path;
03707   s_path = fCfgResultsRootFilePath;
03708   s_path.Append('/');
03709   s_path.Append(name);
03710   
03711   gCnaRootFile   = new TCnaRootFile(s_path.Data(), status);     fCnew++;
03712 
03713   Bool_t ok_open = kFALSE;
03714 
03715   if ( gCnaRootFile->fRootFileStatus == "RECREATE" )
03716     {
03717       ok_open = gCnaRootFile->OpenW();
03718     }
03719   if ( gCnaRootFile->fRootFileStatus == "READ"     )
03720     {
03721       ok_open = gCnaRootFile->OpenR();
03722     }
03723 
03724   if (!ok_open) // unable to open file
03725     {
03726       cout << "TCnaRunEB::OpenRootFile> Cannot open file " << s_path.Data() << endl;
03727 
03728     }
03729   else
03730     {
03731       if(fFlagPrint == fCodePrintAllComments){
03732         cout << "*TCnaRunEB::OpenRootFile> Open ROOT file OK for file " << s_path.Data() << endl;}
03733       
03734       fOpenRootFile  = kTRUE;
03735     }
03736   
03737   return ok_open;
03738 }

TCnaRunEB & TCnaRunEB::operator= ( const TCnaRunEB dcop  ) 

Definition at line 1169 of file TCnaRunEB.cc.

References fCopy().

01170 {
01171 //Overloading of the operator=
01172 
01173   fCopy(dcop);
01174   return *this;
01175 }

Int_t TCnaRunEB::PickupNumberOfEvents ( const Int_t &  SMEcha,
const Int_t &  sample 
)

Definition at line 6611 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fT2d_LastEvtNumber, and fTTBELL.

Referenced by WriteAsciiCnaChannelTable().

06613 {
06614   Int_t nb_of_evts = -1;
06615 
06616   if( SMEcha >= 0 && SMEcha < fFileHeader->fMaxCrysInSM )
06617     {
06618       if( sample >= 0 && sample < fFileHeader->fMaxSampADC )
06619         { 
06620           nb_of_evts = fT2d_LastEvtNumber[SMEcha][sample] + 1;
06621         }
06622       else
06623         {
06624           cout << "!TCnaRunEB::PickupNumberOfEvents()> sample = "
06625            << sample << "OUT OF BOUNDS" << fTTBELL << endl;
06626         }
06627     }
06628   else
06629     {
06630       cout << "!TCnaRunEB::PickupNumberOfEvents()> SMEcha = "
06631            << SMEcha << "OUT OF BOUNDS" << fTTBELL << endl;
06632     }
06633 
06634   return nb_of_evts;
06635 }

void TCnaRunEB::PrintAllComments (  ) 

Definition at line 5464 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintAllComments, and fFlagPrint.

05465 {
05466 // Set flags to authorize printing of the comments of all the methods
05467 
05468   fFlagPrint = fCodePrintAllComments;
05469   cout << "*TCnaRunEB::PrintAllComments()> All the comments will be printed" << endl;
05470 }

void TCnaRunEB::PrintComments (  ) 

Definition at line 5448 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintComments, and fFlagPrint.

05449 {
05450 // Set flags to authorize printing of some comments concerning initialisations (default)
05451 
05452   fFlagPrint = fCodePrintComments;
05453   cout << "*TCnaRunEB::PrintComments()> Warnings and some comments on init will be printed" << endl;
05454 }

void TCnaRunEB::PrintNoComment (  ) 

Definition at line 5472 of file TCnaRunEB.cc.

References fCodePrintNoComment, and fFlagPrint.

05473 {
05474 // Set flags to forbid the printing of all the comments
05475 
05476   fFlagPrint = fCodePrintNoComment;
05477 }

void TCnaRunEB::PrintWarnings (  ) 

Definition at line 5456 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintWarnings, and fFlagPrint.

05457 {
05458 // Set flags to authorize printing of warnings
05459 
05460   fFlagPrint = fCodePrintWarnings;
05461   cout << "*TCnaRunEB::PrintWarnings()> Warnings will be printed" << endl;
05462 }

void TCnaRunEB::StartStopDate ( TString  c_startdate,
TString  c_stopdate 
)

Definition at line 2144 of file TCnaRunEB.cc.

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

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02145 {
02146 // Put the start an stop date (if they exist) in class attributes.
02147 
02148   fFileHeader->fStartDate = c_startdate;
02149   fFileHeader->fStopDate  = c_stopdate;
02150 }

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

Definition at line 2136 of file TCnaRunEB.cc.

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

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

02137 {
02138 // Put the start an stop time (if they exist) in class attributes.
02139 
02140   fFileHeader->fStartTime = t_startime;
02141   fFileHeader->fStopTime  = t_stoptime;
02142 }

void TCnaRunEB::TRootCorCorrecCovCss ( const Int_t &  user_SMEcha  ) 

Definition at line 5119 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxSampADC, fT3d_cor_correc_covss_s, fTagCorCorrecCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

05120 {
05121   if (fTagCorCorrecCovCss[0] == 1 )   // test 1st elt only since global calc
05122     {
05123       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
05124         {
05125           for (Int_t j_samp = 0; j_samp < fFileHeader->fMaxSampADC; j_samp++)
05126             {
05127               gCnaRootFile->fCnaIndivResult->fMatMat(i_samp, j_samp) =
05128                 fT3d_cor_correc_covss_s[user_SMEcha][i_samp][j_samp];
05129             }
05130         }
05131     }
05132 }

void TCnaRunEB::TRootCorCss ( const Int_t &  user_SMEcha  ) 

Definition at line 4940 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxSampADC, fT3d_cor_ss, fTagCorCss, and gCnaRootFile.

Referenced by WriteRootFile().

04941 {
04942    if (fTagCorCss[user_SMEcha] == 1 )
04943      {
04944        for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04945          {
04946            for (Int_t j_samp = 0; j_samp < fFileHeader->fMaxSampADC; j_samp++)
04947              {
04948                gCnaRootFile->fCnaIndivResult->fMatMat(i_samp, j_samp) =
04949                  fT3d_cor_ss[user_SMEcha][i_samp][j_samp];
04950              }
04951          }
04952      }
04953 }

void TCnaRunEB::TRootCorMosccMot (  ) 

Definition at line 4799 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxTowInSM, fT2d_cor_moscc_mot, fTagCorMosccMot, and gCnaRootFile.

Referenced by WriteRootFile().

04800 {
04801   if (fTagCorMosccMot[0] == 1 )
04802     {
04803       for (Int_t i_tow = 0; i_tow < fFileHeader->fMaxTowInSM; i_tow++)
04804         {
04805           for (Int_t j_tow = 0; j_tow < fFileHeader->fMaxTowInSM; j_tow++)
04806             {
04807               gCnaRootFile->fCnaIndivResult->fMatMat(i_tow, j_tow) =
04808                 fT2d_cor_moscc_mot[i_tow][j_tow];
04809             }
04810         }
04811     }
04812 }

void TCnaRunEB::TRootCorSccMos (  ) 

Definition at line 4898 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxCrysInSM, fT2d_cor_cc_mos, fTagCorSccMos, and gCnaRootFile.

Referenced by WriteRootFile().

04899 {
04900   if (fTagCorSccMos[0] == 1 )
04901     {
04902       for (Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
04903         {
04904           for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04905             {
04906               gCnaRootFile->fCnaIndivResult->fMatMat(i_SMEcha, j_SMEcha) =
04907                 fT2d_cor_cc_mos[i_SMEcha][j_SMEcha];
04908             }
04909         }
04910     }
04911 }

void TCnaRunEB::TRootCovCorrecCovCss ( const Int_t &  user_SMEcha  ) 

Definition at line 5097 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxSampADC, fT3d_cov_correc_covss_s, fTagCovCorrecCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

05098 {
05099   if (fTagCovCorrecCovCss[0] == 1 )   // test 1st elt only since global calc
05100     {
05101       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
05102         {
05103           for (Int_t j_samp = 0; j_samp < fFileHeader->fMaxSampADC; j_samp++)
05104             {
05105               gCnaRootFile->fCnaIndivResult->fMatMat(i_samp, j_samp) =
05106                 fT3d_cov_correc_covss_s[user_SMEcha][i_samp][j_samp];
05107             }
05108         }
05109     }
05110 }

void TCnaRunEB::TRootCovCss ( const Int_t &  user_SMEcha  ) 

Definition at line 4919 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxSampADC, fT3d_cov_ss, fTagCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

04920 {
04921    if (fTagCovCss[user_SMEcha] == 1 )
04922      {
04923        for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04924          {
04925            for (Int_t j_samp = 0; j_samp < fFileHeader->fMaxSampADC; j_samp++)
04926              {
04927                gCnaRootFile->fCnaIndivResult->fMatMat(i_samp, j_samp) =
04928                  fT3d_cov_ss[user_SMEcha][i_samp][j_samp];
04929              }
04930          }
04931      }
04932 }

void TCnaRunEB::TRootCovMosccMot (  ) 

Definition at line 4777 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxTowInSM, fT2d_cov_moscc_mot, fTagCovMosccMot, and gCnaRootFile.

Referenced by WriteRootFile().

04778 {
04779   if (fTagCovMosccMot[0] == 1 )
04780     {
04781       for (Int_t i_tow = 0; i_tow < fFileHeader->fMaxTowInSM; i_tow++)
04782         {
04783           for (Int_t j_tow = 0; j_tow < fFileHeader->fMaxTowInSM; j_tow++)
04784             {
04785               gCnaRootFile->fCnaIndivResult->fMatMat(i_tow, j_tow) =
04786                 fT2d_cov_moscc_mot[i_tow][j_tow];
04787             }
04788         }
04789     }
04790 }

void TCnaRunEB::TRootCovSccMos (  ) 

Definition at line 4877 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxCrysInSM, fT2d_cov_cc_mos, fTagCovSccMos, and gCnaRootFile.

Referenced by WriteRootFile().

04878 {
04879   if (fTagCovSccMos[0] == 1 )
04880     {
04881       for (Int_t i_SMEcha = 0; i_SMEcha < fFileHeader->fMaxCrysInSM; i_SMEcha++)
04882         {
04883           for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04884             {
04885               gCnaRootFile->fCnaIndivResult->fMatMat(i_SMEcha, j_SMEcha) =
04886                 fT2d_cov_cc_mos[i_SMEcha][j_SMEcha];
04887             }
04888         }
04889     }
04890 }

void TCnaRunEB::TRootEv (  ) 

Definition at line 4734 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT2d_ev, fTagEv, and gCnaRootFile.

Referenced by WriteRootFile().

04735 {
04736   if (fTagEv[0] == 1 )
04737     {
04738       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04739         {
04740           for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04741             {
04742               gCnaRootFile->fCnaIndivResult->fMatHis( j_SMEcha, i_samp) =
04743                 fT2d_ev[j_SMEcha][i_samp];
04744             }
04745         }
04746     }
04747 }

void TCnaRunEB::TRootEvCorCss (  ) 

Definition at line 4999 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_ev_cor_ss, fTagEvCorCss, and gCnaRootFile.

Referenced by WriteRootFile().

05000 {
05001   if (fTagEvCorCss[0] == 1 )
05002     {
05003       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
05004         {
05005           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
05006             fT1d_ev_cor_ss[j_SMEcha];
05007         }      
05008     }
05009 }

void TCnaRunEB::TRootEvEv (  ) 

Definition at line 4962 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_ev_ev, fTagEvEv, and gCnaRootFile.

Referenced by WriteRootFile().

04963 {
04964   if (fTagEvEv[0] == 1 )
04965     {
04966       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04967         {
04968           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
04969             fT1d_ev_ev[j_SMEcha];
04970         }      
04971     }
04972 }

void TCnaRunEB::TRootEvSig (  ) 

Definition at line 4980 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_ev_sig, fTagEvSig, and gCnaRootFile.

Referenced by WriteRootFile().

04981 {
04982   if (fTagEvSig[0] == 1 )
04983     {
04984       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04985         {
04986           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
04987             fT1d_ev_sig[j_SMEcha];
04988         }      
04989     }
04990 }

void TCnaRunEB::TRootEvts ( const Int_t &  user_SMEcha  ) 

Definition at line 4820 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fNbBinsADC, fT3d_his_s, fTagEvts, and gCnaRootFile.

Referenced by WriteRootFile().

04821 {
04822   if (fTagEvts[user_SMEcha] == 1 )
04823     {
04824       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04825         {
04826           for (Int_t j_bin = 0; j_bin < fFileHeader->fNbBinsADC; j_bin++)
04827             {
04828               gCnaRootFile->fCnaIndivResult->fMatHis(i_samp, j_bin) =
04829                 fT3d_his_s[user_SMEcha][i_samp][j_bin];
04830             }
04831         }
04832     }
04833 }

void TCnaRunEB::TRootEvtsXmax ( const Int_t &  user_SMEcha  ) 

Definition at line 4859 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxSampADC, fT2d_xmax, fTagEvts, and gCnaRootFile.

Referenced by WriteRootFile().

04860 {
04861   if (fTagEvts[user_SMEcha] == 1 )
04862     {
04863       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04864         {
04865           gCnaRootFile->fCnaIndivResult->fMatHis(0, i_samp) =
04866             fT2d_xmax[user_SMEcha][i_samp];  
04867         }
04868     }
04869 }

void TCnaRunEB::TRootEvtsXmin ( const Int_t &  user_SMEcha  ) 

Definition at line 4841 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxSampADC, fT2d_xmin, fTagEvts, and gCnaRootFile.

Referenced by WriteRootFile().

04842 {
04843   if (fTagEvts[user_SMEcha] == 1 )
04844     {
04845       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04846         {
04847           gCnaRootFile->fCnaIndivResult->fMatHis(0, i_samp) =
04848             fT2d_xmin[user_SMEcha][i_samp];  
04849         }
04850     }
04851 }

void TCnaRunEB::TRootLastEvtNumber (  ) 

Definition at line 4686 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT2d_LastEvtNumber, fTagLastEvtNumber, and gCnaRootFile.

Referenced by WriteRootFile().

04687 {
04688   if (fTagLastEvtNumber[0] == 1 )
04689     {
04690       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04691         {
04692           for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04693             {
04694               gCnaRootFile->fCnaIndivResult->fMatHis( j_SMEcha, i_samp) =
04695                 fT2d_LastEvtNumber[j_SMEcha][i_samp] + 1;
04696             }
04697         }
04698     }
04699 }

void TCnaRunEB::TRootSampTime ( const Int_t &  user_SMEcha  ) 

Definition at line 4707 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fNbOfTakenEvts, fT3d_distribs, fTagSampTime, and gCnaRootFile.

Referenced by WriteRootFile().

04708 {
04709   if (fTagSampTime[user_SMEcha] == 1 )
04710     {
04711       for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04712         {
04713           //...................... all the bins set to zero
04714           for (Int_t j_bin = 0; j_bin < fFileHeader->fNbOfTakenEvts; j_bin++)
04715             {
04716               gCnaRootFile->fCnaIndivResult->fMatHis(i_samp, j_bin) = (Double_t)0.;
04717             }
04718           //...................... fill the non-zero bins 
04719           for (Int_t j_bin = 0; j_bin < fFileHeader->fNbOfTakenEvts; j_bin++)
04720             {
04721               gCnaRootFile->fCnaIndivResult->fMatHis(i_samp, j_bin) =
04722                 fT3d_distribs[user_SMEcha][i_samp][j_bin];  
04723             }
04724         }
04725     }
04726 }

void TCnaRunEB::TRootSigCorCss (  ) 

Definition at line 5056 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_sig_cor_ss, fTagSigCorCss, and gCnaRootFile.

Referenced by WriteRootFile().

05057 {
05058   if (fTagSigCorCss[0] == 1 )
05059     {
05060       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
05061         {
05062           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
05063             fT1d_sig_cor_ss[j_SMEcha];
05064         }      
05065     }
05066 }

void TCnaRunEB::TRootSigEv (  ) 

Definition at line 5018 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_sig_ev, fTagSigEv, and gCnaRootFile.

Referenced by WriteRootFile().

05019 {
05020   if (fTagSigEv[0] == 1 )
05021     {
05022       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
05023         {
05024           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
05025             fT1d_sig_ev[j_SMEcha];
05026         }      
05027     }
05028 }

void TCnaRunEB::TRootSigSig (  ) 

Definition at line 5037 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, fT1d_sig_sig, fTagSigSig, and gCnaRootFile.

Referenced by WriteRootFile().

05038 {
05039   if (fTagSigSig[0] == 1 )
05040     {
05041       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
05042         {
05043           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_SMEcha) =
05044             fT1d_sig_sig[j_SMEcha];
05045         }      
05046     }
05047 }

void TCnaRunEB::TRootSvCorrecCovCss (  ) 

Definition at line 5075 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT2d_sv_correc_covss_s, fTagSvCorrecCovCss, and gCnaRootFile.

Referenced by WriteRootFile().

05076 {
05077   if (fTagSvCorrecCovCss[0] == 1 )
05078     {
05079       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
05080         {
05081           for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
05082             {
05083               gCnaRootFile->fCnaIndivResult->fMatHis(j_SMEcha, i_samp) =
05084                 fT2d_sv_correc_covss_s[j_SMEcha][i_samp];
05085             }
05086         }
05087     }
05088 }

void TCnaRunEB::TRootTowerNumbers (  ) 

Definition at line 4668 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxTowInSM, fT1d_SMtowFromIndex, fTagTowerNumbers, and gCnaRootFile.

Referenced by WriteRootFile().

04669 {
04670   if (fTagTowerNumbers[0] == 1 )
04671     {
04672       for (Int_t j_tow = 0; j_tow < fFileHeader->fMaxTowInSM; j_tow++)
04673         {
04674           gCnaRootFile->fCnaIndivResult->fMatHis(0, j_tow) =
04675             fT1d_SMtowFromIndex[j_tow];
04676         }
04677     }
04678 }

void TCnaRunEB::TRootVar (  ) 

Definition at line 4755 of file TCnaRunEB.cc.

References TCnaRootFile::fCnaIndivResult, fFileHeader, TCnaResultType::fMatHis, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, fT2d_var, fTagVar, and gCnaRootFile.

Referenced by WriteRootFile().

04756 {
04757   if (fTagVar[0] == 1 )
04758     {
04759       for (Int_t j_SMEcha = 0; j_SMEcha < fFileHeader->fMaxCrysInSM; j_SMEcha++)
04760         {
04761           for (Int_t i_samp = 0; i_samp < fFileHeader->fMaxSampADC; i_samp++)
04762             {
04763               gCnaRootFile->fCnaIndivResult->fMatHis( j_SMEcha, i_samp) =
04764                 fT2d_var[j_SMEcha][i_samp];
04765             }
04766         }
04767     }
04768 }

void TCnaRunEB::WriteAsciiCnaChannelTable (  ) 

Definition at line 5399 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileName, fAsciiFileWriteHeader(), fCdelete, fCnew, fCodeCorresp, fCodePrintNoComment, fFcout_f, fFileHeader, fFlagPrint, fMakeResultsFileName(), TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fNbOfTakenEvts, TEBNumbering::GetSMCrysFromSMTowAndTowEcha(), TEBNumbering::GetSMTowFromSMEcha(), TEBNumbering::GetTowEchaFromSMEcha(), and PickupNumberOfEvents().

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

05400 {
05401 //Write the correspondance table: CNA-channel <-> (SMTow,TowEcha), SMcrystal
05402 
05403   TEBNumbering* MyNumbering = new TEBNumbering();           fCnew++;
05404   // BuildCrysTable() is called in the method Init() which is called by the constructor
05405 
05406   if(fFlagPrint != fCodePrintNoComment){
05407     cout << "*TCnaRunEB::WriteAsciiCnaChannelTable()> The correspondance table is made."
05408          << " Number of CNA-channels = " << fFileHeader->fMaxCrysInSM << endl;}
05409 
05410   Int_t i_code = fCodeCorresp; // code for cna correspondance table
05411   fMakeResultsFileName(i_code);
05412   fAsciiFileWriteHeader(i_code);
05413 
05414   for (Int_t i_SMEcha=0; i_SMEcha<fFileHeader->fMaxCrysInSM; i_SMEcha++)
05415     {
05416       Int_t sm_tower = MyNumbering->GetSMTowFromSMEcha(i_SMEcha);
05417       Int_t TowEcha  = MyNumbering->GetTowEchaFromSMEcha(i_SMEcha);
05418       if ( TowEcha == 0 )
05419         { fFcout_f << endl;
05420           fFcout_f << "  CNA     tower#   channel#   crystal#    Number of events"  << endl;
05421           fFcout_f << "channel    in SM   in tower     in SM     found  (required)" << endl << endl;      
05422         }
05423       Int_t SMcrys      = MyNumbering->GetSMCrysFromSMTowAndTowEcha(sm_tower, TowEcha);
05424       Int_t sample_z    = 0;
05425       Int_t nb_of_evts  = PickupNumberOfEvents(i_SMEcha, sample_z);
05426       fFcout_f  << setw(7)  << i_SMEcha
05427                 << setw(9)  << sm_tower
05428                 << setw(11) << TowEcha
05429                 << setw(10) << SMcrys
05430                 << setw(10) << nb_of_evts 
05431                 << setw(4) << "(" << setw(6) << fFileHeader->fNbOfTakenEvts << ")" << endl;
05432     }
05433   fFcout_f.close();
05434 
05435   if(fFlagPrint != fCodePrintNoComment){
05436     cout << "*TCnaRunEB::WriteAsciiCnaChannelTable()> The CNA correspondance table "
05437          << "has been written in file: " << fAsciiFileName << endl;}
05438 
05439   delete MyNumbering;                       fCdelete++;
05440 }

void TCnaRunEB::WriteAsciiCorCorrecCovCss ( const Int_t &  user_SMEcha  ) 

Definition at line 5370 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeCorCorrecCovCss, fMakeResultsFileName(), fSectSampSizeX, fSectSampSizeY, fT2dWriteAscii(), fTagCorCorrecCovCss, fTTBELL, and fUserSMEcha.

05371 {
05372 //Writing of the correction factors to the (sample,sample) correlations in ASCII file
05373 
05374   if ( fTagCorCorrecCovCss[0] == 1)
05375     {
05376       Int_t i_code = fCodeCorCorrecCovCss; // code for correction factors to ss correlations
05377       fUserSMEcha = user_SMEcha;
05378       fMakeResultsFileName(i_code);
05379       fAsciiFileWriteHeader(i_code);
05380       
05381       Int_t i_pasx = fSectSampSizeX;
05382       Int_t i_pasy = fSectSampSizeY;
05383       
05384       fT2dWriteAscii(i_code, i_pasx, i_pasy);
05385     }
05386   else
05387     {
05388       cout << "!TCnaRunEB::WriteAsciiCorCorrecCovCss()> "
05389            << " Quantities not calculated. No reason to write an ASCII file."
05390            << fTTBELL << endl;
05391     }
05392 }

void TCnaRunEB::WriteAsciiCorrelationsBetweenSamples ( const Int_t &  user_SMEcha  ) 

Definition at line 5226 of file TCnaRunEB.cc.

References ComputeCorrelationsBetweenSamples(), fAsciiFileWriteHeader(), fCodeCorCss, fMakeResultsFileName(), fSectSampSizeX, fSectSampSizeY, fT2dWriteAscii(), fTagCorCss, and fUserSMEcha.

05227 {
05228 //Writing of the correlations between samples for a given SMEcha in an ASCII file
05229 
05230   if (fTagCorCss[user_SMEcha] != 1 ) {ComputeCorrelationsBetweenSamples();}
05231 
05232   fUserSMEcha = user_SMEcha;
05233   Int_t i_code = fCodeCorCss; // code for correlations between samples
05234   fMakeResultsFileName(i_code); 
05235   fAsciiFileWriteHeader(i_code);
05236 
05237   Int_t i_pasx = fSectSampSizeX;
05238   Int_t i_pasy = fSectSampSizeY;
05239  
05240   fT2dWriteAscii(i_code, i_pasx, i_pasy);
05241 }

void TCnaRunEB::WriteAsciiCovariancesBetweenSamples ( const Int_t &  user_SMEcha  ) 

Definition at line 5204 of file TCnaRunEB.cc.

References ComputeCovariancesBetweenSamples(), fAsciiFileWriteHeader(), fCodeCovCss, fMakeResultsFileName(), fSectSampSizeX, fSectSampSizeY, fT2dWriteAscii(), fTagCovCss, and fUserSMEcha.

05205 {
05206 //Writing of the covariances between samples for a given SMEcha in an ASCII file
05207 
05208   if (fTagCovCss[user_SMEcha] != 1 ) {ComputeCovariancesBetweenSamples();}
05209   fUserSMEcha = user_SMEcha;
05210   Int_t i_code = fCodeCovCss;  // code for covariances between samples
05211   fMakeResultsFileName(i_code);  
05212   fAsciiFileWriteHeader(i_code);
05213 
05214   Int_t i_pasx = fSectSampSizeX;
05215   Int_t i_pasy = fSectSampSizeY;
05216 
05217   fT2dWriteAscii(i_code, i_pasx, i_pasy);
05218 }

void TCnaRunEB::WriteAsciiCovCorrecCovCss ( const Int_t &  user_SMEcha  ) 

Definition at line 5339 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeCovCorrecCovCss, fMakeResultsFileName(), fSectSampSizeX, fSectSampSizeY, fT2dWriteAscii(), fTagCovCorrecCovCss, fTTBELL, and fUserSMEcha.

05340 {
05341 //Writing of the correction factors to the (sample,sample) covariances in ASCII file
05342 
05343   if ( fTagCovCorrecCovCss[0] == 1)
05344     {
05345       Int_t i_code = fCodeCovCorrecCovCss; // code for correction factors to ss covariances
05346       fUserSMEcha = user_SMEcha;
05347       fMakeResultsFileName(i_code); 
05348       fAsciiFileWriteHeader(i_code);
05349       
05350       Int_t i_pasx = fSectSampSizeX;
05351       Int_t i_pasy = fSectSampSizeY;
05352       
05353       fT2dWriteAscii(i_code, i_pasx, i_pasy);
05354     }
05355   else
05356     {
05357       cout << "!TCnaRunEB::WriteAsciiCovCorrecCovCss()> "
05358            << " Quantities not calculated. No reason to write an ASCII file."
05359            << fTTBELL << endl;
05360     }
05361 }

void TCnaRunEB::WriteAsciiExpectationValuesOfCorrelationsBetweenSamples (  ) 

Definition at line 5250 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeEvCorCss, fMakeResultsFileName(), fNbChanByLine, fT1dWriteAscii(), fTagEvCorCss, and fTTBELL.

05251 {
05252 //Write the expectation values of the correlations between samples for all the SMEchas in an ASCII file
05253 
05254   if ( fTagEvCorCss[0] == 1)
05255     {
05256       Int_t i_code = fCodeEvCorCss;  // code for expectation values of ss correlations   
05257       fMakeResultsFileName(i_code);
05258       fAsciiFileWriteHeader(i_code);
05259       
05260       Int_t i_lic1 = fNbChanByLine;
05261       Int_t i_lic2 = 0;
05262       
05263       fT1dWriteAscii(i_code, i_lic1, i_lic2);
05264     }
05265   else
05266     {
05267       cout << "!TCnaRunEB::WriteAsciiExpectationValuesOfCorrelationsBetweenSamples()> "
05268            << " Quantities not calculated. No reason to write an ASCII file."
05269            << fTTBELL << endl;
05270     }
05271 }

void TCnaRunEB::WriteAsciiExpectationValuesOfSamples (  ) 

Definition at line 5146 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeEv, fMakeResultsFileName(), fNbChanByLine, fNbSampByLine, fT1dWriteAscii(), fTagEv, and fTTBELL.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

05147 {
05148 //Writing of the expectation values in an ASCII file
05149 
05150   if ( fTagEv[0] == 1)
05151     {
05152       Int_t i_code = fCodeEv;
05153       fMakeResultsFileName(i_code);
05154       fAsciiFileWriteHeader(i_code);
05155       
05156       Int_t i_lic1 = fNbChanByLine; 
05157       Int_t i_lic2 = fNbSampByLine;
05158 
05159       fT1dWriteAscii(i_code, i_lic1, i_lic2);
05160     }
05161   else
05162     {
05163       cout << "!TCnaRunEB::WriteAsciiExpectationValuesOfSamples()> "
05164            << " Quantities not calculated. No reason to write an ASCII file."
05165            << fTTBELL << endl;
05166     }
05167 }

void TCnaRunEB::WriteAsciiSigmasOfCorrelationsBetweenSamples (  ) 

Definition at line 5279 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeSigCorCss, fMakeResultsFileName(), fNbChanByLine, fT1dWriteAscii(), fTagSigCorCss, and fTTBELL.

05280 {
05281 //Writing of the amplitudes of the correlations between samples for all the SMEchas in an ASCII file
05282 
05283   if ( fTagSigCorCss[0] == 1)
05284     {
05285       Int_t i_code = fCodeSigCorCss;  // code for amplitudes   
05286       fMakeResultsFileName(i_code);
05287       fAsciiFileWriteHeader(i_code);
05288       
05289       Int_t i_lic1 = fNbChanByLine;
05290       Int_t i_lic2 = 0;
05291       
05292       fT1dWriteAscii(i_code, i_lic1, i_lic2);
05293     }
05294   else
05295     {
05296       cout << "!TCnaRunEB::WriteAsciiSigmasOfCorrelationsBetweenSamples()> "
05297            << " Quantities not calculated. No reason to write an ASCII file."
05298            << fTTBELL << endl;
05299     }
05300 }

void TCnaRunEB::WriteAsciiSvCorrecCovCss (  ) 

Definition at line 5309 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeSvCorrecCovCss, fMakeResultsFileName(), fNbChanByLine, fNbSampByLine, fT1dWriteAscii(), fTagSvCorrecCovCss, and fTTBELL.

05310 {
05311 //Writing of the sample value correction coefficients in an ASCII file
05312 
05313   if ( fTagSvCorrecCovCss[0] == 1)
05314     {
05315       Int_t i_code = fCodeSvCorrecCovCss;
05316       fMakeResultsFileName(i_code);
05317       fAsciiFileWriteHeader(i_code);
05318       
05319       Int_t i_lic1 = fNbChanByLine;    
05320       Int_t i_lic2 = fNbSampByLine;
05321       
05322       fT1dWriteAscii(i_code, i_lic1, i_lic2);
05323     }
05324   else
05325     {
05326       cout << "!TCnaRunEB::WriteAsciiSvCorrecCovCss()> "
05327            << " Quantities not calculated. No reason to write an ASCII file."
05328            << fTTBELL << endl;
05329     }
05330 }

void TCnaRunEB::WriteAsciiVariancesOfSamples (  ) 

Definition at line 5175 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fAsciiFileWriteHeader(), fCodeVar, fMakeResultsFileName(), fNbChanByLine, fNbSampByLine, fT1dWriteAscii(), fTagVar, and fTTBELL.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

05176 {
05177 //Writing of the variances in an ASCII file
05178 
05179   if ( fTagVar[0] == 1)
05180     { 
05181       Int_t i_code = fCodeVar;  // code for variance   
05182       fMakeResultsFileName(i_code);
05183       fAsciiFileWriteHeader(i_code);
05184       
05185       Int_t i_lic1 = fNbChanByLine;
05186       Int_t i_lic2 = fNbSampByLine;
05187       
05188       fT1dWriteAscii(i_code, i_lic1, i_lic2);
05189     }
05190   else
05191     {
05192       cout << "!TCnaRunEB::WriteAsciiVariancesOfSamples()> "
05193            << " Quantities not calculated. No reason to write an ASCII file."
05194            << fTTBELL << endl;
05195     }
05196 }

Bool_t TCnaRunEB::WriteRootFile ( Text_t *  name  ) 

Definition at line 3809 of file TCnaRunEB.cc.

References CloseRootFile(), GenMuonPlsPt100GeV_cfg::cout, cTypCorCorrecCovCss, cTypCorCss, cTypCorMosccMot, cTypCorSccMos, cTypCovCorrecCovCss, cTypCovCss, cTypCovMosccMot, cTypCovSccMos, cTypEv, cTypEvCorCss, cTypEvEv, cTypEvSig, cTypEvts, cTypEvtsXmax, cTypEvtsXmin, cTypLastEvtNumber, cTypSampTime, cTypSigCorCss, cTypSigEv, cTypSigSig, cTypSvCorrecCovCss, cTypTowerNumbers, cTypVar, lat::endl(), fCfgResultsRootFilePath, TCnaRootFile::fCnaIndivResult, TCnaRootFile::fCnaResultsTree, fCodePrintNoComment, TCnaHeaderEB::fCorCorrecCovCssCalc, TCnaHeaderEB::fCorCssCalc, TCnaHeaderEB::fCorMosccMotCalc, TCnaHeaderEB::fCorSccMosCalc, TCnaHeaderEB::fCovCorrecCovCssCalc, TCnaHeaderEB::fCovCssCalc, TCnaHeaderEB::fCovMosccMotCalc, TCnaHeaderEB::fCovSccMosCalc, TCnaHeaderEB::fEvCalc, TCnaHeaderEB::fEvCorCssCalc, TCnaHeaderEB::fEvEvCalc, TCnaHeaderEB::fEvSigCalc, TCnaHeaderEB::fEvtsCalc, fFileHeader, fFlagPrint, fgMaxCar, TCnaResultType::fIthElement, TCnaHeaderEB::fLastEvtNumberCalc, TCnaResultType::fMatHis, TCnaResultType::fMatMat, TCnaHeaderEB::fMaxCrysInSM, TCnaHeaderEB::fMaxSampADC, TCnaHeaderEB::fMaxTowInSM, TCnaHeaderEB::fNbBinsADC, TCnaHeaderEB::fNbOfTakenEvts, fOpenRootFile, TCnaRootFile::fRootFile, TCnaHeaderEB::fSampTimeCalc, TCnaHeaderEB::fSigCorCssCalc, TCnaHeaderEB::fSigEvCalc, TCnaHeaderEB::fSigSigCalc, TCnaHeaderEB::fSvCorrecCovCssCalc, fTagCorCorrecCovCss, fTagCorCss, fTagCorMosccMot, fTagCorSccMos, fTagCovCorrecCovCss, fTagCovCss, fTagCovMosccMot, fTagCovSccMos, fTagEv, fTagEvCorCss, fTagEvEv, fTagEvSig, fTagEvts, fTagLastEvtNumber, fTagSampTime, fTagSigCorCss, fTagSigEv, fTagSigSig, fTagSvCorrecCovCss, fTagTowerNumbers, fTagVar, TCnaHeaderEB::fTowerNumbersCalc, fTTBELL, TCnaResultType::fTypOfCnaResult, TCnaHeaderEB::fVarCalc, gCnaRootFile, i, OpenRootFile(), TNArrayD::ReSet(), TRootCorCorrecCovCss(), TRootCorCss(), TRootCorMosccMot(), TRootCorSccMos(), TRootCovCorrecCovCss(), TRootCovCss(), TRootCovMosccMot(), TRootCovSccMos(), TRootEv(), TRootEvCorCss(), TRootEvEv(), TRootEvSig(), TRootEvts(), TRootEvtsXmax(), TRootEvtsXmin(), TRootLastEvtNumber(), TRootSampTime(), TRootSigCorCss(), TRootSigEv(), TRootSigSig(), TRootSvCorrecCovCss(), TRootTowerNumbers(), and TRootVar().

03809                                             {
03810 //Write the Root file
03811 
03812   Text_t *file_name = name;
03813 
03814   Bool_t ok_open  = kFALSE;
03815   Bool_t ok_write = kFALSE;
03816 
03817   if ( fOpenRootFile )
03818     {
03819       cout << "!TCnaRunEB::WriteRootFile(...) *** ERROR ***> Writing on file already open."
03820            << fTTBELL << endl;
03821     }
03822   else
03823     {
03824       //..... List of the different element types and associated parameters as ordered in the ROOT file
03825       //
03826       //   Nb of   Type of element          Type      Type                                      Size    Comment
03827       // elements                           Number    Name
03828       //
03829       //        1  fMatHis(1,tower)         ( 0)  cTypTowerNumbers        1*(   1,  68) =         68
03830 
03831       //        1  fMatHis(1,SMEcha)        (16)  cTypEvEv                1*(   1,1700) =      1 700
03832       //        1  fMatHis(1,SMEcha)        (17)  cTypEvSig               1*(   1,1700) =      1 700
03833       //        1  fMatHis(1,SMEcha)        (10)  cTypEvCorCss            1*(   1,1700) =      1 700
03834 
03835       //        1  fMatHis(1,SMEcha)        (18)  cTypSigEv               1*(   1,1700) =      1 700
03836       //        1  fMatHis(1,SMEcha)        (19)  cTypSigSig              1*(   1,1700) =      1 700
03837       //        1  fMatHis(1,SMEcha)        (11)  cTypSigCorCss           1*(   1,1700) =      1 700
03838 
03839       //        1  fMatMat(tower,tower)     (23)  cTypCovMosccMot         1*(  68,  68) =      4 624
03840       //        1  fMatMat(tower,tower)     (24)  cTypCorMosccMot         1*(  68,  68) =      4 624
03841 
03842       //        1  fMatHis(SMEcha, sample)  (15)  cTypLastEvtNumber       1*(1700,  10) =     17 000
03843       //        1  fMatHis(SMEcha, sample)  ( 1)  cTypEv                  1*(1700,  10) =     17 000
03844       //        1  fMatHis(SMEcha, sample)  ( 2)  cTypVar                 1*(1700,  10) =     17 000
03845 
03846       //        1  fMatHis(SMEcha, sample)  (12)  cTypSvCorrecCovCss      1*(1700,  10) =     17 000
03847 
03848       //   SMEcha  fMatMat(sample, sample)  ( 8)  cTypCovCss           1700*(  10,  10) =    170 000
03849       //   SMEcha  fMatMat(sample, sample   ( 9)  cTypCorCss           1700*(  10,  10) =    170 000
03850 
03851       //   SMEcha  fMatHis(sample, bin_adc) ( 3)  cTypEvts,            1700*(  10, 100) =  1 700 000
03852       //        1  fMatHis(SMEcha, sample)  ( 4)  cTypEvtsXmin            1*(1700,  10) =     17 000
03853       //        1  fMatHis(SMEcha, sample   ( 5)  cTypEvtsXmax            1*(1700,  10) =     17 000
03854 
03855       //   SMEcha  fMatHis(sample, bin_evt) (20)  cTypSampTime,        1700*(  10, 150) =  2 550 000
03856 
03857       //        1  fMatMat(SMEcha, SMEcha)  (21)  cTypCovSccMos           1*(1700,1700) =  2 890 000
03858       //        1  fMatMat(SMEcha, SMEcha)  (22)  cTypCorSccMos           1*(1700,1700) =  2 890 000
03859 
03860       //   SMEcha  fMatMat(sample, sample)  (13)  cTypCovCorrecCovCss  1700*(  10,  10) =    170 000
03861       //   SMEcha  fMatMat(sample, sample)  (14)  cTypCorCorrecCovCss  1700*(  10,  10) =    170 000
03862 
03863       //......................................................................................................
03864 
03865       ok_open = OpenRootFile(file_name, "RECREATE");
03866 
03867       TString typ_name = "?";
03868       Int_t v_nb_times = 0;
03869       Int_t v_dim_one  = 0;
03870       Int_t v_dim_two  = 0;
03871       Int_t v_size     = 0;
03872       Int_t v_tot      = 0;
03873       Int_t v_tot_writ = 0;
03874 
03875       //-------------------------- Tower numbers 
03876       //       1   fMatHis(1,tower)           ( 0)  cTypTowerNumbers        1*(   1,  68) =         68
03877 
03878       Int_t MaxCar = fgMaxCar;
03879       typ_name.Resize(MaxCar);
03880       typ_name   = "TowerNumbers";
03881       v_nb_times = fFileHeader->fTowerNumbersCalc;
03882       v_dim_one  = 1;
03883       v_dim_two  = fFileHeader->fMaxTowInSM;
03884       v_size     = v_nb_times*v_dim_one*v_dim_two;
03885       v_tot     += v_size;
03886 
03887       if(fFlagPrint != fCodePrintNoComment){
03888       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
03889            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
03890            << setw(9) << v_size;}
03891 
03892       for (Int_t i = 0; i < v_nb_times; i++)
03893         {
03894           if ( fTagTowerNumbers[0] == 1 )
03895             {
03896               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypTowerNumbers;
03897               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
03898               gCnaRootFile->fCnaIndivResult->
03899                 SetSizeHis(1,fFileHeader->fMaxTowInSM);
03900               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
03901               TRootTowerNumbers();
03902               gCnaRootFile->fCnaResultsTree->Fill();
03903               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
03904             }
03905         }
03906       cout << endl;
03907 
03908       //-------------------------- Expectation values of the expectation values the samples
03909       //       1   fMatHis(1,SMEcha)         (16)  cTypEvEv                1*(   1,1700) =      1 700
03910 
03911       MaxCar = fgMaxCar;
03912       typ_name.Resize(MaxCar);
03913       typ_name   = "EvEv";
03914       v_nb_times = fFileHeader->fEvEvCalc;
03915       v_dim_one  = 1;
03916       v_dim_two  = fFileHeader->fMaxCrysInSM;
03917       v_size     = v_nb_times*v_dim_one*v_dim_two;
03918       v_tot     += v_size;
03919 
03920       if(fFlagPrint != fCodePrintNoComment){
03921       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
03922            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
03923            << setw(9) << v_size;}
03924 
03925       for (Int_t i = 0; i < v_nb_times; i++)
03926         {
03927           if ( fTagEvEv[0] == 1 )
03928             {
03929               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvEv;
03930               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
03931               gCnaRootFile->fCnaIndivResult->
03932                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
03933               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
03934               TRootEvEv();
03935               gCnaRootFile->fCnaResultsTree->Fill();
03936               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
03937             }
03938         }
03939       cout << endl;
03940                   
03941       //-------------------------- Expectation values of the sigmas the samples
03942       //       1   fMatHis(1,SMEcha)         (17)  cTypEvSig               1*(   1,1700) =      1 700
03943 
03944       MaxCar = fgMaxCar;
03945       typ_name.Resize(MaxCar);
03946       typ_name   = "EvSig";
03947       v_nb_times = fFileHeader->fEvSigCalc;
03948       v_dim_one  = 1;
03949       v_dim_two  = fFileHeader->fMaxCrysInSM;
03950       v_size     = v_nb_times*v_dim_one*v_dim_two;
03951       v_tot     += v_size;
03952 
03953       if(fFlagPrint != fCodePrintNoComment){
03954       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
03955            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
03956            << setw(9) << v_size;}
03957 
03958       for (Int_t i = 0; i < v_nb_times; i++)
03959         {
03960           if ( fTagEvSig[0] == 1 )
03961             {
03962               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvSig;
03963               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
03964               gCnaRootFile->fCnaIndivResult->
03965                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
03966               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
03967               TRootEvSig();
03968               gCnaRootFile->fCnaResultsTree->Fill();
03969               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
03970             }
03971         } 
03972       cout << endl;
03973                                      
03974       //-------------------------- Expectation values of the correlations between the samples
03975       //       1   fMatHis(1,SMEcha)         (10)  cTypEvCorCss            1*(   1,1700) =      1 700
03976 
03977       MaxCar = fgMaxCar;
03978       typ_name.Resize(MaxCar);
03979       typ_name   = "EvCorCss";
03980       v_nb_times = fFileHeader->fEvCorCssCalc;
03981       v_dim_one  = 1;
03982       v_dim_two  = fFileHeader->fMaxCrysInSM;
03983       v_size     = v_nb_times*v_dim_one*v_dim_two;
03984       v_tot     += v_size;
03985 
03986       if(fFlagPrint != fCodePrintNoComment){
03987       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
03988            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
03989            << setw(9) << v_size;}
03990 
03991       for (Int_t i = 0; i < v_nb_times; i++)
03992         {
03993           if ( fTagEvCorCss[0] == 1 )
03994             {
03995               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvCorCss;
03996               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
03997               gCnaRootFile->fCnaIndivResult->
03998                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
03999               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04000               TRootEvCorCss();
04001               gCnaRootFile->fCnaResultsTree->Fill();
04002               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04003             }
04004         } 
04005       cout << endl;
04006       
04007       //-------------------------- Sigmas of the expectation values of the samples  
04008       //       1   fMatHis(1,SMEcha)         (18)  cTypSigEv               1*(   1,1700) =      1 700
04009 
04010       MaxCar = fgMaxCar;
04011       typ_name.Resize(MaxCar);
04012       typ_name   = "SigEv";
04013       v_nb_times = fFileHeader->fSigEvCalc;
04014       v_dim_one  = 1;
04015       v_dim_two  = fFileHeader->fMaxCrysInSM;
04016       v_size     = v_nb_times*v_dim_one*v_dim_two;
04017       v_tot     += v_size;
04018 
04019       if(fFlagPrint != fCodePrintNoComment){
04020       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04021            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04022            << setw(9) << v_size;}
04023 
04024       for (Int_t i = 0; i < v_nb_times; i++)
04025         {
04026           if ( fTagSigEv[0] == 1 )
04027             {
04028               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSigEv;
04029               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04030               gCnaRootFile->fCnaIndivResult->
04031                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
04032               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04033               TRootSigEv();
04034               gCnaRootFile->fCnaResultsTree->Fill();
04035               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04036             }
04037         } 
04038       cout << endl;
04039       
04040       //-------------------------- Sigmas of the sigmas of the samples  
04041       //       1   fMatHis(1,SMEcha)         (19)  cTypSigSig              1*(   1,1700) =      1 700
04042 
04043       MaxCar = fgMaxCar;
04044       typ_name.Resize(MaxCar);
04045       typ_name   = "SigSig";
04046       v_nb_times = fFileHeader->fSigSigCalc;
04047       v_dim_one  = 1;
04048       v_dim_two  = fFileHeader->fMaxCrysInSM;
04049       v_size     = v_nb_times*v_dim_one*v_dim_two;
04050       v_tot     += v_size;
04051 
04052       if(fFlagPrint != fCodePrintNoComment){
04053       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04054            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04055            << setw(9) << v_size;}
04056  
04057       for (Int_t i = 0; i < v_nb_times; i++)
04058         {
04059           if ( fTagSigSig[0] == 1 )
04060             {
04061               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSigSig;
04062               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04063               gCnaRootFile->fCnaIndivResult->
04064                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
04065               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04066               TRootSigSig();
04067               gCnaRootFile->fCnaResultsTree->Fill();
04068               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04069             }
04070         }
04071       cout << endl; 
04072                     
04073       //-------------------------- Sigmas of the correlations between the samples  
04074       //       1   fMatHis(1,SMEcha)         (11)  cTypSigCorCss           1*(   1,1700) =      1 700
04075 
04076       MaxCar = fgMaxCar;
04077       typ_name.Resize(MaxCar);
04078       typ_name   = "SigCorCss";
04079       v_nb_times = fFileHeader->fSigCorCssCalc;
04080       v_dim_one  = 1;
04081       v_dim_two  = fFileHeader->fMaxCrysInSM;
04082       v_size     = v_nb_times*v_dim_one*v_dim_two;
04083       v_tot     += v_size;
04084 
04085       if(fFlagPrint != fCodePrintNoComment){
04086       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04087            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04088            << setw(9) << v_size;}
04089    
04090       for (Int_t i = 0; i < v_nb_times; i++)
04091         {
04092           if ( fTagSigCorCss[0] == 1 )
04093             {
04094               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSigCorCss;
04095               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04096               gCnaRootFile->fCnaIndivResult->
04097                 SetSizeHis(1,fFileHeader->fMaxCrysInSM);
04098               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04099               TRootSigCorCss();
04100               gCnaRootFile->fCnaResultsTree->Fill();
04101               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04102             }
04103         } 
04104       cout << endl;
04105             
04106       //----- Mean Covariances between SMEchas (averaged over samples) for all (tower_X,tower_Y)
04107       //       1   fMatMat(tower,tower)       (23)  cTypCovMosccMot         1*(  68,  68) =      4 624
04108 
04109       MaxCar = fgMaxCar;
04110       typ_name.Resize(MaxCar);
04111       typ_name   = "CovMosccMot";
04112       v_nb_times = fFileHeader->fCovMosccMotCalc;
04113       v_dim_one  = fFileHeader->fMaxTowInSM;
04114       v_dim_two  = fFileHeader->fMaxTowInSM;
04115       v_size     = v_nb_times*v_dim_one*v_dim_two;
04116       v_tot     += v_size;
04117  
04118       if(fFlagPrint != fCodePrintNoComment){
04119       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04120            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04121            << setw(9) << v_size;}
04122 
04123       for (Int_t i = 0; i < v_nb_times; i++)
04124         {
04125           if ( fTagCovMosccMot[0] == 1 )
04126             {
04127               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCovMosccMot;
04128               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04129               gCnaRootFile->fCnaIndivResult->
04130                 SetSizeMat(fFileHeader->fMaxTowInSM,fFileHeader->fMaxTowInSM);
04131               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04132               TRootCovMosccMot();
04133               gCnaRootFile->fCnaResultsTree->Fill();
04134               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04135             }
04136         } 
04137       cout << endl;
04138             
04139       //----- Mean Correlations between SMEchas (averaged over samples) for all (tower_X,tower_Y)
04140       //       1   fMatMat(tower,tower)       (24)  cTypCorMosccMot         1*(  68,  68) =      4 624
04141 
04142       MaxCar = fgMaxCar;
04143       typ_name.Resize(MaxCar);
04144       typ_name   = "CorMosccMot";
04145       v_nb_times = fFileHeader->fCorMosccMotCalc;
04146       v_dim_one  = fFileHeader->fMaxTowInSM;
04147       v_dim_two  = fFileHeader->fMaxTowInSM;
04148       v_size     = v_nb_times*v_dim_one*v_dim_two;
04149       v_tot     += v_size;
04150  
04151       if(fFlagPrint != fCodePrintNoComment){
04152       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04153            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04154            << setw(9) << v_size;}
04155 
04156       for (Int_t i = 0; i < v_nb_times; i++)
04157         {
04158           if ( fTagCorMosccMot[0] == 1 )
04159             {
04160               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCorMosccMot;
04161               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04162               gCnaRootFile->fCnaIndivResult->
04163                 SetSizeMat(fFileHeader->fMaxTowInSM,fFileHeader->fMaxTowInSM);
04164               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04165               TRootCorMosccMot();
04166               gCnaRootFile->fCnaResultsTree->Fill();
04167               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04168             }
04169         } 
04170       cout << endl;
04171       
04172       //-------------------------- Numbers of found events (LastEvtNumber)
04173       //       1   fMatHis(SMEcha, sample)   (15)  cTypLastEvtNumber       1*(1700,  10) =     17 000
04174 
04175       MaxCar = fgMaxCar;
04176       typ_name.Resize(MaxCar);
04177       typ_name   = "LastEvtNumber";
04178       v_nb_times = fFileHeader->fLastEvtNumberCalc;
04179       v_dim_one  = fFileHeader->fMaxCrysInSM;
04180       v_dim_two  = fFileHeader->fMaxSampADC;
04181       v_size     = v_nb_times*v_dim_one*v_dim_two;
04182       v_tot     += v_size;
04183  
04184       if(fFlagPrint != fCodePrintNoComment){
04185       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04186            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04187            << setw(9) << v_size;}
04188 
04189       for (Int_t i = 0; i < v_nb_times; i++)
04190         {
04191           if ( fTagLastEvtNumber[0] == 1 )
04192             {
04193               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypLastEvtNumber;
04194               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04195               gCnaRootFile->fCnaIndivResult->
04196                 SetSizeHis(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxSampADC);
04197               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04198               TRootLastEvtNumber();
04199               gCnaRootFile->fCnaResultsTree->Fill();
04200               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04201             }
04202         }
04203       cout << endl;
04204                   
04205       //-------------------------- Expectation values of the samples
04206       //       1   fMatHis(SMEcha, sample)   ( 1)  cTypEv                  1*(1700,  10) =     17 000
04207 
04208       MaxCar = fgMaxCar;
04209       typ_name.Resize(MaxCar);
04210       typ_name   = "Ev";
04211       v_nb_times = fFileHeader->fEvCalc;
04212       v_dim_one  = fFileHeader->fMaxCrysInSM;
04213       v_dim_two  = fFileHeader->fMaxSampADC;
04214       v_size     = v_nb_times*v_dim_one*v_dim_two;
04215       v_tot     += v_size;
04216  
04217       if(fFlagPrint != fCodePrintNoComment){
04218       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04219            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04220            << setw(9) << v_size;}
04221 
04222       for (Int_t i = 0; i < v_nb_times; i++)
04223         {
04224           if ( fTagEv[0] == 1 )
04225             {
04226               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEv;
04227               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04228               gCnaRootFile->fCnaIndivResult->
04229                 SetSizeHis(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxSampADC);
04230               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04231               TRootEv();
04232               gCnaRootFile->fCnaResultsTree->Fill();
04233               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04234             }
04235         }
04236       cout << endl;
04237       
04238       //-------------------------- Variances of the samples     
04239       //       1   fMatHis(SMEcha, sample)   ( 2)  cTypVar                 1*(1700,  10) =     17 000
04240 
04241       MaxCar = fgMaxCar;
04242       typ_name.Resize(MaxCar);
04243       typ_name   = "Var";
04244       v_nb_times = fFileHeader->fVarCalc;
04245       v_dim_one  = fFileHeader->fMaxCrysInSM;
04246       v_dim_two  = fFileHeader->fMaxSampADC;
04247       v_size     = v_nb_times*v_dim_one*v_dim_two;
04248       v_tot     += v_size;
04249  
04250       if(fFlagPrint != fCodePrintNoComment){
04251       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04252            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04253            << setw(9) << v_size;}
04254 
04255       for (Int_t i = 0; i < v_nb_times; i++)
04256         {
04257           if ( fTagVar[0] == 1 )
04258             {
04259               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypVar;
04260               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04261               gCnaRootFile->fCnaIndivResult->
04262                 SetSizeHis(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxSampADC);
04263               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04264               TRootVar();
04265               gCnaRootFile->fCnaResultsTree->Fill();
04266               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04267             }
04268         }
04269       cout << endl;
04270 
04271       //-------------------------- Corrections to the sample values from cov(s,s)
04272       //       1   fMatHis(SMEcha, sample)   (12)  cTypSvCorrecCovCss      1*(1700,  10) =     17 000
04273 
04274       MaxCar = fgMaxCar;
04275       typ_name.Resize(MaxCar);
04276       typ_name   = "SvCorrecCovCss";
04277       v_nb_times = fFileHeader->fSvCorrecCovCssCalc;
04278       v_dim_one  = fFileHeader->fMaxCrysInSM;
04279       v_dim_two  = fFileHeader->fMaxSampADC;
04280       v_size     = v_nb_times*v_dim_one*v_dim_two;
04281       v_tot     += v_size;
04282  
04283       if(fFlagPrint != fCodePrintNoComment){
04284       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04285            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04286            << setw(9) << v_size;}
04287 
04288       for (Int_t i = 0; i < v_nb_times; i++)
04289         {
04290           if ( fTagSvCorrecCovCss[0] == 1 )
04291             {
04292               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSvCorrecCovCss;
04293               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04294               gCnaRootFile->fCnaIndivResult->
04295                 SetSizeHis(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxSampADC);
04296               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04297               TRootSvCorrecCovCss();
04298               gCnaRootFile->fCnaResultsTree->Fill();
04299               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04300             }
04301         } 
04302       cout << endl;
04303       
04304       //-------------------------- Covariances between samples
04305 
04306       // SMEcha   fMatMat(sample,  sample)   ( 8)  cTypCovCss           1700*(  10,  10) =    170 000
04307 
04308       MaxCar = fgMaxCar;
04309       typ_name.Resize(MaxCar);
04310       typ_name   = "CovCss";
04311       v_nb_times = fFileHeader->fCovCssCalc;
04312       v_dim_one  = fFileHeader->fMaxSampADC;
04313       v_dim_two  = fFileHeader->fMaxSampADC;
04314       v_size     = v_nb_times*v_dim_one*v_dim_two;
04315       v_tot     += v_size;
04316  
04317       if(fFlagPrint != fCodePrintNoComment){
04318       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04319            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04320            << setw(9) << v_size;}
04321 
04322       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04323         {
04324           if ( fTagCovCss[i_SMEcha] == 1 )
04325             {
04326               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCovCss;
04327               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04328               gCnaRootFile->fCnaIndivResult->
04329                 SetSizeMat(fFileHeader->fMaxSampADC,fFileHeader->fMaxSampADC);
04330               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04331               TRootCovCss(i_SMEcha);
04332               gCnaRootFile->fCnaResultsTree->Fill();
04333               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04334             }
04335         }
04336       cout << endl;
04337       
04338       //-------------------------- Correlations between samples   
04339       // SMEcha   fMatMat(sample,  sample)   ( 9)  cTypCorCss           1700*(  10,  10) =    170 000
04340 
04341       MaxCar = fgMaxCar;
04342       typ_name.Resize(MaxCar);
04343       typ_name   = "CorCss";
04344       v_nb_times = fFileHeader->fCorCssCalc;
04345       v_dim_one  = fFileHeader->fMaxSampADC;
04346       v_dim_two  = fFileHeader->fMaxSampADC;
04347       v_size     = v_nb_times*v_dim_one*v_dim_two;
04348       v_tot     += v_size;
04349 
04350       if(fFlagPrint != fCodePrintNoComment){
04351       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04352            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04353            << setw(9) << v_size;}
04354  
04355       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04356         {
04357           if ( fTagCorCss[i_SMEcha] == 1 )
04358             {
04359               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCorCss;
04360               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04361               gCnaRootFile->fCnaIndivResult->
04362                 SetSizeMat(fFileHeader->fMaxSampADC,fFileHeader->fMaxSampADC);
04363               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04364               TRootCorCss(i_SMEcha);
04365               gCnaRootFile->fCnaResultsTree->Fill();
04366               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04367             }     
04368         }
04369       cout << endl;
04370 
04371       //-------------------------- Event distributions
04372       // SMEcha   fMatHis(sample,  bins)     ( 3)  cTypEvts,            1700*(  10, 100) =  1 700 000
04373 
04374       MaxCar = fgMaxCar;
04375       typ_name.Resize(MaxCar);
04376       typ_name   = "Evts";
04377       v_nb_times = fFileHeader->fEvtsCalc;
04378       v_dim_one  = fFileHeader->fMaxSampADC;
04379       v_dim_two  = fFileHeader->fNbBinsADC;
04380       v_size     = v_nb_times*v_dim_one*v_dim_two;
04381       v_tot     += v_size;
04382 
04383       if(fFlagPrint != fCodePrintNoComment){
04384       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04385            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04386            << setw(9) << v_size;}
04387 
04388       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04389         {
04390           if ( fTagEvts[i_SMEcha] == 1 )
04391             {
04392               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvts;
04393               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04394               gCnaRootFile->fCnaIndivResult->
04395                 SetSizeHis(fFileHeader->fMaxSampADC,fFileHeader->fNbBinsADC);
04396               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04397               TRootEvts(i_SMEcha);
04398               gCnaRootFile->fCnaResultsTree->Fill(); 
04399               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04400             }
04401         }
04402       cout << endl;
04403 
04404       //-------------------------- Event distributions Xmin
04405       //       1   fMatHis(cna_SMEcha, sample)   ( 4)  cTypEvtsXmin            1*(1700,  10) =     17 000
04406 
04407       MaxCar = fgMaxCar;
04408       typ_name.Resize(MaxCar);
04409       typ_name   = "EvtsXmin";
04410       v_nb_times = fFileHeader->fEvtsCalc;
04411       v_dim_one  = 1;
04412       v_dim_two  = fFileHeader->fMaxSampADC;
04413       v_size     = v_nb_times*v_dim_one*v_dim_two;
04414       v_tot     += v_size;
04415  
04416       if(fFlagPrint != fCodePrintNoComment){
04417       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04418            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04419            << setw(9) << v_size;}
04420       
04421       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04422         {
04423           if ( fTagEvts[i_SMEcha] == 1 )
04424             {
04425               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvtsXmin;
04426               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04427               gCnaRootFile->fCnaIndivResult->
04428                 SetSizeHis(1,fFileHeader->fMaxSampADC);
04429               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04430               TRootEvtsXmin(i_SMEcha);
04431               gCnaRootFile->fCnaResultsTree->Fill();
04432               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04433             }
04434         }
04435       cout << endl;
04436       
04437       //-------------------------- Event distributions Xmax
04438       //       1   fMatHis(SMEcha, sample)   ( 5)  cTypEvtsXmax            1*(1700,  10) =     17 000
04439 
04440       MaxCar = fgMaxCar;      
04441       typ_name.Resize(MaxCar);
04442       typ_name   = "EvtsXmax";
04443       v_nb_times = fFileHeader->fEvtsCalc;
04444       v_dim_one  = 1;
04445       v_dim_two  = fFileHeader->fMaxSampADC;
04446       v_size     = v_nb_times*v_dim_one*v_dim_two;
04447       v_tot     += v_size;
04448  
04449       if(fFlagPrint != fCodePrintNoComment){
04450       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04451            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04452            << setw(9) << v_size;}
04453       
04454       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04455         {
04456           if ( fTagEvts[i_SMEcha] == 1 )
04457             {
04458               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypEvtsXmax;
04459               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04460               gCnaRootFile->fCnaIndivResult->
04461                 SetSizeHis(1,fFileHeader->fMaxSampADC);
04462               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04463               TRootEvtsXmax(i_SMEcha);
04464               gCnaRootFile->fCnaResultsTree->Fill();
04465               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04466             }
04467         }
04468       cout << endl;
04469 
04470       //-------------------------- Samples as a function of event
04471       // SMEcha   fMatHis(sample,  bins)     (20)  cTypSampTime,        1700*(  10, 200) =  3 400 000
04472 
04473       MaxCar = fgMaxCar;
04474       typ_name.Resize(MaxCar);
04475       typ_name   = "SampTime";
04476       v_nb_times = fFileHeader->fSampTimeCalc;
04477       v_dim_one  = fFileHeader->fMaxSampADC;
04478       v_dim_two  = fFileHeader->fNbOfTakenEvts;
04479       v_size     = v_nb_times*v_dim_one*v_dim_two;
04480       v_tot     += v_size;
04481  
04482       if(fFlagPrint != fCodePrintNoComment){
04483       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04484            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04485            << setw(9) << v_size;}
04486 
04487       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04488         {
04489           if ( fTagSampTime[i_SMEcha] == 1 )
04490             {
04491               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypSampTime;
04492               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04493               gCnaRootFile->fCnaIndivResult->
04494                 SetSizeHis(fFileHeader->fMaxSampADC,fFileHeader->fNbOfTakenEvts);
04495               gCnaRootFile->fCnaIndivResult->fMatMat.ReSet(1,1);
04496               TRootSampTime(i_SMEcha);
04497               gCnaRootFile->fCnaResultsTree->Fill();
04498               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04499             }
04500         }
04501       cout << endl;
04502 
04503       //-------------------------- Covariances between SMEchas (Mean Over Samples)
04504       //  sample   fMatMat(SMEcha, SMEcha)  (21)  cTypCovSccMos           1*(1700,1700) =  2 890 000
04505 
04506       MaxCar = fgMaxCar;
04507       typ_name.Resize(MaxCar);
04508       typ_name   = "CovSccMos";
04509       v_nb_times = fFileHeader->fCovSccMosCalc;
04510       v_dim_one  = fFileHeader->fMaxCrysInSM;
04511       v_dim_two  = fFileHeader->fMaxCrysInSM;
04512       v_size     = v_nb_times*v_dim_one*v_dim_two;
04513       v_tot     += v_size;
04514  
04515       if(fFlagPrint != fCodePrintNoComment){
04516       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04517            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04518            << setw(9) << v_size;}
04519 
04520       for (Int_t i = 0; i < v_nb_times; i++)
04521         {
04522           if ( fTagCovSccMos[0] == 1 )
04523             {
04524               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCovSccMos;
04525               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04526               gCnaRootFile->fCnaIndivResult->
04527                 SetSizeMat(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxCrysInSM);
04528               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04529               TRootCovSccMos();
04530               gCnaRootFile->fCnaResultsTree->Fill();
04531               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04532             }
04533         } 
04534       cout << endl;
04535       
04536       //-------------------------- Correlations between SMEchas (Mean Over Samples)
04537       //  sample   fMatMat(SMEcha, SMEcha)  (22)  cTypCorSccMos           1*(1700,1700) =  2 890 000
04538 
04539       MaxCar = fgMaxCar;
04540       typ_name.Resize(MaxCar);
04541       typ_name   = "CorSccMos";
04542       v_nb_times = fFileHeader->fCorSccMosCalc;
04543       v_dim_one  = fFileHeader->fMaxCrysInSM;
04544       v_dim_two  = fFileHeader->fMaxCrysInSM;
04545       v_size     = v_nb_times*v_dim_one*v_dim_two;
04546       v_tot     += v_size;
04547 
04548       if(fFlagPrint != fCodePrintNoComment){
04549       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04550            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04551            << setw(9) << v_size;}
04552 
04553       for (Int_t i = 0; i < v_nb_times; i++)
04554         {
04555           if ( fTagCorSccMos[0] == 1 )
04556             {
04557               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCorSccMos;
04558               gCnaRootFile->fCnaIndivResult->fIthElement     = i;
04559               gCnaRootFile->fCnaIndivResult->
04560                 SetSizeMat(fFileHeader->fMaxCrysInSM,fFileHeader->fMaxCrysInSM);
04561               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04562               TRootCorSccMos();
04563               gCnaRootFile->fCnaResultsTree->Fill();
04564               if( i == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04565             }
04566         }
04567       cout << endl;
04568 
04569       //-------------------------- Correction factors to the covariances from cov(s,s)
04570       // SMEcha   fMatMat(sample,  sample)   (13)  cTypCovCorrecCovCss  1700*(  10,  10) =    170 000
04571 
04572       MaxCar = fgMaxCar;
04573       typ_name.Resize(MaxCar);
04574       typ_name   = "CovCorrecCovCss";
04575       v_nb_times = fFileHeader->fCovCorrecCovCssCalc;
04576       v_dim_one  = fFileHeader->fMaxSampADC;
04577       v_dim_two  = fFileHeader->fMaxSampADC;
04578       v_size     = v_nb_times*v_dim_one*v_dim_two;
04579       v_tot     += v_size;
04580  
04581       if(fFlagPrint != fCodePrintNoComment){
04582       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04583            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04584            << setw(9) << v_size;}
04585 
04586       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04587         {
04588           if ( fTagCovCorrecCovCss[i_SMEcha] == 1 )
04589             {
04590               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCovCorrecCovCss;
04591               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04592               gCnaRootFile->fCnaIndivResult->
04593                 SetSizeMat(fFileHeader->fMaxSampADC,fFileHeader->fMaxSampADC);
04594               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04595               TRootCovCorrecCovCss(i_SMEcha);
04596               gCnaRootFile->fCnaResultsTree->Fill();
04597               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04598             }
04599         } 
04600       cout << endl;
04601       
04602       //-------------------------- Correction factors to the correlations from cov(s,s)
04603       // SMEcha   fMatMat(sample,  sample)   (14)  cTypCorCorrecCovCss  1700*(  10,  10) =    170 000
04604 
04605       MaxCar = fgMaxCar;
04606       typ_name.Resize(MaxCar);
04607       typ_name   = "CorCorrecCovCss";
04608       v_nb_times = fFileHeader->fCorCorrecCovCssCalc;
04609       v_dim_one  = fFileHeader->fMaxSampADC;
04610       v_dim_two  = fFileHeader->fMaxSampADC;
04611       v_size     = v_nb_times*v_dim_one*v_dim_two;
04612       v_tot     += v_size;
04613  
04614       if(fFlagPrint != fCodePrintNoComment){
04615       cout << "*TCnaRunEB::WriteRootFile()> " << setw(18) << typ_name << ": " << setw(4) << v_nb_times
04616            << " * ("  << setw(4) << v_dim_one << ","  << setw(4) << v_dim_two  << ") = "
04617            << setw(9) << v_size;}
04618 
04619       for (Int_t i_SMEcha = 0; i_SMEcha < v_nb_times; i_SMEcha++)
04620         {
04621           if ( fTagCorCorrecCovCss[i_SMEcha] == 1 )
04622             {
04623               gCnaRootFile->fCnaIndivResult->fTypOfCnaResult = cTypCorCorrecCovCss;
04624               gCnaRootFile->fCnaIndivResult->fIthElement     = i_SMEcha;
04625               gCnaRootFile->fCnaIndivResult->
04626                 SetSizeMat(fFileHeader->fMaxSampADC,fFileHeader->fMaxSampADC);
04627               gCnaRootFile->fCnaIndivResult->fMatHis.ReSet(1,1);
04628               TRootCorCorrecCovCss(i_SMEcha);
04629               gCnaRootFile->fCnaResultsTree->Fill();
04630               if( i_SMEcha == 0 ){cout << " => WRITTEN ON FILE "; v_tot_writ += v_size;}
04631             }
04632         }
04633       cout << endl;
04634 
04635       //---------------------------------------------- WRITING 
04636       //...................................... file 
04637       gCnaRootFile->fRootFile->Write();
04638       //...................................... header
04639       fFileHeader->Write();
04640 
04641       //...................................... status message
04642       if(fFlagPrint != fCodePrintNoComment){
04643         cout << "*TCnaRunEB::WriteRootFile()> " << setw(20) << "TOTAL: "
04644              << setw(21) << "CALCULATED = " << setw(9) <<  v_tot
04645              << " => WRITTEN ON FILE = "    << setw(9) << v_tot_writ << endl;}
04646 
04647       if(fFlagPrint != fCodePrintNoComment){
04648         cout << "*TCnaRunEB::WriteRootFile()> Write OK in file " << file_name << " in directory:" << endl
04649              << "                           " << fCfgResultsRootFilePath
04650              << endl;}
04651 
04652       ok_write = kTRUE;
04653 
04654       //...................................... close
04655       CloseRootFile(file_name);
04656     }
04657   return ok_write;
04658 }

Bool_t TCnaRunEB::WriteRootFile (  ) 

Definition at line 3786 of file TCnaRunEB.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), fCodePrintNoComment, fCodeRoot, fFlagPrint, fMakeResultsFileName(), fRootFileName, and fRootFileNameShort.

Referenced by EcalCorrelatedNoisePedestalRunAnalyzer::~EcalCorrelatedNoisePedestalRunAnalyzer().

03786                                 {
03787 //Write the Root file. File name automatically generated in fMakeResultsFileName.
03788 
03789   Bool_t ok_write = kFALSE;
03790   fMakeResultsFileName(fCodeRoot);  // set fRootFileName, fRootFileNameShort,
03791                                     // fAsciiFileName, fAsciiFileNameShort,
03792                                     // fResultsFileName and fResultsFileNameShort
03793 
03794   Text_t *s_name = (Text_t *)fRootFileNameShort.Data();
03795 
03796   if(fFlagPrint != fCodePrintNoComment){
03797     cout << "*TCnaRunEB::WriteRootFile()> Results are going to be written in the ROOT file: " << endl
03798          << "                           " <<  fRootFileName.Data() << endl;}
03799 
03800   ok_write = WriteRootFile(s_name);
03801   
03802   return ok_write;
03803 }


Member Data Documentation

TString TCnaRunEB::fAsciiFileName [private]

Definition at line 220 of file TCnaRunEB.h.

Referenced by fAsciiFileWriteHeader(), fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), fT2dWriteAscii(), Init(), and WriteAsciiCnaChannelTable().

TString TCnaRunEB::fAsciiFileNameShort [private]

Definition at line 221 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), and Init().

Int_t TCnaRunEB::fCdelete [private]

Definition at line 51 of file TCnaRunEB.h.

Referenced by CloseRootFile(), ComputeCorrectionFactorsToCovss(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), GetReadyToCompute(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), WriteAsciiCnaChannelTable(), and ~TCnaRunEB().

TString TCnaRunEB::fCfgResultsAsciiFilePath [private]

Definition at line 219 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), and GetPathForResultsAsciiFiles().

TString TCnaRunEB::fCfgResultsRootFilePath [private]

Definition at line 215 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), GetPathForResultsRootFiles(), OpenRootFile(), and WriteRootFile().

Int_t TCnaRunEB::fCnaCommand [private]

Definition at line 48 of file TCnaRunEB.h.

Referenced by GetPathForResultsAsciiFiles(), GetPathForResultsRootFiles(), and Init().

Int_t TCnaRunEB::fCnaError [private]

Definition at line 48 of file TCnaRunEB.h.

Referenced by GetPathForResultsAsciiFiles(), GetPathForResultsRootFiles(), and Init().

Int_t TCnaRunEB::fCnew [private]

Definition at line 50 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), fT2dWriteAscii(), GetReadyToCompute(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), OpenRootFile(), WriteAsciiCnaChannelTable(), and ~TCnaRunEB().

Int_t TCnaRunEB::fCodeCorCorrecCovCss [private]

Definition at line 193 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), Init(), and WriteAsciiCorCorrecCovCss().

Int_t TCnaRunEB::fCodeCorCss [private]

Definition at line 152 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), Init(), and WriteAsciiCorrelationsBetweenSamples().

Int_t TCnaRunEB::fCodeCorMosccMot [private]

Definition at line 140 of file TCnaRunEB.h.

Referenced by fCopy(), and Init().

Int_t TCnaRunEB::fCodeCorresp [private]

Definition at line 64 of file TCnaRunEB.h.

Referenced by fMakeResultsFileName(), Init(), and WriteAsciiCnaChannelTable().

Int_t TCnaRunEB::fCodeCorScc [private]

Definition at line 120 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), and Init().

Int_t TCnaRunEB::fCodeCorSccMos [private]

Definition at line 130 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), and Init().

Int_t TCnaRunEB::fCodeCovCorrecCovCss [private]

Definition at line 187 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), Init(), and WriteAsciiCovCorrecCovCss().

Int_t TCnaRunEB::fCodeCovCss [private]

Definition at line 146 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), Init(), and WriteAsciiCovariancesBetweenSamples().

Int_t TCnaRunEB::fCodeCovMosccMot [private]

Definition at line 135 of file TCnaRunEB.h.

Referenced by fCopy(), and Init().

Int_t TCnaRunEB::fCodeCovScc [private]

Definition at line 114 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), and Init().

Int_t TCnaRunEB::fCodeCovSccMos [private]

Definition at line 125 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT2dWriteAscii(), and Init().

Int_t TCnaRunEB::fCodeEv [private]

Definition at line 93 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), Init(), and WriteAsciiExpectationValuesOfSamples().

Int_t TCnaRunEB::fCodeEvCorCss [private]

Definition at line 164 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), Init(), and WriteAsciiExpectationValuesOfCorrelationsBetweenSamples().

Int_t TCnaRunEB::fCodeEvEv [private]

Definition at line 156 of file TCnaRunEB.h.

Int_t TCnaRunEB::fCodeEvSig [private]

Definition at line 160 of file TCnaRunEB.h.

Int_t TCnaRunEB::fCodeEvts [private]

Definition at line 108 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), and Init().

Int_t TCnaRunEB::fCodeHeaderAscii [private]

Definition at line 62 of file TCnaRunEB.h.

Referenced by fAsciiFileWriteHeader(), fCopy(), fMakeResultsFileName(), GetPathForResultsAsciiFiles(), and Init().

Int_t TCnaRunEB::fCodePrintAllComments [private]

Definition at line 235 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), CloseRootFile(), ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fCopy(), fT1dWriteAscii(), fT2dWriteAscii(), GetReadyToCompute(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), MakeHistosOfSamplesAsFunctionOfEvent(), OpenRootFile(), PrintAllComments(), and ~TCnaRunEB().

Int_t TCnaRunEB::fCodePrintComments [private]

Definition at line 235 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToCompute(), GetReadyToReadData(), Init(), PrintComments(), and ~TCnaRunEB().

Int_t TCnaRunEB::fCodePrintNoComment [private]

Definition at line 235 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), PrintNoComment(), WriteAsciiCnaChannelTable(), and WriteRootFile().

Int_t TCnaRunEB::fCodePrintWarnings [private]

Definition at line 235 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), PrintWarnings(), and ~TCnaRunEB().

Int_t TCnaRunEB::fCodeRoot [private]

Definition at line 63 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), GetPathForResultsRootFiles(), Init(), and WriteRootFile().

Int_t TCnaRunEB::fCodeSampTime [private]

Definition at line 74 of file TCnaRunEB.h.

Referenced by fCopy(), and Init().

Int_t TCnaRunEB::fCodeSigCorCss [private]

Definition at line 176 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), Init(), and WriteAsciiSigmasOfCorrelationsBetweenSamples().

Int_t TCnaRunEB::fCodeSigEv [private]

Definition at line 168 of file TCnaRunEB.h.

Int_t TCnaRunEB::fCodeSigSig [private]

Definition at line 172 of file TCnaRunEB.h.

Int_t TCnaRunEB::fCodeSvCorrecCovCss [private]

Definition at line 181 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), Init(), and WriteAsciiSvCorrecCovCss().

Int_t TCnaRunEB::fCodeVar [private]

Definition at line 98 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), Init(), and WriteAsciiVariancesOfSamples().

Int_t TCnaRunEB::fDim_name [private]

Definition at line 46 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), and Init().

ifstream TCnaRunEB::fFcin_ra [private]

Definition at line 213 of file TCnaRunEB.h.

Referenced by GetPathForResultsAsciiFiles().

ifstream TCnaRunEB::fFcin_rr [private]

Definition at line 212 of file TCnaRunEB.h.

Referenced by GetPathForResultsRootFiles().

ofstream TCnaRunEB::fFcout_f [private]

Definition at line 211 of file TCnaRunEB.h.

Referenced by fAsciiFileWriteHeader(), fT1dWriteAscii(), fT2dWriteAscii(), and WriteAsciiCnaChannelTable().

TString TCnaRunEB::fFileForResultsAsciiFilePath [private]

Definition at line 224 of file TCnaRunEB.h.

Referenced by fCopy(), and GetPathForResultsAsciiFiles().

TString TCnaRunEB::fFileForResultsRootFilePath [private]

Definition at line 223 of file TCnaRunEB.h.

Referenced by fCopy(), and GetPathForResultsRootFiles().

TCnaHeaderEB* TCnaRunEB::fFileHeader [private]

Definition at line 59 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fAsciiFileWriteHeader(), fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), fT2dWriteAscii(), GetAnalysisName(), GetFirstTakenEvent(), GetNentries(), GetNumberOfTakenEvents(), GetReadyToCompute(), GetReadyToReadData(), GetRunNumber(), GetSMNumber(), Init(), MakeHistosOfSampleDistributions(), MakeHistosOfSamplesAsFunctionOfEvent(), StartStopDate(), StartStopTime(), TRootCorCorrecCovCss(), TRootCorCss(), TRootCorMosccMot(), TRootCorSccMos(), TRootCovCorrecCovCss(), TRootCovCss(), TRootCovMosccMot(), TRootCovSccMos(), TRootEv(), TRootEvCorCss(), TRootEvEv(), TRootEvSig(), TRootEvts(), TRootEvtsXmax(), TRootEvtsXmin(), TRootLastEvtNumber(), TRootSampTime(), TRootSigCorCss(), TRootSigEv(), TRootSigSig(), TRootSvCorrecCovCss(), TRootTowerNumbers(), TRootVar(), WriteAsciiCnaChannelTable(), WriteRootFile(), and ~TCnaRunEB().

Int_t TCnaRunEB::fFlagPrint [private]

Definition at line 234 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), CloseRootFile(), ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fCopy(), fT1dWriteAscii(), fT2dWriteAscii(), GetReadyToCompute(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), MakeHistosOfSamplesAsFunctionOfEvent(), OpenRootFile(), PrintAllComments(), PrintComments(), PrintNoComment(), PrintWarnings(), WriteAsciiCnaChannelTable(), WriteRootFile(), and ~TCnaRunEB().

Int_t TCnaRunEB::fgMaxCar [private]

Definition at line 45 of file TCnaRunEB.h.

Referenced by GetPathForResultsAsciiFiles(), GetPathForResultsRootFiles(), Init(), and WriteRootFile().

Double_t* TCnaRunEB::fjustap_1d_cc [private]

Definition at line 206 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fjustap_1d_ev [private]

Definition at line 200 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fjustap_1d_ss [private]

Definition at line 209 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fjustap_1d_var [private]

Definition at line 203 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fjustap_2d_cc [private]

Definition at line 205 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fjustap_2d_ev [private]

Definition at line 199 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fjustap_2d_ss [private]

Definition at line 208 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fjustap_2d_var [private]

Definition at line 202 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), and ~TCnaRunEB().

Int_t TCnaRunEB::fMaxMsgIndexForMiscDiag [private]

Definition at line 57 of file TCnaRunEB.h.

Referenced by Init().

Int_t* TCnaRunEB::fMiscDiag [private]

Definition at line 55 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), ComputeSigmasOfExpectationValuesOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().

Int_t TCnaRunEB::fNbChanByLine [private]

Definition at line 229 of file TCnaRunEB.h.

Referenced by fT1dWriteAscii(), GetReadyToReadData(), WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteAsciiSvCorrecCovCss(), and WriteAsciiVariancesOfSamples().

Int_t TCnaRunEB::fNbOfMiscDiagCounters [private]

Definition at line 56 of file TCnaRunEB.h.

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

Int_t TCnaRunEB::fNbSampByLine [private]

Definition at line 230 of file TCnaRunEB.h.

Referenced by fT1dWriteAscii(), GetReadyToReadData(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSvCorrecCovCss(), and WriteAsciiVariancesOfSamples().

Bool_t TCnaRunEB::fOpenRootFile [private]

Definition at line 61 of file TCnaRunEB.h.

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

Int_t TCnaRunEB::fReadyToReadData [private]

Definition at line 66 of file TCnaRunEB.h.

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

TString TCnaRunEB::fRootFileName [private]

Definition at line 217 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), Init(), and WriteRootFile().

TString TCnaRunEB::fRootFileNameShort [private]

Definition at line 216 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), GetRootFileNameShort(), Init(), and WriteRootFile().

Int_t TCnaRunEB::fSectChanSizeX [private]

Definition at line 226 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), GetReadyToReadData(), and Init().

Int_t TCnaRunEB::fSectChanSizeY [private]

Definition at line 226 of file TCnaRunEB.h.

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

Int_t TCnaRunEB::fSectSampSizeX [private]

Definition at line 227 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), GetReadyToReadData(), Init(), WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), and WriteAsciiCovCorrecCovCss().

Int_t TCnaRunEB::fSectSampSizeY [private]

Definition at line 227 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), and WriteAsciiCovCorrecCovCss().

Int_t TCnaRunEB::fSpecialSMTowerNotIndexed [private]

Definition at line 68 of file TCnaRunEB.h.

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

Double_t* TCnaRunEB::fT1d_ev [private]

Definition at line 92 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_ev_cor_ss [private]

Definition at line 163 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfCorrelationsBetweenSamples(), fCopy(), fT1dWriteAscii(), Init(), TRootEvCorCss(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_ev_ev [private]

Definition at line 155 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfExpectationValuesOfSamples(), fCopy(), Init(), TRootEvEv(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_ev_sig [private]

Definition at line 159 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfSigmasOfSamples(), fCopy(), Init(), TRootEvSig(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fT1d_EvtNbInLoop [private]

Definition at line 81 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_his_s [private]

Definition at line 103 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fT1d_LastEvtNumber [private]

Definition at line 85 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_sig_cor_ss [private]

Definition at line 175 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfCorrelationsBetweenSamples(), fCopy(), fT1dWriteAscii(), Init(), TRootSigCorCss(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_sig_ev [private]

Definition at line 167 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfExpectationValuesOfSamples(), fCopy(), Init(), TRootSigEv(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_sig_sig [private]

Definition at line 171 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfSigmasOfSamples(), fCopy(), Init(), TRootSigSig(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fT1d_SMtowFromIndex [private]

Definition at line 88 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), TRootTowerNumbers(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_var [private]

Definition at line 97 of file TCnaRunEB.h.

Referenced by ComputeVariancesOfSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_xmax [private]

Definition at line 107 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT1d_xmin [private]

Definition at line 105 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fT1dCrysNumbersTable [private]

Definition at line 197 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT2d1_cor_cc_mos [private]

Definition at line 129 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannelsMeanOverSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT2d1_cor_moscc_mot [private]

Definition at line 139 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT2d1_cov_cc_mos [private]

Definition at line 124 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenChannelsMeanOverSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT2d1_cov_moscc_mot [private]

Definition at line 134 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT2d1_sv_correc_covss_s [private]

Definition at line 180 of file TCnaRunEB.h.

Referenced by ComputeCorrectionsToSamplesFromCovss(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_cor_cc_mos [private]

Definition at line 128 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), fCopy(), fT2dWriteAscii(), Init(), TRootCorSccMos(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_cor_moscc_mot [private]

Definition at line 138 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), fCopy(), Init(), TRootCorMosccMot(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_cov_cc_mos [private]

Definition at line 123 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), fCopy(), fT2dWriteAscii(), Init(), TRootCovSccMos(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_cov_moscc_mot [private]

Definition at line 133 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), fCopy(), Init(), TRootCovMosccMot(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_ev [private]

Definition at line 91 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeSigmasOfExpectationValuesOfSamples(), fCopy(), fT1dWriteAscii(), Init(), TRootEv(), and ~TCnaRunEB().

Int_t** TCnaRunEB::fT2d_EvtNbInLoop [private]

Definition at line 80 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_his_s [private]

Definition at line 102 of file TCnaRunEB.h.

Referenced by fCopy(), fT1dWriteAscii(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().

Int_t** TCnaRunEB::fT2d_LastEvtNumber [private]

Definition at line 84 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToCompute(), GetReadyToReadData(), Init(), PickupNumberOfEvents(), TRootLastEvtNumber(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_sv_correc_covss_s [private]

Definition at line 179 of file TCnaRunEB.h.

Referenced by ComputeCorrectionsToSamplesFromCovss(), fCopy(), fT1dWriteAscii(), Init(), TRootSvCorrecCovCss(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_var [private]

Definition at line 96 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fCopy(), fT1dWriteAscii(), Init(), TRootVar(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_xmax [private]

Definition at line 106 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), MakeHistosOfSampleDistributions(), TRootEvtsXmax(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT2d_xmin [private]

Definition at line 104 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), MakeHistosOfSampleDistributions(), TRootEvtsXmin(), and ~TCnaRunEB().

Int_t** TCnaRunEB::fT2dCrysNumbersTable [private]

Definition at line 196 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cor_cc [private]

Definition at line 119 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cor_correc_covss_s [private]

Definition at line 192 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cor_ss [private]

Definition at line 151 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cov_cc [private]

Definition at line 113 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cov_correc_covss_s [private]

Definition at line 186 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCovss(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_cov_ss [private]

Definition at line 145 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t* TCnaRunEB::fT3d1_distribs [private]

Definition at line 73 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cor_cc [private]

Definition at line 118 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cor_correc_covss_s [private]

Definition at line 191 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cor_ss [private]

Definition at line 150 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cov_cc [private]

Definition at line 112 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenChannels(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cov_correc_covss_s [private]

Definition at line 185 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCovss(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_cov_ss [private]

Definition at line 144 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenSamples(), fCopy(), Init(), and ~TCnaRunEB().

Double_t** TCnaRunEB::fT3d2_distribs [private]

Definition at line 72 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToCompute(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cor_cc [private]

Definition at line 117 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cor_correc_covss_s [private]

Definition at line 190 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), fCopy(), fT2dWriteAscii(), Init(), TRootCorCorrecCovCss(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cor_ss [private]

Definition at line 149 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), fCopy(), fT2dWriteAscii(), Init(), TRootCorCss(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cov_cc [private]

Definition at line 111 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), fCopy(), fT2dWriteAscii(), Init(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cov_correc_covss_s [private]

Definition at line 184 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCovss(), fCopy(), fT2dWriteAscii(), Init(), TRootCovCorrecCovCss(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_cov_ss [private]

Definition at line 143 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), ComputeCovariancesBetweenSamples(), fCopy(), fT2dWriteAscii(), Init(), TRootCovCss(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_distribs [private]

Definition at line 71 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), TRootSampTime(), and ~TCnaRunEB().

Double_t*** TCnaRunEB::fT3d_his_s [private]

Definition at line 101 of file TCnaRunEB.h.

Referenced by fCopy(), Init(), MakeHistosOfSampleDistributions(), TRootEvts(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCorCorrecCovCss [private]

Definition at line 194 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), fCopy(), GetReadyToReadData(), Init(), TRootCorCorrecCovCss(), WriteAsciiCorCorrecCovCss(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCorCss [private]

Definition at line 153 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), ComputeExpectationValuesOfCorrelationsBetweenSamples(), ComputeSigmasOfCorrelationsBetweenSamples(), fCopy(), GetReadyToReadData(), Init(), TRootCorCss(), WriteAsciiCorrelationsBetweenSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCorMosccMot [private]

Definition at line 141 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), fCopy(), GetReadyToReadData(), Init(), TRootCorMosccMot(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCorScc [private]

Definition at line 121 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), ComputeCorrelationsBetweenChannelsMeanOverSamples(), fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCorSccMos [private]

Definition at line 131 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannelsMeanOverSamples(), ComputeCorrelationsBetweenTowersMeanOverSamplesAndChannels(), fCopy(), GetReadyToReadData(), Init(), TRootCorSccMos(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCovCorrecCovCss [private]

Definition at line 188 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), fCopy(), GetReadyToReadData(), Init(), TRootCovCorrecCovCss(), WriteAsciiCovCorrecCovCss(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCovCss [private]

Definition at line 147 of file TCnaRunEB.h.

Referenced by ComputeCorrectionFactorsToCorss(), ComputeCorrectionFactorsToCovss(), ComputeCorrectionsToSamplesFromCovss(), ComputeCorrelationsBetweenSamples(), ComputeCovariancesBetweenSamples(), fCopy(), GetReadyToReadData(), Init(), TRootCovCss(), WriteAsciiCovariancesBetweenSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCovMosccMot [private]

Definition at line 136 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), fCopy(), GetReadyToReadData(), Init(), TRootCovMosccMot(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCovScc [private]

Definition at line 115 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenChannels(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenChannelsMeanOverSamples(), fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagCovSccMos [private]

Definition at line 126 of file TCnaRunEB.h.

Referenced by ComputeCovariancesBetweenChannelsMeanOverSamples(), ComputeCovariancesBetweenTowersMeanOverSamplesAndChannels(), fCopy(), GetReadyToReadData(), Init(), TRootCovSccMos(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEv [private]

Definition at line 94 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfExpectationValuesOfSamples(), ComputeExpectationValuesOfSamples(), ComputeSigmasOfExpectationValuesOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootEv(), WriteAsciiExpectationValuesOfSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEvCorCss [private]

Definition at line 165 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfCorrelationsBetweenSamples(), fCopy(), GetReadyToReadData(), Init(), TRootEvCorCss(), WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEvEv [private]

Definition at line 157 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfExpectationValuesOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootEvEv(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEvSig [private]

Definition at line 161 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfSigmasOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootEvSig(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEvtNbInLoop [private]

Definition at line 82 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagEvts [private]

Definition at line 109 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), TRootEvts(), TRootEvtsXmax(), TRootEvtsXmin(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagLastEvtNumber [private]

Definition at line 86 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), TRootLastEvtNumber(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagSampTime [private]

Definition at line 75 of file TCnaRunEB.h.

Referenced by GetReadyToReadData(), Init(), MakeHistosOfSamplesAsFunctionOfEvent(), TRootSampTime(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagSigCorCss [private]

Definition at line 177 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfCorrelationsBetweenSamples(), fCopy(), GetReadyToReadData(), Init(), TRootSigCorCss(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagSigEv [private]

Definition at line 169 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfExpectationValuesOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootSigEv(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagSigSig [private]

Definition at line 173 of file TCnaRunEB.h.

Referenced by ComputeSigmasOfSigmasOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootSigSig(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagSvCorrecCovCss [private]

Definition at line 182 of file TCnaRunEB.h.

Referenced by ComputeCorrectionsToSamplesFromCovss(), fCopy(), GetReadyToReadData(), Init(), TRootSvCorrecCovCss(), WriteAsciiSvCorrecCovCss(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagTowerNumbers [private]

Definition at line 89 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), fCopy(), GetReadyToReadData(), Init(), TRootTowerNumbers(), WriteRootFile(), and ~TCnaRunEB().

Int_t* TCnaRunEB::fTagVar [private]

Definition at line 99 of file TCnaRunEB.h.

Referenced by ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfSigmasOfSamples(), ComputeVariancesOfSamples(), fCopy(), GetReadyToReadData(), Init(), TRootVar(), WriteAsciiVariancesOfSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t TCnaRunEB::fTowerIndexBuilt [private]

Definition at line 69 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), and Init().

TString TCnaRunEB::fTTBELL [private]

Definition at line 53 of file TCnaRunEB.h.

Referenced by BuildEventDistributions(), CloseRootFile(), ComputeExpectationValuesOfSigmasOfSamples(), ComputeSigmasOfSigmasOfSamples(), fMakeResultsFileName(), GetPathForResultsAsciiFiles(), GetPathForResultsRootFiles(), GetReadyToCompute(), GetReadyToReadData(), Init(), MakeHistosOfSampleDistributions(), PickupNumberOfEvents(), WriteAsciiCorCorrecCovCss(), WriteAsciiCovCorrecCovCss(), WriteAsciiExpectationValuesOfCorrelationsBetweenSamples(), WriteAsciiExpectationValuesOfSamples(), WriteAsciiSigmasOfCorrelationsBetweenSamples(), WriteAsciiSvCorrecCovCss(), WriteAsciiVariancesOfSamples(), WriteRootFile(), and ~TCnaRunEB().

Int_t TCnaRunEB::fUserSamp [private]

Definition at line 231 of file TCnaRunEB.h.

Referenced by fCopy(), fT2dWriteAscii(), and Init().

Int_t TCnaRunEB::fUserSMEcha [private]

Definition at line 232 of file TCnaRunEB.h.

Referenced by fCopy(), fMakeResultsFileName(), fT1dWriteAscii(), fT2dWriteAscii(), Init(), WriteAsciiCorCorrecCovCss(), WriteAsciiCorrelationsBetweenSamples(), WriteAsciiCovariancesBetweenSamples(), and WriteAsciiCovCorrecCovCss().

TDistrib* TCnaRunEB::fVal_dat2 [private]

Definition at line 78 of file TCnaRunEB.h.

Referenced by fCopy(), GetReadyToCompute(), Init(), and ~TCnaRunEB().

TDistrib** TCnaRunEB::fVal_data [private]

Definition at line 77 of file TCnaRunEB.h.

Referenced by ComputeCorrelationsBetweenSamples(), ComputeCovariancesBetweenChannels(), ComputeCovariancesBetweenSamples(), ComputeExpectationValuesOfSamples(), ComputeVariancesOfSamples(), fCopy(), GetReadyToCompute(), Init(), MakeHistosOfSampleDistributions(), and ~TCnaRunEB().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:33:12 2009 for CMSSW by  doxygen 1.5.4