|
ATLAS Offline Software
|
Go to the documentation of this file.
20 return StatusCode::SUCCESS;
28 if (writeHandle.isValid()) {
30 return StatusCode::SUCCESS;
38 return StatusCode::FAILURE;
40 writeHandle.addDependency(readHandle);
59 const unsigned larHashMax=ncellem+ncellhec+ncellfcal;
63 std::vector<HWIdentifier> oflHashtoSymOnl(larHashMax);
64 std::vector<HWIdentifier> onlHashtoSymOnl(onlHashMax);
66 std::set<HWIdentifier> symIds;
69 for (
unsigned int idhash=0; idhash<ncellem;idhash++){
73 const int barrel_ec = abs( lar_em_id->
barrel_ec(
id) ) ;
74 const int sampling = lar_em_id->
sampling(
id);
75 const int region = lar_em_id->
region(
id);
77 const int eta = lar_em_id->
eta(
id);
82 oflHashtoSymOnl[idHash] = symOnId;
83 onlHashtoSymOnl[hwid_hash]= symOnId;
84 symIds.insert(symOnId);
89 for (
unsigned int idhash=0; idhash<ncellhec;idhash++){
94 const int pos_neg = abs( lar_hec_id->
pos_neg(
id) ) ;
95 const int sampling = lar_hec_id->
sampling(
id);
96 const int region = lar_hec_id->
region(
id);
98 const int eta = lar_hec_id->
eta(
id);
103 oflHashtoSymOnl[ncellem+idHash] = symOnId;
104 onlHashtoSymOnl[hwid_hash]= symOnId;
105 symIds.insert(symOnId);
118 const int pos_neg = abs( lar_fcal_id->
pos_neg(
id) ) ;
123 const int eta = lar_fcal_id->
eta(
id);
124 int phi = lar_fcal_id->
phi(
id);
131 oflHashtoSymOnl[ncellem+ncellhec+idHash] = symOnId;
132 onlHashtoSymOnl[hwid_hash]= symOnId;
133 symIds.insert(symOnId);
137 std::vector<HWIdentifier> symIdVec(symIds.begin(),symIds.end());
138 std::unique_ptr<LArMCSym> mcSym=std::make_unique<LArMCSym>(larOnlineID,caloCellID,
139 std::move(oflHashtoSymOnl),
140 std::move(onlHashtoSymOnl),
141 std::move(symIdVec));
145 if(writeHandle.record(std::move(mcSym)).isFailure()) {
148 <<
" with EventRange " << writeHandle.getRange()
149 <<
" into Conditions Store");
150 return StatusCode::FAILURE;
152 ATH_MSG_INFO(
"recorded new " << writeHandle.key() <<
" with range " << writeHandle.getRange() <<
" into Conditions Store");
155 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
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.
Helper class for LArHEC offline identifiers.
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 ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
int phi(const Identifier id) const
phi [0,15]
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
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 cell identifiers.
IdentifierHash channel_hash(Identifier channelId) const
create hash id from channel id
size_type channelHashMax(void) const
Define channel hash tables max size.
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)
Helper class for LArEM offline identifiers.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Helper class for LArFCAL offline identifiers.
int region(const Identifier id) const
return region [0,1]