![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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();
54 ISvcLocator* svcLoc = Gaudi::svcLocator( );
59 std::cout <<
"MakeLArCellFromRaw ERROR cannot retrieve MessageSvc " << std::endl;
65 log << MSG::INFO <<
" initializing MakeLArCellFromRaw"<<
endmsg ;
67 if(pCorr)
log <<MSG::INFO <<
" Number of Corrections "<< pCorr->size()<<
endmsg ;
71 sc = svcLoc->service(
"DetectorStore",
detStore);
74 log << MSG::ERROR <<
"MakeLArCellFromRaw ERROR cannot retrieve DetectorStore " <<
endmsg;
81 log << MSG::INFO <<
"MakeLArCellFromRaw Creating DataPool<LArCell> of size " << poolMaxSize <<
endmsg ;
83 log << MSG::INFO <<
"MakeLArCellFromRaw do not use DataPool" <<
endmsg ;
93 log <<MSG::ERROR <<
"cannot find LArOnlineID in MakeLArCellFromRaw " <<
endmsg;
106 const std::vector<Identifier>& emIds = em_id.
channel_ids();
107 const std::vector<Identifier>& hecIds = hec_id.
channel_ids();
108 const std::vector<Identifier>& fcalIds = fcal_id.
channel_ids();
123 info0.
elem = nullptr ;
126 std::vector<Identifier>::const_iterator
it = emIds.begin();
127 std::vector<Identifier>::const_iterator it2 = emIds.end();
138 if (cellVec.empty())cellVec.resize(128,info0);
181 if (cellVec.empty())cellVec.resize(128,info0);
208 it = fcalIds.begin();
221 if (cellVec.empty())cellVec.resize(128,info0);
248 log <<MSG::INFO <<
" number of em, hec, fcal cells="<<n_em<<
" "<<n_hec<<
" "<<n_fcal<<
endmsg;
249 log <<MSG::INFO<<
" number of exceptions for em,hec,fcal="<<n_em_err<<
" "<<n_hec_err<<
" "<<n_fcal_err<<
endmsg;
250 log <<MSG::INFO<<
" done with initializing MakeLArCellFromRaw"<<
endmsg;
275 int e,
int t,
int q,
unsigned int& ttId )
const
286 CELL_MAP::const_iterator
it =
m_cellMap.find( feb );
290 log << MSG::ERROR <<
" MakeLArCellFromRaw ERROR, failed to find existing cells. "<<
endmsg;
291 std::cout <<std::hex<<
"FEBID = "<< feb <<std::dec<< std::endl ;
296 const CELL_VEC& cellVec = (*it).second;
297 if(cellVec.size()<=
chan){
306 if(
info.elem ==
nullptr)
return nullptr;
309 double de =
e *
info.eCorr;
313 double time =
t/1000.0;
332 const std::vector<const CaloCellCorrection*>& vCorr,
333 const EventContext& ctx)
const
336 double en= 50. *
GeV ;
342 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
Helper class for LArHEC offline identifiers.
std::vector< CellInfo > CELL_VEC
Mapping between calorimeter trigger id to offline/online Identifier.
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
The Athena Transient Store API.
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.
value_type get_compact(void) const
Get the compact id.
::StatusCode StatusCode
StatusCode definition for legacy code.
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
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
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