Go to the documentation of this file.00001 #ifndef CL_TEcnaRun_H
00002 #define CL_TEcnaRun_H
00003
00004
00005 #include <memory>
00006 #include <iostream>
00007 #include <fstream>
00008 #include <iomanip>
00009 #include <string>
00010 #include <vector>
00011 #include <time.h>
00012 #include <math.h>
00013 #include <stdio.h>
00014 #include "Riostream.h"
00015
00016
00017 #include "TObject.h"
00018 #include "TSystem.h"
00019 #include "TString.h"
00020 #include "TVectorD.h"
00021
00022
00023 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaObject.h"
00024 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParEcal.h"
00025 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaHeader.h"
00026 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParCout.h"
00027 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaParPaths.h"
00028 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRead.h"
00029 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaWrite.h"
00030 #include "CalibCalorimetry/EcalCorrelatedNoiseAnalysisAlgos/interface/TEcnaRootFile.h"
00031
00362
00363 class TEcnaRun: public TObject {
00364
00365 private:
00366
00367
00368
00369 Int_t fgMaxCar;
00370
00371 Int_t fCnaCommand, fCnaError;
00372
00373 Int_t fCnew;
00374 Int_t fCdelete;
00375
00376 TString fTTBELL;
00377
00378 Int_t* fMiscDiag;
00379 Int_t fNbOfMiscDiagCounters;
00380 Int_t fMaxMsgIndexForMiscDiag;
00381
00382 TEcnaObject *fObjectManager;
00383 TEcnaHeader *fFileHeader;
00384 TEcnaParEcal *fEcal;
00385 TEcnaNumbering *fEcalNumbering;
00386 TEcnaParCout *fCnaParCout;
00387 TEcnaParPaths *fCnaParPaths;
00388 TEcnaWrite *fCnaWrite;
00389
00390
00391
00392 TString fFlagSubDet;
00393 TString fStexName, fStinName;
00394
00395 Bool_t fOpenRootFile;
00396 Int_t fReadyToReadData;
00397
00398 TString fRootFileName;
00399 TString fRootFileNameShort;
00400 TString fNewRootFileName;
00401 TString fNewRootFileNameShort;
00402
00403 Int_t fSpecialStexStinNotIndexed;
00404 Int_t fStinIndexBuilt;
00405 Int_t fBuildEvtNotSkipped;
00406
00407 Int_t fNbSampForFic;
00408 Int_t fNbSampForCalc;
00409
00410 Int_t fNumberOfEvents;
00411
00412 Int_t fMemoReadNumberOfEventsforSamples;
00413
00414 Double_t*** fT3d_AdcValues;
00415 Double_t** fT3d2_AdcValues;
00416 Double_t* fT3d1_AdcValues;
00417 Int_t* fTagAdcEvt;
00418
00419 Int_t** fT2d_NbOfEvts;
00420 Int_t* fT1d_NbOfEvts;
00421 Int_t* fTagNbOfEvts;
00422
00423 Int_t* fT1d_StexStinFromIndex;
00424 Int_t* fTagStinNumbers;
00425
00426 Double_t** fT2d_ev;
00427 Double_t* fT1d_ev;
00428 Int_t* fTagMSp;
00429
00430 Double_t** fT2d_sig;
00431 Double_t* fT1d_sig;
00432 Int_t* fTagSSp;
00433
00434 Double_t*** fT3d_cov_ss;
00435 Double_t** fT3d2_cov_ss;
00436 Double_t* fT3d1_cov_ss;
00437 Int_t* fTagCovCss;
00438
00439 Double_t*** fT3d_cor_ss;
00440 Double_t** fT3d2_cor_ss;
00441 Double_t* fT3d1_cor_ss;
00442 Int_t* fTagCorCss;
00443
00444
00445 Double_t* fT1d_ev_ev;
00446 Int_t* fTagPed;
00447 Double_t* fT1d_av_mped;
00448 Int_t* fTagAvPed;
00449
00450 Double_t* fT1d_evsamp_of_sigevt;
00451 Int_t* fTagTno;
00452 Double_t* fT1d_av_totn;
00453 Int_t* fTagAvTno;
00454
00455 Double_t* fT1d_ev_cor_ss;
00456 Int_t* fTagMeanCorss;
00457 Double_t* fT1d_av_ev_corss;
00458 Int_t* fTagAvMeanCorss;
00459
00460 Double_t* fT1d_sigevt_of_evsamp;
00461 Int_t* fTagLfn;
00462 Double_t* fT1d_av_lofn;
00463 Int_t* fTagAvLfn;
00464
00465 Double_t* fT1d_evevt_of_sigsamp;
00466 Int_t* fTagHfn;
00467 Double_t* fT1d_av_hifn;
00468 Int_t* fTagAvHfn;
00469
00470 Double_t* fT1d_sig_cor_ss;
00471 Int_t* fTagSigCorss;
00472 Double_t* fT1d_av_sig_corss;
00473 Int_t* fTagAvSigCorss;
00474
00475
00476 Double_t** fT2d_lf_cov;
00477 Double_t* fT2d1_lf_cov;
00478 Int_t* fTagLfCov;
00479
00480 Double_t** fT2d_lf_cor;
00481 Double_t* fT2d1_lf_cor;
00482 Int_t* fTagLfCor;
00483
00484
00485 Double_t** fT2d_hf_cov;
00486 Double_t* fT2d1_hf_cov;
00487 Int_t* fTagHfCov;
00488
00489 Double_t** fT2d_hf_cor;
00490 Double_t* fT2d1_hf_cor;
00491 Int_t* fTagHfCor;
00492
00493
00494 Double_t** fT2d_lfcc_mostins;
00495 Double_t* fT2d1_lfcc_mostins;
00496 Int_t* fTagLFccMoStins;
00497
00498 Double_t** fT2d_hfcc_mostins;
00499 Double_t* fT2d1_hfcc_mostins;
00500 Int_t* fTagHFccMoStins;
00501
00502
00503
00504 Int_t** fT2dCrysNumbersTable;
00505 Int_t* fT1dCrysNumbersTable;
00506
00507 ofstream fFcout_f;
00508
00509 Int_t fFlagPrint;
00510 Int_t fCodePrintComments, fCodePrintWarnings, fCodePrintAllComments, fCodePrintNoComment;
00511
00512
00513 public:
00514
00515
00516
00517 TEcnaRun();
00518 TEcnaRun(TEcnaObject*, const TString);
00519 TEcnaRun(TEcnaObject*, const TString, const Int_t&);
00520
00521
00522
00523
00524
00525 TEcnaRun(const TEcnaRun&);
00526
00527
00528
00529
00530
00531
00532
00533 virtual ~TEcnaRun();
00534
00535
00536
00537 void Init();
00538
00539 void SetEcalSubDetector(const TString);
00540
00541 Bool_t GetPathForResults();
00542
00543 Bool_t OpenRootFile(const Text_t *, TString);
00544 Bool_t CloseRootFile(const Text_t *);
00545
00546
00547 void GetReadyToReadData(TString, const Int_t&, const Int_t&, const Int_t&, const Int_t&, const Int_t&);
00548 void GetReadyToReadData(TString, const Int_t&, const Int_t&, const Int_t&, const Int_t&, const Int_t&, const Int_t&);
00549
00550 Bool_t GetSampleAdcValues(const Int_t&, const Int_t&, const Int_t&, const Int_t&, const Double_t&);
00551 Bool_t ReadSampleAdcValues();
00552 Bool_t ReadSampleAdcValues(const Int_t&);
00553
00554 void StartStopDate(TString, TString);
00555 void StartStopTime(time_t, time_t);
00556
00557
00558
00559 void StandardCalculations();
00560
00561 void SampleMeans();
00562
00563 void SampleSigmas();
00564
00565
00566 void CovariancesBetweenSamples();
00567
00568 void CorrelationsBetweenSamples();
00569
00570
00571 void Pedestals();
00572 void TotalNoise();
00573 void LowFrequencyNoise();
00574 void HighFrequencyNoise();
00575 void MeanCorrelationsBetweenSamples();
00576 void SigmaOfCorrelationsBetweenSamples();
00577
00578
00579 void AveragePedestals();
00580 void AverageTotalNoise();
00581 void AverageLowFrequencyNoise();
00582 void AverageHighFrequencyNoise();
00583 void AverageMeanCorrelationsBetweenSamples();
00584 void AverageSigmaOfCorrelationsBetweenSamples();
00585
00586
00587
00588
00589
00590
00591
00592
00593 void Expert1Calculations();
00594
00595 void LowFrequencyCovariancesBetweenChannels();
00596 void HighFrequencyCovariancesBetweenChannels();
00597
00598 void LowFrequencyCorrelationsBetweenChannels();
00599 void HighFrequencyCorrelationsBetweenChannels();
00600
00601
00602 void Expert2Calculations();
00603
00604 void LowFrequencyMeanCorrelationsBetweenTowers();
00605 void HighFrequencyMeanCorrelationsBetweenTowers();
00606
00607 void LowFrequencyMeanCorrelationsBetweenSCs();
00608 void HighFrequencyMeanCorrelationsBetweenSCs();
00609
00610
00611
00612 void GetReadyToCompute();
00613 void SampleValues();
00614
00615
00616 void LowFrequencyMeanCorrelationsBetweenStins();
00617 void HighFrequencyMeanCorrelationsBetweenStins();
00618
00619
00620 TString GetRootFileName();
00621 TString GetRootFileNameShort();
00622 TString GetNewRootFileName();
00623 TString GetNewRootFileNameShort();
00624
00625 Bool_t WriteRootFile();
00626 Bool_t WriteNewRootFile(const TString);
00627 Bool_t WriteRootFile(const Text_t *, Int_t&);
00628
00629 void TRootStinNumbers();
00630 void TRootNbOfEvts(const Int_t&);
00631
00632 void TRootAdcEvt(const Int_t&, const Int_t&);
00633
00634 void TRootMSp(const Int_t&);
00635 void TRootSSp(const Int_t&);
00636
00637 void TRootCovCss(const Int_t&, const Int_t&);
00638 void TRootCorCss(const Int_t&, const Int_t&);
00639
00640 void TRootLfCov();
00641 void TRootLfCor();
00642
00643 void TRootHfCov();
00644 void TRootHfCor();
00645
00646 void TRootLFccMoStins();
00647 void TRootHFccMoStins();
00648
00649 void TRootPed();
00650 void TRootTno();
00651 void TRootMeanCorss();
00652
00653 void TRootLfn();
00654 void TRootHfn();
00655 void TRootSigCorss();
00656
00657 void TRootAvPed();
00658 void TRootAvEvCorss();
00659 void TRootAvSigCorss();
00660 void TRootAvTno();
00661 void TRootAvLfn();
00662 void TRootAvHfn();
00663
00664
00665 void PrintNoComment();
00666
00667 void PrintWarnings();
00668 void PrintComments();
00669
00670 void PrintAllComments();
00671
00672 ClassDef(TEcnaRun,1)
00673 };
00674
00675 #endif // CL_TEcnaRun_H
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685
00686