|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #include "CaloDetDescr/CaloDetDescrElement.h"
19 #include "GaudiKernel/Bootstrap.h"
20 #include "GaudiKernel/ISvcLocator.h"
21 #include "GaudiKernel/IToolSvc.h"
22 #include "GaudiKernel/ThreadLocalContext.h"
26 #include "CLHEP/Units/SystemOfUnits.h"
48 const std::vector<const CaloCellCorrection*>* pCorr,
unsigned int poolMaxSize )
50 const EventContext& ctx = Gaudi::Hive::currentContext();
56 log << MSG::INFO <<
" initializing MakeLArCellFromRaw"<<
endmsg ;
58 if(pCorr)
log <<MSG::INFO <<
" Number of Corrections "<< pCorr->size()<<
endmsg ;
61 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator( )->service(
"DetectorStore")};
64 log << MSG::ERROR <<
"MakeLArCellFromRaw ERROR cannot retrieve DetectorStore " <<
endmsg;
71 log << MSG::INFO <<
"MakeLArCellFromRaw Creating DataPool<LArCell> of size " << poolMaxSize <<
endmsg ;
73 log << MSG::INFO <<
"MakeLArCellFromRaw do not use DataPool" <<
endmsg ;
83 log <<MSG::ERROR <<
"cannot find LArOnlineID in MakeLArCellFromRaw " <<
endmsg;
96 const std::vector<Identifier>& emIds = em_id.
channel_ids();
97 const std::vector<Identifier>& hecIds = hec_id.
channel_ids();
98 const std::vector<Identifier>& fcalIds = fcal_id.
channel_ids();
113 info0.
elem = nullptr ;
116 std::vector<Identifier>::const_iterator
it = emIds.begin();
117 std::vector<Identifier>::const_iterator it2 = emIds.end();
128 if (cellVec.empty())cellVec.resize(128,info0);
171 if (cellVec.empty())cellVec.resize(128,info0);
198 it = fcalIds.begin();
211 if (cellVec.empty())cellVec.resize(128,info0);
238 log <<MSG::INFO <<
" number of em, hec, fcal cells="<<n_em<<
" "<<n_hec<<
" "<<n_fcal<<
endmsg;
239 log <<MSG::INFO<<
" number of exceptions for em,hec,fcal="<<n_em_err<<
" "<<n_hec_err<<
" "<<n_fcal_err<<
endmsg;
240 log <<MSG::INFO<<
" done with initializing MakeLArCellFromRaw"<<
endmsg;
265 int e,
int t,
int q,
unsigned int& ttId )
const
276 CELL_MAP::const_iterator
it =
m_cellMap.find( feb );
280 log << MSG::ERROR <<
" MakeLArCellFromRaw ERROR, failed to find existing cells. "<<
endmsg;
281 std::cout <<std::hex<<
"FEBID = "<< feb <<std::dec<< std::endl ;
286 const CELL_VEC& cellVec = (*it).second;
287 if(cellVec.size()<=
chan){
296 if(
info.elem ==
nullptr)
return nullptr;
299 double de =
e *
info.eCorr;
303 double time =
t/1000.0;
322 const std::vector<const CaloCellCorrection*>& vCorr,
323 const EventContext& ctx)
const
326 double en= 50. *
GeV ;
332 corr->MakeCorrection (
cell, ctx);
LArCell * getLArCell(unsigned int feb, unsigned int chan, int e, int t, int q, CaloGain::CaloGain caloGain, unsigned int &ttId) const
access by Identifier
const LArEM_ID * em_idHelper() const
access to EM idHelper
double getCorrection(LArCell *cell, const std::vector< const CaloCellCorrection * > &vCorr, const EventContext &ctx) const
const LArOnlineID * m_onlineID
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Helper class for LArHEC offline identifiers.
std::vector< CellInfo > CELL_VEC
Mapping between calorimeter trigger id to offline/online Identifier.
value_type get_compact() const
Get the compact id.
IMessageSvc * getMessageSvc(bool quiet=false)
Definition of CaloDetDescrManager.
const LArHEC_ID * hec_idHelper() const
access to HEC idHelper
void initialize(const LArRoIMap &roiMap, const LArOnOffIdMapping &onOffMap, const CaloDetDescrManager &man, const std::vector< const CaloCellCorrection * > *pCorr, unsigned int poolMaxSize=190000)
initialize the internal map
~MakeLArCellFromRaw()
destructor
const std::vector< Identifier > & channel_ids() const
provide acces to channel id vector, accessed via hash
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Helper class for offline cell identifiers.
HWIdentifier createSignalChannelID(const Identifier &id) const
create a HWIdentifier from an Identifier (not inline)
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
Data object for LAr calorimeter readout cell.
MakeLArCellFromRaw()
constructor
void setThreshold(float t)
This class provides the client interface for accessing the detector description information common to...
def time(flags, cells_name, *args, **kw)
Mapping between calorimeter trigger id to offline/online Identifier.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
float eta() const
cell eta
Helper class for LArEM offline identifiers.
float phi() const
cell phi
TT_ID trigTowerID(const Identifier &channel_id) const
Translate offline channel identifier to trigger tower ID.
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
const std::vector< Identifier > & channel_ids() const
provide access to channel id vector, accessed via hash
Helper class for LArFCAL offline identifiers.
Exception class for LAr Identifiers.
const LArFCAL_ID * fcal_idHelper() const
access to FCAL idHelper
const CaloDetDescrElement * elem