ATLAS Offline Software
Loading...
Searching...
No Matches
CaloTTDescriptor.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 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 << std::endl << " CaloTTDescriptor print: "
45 << std::endl << std::endl;
46
47 // Print out id
48 m_id.show();
49
50 std::cout << " Calo LVL1 Trigger Towers: " << std::endl;
51 std::cout << " eta min eta max deta phi min phi max dphi nLay"
52 << std::endl;
53 std::cout << std::setiosflags(std::ios::fixed);
54 std::cout << std::setw(9) << std::setprecision(4) << m_eta_min << " "
55 << std::setw(9) << std::setprecision(4) << m_eta_max << " "
56 << std::setw(9) << std::setprecision(4) << m_deta << " "
57 << std::setw(9) << std::setprecision(4) << m_phi_min << " "
58 << std::setw(9) << std::setprecision(4) << m_phi_max << " "
59 << std::setw(9) << std::setprecision(4) << m_dphi << " "
60 << std::setw(9) << std::setprecision(4) << m_nLay << " "
61 << std::endl;
62}
63
64
65void
67 float eta_max,
68 float deta,
69 float phi_min,
70 float phi_max,
71 float dphi,
72 int sign_eta,
73 short n_lay)
74{
77 m_deta = deta;
78 m_phi_min = phi_min;
79 m_phi_max = phi_max;
80 m_dphi = dphi;
81 m_nEta = (short) ((eta_max - eta_min)/deta + 0.501);
82 // Dummy conditional to prevent these two statements from being
83 // evaluated using a vectorized instruction. Otherwise, we can
84 // get a FPE in the clang build from the division because there
85 // are two unused vector lanes.
86 if (m_nEta > 0) {
87 m_nPhi = (short) ((phi_max - phi_min)/dphi + 0.501);
88 }
89 else {
90 m_nPhi = 0;
91 }
93 m_nLay = n_lay;
94}
95
96
97
98
99
100
101
102
103
104
105
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