ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TileLasCalib Class Reference

#include <TileLasCalib.h>

Collaboration diagram for TileLasCalib:

Public Member Functions

 TileLasCalib ()
 
void setCalib (int type, double sumXinQDC, double sumX2inQDC, int nevts, int gain)
 
double getMean (int gain) const
 
double getSigma (int gain) const
 
int getType () const
 
int getN () const
 
bool isSet (int gain) const
 
 operator std::string () const
 Convertion operator to a std::string, can be used in a cast operation : (std::string) TileLaserDiode. More...
 

Private Attributes

double m_mean_LG
 
double m_sigma_LG
 
double m_mean_HG
 
double m_sigma_HG
 
int m_type
 
int m_nevts
 
bool m_isSet_LG
 
bool m_isSet_HG
 

Static Private Attributes

static const int HG = 1
 
static const int LG = 0
 

Detailed Description

Definition at line 18 of file TileLasCalib.h.

Constructor & Destructor Documentation

◆ TileLasCalib()

TileLasCalib::TileLasCalib ( )
inline

Definition at line 22 of file TileLasCalib.h.

23  : m_mean_LG(-99.)
24  , m_sigma_LG(-99.)
25  , m_mean_HG(-99.)
26  , m_sigma_HG(-99.)
27  , m_type(-1)
28  , m_nevts(0)
29  , m_isSet_LG(false)
30  , m_isSet_HG(false) { }

Member Function Documentation

◆ getMean()

double TileLasCalib::getMean ( int  gain) const
inline

Definition at line 59 of file TileLasCalib.h.

59  {
60  if(gain == LG) return m_mean_LG;
61  return m_mean_HG;
62  } // getMean

◆ getN()

int TileLasCalib::getN ( ) const
inline

Definition at line 93 of file TileLasCalib.h.

93  {
94  return m_nevts;
95  } // getN

◆ getSigma()

double TileLasCalib::getSigma ( int  gain) const
inline

Definition at line 67 of file TileLasCalib.h.

67  {
68  if(gain == LG) return m_sigma_LG;
69  return m_sigma_HG;
70  } // getSigma

◆ getType()

int TileLasCalib::getType ( ) const
inline

Definition at line 87 of file TileLasCalib.h.

87  {
88  return m_type;
89  } // getType

◆ isSet()

bool TileLasCalib::isSet ( int  gain) const
inline

Definition at line 97 of file TileLasCalib.h.

97  {
98  if(gain == LG) return m_isSet_LG;
99  if(gain == HG) return m_isSet_HG;
100  //if(gain != LG && gain != HG) return false;
101  return false;
102  } // isSet

◆ operator std::string()

TileLasCalib::operator std::string ( ) const

Convertion operator to a std::string, can be used in a cast operation : (std::string) TileLaserDiode.

Definition at line 18 of file TileLasCalib.cxx.

19 {
20  std::ostringstream text;
21  text << "TileLasCalib: ";
22  text << "type: " << m_type << " ";
23  text << "nevts: " << m_nevts << " ";
24  text << "LG mean/sig: " << m_mean_LG << " " << m_sigma_LG << " (" << m_isSet_LG << ") ";
25  text << "HG mean/sig: " << m_mean_HG << " " << m_sigma_HG << " (" << m_isSet_HG << ") ";
26  return text.str();
27 }

◆ setCalib()

void TileLasCalib::setCalib ( int  type,
double  sumXinQDC,
double  sumX2inQDC,
int  nevts,
int  gain 
)
inline

Definition at line 33 of file TileLasCalib.h.

33  {
34  if(nevts > 0 && !isSet(gain) && (gain == LG || gain == HG) ){
35  double tmp_mean = sumXinQDC / double(nevts);
36  double tmp_sigma = sqrt(sumX2inQDC / nevts - tmp_mean * tmp_mean);
37  tmp_mean = 8500. - tmp_mean; // CONVERT QDC TO ADC COUNTS
38  if(tmp_mean > 0){
39  if(gain == LG){
40  m_mean_LG = tmp_mean;
41  m_sigma_LG = tmp_sigma;
42  m_isSet_LG = true;
43  } else { // IF
44  m_mean_HG = tmp_mean;
45  m_sigma_HG = tmp_sigma;
46  m_isSet_HG = true;
47  } // ELSE
48  m_type = type;
49  m_nevts = nevts;
50  } // IF
51  } // IF
52  } // setPed

Member Data Documentation

◆ HG

const int TileLasCalib::HG = 1
staticprivate

Definition at line 112 of file TileLasCalib.h.

◆ LG

const int TileLasCalib::LG = 0
staticprivate

Definition at line 113 of file TileLasCalib.h.

◆ m_isSet_HG

bool TileLasCalib::m_isSet_HG
private

Definition at line 121 of file TileLasCalib.h.

◆ m_isSet_LG

bool TileLasCalib::m_isSet_LG
private

Definition at line 120 of file TileLasCalib.h.

◆ m_mean_HG

double TileLasCalib::m_mean_HG
private

Definition at line 116 of file TileLasCalib.h.

◆ m_mean_LG

double TileLasCalib::m_mean_LG
private

Definition at line 114 of file TileLasCalib.h.

◆ m_nevts

int TileLasCalib::m_nevts
private

Definition at line 119 of file TileLasCalib.h.

◆ m_sigma_HG

double TileLasCalib::m_sigma_HG
private

Definition at line 117 of file TileLasCalib.h.

◆ m_sigma_LG

double TileLasCalib::m_sigma_LG
private

Definition at line 115 of file TileLasCalib.h.

◆ m_type

int TileLasCalib::m_type
private

Definition at line 118 of file TileLasCalib.h.


The documentation for this class was generated from the following files:
TileLasCalib::m_nevts
int m_nevts
Definition: TileLasCalib.h:119
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
TileLasCalib::HG
static const int HG
Definition: TileLasCalib.h:112
TileLasCalib::m_isSet_LG
bool m_isSet_LG
Definition: TileLasCalib.h:120
TileLasCalib::isSet
bool isSet(int gain) const
Definition: TileLasCalib.h:97
TileLasCalib::m_isSet_HG
bool m_isSet_HG
Definition: TileLasCalib.h:121
TileLasCalib::m_type
int m_type
Definition: TileLasCalib.h:118
TileLasCalib::LG
static const int LG
Definition: TileLasCalib.h:113
TileLasCalib::m_mean_LG
double m_mean_LG
Definition: TileLasCalib.h:114
TileLasCalib::m_mean_HG
double m_mean_HG
Definition: TileLasCalib.h:116
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
sg-dump.nevts
nevts
Definition: sg-dump.py:146
TileLasCalib::m_sigma_HG
double m_sigma_HG
Definition: TileLasCalib.h:117
TileLasCalib::m_sigma_LG
double m_sigma_LG
Definition: TileLasCalib.h:115
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11