ATLAS Offline Software
Loading...
Searching...
No Matches
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
38
39public:
40
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
107private:
108
114 float m_timeAve;
118 uint16_t m_quality;
119
120
121};
122
123#endif // TILEEVENT_TILETTL1CELL_H
uint16_t qualTower(void) const
get quality factor for (data member)
float corrFactor(void) const
get tower correction factor (data member)
void setTime(float tave)
set average cell time
const Identifier & TTL1_ID() const
all get methods
bool towerbad(void) const
check if tower is bad
~TileTTL1Cell()=default
destructor
bool cellbad(void) const
check if tower has bad cell
QUALITY_BITS
definition of various bits in quality
float eneTower(void) const
get energy for tower (data member)
uint16_t m_quality
quality = quality bit for cell and PMTs in tower
float m_corrFactor
corrFactor = energy correction factors applied to tower
Identifier identify(void) const
void setEnergy(float ene)
all set methods
void setQuality(uint16_t qual)
set quality bits for one tower
float m_eneTower
eneTower = sum of cell energies
void setCorrectionFactor(float corrfact)
set correction factor
float timeAve(void) const
get time average for all cells in tower (data member)
float m_timeAve
timeAve = time average of cell times.
bool chanbad(void) const
check if a pmt is bad
Identifier m_ID
ID = trigger tower id.
void print(void) const
print all cell data memebers to stdout
TileTTL1Cell()
default constructor
std::string whoami(void) const
get name of the object