ATLAS Offline Software
TileCorrelation.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //*************************************************************************************
6 #ifndef TILERECUTILS_TILECORRELATION_H
7 #define TILERECUTILS_TILECORRELATION_H
8 
9 // Filename : TileCorrelation.h
10 // Author : C Cuenca
11 // Created : May 2004
12 
13 // DESCRIPTION
14 // Implementation of a class for correlation among digits calculation.
15 
16 // ************************************************************************************
17 
20 
21 class TileHWID;
22 
23 #include <vector>
24 #include <string>
25 #include <fstream>
26 
27 
29  : public AthMessaging
30 {
31  public:
34  void setCorrelationZero(int dignum);
35  void setCorrelationDelta(int dignum);
36 
37  void sum(std::vector<double> &digits, int ros, int drawer, int channel, int gain, int &dignum);
38 
39  void runningCorrelation(std::vector<double> &digits, int ros, int drawer, int channel, int gain,
40  int &dignum, int chthres);
41 
42  void calculateCorrelation(int dignum);
43  void calculateRunningCorrelation(int dignum, int chthres, bool is7to9);
44  void printCorrelation(int dignum);
45  void saveCorrelationSumm(bool deltaCorrelation, const std::string& correlationSummOptFilterFile,
46  const TileHWID *tileHWID, int dignum);
47 
48  void saveCorrelationMatrix(bool deltaCorrelation, const std::string& correlationMatrixOptFilterFile,
49  const TileHWID *tileHWID, int dignum);
50 
51  void calculateWeights(bool deltaCorrelation,
52  const std::vector<double>& shapeFormLG,
53  const std::vector<double>& shapeFormHG,
54  const std::vector<double>& shapeFormDerivativeLG,
55  const std::vector<double>& shapeFormDerivativeHG,
56  const std::string& aiLoOptFilterFile,
57  const std::string& biLoOptFilterFile,
58  const std::string& aiHiOptFilterFile,
59  const std::string& biHiOptFilterFile,
60  const TileHWID *tileHWID, int dignum);
61 
62  void buildPulseShape(std::vector<double> &pulseShape, std::vector<double> &pulseShapeY,
63  std::vector<double> &pulseShapeT, int dignum);
64 
65 
66  private:
67  //double SS(9,9);
68  double m_SS[4][64][48][2][9][9];
69  double m_S[4][64][48][2][9];
70  double m_R[4][64][48][2][9][9];
71  //int N_events[4][64][48][2];
72 
73  double m_corr[9];
74  double m_corrSum[4][64][48][2][9];
75  double m_corrSum2[4][64][48][2][9];
76  double m_nCorr;
77  int m_N[4][64][48][2];
78  int m_jEntry;
79  int m_lag;
80  int m_nPairs[4][64][48][2][9];
81  double m_nD;
82  double m_S1[4][64][48][2][9];
83  double m_S2[4][64][48][2][9];
84  double m_S11[4][64][48][2][9];
85  double m_S12[4][64][48][2][9];
86  double m_S22[4][64][48][2][9];
87 };
88 
89 
90 #endif // TILERECUTILS_TILECORRELATION_H
TileCorrelation::calculateRunningCorrelation
void calculateRunningCorrelation(int dignum, int chthres, bool is7to9)
Definition: TileCorrelation.cxx:283
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
TileCorrelation::m_S
double m_S[4][64][48][2][9]
Definition: TileCorrelation.h:69
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
TileCorrelation::calculateWeights
void calculateWeights(bool deltaCorrelation, const std::vector< double > &shapeFormLG, const std::vector< double > &shapeFormHG, const std::vector< double > &shapeFormDerivativeLG, const std::vector< double > &shapeFormDerivativeHG, const std::string &aiLoOptFilterFile, const std::string &biLoOptFilterFile, const std::string &aiHiOptFilterFile, const std::string &biHiOptFilterFile, const TileHWID *tileHWID, int dignum)
Definition: TileCorrelation.cxx:496
TileCorrelation::m_R
double m_R[4][64][48][2][9][9]
Definition: TileCorrelation.h:70
TileCorrelation::sum
void sum(std::vector< double > &digits, int ros, int drawer, int channel, int gain, int &dignum)
Definition: TileCorrelation.cxx:121
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
TileCorrelation::saveCorrelationMatrix
void saveCorrelationMatrix(bool deltaCorrelation, const std::string &correlationMatrixOptFilterFile, const TileHWID *tileHWID, int dignum)
Definition: TileCorrelation.cxx:432
TileCorrelation::m_S1
double m_S1[4][64][48][2][9]
Definition: TileCorrelation.h:82
TileCorrelation::m_S22
double m_S22[4][64][48][2][9]
Definition: TileCorrelation.h:86
TileCorrelation::m_S11
double m_S11[4][64][48][2][9]
Definition: TileCorrelation.h:84
TileCorrelation::calculateCorrelation
void calculateCorrelation(int dignum)
Definition: TileCorrelation.cxx:162
TileCorrelation::m_nD
double m_nD
Definition: TileCorrelation.h:81
TileCorrelation::saveCorrelationSumm
void saveCorrelationSumm(bool deltaCorrelation, const std::string &correlationSummOptFilterFile, const TileHWID *tileHWID, int dignum)
Definition: TileCorrelation.cxx:368
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileCorrelation::m_corr
double m_corr[9]
Definition: TileCorrelation.h:73
TileCorrelation::buildPulseShape
void buildPulseShape(std::vector< double > &pulseShape, std::vector< double > &pulseShapeY, std::vector< double > &pulseShapeT, int dignum)
Definition: TileCorrelation.cxx:741
TileCorrelation::m_jEntry
int m_jEntry
Definition: TileCorrelation.h:78
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileCorrelation::m_nPairs
int m_nPairs[4][64][48][2][9]
Definition: TileCorrelation.h:80
TileCorrelation::m_nCorr
double m_nCorr
Definition: TileCorrelation.h:76
TileCorrelation::m_S2
double m_S2[4][64][48][2][9]
Definition: TileCorrelation.h:83
TileCorrelation::setCorrelationZero
void setCorrelationZero(int dignum)
Definition: TileCorrelation.cxx:65
TileCorrelation::printCorrelation
void printCorrelation(int dignum)
Definition: TileCorrelation.cxx:342
TileCorrelation::TileCorrelation
TileCorrelation()
Definition: TileCorrelation.cxx:37
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TileCorrelation::m_corrSum
double m_corrSum[4][64][48][2][9]
Definition: TileCorrelation.h:74
TileCorrelation::m_SS
double m_SS[4][64][48][2][9][9]
Definition: TileCorrelation.h:68
TileCorrelation::m_corrSum2
double m_corrSum2[4][64][48][2][9]
Definition: TileCorrelation.h:75
TileCorrelation::m_S12
double m_S12[4][64][48][2][9]
Definition: TileCorrelation.h:85
TileCorrelation::m_N
int m_N[4][64][48][2]
Definition: TileCorrelation.h:77
AthMessaging.h
TileCorrelation::m_lag
int m_lag
Definition: TileCorrelation.h:79
TileCorrelation::setCorrelationDelta
void setCorrelationDelta(int dignum)
Definition: TileCorrelation.cxx:102
TileCorrelation
Definition: TileCorrelation.h:30
TileCorrelation::~TileCorrelation
~TileCorrelation()
Definition: TileCorrelation.cxx:61
TileCorrelation::runningCorrelation
void runningCorrelation(std::vector< double > &digits, int ros, int drawer, int channel, int gain, int &dignum, int chthres)
Definition: TileCorrelation.cxx:212