Skip to content
Snippets Groups Projects
Commit f73e511e authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'cellID.CaloIdentifier-20200503' into 'master'

CaloIdentifier: Add command-line utility to translate cell hashes.

See merge request !32578
parents 86977872 e08376ad
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!32578CaloIdentifier: Add command-line utility to translate cell hashes.
...@@ -59,6 +59,11 @@ atlas_add_executable( test_lvl1_id ...@@ -59,6 +59,11 @@ atlas_add_executable( test_lvl1_id
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier ) LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
atlas_add_executable( caloCellLookup
utils/caloCellLookup.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} CaloGeoHelpers AthenaKernel AtlasDetDescr IdDict Identifier GaudiKernel TestTools CxxUtils StoreGateLib SGtests IdDictParser PathResolver CaloIdentifier )
#atlas_add_test( GTower_ID_test #atlas_add_test( GTower_ID_test
# SOURCES # SOURCES
# test/GTower_ID_test.cxx # test/GTower_ID_test.cxx
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
* @file CaloIdentifier/utils/caloCellLookup.cxx
* @author scott snyder
* @date Apr 2020
* @brief Command-line utility to decode a calorimeter cell hash.
*/
#include "CaloIdentifier/CaloHelpersTest.h"
#include <cstdlib>
#include <iostream>
int main (int argc, char** argv)
{
CaloHelpersTest helpers;
const CaloCell_ID& caloID = helpers.caloID();
for (int i=1; i < argc; i++) {
int hash = atoi (argv[i]);
Identifier id = caloID.cell_id (hash);
std::cout << hash << " " << id << " ";
int subcalo = caloID.sub_calo (hash);
switch (subcalo) {
case CaloCell_ID::LAREM:
std::cout << "LAREM " <<
"BEC: " << helpers.emID().barrel_ec(id) << " "
"Samp: " << helpers.emID().sampling(id) << " "
"Reg: " << helpers.emID().region(id) << " "
"Eta: " << helpers.emID().eta(id) << " "
"Phi: " << helpers.emID().phi(id) << " "
"SC: " << helpers.emID().is_supercell(id) << std::endl;
break;
case CaloCell_ID::LARHEC:
std::cout << "LARHEC " <<
"P/N: " << helpers.hecID().pos_neg(id) << " "
"Samp: " << helpers.hecID().sampling(id) << " "
"Reg: " << helpers.hecID().region(id) << " "
"Eta: " << helpers.hecID().eta(id) << " "
"Phi: " << helpers.hecID().phi(id) << " "
"SC: " << helpers.hecID().is_supercell(id) << std::endl;
break;
case CaloCell_ID::LARFCAL:
std::cout << "LARFCAL " <<
"P/N: " << helpers.fcalID().pos_neg(id) << " "
"Mod: " << helpers.fcalID().module(id) << " "
"Eta: " << helpers.fcalID().eta(id) << " "
"Phi: " << helpers.fcalID().phi(id) << " "
"SC: " << helpers.fcalID().is_supercell(id) << std::endl;
break;
case CaloCell_ID::TILE:
std::cout << "TILE " <<
"Reg: " << helpers.tileID().region(id) << " "
"Syst: " << helpers.tileID().system(id) << " "
"Sect: " << helpers.tileID().section(id) << " "
"Side: " << helpers.tileID().side(id) << " "
"Mod: " << helpers.tileID().module(id) << " "
"Tow: " << helpers.tileID().tower(id) << " "
"Samp: " << helpers.tileID().sample(id) << " "
"PMT: " << helpers.tileID().pmt(id) << std::endl;
break;
case CaloCell_ID::LARMINIFCAL:
std::cout << "LARMINIFCAL "
"P/N: " << helpers.minifcalID().pos_neg(id) << " "
"Mod: " << helpers.minifcalID().module(id) << " "
"Dep: " << helpers.minifcalID().depth(id) << " "
"Eta: " << helpers.minifcalID().eta(id) << " "
"Phi: " << helpers.minifcalID().phi(id) << std::endl;
break;
default:
std::cout << "UNKNOWN ";
}
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment