|
ATLAS Offline Software
|
Command-line utility to decode a calorimeter cell hash.
More...
#include "CaloIdentifier/CaloHelpersTest.h"
#include <cstdlib>
#include <iostream>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Command-line utility to decode a calorimeter cell hash.
- Author
- scott snyder
- Date
- Apr 2020
Definition in file caloCellLookup.cxx.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 17 of file caloCellLookup.cxx.
25 std::cout <<
hash <<
" " <<
id <<
" ";
29 std::cout <<
"LAREM " <<
33 "Eta: " << helpers.
emID().
eta(
id) <<
" "
34 "Phi: " << helpers.
emID().
phi(
id) <<
" "
38 std::cout <<
"LARHEC " <<
42 "Eta: " << helpers.
hecID().
eta(
id) <<
" "
43 "Phi: " << helpers.
hecID().
phi(
id) <<
" "
47 std::cout <<
"LARFCAL " <<
50 "Eta: " << helpers.
fcalID().
eta(
id) <<
" "
51 "Phi: " << helpers.
fcalID().
phi(
id) <<
" "
55 std::cout <<
"TILE " <<
63 "PMT: " << helpers.
tileID().
pmt(
id) << std::endl;
66 std::cout <<
"LARMINIFCAL "
74 std::cout <<
"UNKNOWN ";
int phi(const Identifier id) const
return phi according to :
const LArHEC_ID & hecID() const
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
int pmt(const Identifier &id) const
int module(const Identifier id) const
module [0]
const TileID & tileID() const
int side(const Identifier &id) const
int sample(const Identifier &id) const
int module(const Identifier id) const
module [1,3]
int depth(const Identifier id) const
depth [0,3]
int region(const Identifier id) const
return region according to :
int sampling(const Identifier id) const
return sampling according to :
const LArMiniFCAL_ID & minifcalID() const
int tower(const Identifier &id) const
int system(const Identifier &id) const
int eta(const Identifier id) const
return eta according to :
int region(int section, int side) const
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
int phi(const Identifier id) const
phi [0,15]
Helper to initialize ID helpers for unit tests.
int phi(const Identifier id) const
phi [0,15]
int module(const Identifier &id) const
int sub_calo(const Identifier id) const
returns an int taken from SUBCALO enum and describing the subCalo to which the Id belongs.
Helper class for offline cell identifiers.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
const LArFCAL_ID & fcalID() const
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
const CaloCell_ID & caloID() const
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
int section(const Identifier &id) const
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
const LArEM_ID & emID() const
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
int region(const Identifier id) const
return region [0,1]
bool is_supercell(const Identifier id) const
Test if the identifier represents a supercell.
int phi(const Identifier id) const
return phi[0,63] outer part [0,31] inner part