|
ATLAS Offline Software
|
Go to the documentation of this file.
13 "CaloCellGroup of allowed deviation of cov[i]");
15 "CaloCellGroup of allowed deviation of cov[i] (average over one FEB,");
18 "Number of samples (covr elements) to check");
35 ATH_MSG_INFO (
"Initialize covariance tolerances (CaloCellGroup)" ) ;
38 ATH_MSG_ERROR (
"Failed to initialize CaloCellGroup of covariance tolerances!" ) ;
39 return StatusCode::FAILURE;
42 ATH_MSG_ERROR (
"Configuration error: Expected three covariance tolerance values (one per gain), got "
44 return StatusCode::FAILURE;
50 ATH_MSG_INFO (
"Initialize covariance FEB tolerances (CaloCellGroup)" ) ;
53 ATH_MSG_ERROR (
"Failed to initialize CaloCellGroup of covariance tolerances!" ) ;
54 return StatusCode::FAILURE;
57 ATH_MSG_ERROR (
"Configuration error: Expected three covariance tolerance values (one per gain), got "
59 return StatusCode::FAILURE;
64 return StatusCode::SUCCESS;
70 if (gain<0 || gain>2) {
75 if (
val.m_vAutoCorr.size()==0) {
79 if (
ref.m_vAutoCorr.size()==0) {
84 const float covVal=
val.m_vAutoCorr[0];
85 const float covRef=
ref.m_vAutoCorr[0];
94 if (!dataPerFEB || dataPerFEB->
febid!=febid) {
98 dataPerFEB->
covVal+=covVal;
99 dataPerFEB->
covRef+=covRef;
106 const size_t s=
val.m_vAutoCorr.size();
107 const size_t sr=
ref.m_vAutoCorr.size();
108 for (
size_t i=0;
i<
s;++
i) {
109 const float covVal_i=
val.m_vAutoCorr[
i];
110 if (fabs(covVal_i)>1.0) {
112 << std::setprecision(4) << covVal_i <<
endmsg;
120 const float covRef_i=
ref.m_vAutoCorr[
i];
121 if (fabs(covVal_i-covRef_i)> covTolerance){
123 std::stringstream devMsg;
124 devMsg.setf(std::ios::fixed,std::ios::floatfield);
126 <<
" (" << covRef_i <<
", " << std::setprecision(2) << ((covVal_i-covRef_i)/covRef_i)*100 <<
"%)";
143 msg().setf(std::ios::fixed,std::ios::floatfield);
145 dataPerFeb.covVal/=dataPerFeb.nEntries;
146 dataPerFeb.covRef/=dataPerFeb.nEntries;
151 if (fabs(dataPerFeb.covVal-dataPerFeb.covRef)>covToleranceFEB){
153 << dataPerFeb.covVal <<
" (" << dataPerFeb.covRef <<
")" <<
endmsg;
171 sc=StatusCode::RECOVERABLE;
174 sc=StatusCode::RECOVERABLE;
const LArOnlineID_Base * m_onlineHelper
unsigned m_nFailedValidation
Number of channels for which vaildateChannel returned false.
unsigned m_nSamplesToCheck
Number of elements of the Covariance vector that should be checked.
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.
unsigned m_nEntriesGlobal
CaloCellGroupList m_covTolerance
bool msgLvl(const MSG::Level lvl) const
bool validateChannel(const LArCondObj &ref, const LArCondObj &val, const HWIdentifier chid, const int gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override final
Method to validate readout channels.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual StatusCode preLoop() override
Executed before the loop over all channels to reset global sums.
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
Method executed after the loop over all channels The implementation in the base class writes out only...
const CaloCell_Base_ID * m_caloId
CONDITIONSCONTAINER::LArCondObj LArCondObj
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
MSG::Level m_myMsgLvl
Message level for reporting deviations.
std::vector< std::string > m_covToleranceFEBInit
Covariace tolerance of one FEB (job-Property)
LArAutoCorrValidationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Regular algorithm constructor.
CaloCellGroupList m_covToleranceFEB
#define ATH_MSG_WARNING(x)
const boost::regex ref(r_ef)
unsigned m_maxmessages
Limit for the number of messages about indiviual deviating channels (usd only by derived class)
Algorithm to validate LAr Autocorr;.
std::vector< std::string > m_covToleranceInit
Covariance tolerance (job-Property)
const std::string channelDescription(const HWIdentifier &chid, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const unsigned gain=99, bool isFeb=false) const
Textual representation of gain and location of a certain cell or FEB.
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override
Summary method executed after the loop over all channels.
const std::vector< float > & valuesForCell(const Identifier id)
bool setDefinition(const CaloCell_Base_ID *caloCellId, const std::vector< std::string > &definitions, MsgStream &logStr)
bool m_doFebAverages
wether to compare feb-averages (used only by derived class)
std::vector< DataPerFEB > m_vDataPerFEB
bool febSummary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
Method to compare FEB averages.