ATLAS Offline Software
Loading...
Searching...
No Matches
TileMu.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5//========================================
6// file TileMu.cxx
7//
8//========================================
9
10#include "TileEvent/TileMu.h"
11
12#include <iostream>
13#include <sstream>
14#include <iomanip>
15
16TileMu::TileMu ( float eta, float phi, const std::vector<float> & ener, float qual )
17 : m_eta(eta)
18 , m_phi(phi)
19 , m_energy_deposited(ener)
20 , m_quality_factor(qual)
21{
22}
23
24void TileMu::Set( float eta, float phi, const std::vector<float> & ener, float qual )
25{
26 m_eta = eta;
27 m_phi = phi;
28 m_energy_deposited = ener;
29 m_quality_factor = qual;
30}
31
32void TileMu::print() const
33{
34 std::cout << (std::string) (*this) << std::endl;
35}
36
37TileMu::operator std::string() const
38{
39 std::ostringstream text(std::ostringstream::out);
40
41 text << whoami();
42 text << " eta=" << m_eta;
43 text << " phi=" << m_phi;
44 for (unsigned int i=0; i<m_energy_deposited.size(); ++i)
45 text << " ene[" << i << "]=" << m_energy_deposited[i];
46 text << " qual=" << m_quality_factor;
47
48 return text.str();
49}
50
float m_phi
Muon phi.
Definition TileMu.h:78
void print(void) const
Printing for debugging.
Definition TileMu.cxx:32
std::vector< float > m_energy_deposited
Energy deposited by the muons in TileCal.
Definition TileMu.h:81
void Set(float eta, float phi, const std::vector< float > &ener, float qual)
Definition TileMu.cxx:24
float m_quality_factor
Quality flag for tight and loose muon selection.
Definition TileMu.h:84
std::string whoami(void) const
Return identification.
Definition TileMu.h:63
float eta() const
Eta (computed as the average of the eta values of the TileCal cells where the muon goes through)
Definition TileMu.h:43
TileMu()
Constructor.
Definition TileMu.h:30
float phi() const
Phi (average value at the TileCal radius)
Definition TileMu.h:46
float m_eta
Muon eta.
Definition TileMu.h:75