12#include "CaloDetDescr/CaloDetDescrElement.h"
36 (
const std::string&
type,
37 const std::string& name,
38 const IInterface* parent)
48 declareProperty(
"CaloEtaCut",
m_etaCut );
49 declareProperty(
"CaloPhiCut",
m_phiCut );
51 declareProperty(
"CaloDetectors",
m_caloNums );
55 "Offline / supercell mapping tool.");
64 CHECK( detStore.retrieve() ) ;
82 ATH_MSG_INFO(
" *** LArSCHitFillerTool: No calorimeter selection" );
86 <<
" More than " << nSubCalo <<
" calo specified. "
87 <<
"Must be wrong. Stop.";
88 return StatusCode::FAILURE;
94 <<
"Invalid calo specification:"
96 return StatusCode::FAILURE;
109 REPORT_MESSAGE( MSG::FATAL ) <<
" *** LArSCHitFillerTool: Invalid Eta Cut Range specified: Abort!";
110 return StatusCode::FAILURE;
120 REPORT_MESSAGE( MSG::FATAL ) <<
" *** LArSCHitFillerTool: Invalid Phi Cut Range specified: Abort!";
121 return StatusCode::FAILURE;
128 REPORT_MESSAGE( MSG::FATAL ) <<
" *** LArSCHitFillerTool: Invalid No. of Calo Layer selection: " <<
m_caloLayers.size() <<
" Abort!";
129 return StatusCode::FAILURE;
134 return StatusCode::FAILURE;
146 return StatusCode::SUCCESS;
169 return StatusCode::SUCCESS;
183 std::map<int, double> sc_E;
186 CONTAINER::const_iterator f_hit = p.begin();
187 CONTAINER::const_iterator l_hit = p.end();
188 for( ; f_hit != l_hit; ++f_hit ) {
189 const LArHit* hit = ( *f_hit );
194 sc_E[hashId] += hit->
energy();
200 std::map<int, double>::const_iterator it = sc_E.begin();
201 std::map<int, double>::const_iterator it_e = sc_E.end();
206 for ( ; it!=it_e ; ++it ) {
207 int hashId = (*it).first;
210 double E = (*it).second;
223 std::vector< unsigned int >::const_iterator theFound =
242 m_calo->push_back( calo );
245 m_ieta->push_back( ieta );
246 m_jphi->push_back( jphi );
248 m_eta->push_back( feta );
249 m_phi->push_back( fphi );
250 double offEnergy = E;
256 m_Eoff->push_back( offEnergy );
257 m_Et->push_back( offEnergy/cosh( feta ) );
262 return StatusCode::SUCCESS;
Helper class for offline supercell identifiers.
Helpers for checking error return status codes and reporting errors.
#define REPORT_MESSAGE(LVL)
Report a message.
#define CHECK(...)
Evaluate an expression and check for errors.
float eta() const
cell eta
float phi() const
cell phi
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Class to store hit energy and time in LAr cell from G4 simulation.
Identifier cellID() const
Block filler tool for noisy FEB information.