20 "Minimal ADC, where the RampTime is computed");
22 "Allowed deviation of ramp (%)");
24 "Allowed deviation of ramp (average over one FEB,");
26 "Allowed deviation of the reconstructed time (ns)");
34 ATH_MSG_ERROR (
"Failed to initialize CaloCellGroup of thresholds!" ) ;
35 return StatusCode::FAILURE;
39 ATH_MSG_ERROR (
"Expected three values in CaloCellGroup of thresholds for three gains!" ) ;
40 return StatusCode::FAILURE;
47 ATH_MSG_ERROR (
"Failed to initialize CaloCellGroup of thresholds!" ) ;
48 return StatusCode::FAILURE;
52 ATH_MSG_ERROR (
"Expected three values in CaloCellGroup of thresholds for three gains!" ) ;
53 return StatusCode::FAILURE;
65 for (
const std::string& key_it :
m_contKey) {
68 ATH_MSG_WARNING (
"Unable to retrieve LArRawRampContainer with key " << key_it ) ;
71 ATH_MSG_DEBUG (
"Got LArRawRampContainer with key " << key_it ) ;
76 ATH_MSG_WARNING (
"No LArRawRampContainer found. Only fitted ramp will be tested " ) ;
83 for (;cont_it!=cont_it_e;++cont_it) {
84 const std::vector<LArRawRamp::RAMPPOINT_t>& singleRamp=(*cont_it)->theRamp();
85 for (
unsigned int DACIndex=0; DACIndex<singleRamp.size(); DACIndex++) {
88 <<
" DAC value : " << singleRamp[DACIndex].DAC
89 <<
" ADC value : " << singleRamp[DACIndex].
ADC
90 <<
" Time " << singleRamp[DACIndex].TimeMax ) ;
95 msg().setf(std::ios::fixed,std::ios::floatfield);
97 msg() <<
m_myMsgLvl <<
"Deviating! chan= " << (*cont_it)->channelID()<<
" gain= "<<(*cont_it)->gain() <<
" DeltaT=" << singleRamp[DACIndex].TimeMax <<
" DAC = " << singleRamp[DACIndex].DAC <<
endmsg;
105 return StatusCode::SUCCESS;
112 Identifier offlineID = cabling->cnvToIdentifier(chid);
118 dataPerFEB.
rampVal+=val.m_vRamp[1];
134 dataPerSector.
rampVal+=val.m_vRamp[1];
143 std::stringstream devMsg;
144 devMsg.setf(std::ios::fixed,std::ios::floatfield);
146 devMsg <<
"Deviating! " <<
channelDescription(chid,cabling,bcCont,gain) <<
" Ramp: " << val.m_vRamp[1] <<
" (" <<
ref.m_vRamp[1] <<
", ";
148 devMsg << 100*(val.m_vRamp[1]-
ref.m_vRamp[1])/
ref.m_vRamp[1] <<
"%)";
179 const Identifier id=cabling->cnvToIdentifier(febId);
184 msg().setf(std::ios::fixed,std::ios::floatfield);
194 <<
" FEBs deviating from reference" ) ;
198 <<
" FEBs withing given tolerance." ) ;
222 Identifier offlineID = cabling->cnvToIdentifier(chid);
228 if (dataPerSector.rampVal == 0 ){
229 ATH_MSG_ERROR (
"Found Sector with Ramp Average equals to zero" ) ;
231 <<
" layer " <<
m_caloId->sampling(regId) <<
" eta " <<
eta <<
" gain " << gain);
234 float ratio = val.m_vRamp[1]/dataPerSector.rampVal;
236 msg() <<
m_myMsgLvl <<
"!!! Deviating Sector channel = " <<
channelDescription(chid,cabling,bcCont,gain) <<
"Ramp: " << val.m_vRamp[1] <<
" (Average Sector Ramp: " << dataPerSector.rampRef <<
")" <<
endmsg;
244 StatusCode
sc=StatusCode::SUCCESS;
247 sc=StatusCode::RECOVERABLE;
250 sc=StatusCode::RECOVERABLE;
267 return LArCondObj(std::vector<float>(ramp.begin(),ramp.end()));
const boost::regex ref(r_ef)
Scalar eta() const
pseudorapidity method
#define ATH_MSG_WARNING(x)
LArBadXCont< LArBadChannel > LArBadChannelCont
LArCalibValidationAlg< LArRampComplete, ILArRamp > LArRampValidationBase
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
DataModel_detail::const_iterator< DataVector > const_iterator
LArRampComplete::LArCondObj LArCondObj
const LArOnlineID_Base * m_onlineHelper
const CaloCell_Base_ID * m_caloId
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
const ILArRamp * m_reference
const std::string channelDescription(const HWIdentifier &chid, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont, const unsigned gain=99, bool isFeb=false) const
unsigned m_nFailedValidation
unsigned m_nEntriesGlobal
LArRampValidationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Regular algorithm constructor.
CaloCellGroupList m_toleranceFEB
Ramp tolerance (FEB average) as initializer string CaloCellGroup object.
float m_rawrampTimeADC
Raw Ramp ADC (job-Property)
bool deviateFromAvg(const LArCondObj &val, const HWIdentifier chid, const int gain, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
virtual StatusCode summary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont) override
Summary method executed after the loop over all channels.
float m_rawrampTimeTolerance
Raw Ramp time tolerance (in ns) (job-Property)
bool m_hasRawRampContainer
To check if Raw Ramps are found.
std::unordered_map< Identifier, DataPerRegion > m_vDataPerSector
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 the ramps single readout channels.
CaloCellGroupList m_tolerance
Ramp tolerance as CaloCellGroup object.
LArCondObj getRefObj(const HWIdentifier chid, const int gain) const override final
Method implmented in derived class to get the reference object from ref-container.
std::vector< std::string > m_contKey
To store Gain Keys for Raw Ramps (job-Property)
bool febSummary(const LArOnOffIdMapping *cabling, const LArBadChannelCont *bcCont)
Method to compare FEB averages.
std::vector< std::string > m_toleranceInitFEB
Ramp tolerance (FEB average) as CaloCellGroup object (job-Property)
virtual StatusCode preLoop() override
Executed before the loop over all channels to reset global sums.
std::vector< std::string > m_toleranceInit
Ramp tolerance as init string for CellGroupObject (job-Property)
std::unordered_map< HWIdentifier, DataPerRegion > m_vDataPerFEB
LArRawRampContainer * m_rawRampContainer