90 if (febSet.find(fName)!=febSet.end()) {
95 return StatusCode::SUCCESS;
104 ATH_MSG_DEBUG(
"Plotting switched off, either we are online and custom FEB list is empty, OR something went wrong with the custom list of FEBs passed");
105 return StatusCode::SUCCESS;
114 constexpr unsigned int ABORT_GAP_START = 3446;
115 constexpr unsigned int ABORT_GAP_END = 3563;
116 const unsigned int bcid=ctx.eventID().bunch_crossing_id();
119 return StatusCode::SUCCESS;
128 return StatusCode::FAILURE;
150 for (
const LArDigit* pDig : *pLArDigitContainer) {
153 auto febDat=febMap.find(fid);
154 if (febDat!=febMap.end()) {
156 double ped = pedestals->
pedestal(chid,gain);
158 febDat->second.m_digitsAndPed.emplace_back(std::make_pair(pDig,ped));
165 for (
auto& [febid,febdat] : febMap) {
167 auto chanMean =
Monitored::Collection(
"chanMean",febdat.m_meanSum,[](
const std::pair<int,double> ch){return ch.second;});
168 auto chanMeanX =
Monitored::Collection(
"chanMeanX",febdat.m_meanSum,[](
const std::pair<int,double> ch){return ch.first;});
169 auto chanPartSum =
Monitored::Collection(
"chanPartSum",febdat.m_partSum,[](
const std::pair<std::pair<int,int>,
double> ch){return ch.second;});
170 auto chanPartSumX =
Monitored::Collection(
"chanPartSumX",febdat.m_partSum,[](
const std::pair<std::pair<int,int>,
double> ch){return std::min(ch.first.first,ch.first.second);});
171 auto chanPartSumY =
Monitored::Collection(
"chanPartSumY",febdat.m_partSum,[](
const std::pair<std::pair<int,int>,
double> ch){return std::max(ch.first.first,ch.first.second);});
179 return StatusCode::SUCCESS;
197 if(!cabling->isOnlineConnected(
ID))
209 for (
size_t i1=0;i1<S;++i1) {
211 const int ch1 = lArOnlineIDHelper->
channel(pDig1->channelID());
213 for (
const short adc : pDig1->samples()) {
214 m_meanSum.emplace_back(ch1,adc-pedestal1);
217 for (
size_t i2=i1;i2<S;++i2) {
219 const int ch2 = lArOnlineIDHelper->
channel(pDig2->channelID());
221 const unsigned nADC=std::min(pDig1->nsamples(),pDig2->nsamples());
222 for (
unsigned i=0;i<nADC;++i) {
223 sumSquare+=((pDig1->samples().at(i)-pedestal1)*(pDig2->samples().at(i)-pedestal2));
225 m_partSum.emplace_back(std::make_pair(std::make_pair(ch1,ch2),sumSquare));
#define ATH_CHECK
Evaluate an expression and check for errors.
std::vector< Identifier > ID
LArBadXCont< LArBadChannel > LArBadChannelCont
const ServiceHandle< StoreGateSvc > & detStore() const
virtual StatusCode initialize() override
initialize
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
Liquid Argon digit base class.
std::map< std::string, int > m_noiseCorrGroups
const LArOnlineID * m_LArOnlineIDHelper
services
virtual ~LArNoiseCorrelationMonAlg()
Default destructor.
Gaudi::Property< std::string > m_noiseCorrGroupName
the group array
Gaudi::Property< bool > m_ignoreKnownBadChannels
bool use to mask the bad channels
virtual StatusCode initialize() override
initialize
LArBadChannelMask m_bcMask
Handle to bad-channel mask.
const std::string m_abortGapTrig
std::map< HWIdentifier, perFeb_t > m_febMapModel
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestal
Handle to pedestal.
SG::ReadHandleKey< LArDigitContainer > m_LArDigitContainerKey
Handle to digits.
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
bool isGoodChannel(const HWIdentifier id, const float ped, const LArOnOffIdMapping *cabling, const LArBadChannelCont *bc) const
check if channel is ok for monitoring
SG::ReadCondHandleKey< LArBadChannelCont > m_bcContKey
Gaudi::Property< bool > m_plotsOFF
Gaudi::Property< std::vector< std::string > > m_problemsToMask
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Handle to cabling.
Gaudi::Property< std::vector< std::string > > m_FEBlist
list of FEBs to monitor.
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Helper class to manipulate strings for LArOnlineID names.
std::vector< V > buildToolMap(const ToolHandleArray< GenericMonitoringTool > &tools, const std::string &baseName, int nHist)
Builds an array of indices (base case)
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
std::vector< std::pair< int, double > > m_meanSum
std::vector< std::pair< std::pair< int, int >, double > > m_partSum
std::vector< std::pair< const LArDigit *, double > > m_digitsAndPed
void sumSamples(const LArOnlineID *lArOnlineIDHelper)
void fill(H5::Group &out_file, size_t iterations)