|
ATLAS Offline Software
|
Go to the documentation of this file.
59 m_LArOnlineIDHelper(nullptr)
73 ATH_MSG_INFO(
"Initialize LArCoherentNoisefractionMonAlg" );
86 ATH_MSG_ERROR(
"Wrong configuration of LArCoherentNoisefractionMonAlg, bombing !");
87 return StatusCode::FAILURE;
89 unsigned int nGroups=0;
96 return StatusCode::FAILURE;
101 bool plotThisFEB=
false;
108 if(plotThisFEB)
m_febMap.emplace_back(*feb);
118 return StatusCode::SUCCESS;
129 if(
m_FEBlist.size() == 0)
return StatusCode::SUCCESS;
138 if(!trigTool.empty()) {
140 const int ABORT_GAP_START = 3446;
141 const int ABORT_GAP_END = 3563;
143 passBCID = ((trig_chain ==
"HLT_noalg_cosmiccalo_L1RD1_EMPTY")?(ctx.eventID().bunch_crossing_id() >= ABORT_GAP_START && ctx.eventID().bunch_crossing_id() <= ABORT_GAP_END):
true);
144 passTrig=(passTrig || (passBCID && trigTool->isPassed(trig_chain)));
148 ATH_MSG_INFO(
"Running as 'calibration run'. No trigger selection will be applied...");
153 return StatusCode::SUCCESS;
163 return StatusCode::FAILURE;
180 std::map<std::pair<HWIdentifier,unsigned>, std::vector<float> > div_array;
190 for ( ; itDig!=itDig_e;++itDig) {
199 const std::vector<short>* digito = &pLArDigit->
samples();
208 if(div_array.count(std::make_pair(febID,
group)) > 0) {
210 std::vector<float> &tmparr=div_array.at(std::make_pair(febID,
group));
211 short sample=digito->at(2);
212 float sdiff =
sample-pedestal;
214 tmparr.push_back(sdiff);
216 tmparr.push_back(sdiff);
218 tmparr.push_back(sdiff);
220 tmparr.push_back(sdiff);
222 tmparr.push_back(sdiff);
224 tmparr.push_back(sdiff);
226 tmparr.push_back(sdiff);
228 tmparr.push_back(sdiff);
230 tmparr.push_back(sdiff);
232 tmparr.push_back(sdiff);
234 tmparr.push_back(sdiff);
236 tmparr.push_back(sdiff);
238 tmparr.push_back(sdiff);
241 catch (
const std::out_of_range& oor) {
256 for(
auto const& feb_entry :
m_febMap) {
257 std::string febstr =
febString(feb_entry);
264 return StatusCode::SUCCESS;
275 return eb+ac+Form(
"ft%02d",
FT)+Form(
"slot%02d",SL);
281 for(
auto it : *input_vector) tmean +=
it;
282 tmean = tmean / input_vector->size();
283 for(
auto it : *input_vector) tdiv += (tmean -
it)*(tmean -
it);
284 tdiv = tdiv / input_vector->size();
289 for(
auto it : *input_vector) tsum +=
it;
const LArOnlineID * m_LArOnlineIDHelper
services
def retrieve(aClass, aKey=None)
virtual float pedestal(const HWIdentifier &id, int gain) const =0
double calc_dev(std::vector< float > *input_vector) const
Const iterator class for DataVector/DataList.
std::string febString(const HWIdentifier) const
build the FEB string, following instructions from python config
SG::ReadCondHandleKey< ILArPedestal > m_keyPedestal
Handle to pedestal.
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
const std::vector< short > & samples() const
const HWIdentifier & hardwareID() const
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
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...
id_iterator feb_begin() const
Returns an iterator pointing to a feb identifier collection.
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual ~LArCoherentNoisefractionMonAlg()
Default destructor.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Property< std::vector< unsigned > > m_groupNChan
Base class for Athena Monitoring Algorithms.
Gaudi::Property< std::vector< std::string > > m_groupNames
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
Liquid Argon digit base class.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< HWIdentifier > m_febMap
Gaudi::Property< std::vector< bool > > m_processGroup
int pos_neg(const HWIdentifier id) const
Return the side of a hardware cell identifier pos_neg = [0,1] positive-side or negative-side Barrel...
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
id_iterator feb_end() const
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
double calc_sum_dev(std::vector< float > *input_vector) const
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Handle to cabling.
StatusCode initialize(bool used=true)
bool isEMBchannel(const HWIdentifier id) const
SG::ReadHandleKey< LArDigitContainer > m_LArDigitContainerKey
Handle to digits.
virtual StatusCode initialize() override
initialize
std::vector< std::map< std::string, int > > m_histoGroups
the group array
Gaudi::Property< std::vector< std::string > > m_FEBlist
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
CaloGain::CaloGain gain() const
LArCoherentNoisefractionMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_isCalibrationRun
to avoid asking for triggers in case of a calibration run
Declare a monitored scalar variable.
virtual StatusCode initialize() override
initialize