|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "CaloDetDescr/CaloDetDescrElement.h"
11 #include "GaudiKernel/ThreadLocalContext.h"
16 #include "CoralBase/Blob.h"
17 #include "CoralBase/Attribute.h"
18 #include "CoralBase/AttributeList.h"
19 #include "CoralBase/AttributeListSpecification.h"
23 #include "CoolKernel/StorageType.h"
35 "Select how to set thresholds. Allowed values are 'fixed','group' and 'noise'");
75 if (
m_mode.compare(
"fixed")==0) {
78 <<
name() <<
".tQThreshold and "
79 <<
name() <<
".samplesThreshold for DSP thresholds" );
81 else if (
m_mode.compare(
"group")==0) {
83 ATH_MSG_INFO (
"Will used cell groups defined in jobO " <<
name() <<
".CellGroup for DSP thresholds" );
88 return StatusCode::FAILURE;
93 return StatusCode::FAILURE;
96 else if (
m_mode.compare(
"noise")==0) {
100 ATH_MSG_INFO (
"Will used ICaloCellTool::totalNoiseRMS times " <<
name() <<
".sigmaNoiseSamples and" );
102 ATH_MSG_INFO (
"Will used ICaloCellTool::elecNoiseRMS times " <<
name() <<
".sigmaNoiseSamples and" );
105 ATH_MSG_INFO (
"ICaloCellTool::totalNoiseRMS times " <<
name() <<
".sigmaNoiseQt for DSP thresholds" );
107 ATH_MSG_INFO (
"ICaloCellTool::elecNoiseRMS times " <<
name() <<
".sigmaNoiseQt for DSP thresholds" );
114 return StatusCode::SUCCESS;
121 const EventContext& ctx = Gaudi::Hive::currentContext();
129 coral::AttributeListSpecification*
spec =
new coral::AttributeListSpecification();
131 spec->extend(
"tQThr",
"blob");
132 spec->extend(
"samplesThr",
"blob");
133 spec->extend(
"trigSumThr",
"blob");
134 spec->extend(
"Name",
"string");
144 tQThrBlob.resize(hashMax*
sizeof(
float));
145 samplesThrBlob.resize(hashMax*
sizeof(
float));
146 trigSumThrBlob.resize(hashMax*
sizeof(
float));
148 float* ptQThrBlob=
static_cast<float*
>(tQThrBlob.startingAddress());
149 float* psamplesBlob=
static_cast<float*
>(samplesThrBlob.startingAddress());
150 float* ptrigSumBlob=
static_cast<float*
>(trigSumThrBlob.startingAddress());
163 return StatusCode::FAILURE;
170 totalNoise = totalNoiseH.
cptr();
172 elecNoise = elecNoiseH.
cptr();
183 for (
unsigned hs=0;
hs<hashMax;++
hs) {
188 if(!
cabling->isOnlineConnected(chid)){
189 ATH_MSG_DEBUG (
"cell id: " <<
id <<
" not connected channel, skip " );
213 if(thrs.size()!=2) std::cout <<
"len=" << thrs.size() << std::endl;
214 ptQThrBlob[
hs]=thrs[0];
215 psamplesBlob[
hs]=thrs[1];
216 ptrigSumBlob[
hs]=thrs[0];
222 return StatusCode::FAILURE;
246 float samplesThr = 0.;
295 std::ostream *
out = &(std::cout);
309 for (;chanIt!=chanIt_e;++chanIt) {
321 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
bool isEMECIW(const HWIdentifier id) const override final
Gaudi::Property< std::vector< std::string > > m_problemsToMask
float m_sigmaNoiseSamples
bool m_usePileupNoiseSamples
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const std::vector< float > & getDefaults() const
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
LArDSPThresholdFillInline(const std::string &name, ISvcLocator *pSvcLocator)
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
value_type get_compact() const
Get the compact id.
const std::string & key() const
Return the StoreGate ID for the referenced object.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
Gaudi::Property< float > m_scaleIW
id_iterator channel_end() const
virtual ~LArDSPThresholdFillInline()
std::string m_outFileName
float samplesThr(const HWIdentifier &CellID) const
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
bool isFCALchannel(const HWIdentifier id) const
virtual StatusCode stop() override
IdentifierHash calo_hash() const
cell calo hash
bool isEMECchannel(const HWIdentifier id) const override final
float tQThr(const HWIdentifier &CellID) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
::StatusCode StatusCode
StatusCode definition for legacy code.
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Helper class for offline cell identifiers.
bool is_lar_fcal() const
cell belongs to FCAL
float m_maskedsamplesThrsh
std::vector< std::string > m_cellGroupStr
size_type channelHashMax(void) const
Define channel hash tables max size.
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
StatusCode initialize(bool used=true)
float trigSumThr(const HWIdentifier &CellID) const
virtual StatusCode initialize() override
This class provides the client interface for accessing the detector description information common to...
LArBadChannelMask m_bcMask
Handle to bad-channel mask.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
CaloCellGroupList m_thrPerCell
float eta() const
cell eta
float phi() const
cell phi
bool isHECchannel(const HWIdentifier id) const override final
Helper base class for offline cell identifiers.
const std::vector< float > & valuesForCell(const Identifier id)
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::vector< std::string > &definitions, MsgStream &logStr)
id_iterator channel_begin() const
Returns an iterator pointing to a channel identifier collection.
SG::ReadCondHandleKey< CaloNoise > m_totalNoiseKey
const_pointer_type cptr()
const LArOnlineID * m_onlineID