ATLAS Offline Software
TileTTL1Cell.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //*****************************************************************************
6 // Filename : TileTTL1Cell.cxx
7 // Author : Monica Dunford
8 // Created : Nov, 2009
9 //
10 // DESCRIPTION:
11 // Implementation comments only. Class level comments go in .h file.
12 //
13 // HISTORY:
14 //
15 //
16 //
17 // BUGS:
18 //
19 //
20 //*****************************************************************************
21 
22 #include "TileEvent/TileTTL1Cell.h"
24 
25 #include "CaloIdentifier/TileID.h"
26 #include "CaloDetDescr/CaloDetDescrElement.h"
27 
28 #include <iostream>
29 #include <sstream>
30 #include <iomanip>
31 
32 // get cabling
33 namespace {
34 const TileCablingService * const s_cabling = TileCablingService::getInstance();
35 }
36 
37 //=========================
38 // Constructors
39 //=========================
41  float energy, float time, float correction_factor,
42  uint16_t quality)
43  : m_ID(id)
44  , m_eneTower(energy)
45  , m_timeAve(time)
46  , m_corrFactor(correction_factor)
47  , m_quality(quality)
48 {
49 }
50 
51 //=========================
52 // Set attributes
53 //=========================
54 void TileTTL1Cell::setEnergy(float ene)
55 {
56  m_eneTower = ene;
57 }
58 void TileTTL1Cell::setTime(float tave)
59 {
60  m_timeAve = tave;
61 }
63 {
64  m_corrFactor = corrfact;
65 }
67 {
68  m_quality = qual;
69 }
70 
71 //=========================
72 // Return attributes
73 //=========================
74 /* return Identifier */
76  return m_ID;
77 }
78 
79 //=========================
80 // Supporting functions
81 //=========================
82 
83 void TileTTL1Cell::print() const
84 {
85  std::cout << (std::string) (*this) << std::endl;
86 }
87 
88 TileTTL1Cell::operator std::string() const
89 {
90  std::ostringstream text(std::ostringstream::out);
91 
92  text << whoami();
93  if (s_cabling->getTileTBID()->is_tiletb(m_ID)) {
94  text << "MBTS Id = " << s_cabling->getTileTBID()->to_string(m_ID);
95  } else {
96  text << " Id = " << s_cabling->getCaloLVL1_ID()->show_to_string(m_ID);
97  }
98  text << " tower ene = " << eneTower();
99  text << " ave time = " << timeAve();
100  text << " correction factor = " << corrFactor();
101  text << " qual = " << qualTower();
102 
103  return text.str();
104 }
105 
TileTTL1Cell::setEnergy
void setEnergy(float ene)
all set methods
Definition: TileTTL1Cell.cxx:54
TileTTL1Cell::print
void print(void) const
print all cell data memebers to stdout
Definition: TileTTL1Cell.cxx:83
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
TileTTL1Cell::setCorrectionFactor
void setCorrectionFactor(float corrfact)
set correction factor
Definition: TileTTL1Cell.cxx:62
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TileTTL1Cell::setQuality
void setQuality(uint16_t qual)
set quality bits for one tower
Definition: TileTTL1Cell.cxx:66
TileID.h
TileTTL1Cell::setTime
void setTime(float tave)
set average cell time
Definition: TileTTL1Cell.cxx:58
TileTTL1Cell::TileTTL1Cell
TileTTL1Cell()
default constructor
Definition: TileTTL1Cell.h:53
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
TileCablingService.h
TileTTL1Cell::m_eneTower
float m_eneTower
eneTower = sum of cell energies
Definition: TileTTL1Cell.h:112
TileTTL1Cell::m_timeAve
float m_timeAve
timeAve = time average of cell times.
Definition: TileTTL1Cell.h:114
TileCablingService
Definition: TileCablingService.h:23
TileTTL1Cell::m_ID
Identifier m_ID
ID = trigger tower id.
Definition: TileTTL1Cell.h:110
TileTTL1Cell::TTL1_ID
const Identifier & TTL1_ID() const
all get methods
Definition: TileTTL1Cell.cxx:75
TileTTL1Cell.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:227
TileTTL1Cell::m_quality
uint16_t m_quality
quality = quality bit for cell and PMTs in tower
Definition: TileTTL1Cell.h:118
TileTTL1Cell::m_corrFactor
float m_corrFactor
corrFactor = energy correction factors applied to tower
Definition: TileTTL1Cell.h:116
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
beamspotman.qual
qual
Definition: beamspotman.py:481
Identifier
Definition: IdentifierFieldParser.cxx:14