ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
TileL2 Class Reference

Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs. More...

#include <TileL2.h>

Collaboration diagram for TileL2:

Public Member Functions

 TileL2 ()
 Constructor. More...
 
 TileL2 (int id)
 Constructor. More...
 
 TileL2 (int id, float)
 Obsolete constructor - will be removed soon. More...
 
void setMu (const std::vector< float > &eta, const std::vector< float > &enemu0, const std::vector< float > &enemu1, const std::vector< float > &enemu2, const std::vector< unsigned int > &qual, const std::vector< unsigned int > &val)
 Set Muon Info in TileL2. More...
 
void setMu (std::vector< float > &&eta, std::vector< float > &&enemu0, std::vector< float > &&enemu1, std::vector< float > &&enemu2, std::vector< unsigned int > &&qual, std::vector< unsigned int > &&val)
 
void setEt (std::vector< float > &&sumE)
 Set sumE vector in TileL2. More...
 
int identify (void) const
 Return Identifier. More...
 
unsigned int Ndata () const
 Return number of data words. More...
 
unsigned int val (unsigned int i) const
 Return Data. More...
 
const std::vector< unsigned int > & val () const
 
unsigned int NMuons () const
 Return number of muons. More...
 
float eta (unsigned int ind) const
 Return eta (computed as the average of the eta values of the TileCal cells where the muon goes through) More...
 
const std::vector< float > & eta () const
 
float phi (unsigned int) const
 Return phi (average value at the TileCal radius) More...
 
float cosphi () const
 Return cos(phi) More...
 
float sinphi () const
 Return sin(phi) More...
 
float enemu0 (unsigned int ind) const
 Return energy deposited in innermost layer (A cells) More...
 
const std::vector< float > & enemu0 () const
 
float enemu1 (unsigned int ind) const
 Return energy deposited in central layer (BC cells) More...
 
const std::vector< float > & enemu1 () const
 
float enemu2 (unsigned int ind) const
 Return energy deposited in outermost layer (D cells) More...
 
const std::vector< float > & enemu2 () const
 
unsigned int qual (unsigned int ind) const
 Return quality flag (0 or 1): set to 0 if the "energy deposition path" is MIP like in all three samples, set to 1 if the "energy deposition path" is MIP like in two samples and a larger energy deposition is found in the remaining cell. More...
 
const std::vector< unsigned int > & qual () const
 
unsigned int NsumE () const
 Return number of sumE words. More...
 
float Ex () const
 Return Ex in a TileCal superdrawer (ROD-based) More...
 
float Ey () const
 Return Ey in a TileCal superdrawer (ROD-based) More...
 
float Ez () const
 Return Ez in a TileCal superdrawer (ROD-based) More...
 
float Et () const
 Return total Et in a TileCal superdrawer (ROD-based) More...
 
float sumEt () const
 
float sumEz () const
 Return sumEz in a TileCal superdrawer (ROD-based) More...
 
float sumE () const
 Return sumE in a TileCal superdrawer (ROD-based) More...
 
float sumE (unsigned int ind) const
 Return sumE i-th element. More...
 
const std::vector< float > & sumEVec () const
 
std::string whoami (void) const
 Return identification. More...
 
void print (void) const
 Printing for debugging. More...
 
 operator std::string () const
 Convertion operator to a std::string, can be used in a cast operation : (std::string) TileL2. More...
 
void clear ()
 Clear all vectors in TileL2. More...
 
void setzero ()
 

Private Member Functions

void setphi ()
 function to set phi from ID More...
 

Private Attributes

int m_ID
 Drawer ID: 0x100-0x13F, 0x200-0x23F, 0x300-0x33F, 0x400-0x43F. More...
 
float m_phi
 drawer phi More...
 
float m_cosphi
 
float m_sinphi
 
std::vector< float > m_sumE
 sumEt, sumEz, sumE energy per TileCal superdrawer More...
 
std::vector< float > m_eta
 Muon eta. More...
 
std::vector< float > m_enemu0
 Energy deposited by the muons in TileCal innermost layer. More...
 
std::vector< float > m_enemu1
 Energy deposited by the muons in TileCal central layer. More...
 
std::vector< float > m_enemu2
 Energy deposited by the muons in TileCal outermost layer. More...
 
std::vector< unsigned int > m_quality_factor
 Quality flag for tight and loose muon selection. More...
 
std::vector< unsigned int > m_val
 32-bit words (packed muon info) More...
 

Friends

class TileL2Cnv_p1
 

Detailed Description

Class to store TileMuId and Et quantities computed at the TileCal ROD DSPs.

Author
A. Ruiz (aranz.nosp@m.azu..nosp@m.ruiz..nosp@m.mart.nosp@m.inez@.nosp@m.cern.nosp@m..ch) Modified in April-2011 to keep sumEt, sumEz, sumE in a vector All doubles replaced by floats as well

Definition at line 33 of file TileL2.h.

Constructor & Destructor Documentation

◆ TileL2() [1/3]

TileL2::TileL2 ( )
inline

Constructor.

Definition at line 38 of file TileL2.h.

38 : m_ID(0), m_phi(0.0), m_cosphi(0.0), m_sinphi(0.0) {}

◆ TileL2() [2/3]

TileL2::TileL2 ( int  id)

Constructor.

Definition at line 29 of file TileL2.cxx.

30  : m_ID (id)
31 {
32  setphi();
33 }

◆ TileL2() [3/3]

TileL2::TileL2 ( int  id,
float   
)

Obsolete constructor - will be removed soon.

Definition at line 35 of file TileL2.cxx.

36  : m_ID (id)
37 {
38  setphi();
39 }

Member Function Documentation

◆ clear()

void TileL2::clear ( )

Clear all vectors in TileL2.

Definition at line 104 of file TileL2.cxx.

105 {
106  m_sumE.clear();
107  if (m_eta.size()) {
108  m_eta.clear();
109  m_enemu0.clear();
110  m_enemu1.clear();
111  m_enemu2.clear();
112  m_quality_factor.clear();
113  m_val.clear();
114  }
115 }

◆ cosphi()

float TileL2::cosphi ( ) const
inline

Return cos(phi)

Definition at line 106 of file TileL2.h.

106 { return m_cosphi; }

◆ enemu0() [1/2]

const std::vector<float>& TileL2::enemu0 ( ) const
inline

Definition at line 113 of file TileL2.h.

113 { return m_enemu0; }

◆ enemu0() [2/2]

float TileL2::enemu0 ( unsigned int  ind) const
inline

Return energy deposited in innermost layer (A cells)

Definition at line 112 of file TileL2.h.

112 { return m_enemu0[ind]; }

◆ enemu1() [1/2]

const std::vector<float>& TileL2::enemu1 ( ) const
inline

Definition at line 117 of file TileL2.h.

117 { return m_enemu1; }

◆ enemu1() [2/2]

float TileL2::enemu1 ( unsigned int  ind) const
inline

Return energy deposited in central layer (BC cells)

Definition at line 116 of file TileL2.h.

116 { return m_enemu1[ind]; }

◆ enemu2() [1/2]

const std::vector<float>& TileL2::enemu2 ( ) const
inline

Definition at line 121 of file TileL2.h.

121 { return m_enemu2; }

◆ enemu2() [2/2]

float TileL2::enemu2 ( unsigned int  ind) const
inline

Return energy deposited in outermost layer (D cells)

Definition at line 120 of file TileL2.h.

120 { return m_enemu2[ind]; }

◆ Et()

float TileL2::Et ( ) const
inline

Return total Et in a TileCal superdrawer (ROD-based)

Definition at line 143 of file TileL2.h.

143 { return (m_sumE.size()>0)?m_sumE[0]:0.0; }

◆ eta() [1/2]

const std::vector<float>& TileL2::eta ( ) const
inline

Definition at line 100 of file TileL2.h.

100 { return m_eta; }

◆ eta() [2/2]

float TileL2::eta ( unsigned int  ind) const
inline

Return eta (computed as the average of the eta values of the TileCal cells where the muon goes through)

Definition at line 99 of file TileL2.h.

99 { return m_eta[ind]; }

◆ Ex()

float TileL2::Ex ( ) const
inline

Return Ex in a TileCal superdrawer (ROD-based)

Definition at line 134 of file TileL2.h.

134 { return (m_sumE.size()>0)?m_sumE[0]*m_cosphi:0.0; }

◆ Ey()

float TileL2::Ey ( ) const
inline

Return Ey in a TileCal superdrawer (ROD-based)

Definition at line 137 of file TileL2.h.

137 { return (m_sumE.size()>0)?m_sumE[0]*m_sinphi:0.0; }

◆ Ez()

float TileL2::Ez ( ) const
inline

Return Ez in a TileCal superdrawer (ROD-based)

Definition at line 140 of file TileL2.h.

140 { return (m_sumE.size()>1)?((m_ID&0x100)?m_sumE[1]:-m_sumE[1]):0.0; }

◆ identify()

int TileL2::identify ( void  ) const
inline

Return Identifier.

Definition at line 86 of file TileL2.h.

86 { return m_ID; }

◆ Ndata()

unsigned int TileL2::Ndata ( ) const
inline

Return number of data words.

Definition at line 89 of file TileL2.h.

89 { return m_val.size(); }

◆ NMuons()

unsigned int TileL2::NMuons ( ) const
inline

Return number of muons.

Definition at line 96 of file TileL2.h.

96 { return m_eta.size(); }

◆ NsumE()

unsigned int TileL2::NsumE ( ) const
inline

Return number of sumE words.

Definition at line 131 of file TileL2.h.

131 { return m_sumE.size(); }

◆ operator std::string()

TileL2::operator std::string ( ) const

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

Definition at line 54 of file TileL2.cxx.

55 {
56  std::ostringstream text(std::ostringstream::out);
57 
58  text << whoami();
59  text << " Id = " << std::hex << "0x" << m_ID << std::dec;
60  text << " phi = " << m_phi;
61 
62  if (m_sumE.size()>0 ) {
63  text << " sumEt = " << m_sumE[0];
64  if (m_sumE.size()>1 ) {
65  text << " sumEz = " << m_sumE[1];
66  if (m_sumE.size()>2 ) {
67  text << " sumE = " << m_sumE[2];
68  if (m_sumE.size()>3 ) {
69  text << " others = ";
70  for (unsigned int i=3; i<m_sumE.size(); ++i) text << " " << m_sumE[i];
71  }
72  }
73  }
74  } else {
75  text << " sumE: none";
76  }
77 
78  text << " NMuons = " << m_eta.size();
79 
80  if (m_eta.size() ) {
81 
82  text << " eta =";
83  for (unsigned int i=0; i<m_eta.size(); ++i) text << " " << m_eta[i];
84 
85  text << " enemu0 =";
86  for (unsigned int i=0; i<m_enemu0.size(); ++i) text << " " << m_enemu0[i];
87 
88  text << " enemu1 =";
89  for (unsigned int i=0; i<m_enemu1.size(); ++i) text << " " << m_enemu1[i];
90 
91  text << " enemu2 =";
92  for (unsigned int i=0; i<m_enemu2.size(); ++i) text << " " << m_enemu2[i];
93 
94  text << " qual =";
95  for (unsigned int i=0; i<m_quality_factor.size(); ++i) text << " " << m_quality_factor[i];
96 
97  text << " val =";
98  for (unsigned int i=0; i<m_val.size(); ++i) text << " " << m_val[i];
99  }
100 
101  return text.str();
102 }

◆ phi()

float TileL2::phi ( unsigned int  ) const
inline

Return phi (average value at the TileCal radius)

Definition at line 103 of file TileL2.h.

103 { return m_phi; }

◆ print()

void TileL2::print ( void  ) const

Printing for debugging.

Definition at line 49 of file TileL2.cxx.

50 {
51  std::cout << (std::string) (*this) << std::endl;
52 }

◆ qual() [1/2]

const std::vector<unsigned int>& TileL2::qual ( ) const
inline

Definition at line 128 of file TileL2.h.

128 { return m_quality_factor; }

◆ qual() [2/2]

unsigned int TileL2::qual ( unsigned int  ind) const
inline

Return quality flag (0 or 1): set to 0 if the "energy deposition path" is MIP like in all three samples, set to 1 if the "energy deposition path" is MIP like in two samples and a larger energy deposition is found in the remaining cell.

Definition at line 127 of file TileL2.h.

127 { return m_quality_factor[ind]; }

◆ setEt()

void TileL2::setEt ( std::vector< float > &&  sumE)
inline

Set sumE vector in TileL2.

Definition at line 81 of file TileL2.h.

81 {m_sumE = std::move(sumE); }

◆ setMu() [1/2]

void TileL2::setMu ( const std::vector< float > &  eta,
const std::vector< float > &  enemu0,
const std::vector< float > &  enemu1,
const std::vector< float > &  enemu2,
const std::vector< unsigned int > &  qual,
const std::vector< unsigned int > &  val 
)
inline

Set Muon Info in TileL2.

Definition at line 50 of file TileL2.h.

56  {
57  m_eta = eta;
58  m_enemu0 = enemu0;
59  m_enemu1 = enemu1;
60  m_enemu2 = enemu2;
62  m_val = val;
63  }

◆ setMu() [2/2]

void TileL2::setMu ( std::vector< float > &&  eta,
std::vector< float > &&  enemu0,
std::vector< float > &&  enemu1,
std::vector< float > &&  enemu2,
std::vector< unsigned int > &&  qual,
std::vector< unsigned int > &&  val 
)
inline

Definition at line 65 of file TileL2.h.

71  {
72  m_eta = std::move(eta);
73  m_enemu0 = std::move(enemu0);
74  m_enemu1 = std::move(enemu1);
75  m_enemu2 = std::move(enemu2);
76  m_quality_factor = std::move(qual);
77  m_val = std::move(val);
78  }

◆ setphi()

void TileL2::setphi ( )
private

function to set phi from ID

Definition at line 41 of file TileL2.cxx.

42 {
43  int drawer = (m_ID&0x3F);
45  m_cosphi = cos(m_phi);
46  m_sinphi = sin(m_phi);
47 }

◆ setzero()

void TileL2::setzero ( )
inline

Definition at line 168 of file TileL2.h.

168 { clear(); }

◆ sinphi()

float TileL2::sinphi ( ) const
inline

Return sin(phi)

Definition at line 109 of file TileL2.h.

109 { return m_sinphi; }

◆ sumE() [1/2]

float TileL2::sumE ( ) const
inline

Return sumE in a TileCal superdrawer (ROD-based)

Definition at line 150 of file TileL2.h.

150 { return (m_sumE.size()>2)?m_sumE[2]:0.0; }

◆ sumE() [2/2]

float TileL2::sumE ( unsigned int  ind) const
inline

Return sumE i-th element.

Definition at line 153 of file TileL2.h.

153 { return m_sumE[ind]; }

◆ sumEt()

float TileL2::sumEt ( ) const
inline

Definition at line 144 of file TileL2.h.

144 { return (m_sumE.size()>0)?m_sumE[0]:0.0; }

◆ sumEVec()

const std::vector<float>& TileL2::sumEVec ( ) const
inline

Definition at line 154 of file TileL2.h.

154 { return m_sumE; }

◆ sumEz()

float TileL2::sumEz ( ) const
inline

Return sumEz in a TileCal superdrawer (ROD-based)

Definition at line 147 of file TileL2.h.

147 { return (m_sumE.size()>1)?m_sumE[1]:0.0; }

◆ val() [1/2]

const std::vector<unsigned int>& TileL2::val ( ) const
inline

Definition at line 93 of file TileL2.h.

93 { return m_val; }

◆ val() [2/2]

unsigned int TileL2::val ( unsigned int  i) const
inline

Return Data.

Definition at line 92 of file TileL2.h.

92 { return m_val[i]; }

◆ whoami()

std::string TileL2::whoami ( void  ) const
inline

Return identification.

Definition at line 157 of file TileL2.h.

157 { return "TileL2"; }

Friends And Related Function Documentation

◆ TileL2Cnv_p1

friend class TileL2Cnv_p1
friend

Definition at line 171 of file TileL2.h.

Member Data Documentation

◆ m_cosphi

float TileL2::m_cosphi
private

Definition at line 181 of file TileL2.h.

◆ m_enemu0

std::vector<float> TileL2::m_enemu0
private

Energy deposited by the muons in TileCal innermost layer.

Definition at line 191 of file TileL2.h.

◆ m_enemu1

std::vector<float> TileL2::m_enemu1
private

Energy deposited by the muons in TileCal central layer.

Definition at line 194 of file TileL2.h.

◆ m_enemu2

std::vector<float> TileL2::m_enemu2
private

Energy deposited by the muons in TileCal outermost layer.

Definition at line 197 of file TileL2.h.

◆ m_eta

std::vector<float> TileL2::m_eta
private

Muon eta.

Definition at line 188 of file TileL2.h.

◆ m_ID

int TileL2::m_ID
private

Drawer ID: 0x100-0x13F, 0x200-0x23F, 0x300-0x33F, 0x400-0x43F.

Definition at line 174 of file TileL2.h.

◆ m_phi

float TileL2::m_phi
private

drawer phi

Definition at line 180 of file TileL2.h.

◆ m_quality_factor

std::vector<unsigned int> TileL2::m_quality_factor
private

Quality flag for tight and loose muon selection.

Definition at line 200 of file TileL2.h.

◆ m_sinphi

float TileL2::m_sinphi
private

Definition at line 182 of file TileL2.h.

◆ m_sumE

std::vector<float> TileL2::m_sumE
private

sumEt, sumEz, sumE energy per TileCal superdrawer

Definition at line 185 of file TileL2.h.

◆ m_val

std::vector<unsigned int> TileL2::m_val
private

32-bit words (packed muon info)

Definition at line 203 of file TileL2.h.


The documentation for this class was generated from the following files:
DELTA_PHI_DRAWER
const float DELTA_PHI_DRAWER
Definition: TileL2.cxx:27
TileL2::m_eta
std::vector< float > m_eta
Muon eta.
Definition: TileL2.h:188
TileL2::m_quality_factor
std::vector< unsigned int > m_quality_factor
Quality flag for tight and loose muon selection.
Definition: TileL2.h:200
TileL2::whoami
std::string whoami(void) const
Return identification.
Definition: TileL2.h:157
TileL2::qual
const std::vector< unsigned int > & qual() const
Definition: TileL2.h:128
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TileL2::m_cosphi
float m_cosphi
Definition: TileL2.h:181
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileL2::m_enemu1
std::vector< float > m_enemu1
Energy deposited by the muons in TileCal central layer.
Definition: TileL2.h:194
TileL2::m_ID
int m_ID
Drawer ID: 0x100-0x13F, 0x200-0x23F, 0x300-0x33F, 0x400-0x43F.
Definition: TileL2.h:174
TileL2::enemu1
const std::vector< float > & enemu1() const
Definition: TileL2.h:117
lumiFormat.i
int i
Definition: lumiFormat.py:92
TileL2::clear
void clear()
Clear all vectors in TileL2.
Definition: TileL2.cxx:104
TileL2::m_sinphi
float m_sinphi
Definition: TileL2.h:182
TileL2::m_val
std::vector< unsigned int > m_val
32-bit words (packed muon info)
Definition: TileL2.h:203
TileL2::sumE
float sumE() const
Return sumE in a TileCal superdrawer (ROD-based)
Definition: TileL2.h:150
TileL2::m_phi
float m_phi
drawer phi
Definition: TileL2.h:180
TileL2::m_enemu0
std::vector< float > m_enemu0
Energy deposited by the muons in TileCal innermost layer.
Definition: TileL2.h:191
TileL2::m_sumE
std::vector< float > m_sumE
sumEt, sumEz, sumE energy per TileCal superdrawer
Definition: TileL2.h:185
TileL2::eta
const std::vector< float > & eta() const
Definition: TileL2.h:100
TileL2::val
const std::vector< unsigned int > & val() const
Definition: TileL2.h:93
TileL2::enemu0
const std::vector< float > & enemu0() const
Definition: TileL2.h:113
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
TileL2::setphi
void setphi()
function to set phi from ID
Definition: TileL2.cxx:41
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TileL2::enemu2
const std::vector< float > & enemu2() const
Definition: TileL2.h:121
TileL2::m_enemu2
std::vector< float > m_enemu2
Energy deposited by the muons in TileCal outermost layer.
Definition: TileL2.h:197
checkFileSG.ind
list ind
Definition: checkFileSG.py:118