ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTTDescriptor.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5/***************************************************************************
6 Liquid Argon detector description package
7 -----------------------------------------
8 ***************************************************************************/
9
10//<doc><file> $Id: CaloTTDescriptor.cxx,v 1.5 2006-02-15 09:05:19 fledroit Exp $
11//<version> $Name: not supported by cvs2svn $
12
13//<<<<<< INCLUDES >>>>>>
14
16
17//FLG#include "CaloIdentifier/CaloLVL1_ID.h"
18
19#include <iostream>
20#include <iomanip>
21
23 float phi_min, float phi_max, float dphi,
24 int sign_eta, short n_lay)
25 :
29 m_deta (deta),
30 m_phi_min (phi_min),
31 m_phi_max (phi_max),
32 m_dphi (dphi),
33 m_nEta ((short) ((eta_max - eta_min)/deta + 0.501)),
34 m_nPhi ((short) ((phi_max - phi_min)/dphi + 0.501)),
35 m_nLay (n_lay)
36{
37}
38
39
40
41void
43{
44 std::cout << "\n CaloTTDescriptor print: \n\n" << m_id;
45 std::cout << " Calo LVL1 Trigger Towers: \n";
46 std::cout << " eta min eta max deta phi min phi max dphi nLay\n";
47 std::cout << std::setiosflags(std::ios::fixed);
48 std::cout << std::setw(9) << std::setprecision(4) << m_eta_min << " "
49 << std::setw(9) << std::setprecision(4) << m_eta_max << " "
50 << std::setw(9) << std::setprecision(4) << m_deta << " "
51 << std::setw(9) << std::setprecision(4) << m_phi_min << " "
52 << std::setw(9) << std::setprecision(4) << m_phi_max << " "
53 << std::setw(9) << std::setprecision(4) << m_dphi << " "
54 << std::setw(9) << std::setprecision(4) << m_nLay << " "
55 << std::endl;
56}
57
58
59void
61 float eta_max,
62 float deta,
63 float phi_min,
64 float phi_max,
65 float dphi,
66 int sign_eta,
67 short n_lay)
68{
71 m_deta = deta;
72 m_phi_min = phi_min;
73 m_phi_max = phi_max;
74 m_dphi = dphi;
75 m_nEta = (short) ((eta_max - eta_min)/deta + 0.501);
76 // Dummy conditional to prevent these two statements from being
77 // evaluated using a vectorized instruction. Otherwise, we can
78 // get a FPE in the clang build from the division because there
79 // are two unused vector lanes.
80 if (m_nEta > 0) {
81 m_nPhi = (short) ((phi_max - phi_min)/dphi + 0.501);
82 }
83 else {
84 m_nPhi = 0;
85 }
87 m_nLay = n_lay;
88}
89
90
91
92
93
94
95
96
97
98
99
void set(const Identifier &id)
set internal data member m_id (which is unused.
float deta() const
descriptor parameter: eta granularity
short m_nLay
descriptor parameter: number of layers
CaloTTDescriptor()
Default constructor.
float m_eta_min
descriptor parameter: min value of abs(eta)
float m_eta_max
descriptor parameter: max value of abs(eta)
int m_sign_eta
descriptor parameter: sign of eta (+-1)
int sign_eta() const
descriptor parameter: sign of eta (+-1)
float m_dphi
descriptor parameter: phi granularity
float m_phi_max
descriptor parameter: max value of phi
float dphi() const
descriptor parameter: phi granularity
float m_deta
descriptor parameter: eta granularity
float m_phi_min
descriptor parameter: min value of phi
Identifier m_id
an identifier associated to the descriptor.
float eta_min() const
descriptor parameter: min value of abs(eta)
short m_nPhi
descriptor parameter: number of phi bins
float eta_max() const
descriptor parameter: max value of abs(eta)
void print() const
Print.
short m_nEta
descriptor parameter: number of eta bins