 |
ATLAS Offline Software
|
Go to the documentation of this file.
23 return StatusCode::SUCCESS;
31 if (writeHandle.isValid()) {
33 return StatusCode::SUCCESS;
41 return StatusCode::FAILURE;
43 writeHandle.addDependency(readHandle);
71 const unsigned larHashMax=ncellem+ncellhec+ncellfcal;
75 std::vector<HWIdentifier> oflHashtoSymOnl(larHashMax);
76 std::vector<HWIdentifier> onlHashtoSymOnl(onlHashMax);
78 std::set<HWIdentifier> symIds;
81 for (
unsigned int idhash=0; idhash<ncellem;idhash++){
85 const int barrel_ec = std::abs( lar_em_id->
barrel_ec(
id) ) ;
86 const int sampling = lar_em_id->
sampling(
id);
87 const int region = lar_em_id->
region(
id);
89 const int eta = lar_em_id->
eta(
id);
94 oflHashtoSymOnl[idHash] = symOnId;
95 onlHashtoSymOnl[hwid_hash]= symOnId;
96 symIds.insert(symOnId);
101 for (
unsigned int idhash=0; idhash<ncellhec;idhash++){
106 const int pos_neg = std::abs( lar_hec_id->
pos_neg(
id) ) ;
107 const int sampling = lar_hec_id->
sampling(
id);
108 const int region = lar_hec_id->
region(
id);
110 const int eta = lar_hec_id->
eta(
id);
115 oflHashtoSymOnl[ncellem+idHash] = symOnId;
116 onlHashtoSymOnl[hwid_hash]= symOnId;
117 symIds.insert(symOnId);
130 const int pos_neg = std::abs( lar_fcal_id->
pos_neg(
id) ) ;
135 const int eta = lar_fcal_id->
eta(
id);
136 int phi = lar_fcal_id->
phi(
id);
143 oflHashtoSymOnl[ncellem+ncellhec+idHash] = symOnId;
144 onlHashtoSymOnl[hwid_hash]= symOnId;
145 symIds.insert(symOnId);
149 std::vector<HWIdentifier> symIdVec(symIds.begin(),symIds.end());
150 std::unique_ptr<LArMCSym> mcSym=std::make_unique<LArMCSym>(larOnlineID,caloCellID,
151 std::move(oflHashtoSymOnl),
152 std::move(onlHashtoSymOnl),
153 std::move(symIdVec));
157 if(writeHandle.record(std::move(mcSym)).isFailure()) {
160 <<
" with EventRange " << writeHandle.getRange()
161 <<
" into Conditions Store");
162 return StatusCode::FAILURE;
164 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
167 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
int eta(const Identifier id) const
return eta [0,9] outer part [0,3] inner part
Scalar phi() const
phi method
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
This class factors out code common between LArEM_ID and LArEM_SuperCell_ID.
int pos_neg(const Identifier id) const
pos_neg : +/- 2 (A/C side)
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
Scalar eta() const
pseudorapidity method
Identifier region_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
int module(const Identifier id) const
module [1,3]
int region(const Identifier id) const
return region according to :
IdentifierHash channel_hash(Identifier channelId) const
Convert a connected channel (cell) Identifier to a hash code.
int sampling(const Identifier id) const
return sampling according to :
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::WriteCondHandleKey< LArMCSym > m_writeKey
Identifier region_id(const ExpandedIdentifier &exp_id) const
region identifier for a channel from ExpandedIdentifier
SG::ReadCondHandleKey< LArOnOffIdMapping > m_readKey
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
virtual std::string dictionaryVersion(void) const override
int eta(const Identifier id) const
return eta according to :
int eta(const Identifier id) const
eta [0,63] module 1 ; [0,31] module 2 ; [0,15] module 3
const LArFCAL_Base_ID * fcal_idHelper() const
access to FCAL idHelper
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
size_type channelHashMax() const
Define channel hash tables max size.
int phi(const Identifier id) const
phi [0,15]
const LArEM_Base_ID * em_idHelper() const
access to EM idHelper
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
Helper class for offline supercell identifiers.
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
::StatusCode StatusCode
StatusCode definition for legacy code.
Identifier channel_id(const ExpandedIdentifier &exp_id) const
cell identifier for a channel from ExpandedIdentifier
int phi_min(const Identifier regId) const
min value of phi index (-999 == failure)
Helper class for offline supercell identifiers.
Helper class for offline cell identifiers.
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
Helper for the Liquid Argon Calorimeter cell identifiers.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
Identifier channel_id(const ExpandedIdentifier &exp_id) const
channel identifier for a channel from ExpandedIdentifier
StatusCode initialize(bool used=true)
int sampling(const Identifier id) const
return sampling [0,3] (only 0 for supercells)
int pos_neg(const Identifier id) const
return pos_neg -2 (C side) or 2 (A side)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Helper base class for offline cell identifiers.
int region(const Identifier id) const
return region [0,1]
const LArHEC_Base_ID * hec_idHelper() const
access to HEC idHelper