 |
ATLAS Offline Software
|
Command-line utility to decode a calorimeter cell hash.
More...
#include "CaloIdentifier/CaloHelpersTest.h"
#include "CxxUtils/checker_macros.h"
#include <cstdlib>
#include <iostream>
#include <memory>
Go to the source code of this file.
Command-line utility to decode a calorimeter cell hash.
- Author
- scott snyder
- Date
- Apr 2020
Definition in file caloCellLookup.cxx.
◆ ATLAS_NOT_THREAD_SAFE()
int main ATLAS_NOT_THREAD_SAFE |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 19 of file caloCellLookup.cxx.
21 std::unique_ptr<CaloHelpersTest> helpers;
23 helpers = std::make_unique<CaloHelpersTest>();
26 std::cerr <<
"Caught exception: " << std::string(
e) <<
"\n";
34 std::cout <<
hash <<
" " <<
id <<
" ";
38 std::cout <<
"LAREM " <<
42 "Eta: " << helpers->
emID().
eta(
id) <<
" "
43 "Phi: " << helpers->
emID().
phi(
id) <<
" "
47 std::cout <<
"LARHEC " <<
51 "Eta: " << helpers->
hecID().
eta(
id) <<
" "
52 "Phi: " << helpers->
hecID().
phi(
id) <<
" "
56 std::cout <<
"LARFCAL " <<
59 "Eta: " << helpers->
fcalID().
eta(
id) <<
" "
60 "Phi: " << helpers->
fcalID().
phi(
id) <<
" "
64 std::cout <<
"TILE " <<
72 "PMT: " << helpers->
tileID().
pmt(
id) << std::endl;
75 std::cout <<
"LARMINIFCAL "
83 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]
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]
Exception class for LAr Identifiers.
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