ATLAS Offline Software
TileTTL1Cell.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 //***************************************************************************
8 // Filename : TileTTL1Cell.h
9 // Author : Ed Frank, Ambreesh Gupta
10 // : University of Chicago
11 //
12 //
13 // DESCRIPTION:
14 // TTL1Cell is the class for Tile Level 1 Trigger Towers where the energy and time are build from Tile cells
15 // This container is to add the L1Calo calibration where they can compare their tower energy to the tower energy
16 // from Tile's readout
17 // Each tower is contains a sum of Tile cells energies
18 // The time is the average time of all cells
19 // the correction factor is any pC to GeV correction factors that L1-Calo wants to account for separately
20 // the quality factor is defined as
21 // bit [0] -- individual PMTs bad
22 // bit [1] -- at least one cell bad
23 // bit [2] -- full tower is bad
24 // HISTORY:
25 //
26 // BUGS:
27 //
28 // ***************************************************************************
29 
30 #ifndef TILEEVENT_TILETTL1CELL_H
31 #define TILEEVENT_TILETTL1CELL_H
32 
33 #include "Identifier/Identifier.h"
34 
35 #include <string>
36 
37 class TileTTL1Cell {
38 
39 public:
40 
42  enum QUALITY_BITS {
43  MASK_BADTOWER = 0x04,
44  MASK_BADCELL = 0x02,
45  MASK_BADCHAN = 0x01,
46 
49  SHIFT_BADCHAN = 0
50  };
51 
54  : m_eneTower(0.0),
55  m_timeAve(0.0),
56  m_corrFactor(0.0),
57  m_quality(0)
58  {}
59 
61  TileTTL1Cell(const Identifier& id,
62  float energy, float time, float correction_factor,
63  uint16_t quality);
64 
66  ~TileTTL1Cell() = default;
67 
70  void setEnergy(float ene);
72  void setTime(float tave);
74  void setCorrectionFactor(float corrfact);
76  void setQuality(uint16_t qual);
77 
80  const Identifier & TTL1_ID() const;
81  inline Identifier identify(void) const { return m_ID; }
82 
84  inline float eneTower(void) const { return m_eneTower; }
86  inline float timeAve(void) const { return m_timeAve; }
88  inline float corrFactor(void) const { return m_corrFactor; }
90  inline uint16_t qualTower(void) const { return m_quality; }
91 
93  bool cellbad (void) const { return ((m_quality&TileTTL1Cell::MASK_BADCELL) != 0); }
95  bool towerbad (void) const { return ((m_quality&TileTTL1Cell::MASK_BADTOWER) != 0); }
97  bool chanbad (void) const { return ((m_quality&TileTTL1Cell::MASK_BADCHAN) != 0); }
98 
100  std::string whoami (void) const { return "TileTTL1Cell"; }
102  void print (void) const;
105  operator std::string() const;
106 
107 private:
108 
112  float m_eneTower;
114  float m_timeAve;
116  float m_corrFactor;
119 
120 
121 };
122 
123 #endif // TILEEVENT_TILETTL1CELL_H
TileTTL1Cell::cellbad
bool cellbad(void) const
check if tower has bad cell
Definition: TileTTL1Cell.h:93
TileTTL1Cell::MASK_BADCELL
@ MASK_BADCELL
Definition: TileTTL1Cell.h:44
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
TileTTL1Cell::~TileTTL1Cell
~TileTTL1Cell()=default
destructor
TileTTL1Cell::SHIFT_BADTOWER
@ SHIFT_BADTOWER
Definition: TileTTL1Cell.h:47
TileTTL1Cell::setCorrectionFactor
void setCorrectionFactor(float corrfact)
set correction factor
Definition: TileTTL1Cell.cxx:62
TileTTL1Cell::timeAve
float timeAve(void) const
get time average for all cells in tower (data member)
Definition: TileTTL1Cell.h:86
TileTTL1Cell
Definition: TileTTL1Cell.h:37
TileTTL1Cell::corrFactor
float corrFactor(void) const
get tower correction factor (data member)
Definition: TileTTL1Cell.h:88
TileTTL1Cell::chanbad
bool chanbad(void) const
check if a pmt is bad
Definition: TileTTL1Cell.h:97
TileTTL1Cell::setQuality
void setQuality(uint16_t qual)
set quality bits for one tower
Definition: TileTTL1Cell.cxx:66
TileTTL1Cell::MASK_BADCHAN
@ MASK_BADCHAN
Definition: TileTTL1Cell.h:45
TileTTL1Cell::identify
Identifier identify(void) const
Definition: TileTTL1Cell.h:81
TileTTL1Cell::setTime
void setTime(float tave)
set average cell time
Definition: TileTTL1Cell.cxx:58
TileTTL1Cell::whoami
std::string whoami(void) const
get name of the object
Definition: TileTTL1Cell.h:100
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:88
TileTTL1Cell::SHIFT_BADCELL
@ SHIFT_BADCELL
Definition: TileTTL1Cell.h:48
TileTTL1Cell::m_eneTower
float m_eneTower
eneTower = sum of cell energies
Definition: TileTTL1Cell.h:112
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
TileTTL1Cell::m_timeAve
float m_timeAve
timeAve = time average of cell times.
Definition: TileTTL1Cell.h:114
TileTTL1Cell::m_ID
Identifier m_ID
ID = trigger tower id.
Definition: TileTTL1Cell.h:110
TileTTL1Cell::towerbad
bool towerbad(void) const
check if tower is bad
Definition: TileTTL1Cell.h:95
TileTTL1Cell::TTL1_ID
const Identifier & TTL1_ID() const
all get methods
Definition: TileTTL1Cell.cxx:75
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
TileTTL1Cell::qualTower
uint16_t qualTower(void) const
get quality factor for (data member)
Definition: TileTTL1Cell.h:90
TileTTL1Cell::QUALITY_BITS
QUALITY_BITS
definition of various bits in quality
Definition: TileTTL1Cell.h:42
beamspotman.qual
qual
Definition: beamspotman.py:481
TileTTL1Cell::MASK_BADTOWER
@ MASK_BADTOWER
Definition: TileTTL1Cell.h:43
TileTTL1Cell::eneTower
float eneTower(void) const
get energy for tower (data member)
Definition: TileTTL1Cell.h:84
TileTTL1Cell::SHIFT_BADCHAN
@ SHIFT_BADCHAN
Definition: TileTTL1Cell.h:49