|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #include "GaudiKernel/ConcurrencyFlags.h"
37 const std::string&
name,
41 m_storeGateFastCalo(
"StoreGateSvc/FastCalo",
name)
62 ATH_MSG_DEBUG(
"StoreGateFastCalo Svc structure at Initialisation"<<(*m_storeGateFastCalo).dump());
67 throw std::runtime_error(
"FastHitConvertTool: Invalid LAr EM ID helper");
70 throw std::runtime_error(
"FastHitConvertTool: Invalid FCAL ID helper");
73 throw std::runtime_error(
"FastHitConvertTool: Invalid HEC ID helper");
76 throw std::runtime_error(
"FastHitConvertTool: Invalid Tile ID helper");
98 return StatusCode::SUCCESS;
116 const double minEnergy=1
e-9;
120 double energyConv=0.0;
125 double eLArEMRead=0.0;
126 double eLArHECRead=0.0;
127 double eLArFCALRead=0.0;
128 double eTileRead=0.0;
130 double eLArEMConv=0.0;
131 double eLArHECConv=0.0;
132 double eLArFCALConv=0.0;
133 double eTileConv=0.0;
146 SampFrac=fSampl->
FSAMPL(cellid);
147 energyConv=
energy*SampFrac;
150 eLArEMConv+=energyConv;
153 if(energyConv > minEnergy)
160 embHitContainer->push_back(
new LArHit(cellid,energyConv,
hitTime));
165 emecHitContainer->push_back(
new LArHit(cellid,energyConv,
hitTime));
182 SampFrac=fSampl->
FSAMPL(cellid);
183 energyConv=
energy*SampFrac;
186 eLArHECConv+=energyConv;
190 if(energyConv>minEnergy)
195 hecHitContainer->push_back(
new LArHit(cellid,energyConv,
hitTime));
209 SampFrac=fSampl->
FSAMPL(cellid);
210 energyConv=
energy*SampFrac;
213 eLArHECConv+=energyConv;
216 if(energyConv>minEnergy)
221 fcalHitContainer->push_back(
new LArHit(cellid,energyConv,
hitTime));
250 energyConv=
energy/SampFrac;
253 eTileConv+=energyConv;
257 if(energyConv>minEnergy)
268 tileHitVector->push_back(
TileHit(pmt_id0,energyConv/2.0,
hitTime));
269 tileHitVector->push_back(
TileHit(pmt_id1,energyConv/2.0,
hitTime));
275 ATH_MSG_DEBUG(
"eReadTot= "<<eLArEMRead+eLArHECRead+eLArFCALRead+eTileRead);
276 ATH_MSG_DEBUG(
"eLArEMRead= "<<eLArEMRead<<
" eLArHECRead= "<<eLArHECRead<<
" eLArFCALRead= "<<eLArFCALRead<<
" eTileRead= "<<eTileRead);
277 ATH_MSG_DEBUG(
"eConvTot= "<<eLArEMConv+eLArHECConv+eLArFCALConv+eTileConv);
278 ATH_MSG_DEBUG(
"eLArEMConv= "<<eLArEMConv<<
" eLArHECConv= "<<eLArHECConv<<
"eLArFCALConv"<<eLArFCALConv<<
"eTileConv"<<eTileConv);
281 ATH_MSG_DEBUG(embHitContainer.name()<<
" : "<<embHitContainer->size()<<
" hits ");
282 ATH_MSG_DEBUG(emecHitContainer.name()<<
" : "<<emecHitContainer->size()<<
" hits ");
283 ATH_MSG_DEBUG(fcalHitContainer.name()<<
" : "<<fcalHitContainer->size()<<
" hits ");
284 ATH_MSG_DEBUG(hecHitContainer.name()<<
" : "<<hecHitContainer->size()<<
" hits ");
285 ATH_MSG_DEBUG(tileHitVector.name()<<
" : "<<tileHitVector->size()<<
" hits ");
289 CHECK((*m_storeGateFastCalo).clearStore(
true));
295 if (Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents() > 1) {
296 ATH_MSG_ERROR (
"FastHitConvertTool doesn't support pileup in AthenaMT");
297 return StatusCode::FAILURE;
304 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
float getSamplingFraction(unsigned int drawerIdx, unsigned int channel) const
Return Tile Calorimeter sampling fraction.
Const iterator class for DataVector/DataList.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
bool is_lar_fcal(Identifier id) const
const LArEM_ID * getEM_ID(void) const
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
const std::string & key() const
Return the StoreGate ID for the referenced object.
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const TileID * getTileID(void) const
const LArHEC_ID * getHEC_ID(void) const
bool is_tile_gapscin(const Identifier &id) const
This class initializes the Calo (LAr and Tile) offline identifiers.
std::vector< HWIdentifier >::iterator it1
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual const float & FSAMPL(const HWIdentifier &id) const =0
const LArFCAL_ID * getFCAL_ID(void) const
void addSubEvt(time_type t, PileUpTimeEventIndex::PileUpType puType, const EventInfo *pse, StoreGateSvc *psg)
setter for the subEvt collection t=0(ns) for the original event
#define CHECK(...)
Evaluate an expression and check for errors.
bool is_tile(Identifier id) const
bool is_lar_hec(Identifier id) const
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
int drawerIdx(const HWIdentifier &id) const
construct drawer index from HW identifier
This class provides general information about an event. Event information is provided by the accessor...
StatusCode initialize(bool used=true)
Class to store hit energy and time in LAr cell from G4 simulation.
Container class for CaloCell.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
bool is_em_barrel(const Identifier id) const
test if the id belongs to the EM barrel
Identifier pmt_id(const Identifier &any_id) const
the preferred mechanism to access information from the different event stores in a pileup job.
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
#define ATLAS_THREAD_SAFE
float hitTime(const AFP_SIDSimHit &hit)
Define macros for attributes used to control the static checker.
bool is_lar_em(Identifier id) const
bool is_em_endcap(const Identifier id) const
test if the id belongs to the EM Endcap
HWIdentifier s2h_channel_id(const Identifier &id) const