ATLAS Offline Software
LArShapeDumper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "LArRawEvent/LArDigit.h"
8 #include "GaudiKernel/INTupleSvc.h"
12 #include "LArElecCalib/ILArShape.h"
13 
17 
19 #include "CaloDetDescr/CaloDetDescrElement.h"
23 #include "LArCafJobs/ShapeInfo.h"
24 #include "LArCafJobs/CellInfo.h"
25 #include "LArCafJobs/RunData.h"
26 #include "LArCafJobs/EventData.h"
29 #include "TFile.h"
30 #include "TMath.h"
31 
32 #include <regex>
33 
34 
35 #include <vector>
36 #include <iostream>
37 using std::cout;
38 using std::endl;
39 
40 using namespace LArSamples;
41 
42 
43 LArShapeDumper::LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocator) :
44  AthAlgorithm(name, pSvcLocator),
45  m_count(0),
46  m_nWrongBunchGroup(0),
47  m_nPrescaledAway(0),
48  m_nLArError(0),
49  m_nNoDigits(0),
50  m_onlineHelper(nullptr),
51  m_doEM(false),
52  m_doHEC(false),
53  m_doFCAL(false),
54  m_samples(nullptr)
55 {
56  declareProperty("FileName", m_fileName = "samples.root");
57  declareProperty("MaxChannels", m_maxChannels = 200000);
58  declareProperty("DigitsKey", m_digitsKey = "FREE");
59  declareProperty("ChannelsKey", m_channelsKey = "LArRawChannels");
60  declareProperty("Prescale", m_prescale = 1);
61  declareProperty("CaloType", m_caloType = "EMHECFCAL");
62  declareProperty("EnergyCut", m_energyCut = -1);
63  declareProperty("NoiseSignifCut", m_noiseSignifCut = 3);
64  declareProperty("MinADCMax", m_minADCMax = -1);
65  declareProperty("Gains", m_gainSpec = "HIGH,MEDIUM,LOW");
66  declareProperty("DumpDisconnected", m_dumpDisc = false);
67  declareProperty("DoStream", m_doStream = false);
68  declareProperty("DoTrigger", m_doTrigger = true);
69  declareProperty("DoOFCIter", m_doOFCIter = true);
70  declareProperty("DoAllEvents", m_doAllEvents = true);
71  declareProperty("DumpChannelInfos", m_dumpChannelInfos = false);
72  declareProperty("DoRoIs", m_doRoIs = true);
73  declareProperty("TriggerNames", m_triggerNames);
74  declareProperty("DoAllLvl1", m_doAllLvl1 = true);
75  declareProperty("onlyEmptyBC",m_onlyEmptyBC=false);
76 }
77 
78 
80 {
81 }
82 
83 
85 {
86  ATH_MSG_DEBUG ("in initialize()");
87 
88  m_samples = new DataStore();
89 
91  ATH_CHECK( m_BCKey.initialize() );
96 
97  ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
99 
102 
103 
104  if (m_doTrigger) {
105  CHECK( m_trigDec.retrieve() );
106  }
107 
108  ATH_CHECK( m_dumperTool.retrieve() );
109 
110  if (m_dumperTool->doShape()) {
111  ATH_CHECK( detStore()->regHandle(m_autoCorr, "LArAutoCorr") );
112  }
113 
114  std::transform(m_caloType.begin(), m_caloType.end(), m_caloType.begin(), toupper);
115  m_doEM = (m_caloType.find("EM") != std::string::npos);
116  m_doHEC = (m_caloType.find("HEC") != std::string::npos);
117  m_doFCAL = (m_caloType.find("FCAL") != std::string::npos);
118 
119  std::transform(m_gainSpec.begin(), m_gainSpec.end(), m_gainSpec.begin(), toupper);
120  m_gains[CaloGain::LARHIGHGAIN] = (m_gainSpec.find("HIGH") != std::string::npos);
121  m_gains[CaloGain::LARMEDIUMGAIN] = (m_gainSpec.find("MEDIUM") != std::string::npos);
122  m_gains[CaloGain::LARLOWGAIN] = (m_gainSpec.find("LOW") != std::string::npos);
123 
124  //if (m_onlyEmptyBC)
125  //ATH_CHECK(m_bcidTool.retrieve());
126 
127  return StatusCode::SUCCESS;
128 }
129 
130 
132 {
133  m_runData = std::make_unique<RunData>(0);
134 
135  if (m_doTrigger) {
136  std::vector<std::regex> regexs;
137  regexs.reserve(m_triggerNames.size());
138 for (const std::string& name : m_triggerNames) {
139  regexs.push_back(std::regex(name));
140  }
141 
142  std::vector<std::string> chains = m_trigDec->getListOfTriggers();
143  std::vector<std::string> myChains;
144  std::cmatch match;
145 
146  for (const std::string& chain : chains) {
147  ATH_MSG_INFO ( "Configured chain : " << chain );
148  for (const std::regex& regex : regexs) {
149  if (std::regex_match(chain.c_str(), match, regex)) myChains.push_back(chain);
150  }
151  }
152  for (const std::string& group : m_trigDec->getListOfGroups())
153  ATH_MSG_INFO ( "Configured group : " << group );
154  const Trig::ChainGroup* calibStreamGroup = m_trigDec->getChainGroup("Calibration");
155  if (calibStreamGroup) {
156  std::vector<std::string> chains = calibStreamGroup->getListOfTriggers();
157  ATH_MSG_INFO ( "Chains for Calibration group:" );
158  for (const std::string& chain : chains)
159  ATH_MSG_INFO ( "Calib chain : " << chain );
160  }
161 
162  unsigned int idx = 0;
163 
164  if (m_doAllLvl1) {
165  const Trig::ChainGroup* group = m_trigDec->getChainGroup("L1_.*");
166  for (const std::string& l1Item : group->getListOfTriggers()) {
167  const TrigConf::TriggerItem* confItem = m_trigDec->ExperimentalAndExpertMethods().getItemConfigurationDetails(l1Item);
168  if (!confItem) {
169  ATH_MSG_WARNING ( "LVL1 item " << l1Item << ", obtained from TrigConfig, cannot be retrieved!" );
170  continue;
171  }
172  int pos = confItem->ctpId();
173  if (pos < 0 || pos >= 256) {
174  ATH_MSG_WARNING ( "LVL1 item " << l1Item << "has out-of-range ctpId " << pos );
175  continue;
176  }
177  m_runData->addBit(l1Item.c_str(), pos);
178  ATH_MSG_INFO ( "Adding LVL1 trigger bit for " << l1Item << " at position " << pos );
179  }
180  idx = 256;
181  }
182 
183  for (const std::string& name : myChains) {
184  if (m_trigDec->getListOfTriggers(name).empty()) {
185  ATH_MSG_WARNING ( "Requested trigger name " << name << " is not configured in this run" );
186  continue;
187  }
188  const Trig::ChainGroup* group = m_trigDec->getChainGroup(name);
189  if (!group) {
190  ATH_MSG_WARNING ( "Could not retrieve chain group for trigger " << name );
191  continue;
192  }
193  m_runData->addBit(name.c_str(), idx++);
194  m_triggerGroups.push_back(group);
195  ATH_MSG_INFO ( "Adding trigger bit for " << name << " at position " << idx-1 );
196  }
197  }
198  return StatusCode::SUCCESS;
199 }
200 
201 
203 {
204  m_count++;
205  const EventContext& ctx = Gaudi::Hive::currentContext();
206  if ((m_prescale > 1 && m_random.Rndm() > 1.0/m_prescale) || m_prescale <= 0) {
207  ATH_MSG_VERBOSE ( "======== prescaling event "<< m_count << " ========" );
209  return StatusCode::SUCCESS;
210  }
211 
212  ATH_MSG_VERBOSE ( "======== executing event "<< m_count << " ========" );
213 
214  const xAOD::EventInfo* eventInfo = nullptr;
215  ATH_CHECK( evtStore()->retrieve(eventInfo) );
216 
217  int event = eventInfo->eventNumber();
218  int run = eventInfo->runNumber();
219  int lumiBlock = eventInfo->lumiBlock();
220  int bunchId = eventInfo->bcid();
221 
222 
224  ATH_MSG_DEBUG("Ignoring Event b/c of LAr ERROR");
225  m_nLArError++;
226  return StatusCode::SUCCESS;
227  }
228 
229 
231  const BunchCrossingCondData* bunchCrossing=*bccd;
232  if (!bunchCrossing) {
233  ATH_MSG_ERROR("Failed to retrieve Bunch Crossing obj");
234  return StatusCode::FAILURE;
235  }
236 
238  ATH_CHECK(caloMgrHandle.isValid());
239  const CaloDetDescrManager* caloMgr = *caloMgrHandle;
240 
241  if (m_onlyEmptyBC) {
242  if (!bccd->isFilled(bunchId)) {
243  ATH_MSG_DEBUG("Ignoring Event with bunch crossing type ");
245  return StatusCode::SUCCESS;
246  }
247  }
248 
249 
250  EventData* eventData = nullptr;
251  int eventIndex = -1;
252  if (m_doAllEvents) {
253  eventIndex = makeEvent(eventData, run, event, lumiBlock, bunchId);
254  if (eventIndex < 0) return StatusCode::FAILURE;
255  }
256 
257  const LArDigitContainer* larDigitContainer;
258  if (!m_digitsKey.empty())
259  ATH_CHECK( evtStore()->retrieve(larDigitContainer, m_digitsKey) );
260  else
261  ATH_CHECK( evtStore()->retrieve(larDigitContainer) );
262 
263  if (larDigitContainer->empty()) {
264  ATH_MSG_WARNING ( "LArDigitContainer with key=" << m_digitsKey << " is empty!" );
265  m_nNoDigits++;
266  return StatusCode::SUCCESS;
267  }
268 
271 
272 
274  const LArOnOffIdMapping* cabling=*cablingHdl;
275  if(!cabling) {
276  ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" );
277  return StatusCode::FAILURE;
278  }
279 
281  const LArADC2MeV* adc2MeV=*adc2mevHdl;
282  if(!adc2MeV) {
283  ATH_MSG_ERROR( "Failed to retreive ADC2MeV cond obj" );
284  return StatusCode::FAILURE;
285  }
286 
288  const ILArPedestal* pedestals=*pedHdl;
289  if (!pedestals) {
290  ATH_MSG_ERROR("Failed to retrieve pedestal cond obj");
291  return StatusCode::FAILURE;
292  }
293 
295  const LArBadChannelCont *bcCont {*readHandle};
296  if(!bcCont) {
297  ATH_MSG_ERROR( "Do not have Bad chan container " << m_BCKey.key() );
298  return StatusCode::FAILURE;
299  }
300 
301  const LArOFIterResultsContainer* ofIterResult = nullptr;
302  if (m_doOFCIter) {
303  if (evtStore()->contains<LArOFIterResultsContainer> ("LArOFIterResult")) {
304  ATH_CHECK( evtStore()->retrieve(ofIterResult, "LArOFIterResult") );
305  } else {
306  ATH_MSG_WARNING("Do not have LArOFIterResult in this event");
307  }
308  }
309 
310  const LArFebErrorSummary* larFebErrorSummary = nullptr;
311  ATH_CHECK( evtStore()->retrieve(larFebErrorSummary, "LArFebErrorSummary") );
312  const std::map<unsigned int,uint16_t>& febErrorMap = larFebErrorSummary->get_all_febs();
313  std::map<unsigned int, const LArRawChannel*> channelsToKeep;
314 
315  for (LArRawChannelContainer::const_iterator channel = rawChannelContainer->begin();
316  channel != rawChannelContainer->end(); ++channel)
317  {
318  if (m_energyCut > 0 && TMath::Abs(channel->energy()) < m_energyCut) continue;
319  if (m_bcMask.cellShouldBeMasked(bcCont,channel->channelID())) continue;
320 
321  IdentifierHash hash = m_onlineHelper->channel_Hash(channel->channelID());
322 
323  if (!hash.is_valid()) {
324  ATH_MSG_FATAL ( "Found a LArRawChannel whose HWIdentifier (" << channel->channelID()
325  << ") does not correspond to a valid hash -- returning StatusCode::FAILURE." );
326  return StatusCode::FAILURE;
327  }
328  channelsToKeep[hash] = &*channel;
329  if (m_dumpChannelInfos) {
331  CellInfo* info = nullptr;
332  if (!histCont) {
333  HWIdentifier channelID = channel->hardwareID();
334  const Identifier id = cabling->cnvToIdentifier(channelID);
335  const CaloDetDescrElement* caloDetElement = caloMgr->get_element(id);
336  info = m_dumperTool->makeCellInfo(channelID, id, caloDetElement);
337  if (!info) continue;
339  }
340  }
341  }
342 
343  std::map<HWIdentifier, LArOFIterResultsContainer::const_iterator> ofcResultPosition;
344  if (m_doOFCIter && ofIterResult) {
345  for (LArOFIterResultsContainer::const_iterator ofResult = ofIterResult->begin();
346  ofResult != ofIterResult->end(); ++ofResult)
347  ofcResultPosition[ofResult->getChannelID()] = ofResult;
348 
349  ATH_MSG_INFO ( "njpbSizes : " << larDigitContainer->size()
350  << " " << (ofIterResult ? ofIterResult->size() : 0) << " "
351  << rawChannelContainer->size() << " " << channelsToKeep.size() );
352  }
354  const CaloNoise* noiseCDO=*noiseHdl;
355 
356  for (LArDigitContainer::const_iterator digit = larDigitContainer->begin();
357  digit != larDigitContainer->end(); ++digit)
358  {
359  //Check Energy selection
360  IdentifierHash hash = m_onlineHelper->channel_Hash((*digit)->channelID());
361 
362  std::map<unsigned int, const LArRawChannel*>::const_iterator findChannel = channelsToKeep.find(hash);
363  if (findChannel == channelsToKeep.end()) continue;
364  const LArRawChannel* rawChannel = findChannel->second;
365 
366  //Check detector part
367  HWIdentifier channelID = (*digit)->hardwareID();
368  if ((m_onlineHelper->isEMBchannel(channelID) || m_onlineHelper->isEMECchannel(channelID)) && !m_doEM) continue;
369  if (m_onlineHelper->isHECchannel(channelID) && !m_doHEC) continue;
370  if (m_onlineHelper->isFCALchannel(channelID) && !m_doFCAL) continue;
371 
372  //Check gain
373  CaloGain::CaloGain gain=(*digit)->gain();
374  if (gain >= CaloGain::LARNGAIN || m_gains[gain] == false) continue;
375 
376  //Check if connected
377  const bool connected = cabling->isOnlineConnected(channelID);
378  if (!connected && !m_dumpDisc) continue;
379 
380  // Check ADCMax selection
381  float pedestal = pedestals->pedestal(channelID, gain);
382  float pedestalRMS = pedestals->pedestalRMS(channelID, gain);
383  if (m_minADCMax > 0 || m_noiseSignifCut > 0) {
384  const std::vector<short>& samples = (*digit)->samples();
385  double maxValue = -1;
386  for (short sample : samples)
387  if (sample - pedestal > maxValue) maxValue = sample - pedestal;
388  if (m_minADCMax > 0 && fabs(maxValue) < m_minADCMax) continue;
389  if (m_noiseSignifCut > 0 && fabs(maxValue) < pedestalRMS*m_noiseSignifCut) continue;
390  }
391 
392  const Identifier id = cabling->cnvToIdentifier(channelID);
393  const CaloDetDescrElement* caloDetElement = nullptr;
394 
396  CellInfo* info = nullptr;
397  if (!histCont) {
398  if (!caloDetElement) caloDetElement = caloMgr->get_element(id);
399  info = m_dumperTool->makeCellInfo(channelID, id, caloDetElement);
400  if (!info) continue;
401  histCont = m_samples->makeNewHistory(hash, info);
402  }
403  else
404  info = histCont->cell_info();
405 
406  float noise = -1;
407  unsigned int status = 0xFFFFFFFF;
408  if (connected) {
409  if (!caloDetElement) caloDetElement = caloMgr->get_element(id);
410  noise = noiseCDO->getNoise(id,gain);
411  status = bcCont->status(channelID).packedData();
412  HWIdentifier febId = m_onlineHelper->feb_Id(m_onlineHelper->feedthrough_Id(channelID), m_onlineHelper->slot(channelID));
413  std::map<unsigned int,uint16_t>::const_iterator findError = febErrorMap.find(febId.get_identifier32().get_compact());
414  if (findError != febErrorMap.end()) {
415  unsigned int febErrWord = findError->second;
416  status = status & (febErrWord >> 17);
417  }
418  }
419 
420  //std::vector<float> autoCorr;
422  if (m_dumperTool->doShape()) {
423  const LArAutoCorrComplete* autoCorrObj = dynamic_cast<const LArAutoCorrComplete*>(m_autoCorr.cptr());
424  if (!autoCorrObj)
425  ATH_MSG_WARNING ( "AutoCorr object is not of type LArAutoCorrComplete!" );
426  else
427  autoCorr = autoCorrObj->autoCorr(channelID, gain);
428  }
429 
430  if (!info->shape((*digit)->gain())) // this happens if doAllShapes is off
431  info->setShape((*digit)->gain(), m_dumperTool->retrieveShape(channelID, gain));
432 
433  if (!eventData) {
434  eventIndex = makeEvent(eventData, run, event, lumiBlock, bunchId); // this happens if doAllEvents is off
435  if (eventIndex < 0) return StatusCode::FAILURE;
436  }
437 
438  DataContainer* data =
439  new DataContainer((*digit)->gain(), (*digit)->samples(),
440  rawChannel->energy(),
441  rawChannel->time()/double(1000),
442  rawChannel->quality(),
443  eventIndex,
444  autoCorr,
445  noise, pedestal, pedestalRMS, status);
446 
447  // std::map<HWIdentifier, LArOFIterResultsContainer::const_iterator>::const_iterator findResult = ofcResultPosition.find(channelID);
448 // if (findResult != ofcResultPosition.end()) {
449 // LArOFIterResultsContainer::const_iterator ofResult = findResult->second;
450 // if (ofResult->getValid() && ofResult->getConverged())
451 // data->setADCMax(ofResult->getAmplitude());
452 // }
453 // else
454 // msg() << MSG::INFO << "OFResult for channel 0x" << MSG::hex << channelID << MSG::dec
455 // << " not found. (size was " << ofcResultPosition.size() << ")" << endmsg;
456 
457 
458  const auto ramp=adc2MeV->ADC2MEV(channelID,gain); //dudu
459  data->setADCMax(rawChannel->energy()/ramp[1]); //pow(ADCPeak,i); //dudu
460 
461 
462  histCont->add(data);
463  }
464 
465  //msg() << MSG::INFO << "Current footprint = " << m_samples->footprint() << ", size = " << m_samples->size() << endmsg;
466  return StatusCode::SUCCESS;
467 }
468 
469 
471 {
472  m_samples->addRun(m_runData.release());
473  return StatusCode::SUCCESS;
474 }
475 
476 
478 {
479  ATH_MSG_DEBUG ("in finalize() ");
480 
481  if (m_prescale>1) ATH_MSG_INFO("Prescale dropped " << m_nPrescaledAway << "/" << m_count << " events");
482  if (m_onlyEmptyBC) ATH_MSG_INFO("Dropped " << m_nWrongBunchGroup << "/" << m_count << " events b/c of wrong bunch group");
483  ATH_MSG_INFO("Dropped " << m_nLArError << "/" << m_count << " Events b/c of LAr Veto (Noise burst or corruption)");
484 
485 
486  int n = 0;
487  for (unsigned int i = 0; i < m_samples->nChannels(); i++)
488  if (m_samples->historyContainer(i)) {
489  if (m_samples->historyContainer(i)->cellInfo() == nullptr)
490  ATH_MSG_INFO ( "Cell with no cellInfo at index " << i << " !!" );
491  //else if (m_samples->historyContainer(i)->cellInfo()->shape() == 0)
492  //msg() << MSG::INFO << "Cell with no ShapeInfo at index " << i << " !!" << endmsg;
493  //msg() << MSG::INFO << "Non-zero cell at index " << i << " " << m_samples->shape(i)->size() << endmsg;
494  n++;
495  }
496 
497  //for (unsigned int i = 0; i < m_samples->nEvents(); i++) {
498  // msg() << MSG::INFO << "Event " << i << " = "
499  // << m_samples->eventData(i)->run() << " " << m_samples->eventData(i)->event()
500  // << "trigger = " << m_samples->eventData(i)->triggers() << ", nRoIs = " << m_samples->eventData(i)->nRoIs() << endmsg;
501  // }
502  ATH_MSG_INFO ( "Non-zero cells = " << n << ", footprint = " << m_samples->footprint() );
503  ATH_MSG_INFO ( "Writing..." );
504 
505  if (!m_doStream) {
506  m_samples->writeTrees(m_fileName.c_str());
507 /* TFile* f = TFile::Open(m_fileName.c_str(), "RECREATE");
508  msg() << MSG::INFO << "Writing (2)..." << endmsg;
509  f->WriteObjectAny(m_samples, "Container", "LArSamples");
510  msg() << MSG::INFO << "Closing..." << endmsg;
511  f->Close();
512  msg() << MSG::INFO << "Deleting..." << endmsg;
513  delete m_samples;*/
514  msg() << MSG::INFO << "Done!" << endmsg;
515  }
516 
517  return StatusCode::SUCCESS;
518 }
519 
520 
522  int run, int event,
523  int lumiBlock, int bunchXing) const
524 {
525  std::vector<unsigned int> triggerWords;
526  if (m_doTrigger) {
527  const ROIB::RoIBResult* l1Result = nullptr;
528  if (evtStore()->retrieve(l1Result).isFailure() || !l1Result) {
529  ATH_MSG_FATAL ( "Could not retrieve RoIBResult!" );
530  return -1;
531  }
532  const std::vector<ROIB::CTPRoI> tav = l1Result->cTPResult().TAV();
533  for (const ROIB::CTPRoI& word : tav)
534  triggerWords.push_back(word.roIWord());
535 
536  for (const std::pair<const TString, unsigned int>& p : m_runData->triggerConfig()) {
537  while (triggerWords.size() <= p.second/32) triggerWords.push_back(0);
538  if (m_trigDec->isPassed(p.first.Data())) {
539  triggerWords[p.second/32] |= (0x1 << (p.second % 32));
540  //msg() << MSG::INFO << "Trigger line " << p.first.Data() << " passed" << endmsg;
541  }
542  }
543  //msg() << MSG::INFO << "Trigger words : ";
544  //for (unsigned int i = 0; i < triggerWords.size(); i++) msg() << MSG::INFO << triggerWords[i] << " ";
545  //msg() << MSG::INFO << endmsg;
546  }
547 
548  eventData = new EventData(event, 0, lumiBlock, bunchXing);
549  if (m_runData->run() == 0) m_runData->setRun(run);
550  eventData->setRunData(m_runData.get());
551  eventData->setTriggerData(triggerWords);
552  if (m_doRoIs) {
553  //msg() << MSG::INFO << "Filling RoI list" << endmsg;
554  for (const Trig::ChainGroup* group : m_triggerGroups) {
555  std::vector<Trig::Feature<TrigRoiDescriptor> > roIs = group->features().get<TrigRoiDescriptor>();
556  for (const Trig::Feature<TrigRoiDescriptor>& roI : roIs) {
557  //msg() << MSG::INFO << "Found an roi for chain ";
558  //for (unsigned int i = 0; i < group->getListOfTriggers().size(); i++) cout << group->getListOfTriggers()[i] << " ";
559  //cout << "@ " << roI.cptr()->eta() << ", " << roI.cptr()->phi() << ", TE = "
560  // << roI.te()->getId() << " " << Trig::getTEName(*roI.te()) << " with label " << roI.label() << endmsg;
561  eventData->addRoI(roI.cptr()->eta(), roI.cptr()->phi(), group->getListOfTriggers()[0].c_str(), roI.label().c_str());
562  //msg() << MSG::INFO << "nRoIs so far = " << eventData->nRoIs() << endmsg;
563  }
564  }
565  }
566  return m_samples->addEvent(eventData);
567 }
grepfile.info
info
Definition: grepfile.py:38
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
RunData.h
LArShapeDumper::m_dumperTool
ToolHandle< ILArShapeDumperTool > m_dumperTool
Definition: LArShapeDumper.h:100
ROIB::CTPRoI
ROIB::CTPRoI contains a RoI delivered by the CTP.
Definition: CTPRoI.h:28
ILArPedestal::pedestal
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArShapeDumper::m_gains
bool m_gains[CaloGain::LARNGAIN]
Definition: LArShapeDumper.h:131
LArShapeDumper::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: LArShapeDumper.h:113
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LArADC2MeV::ADC2MEV
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Definition: LArADC2MeV.h:32
Trig::Feature
Definition: Feature.h:112
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
TrigConf::TriggerItem::ctpId
int ctpId() const
Definition: TriggerItem.h:34
LArOnlineID_Base::channel_Hash
IdentifierHash channel_Hash(HWIdentifier channelId) const
Create channel_hash from channel_Id.
Definition: LArOnlineID_Base.cxx:1636
LArFebErrorSummary::get_all_febs
const std::map< unsigned int, uint16_t > & get_all_febs() const
get all febs with error
Definition: LArFebErrorSummary.cxx:47
BunchCrossingCondData
Definition: BunchCrossingCondData.h:23
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
maxValue
#define maxValue(current, test)
Definition: CompoundLayerMaterialCreator.h:22
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
LArShapeDumper::m_doOFCIter
bool m_doOFCIter
Definition: LArShapeDumper.h:128
LArSamples::EventData::setRunData
void setRunData(const RunData *runData)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:75
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
LArShapeDumper::m_gainSpec
std::string m_gainSpec
Definition: LArShapeDumper.h:96
RoIBResult.h
LArSamples::DataStore::historyContainer
const HistoryContainer * historyContainer(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:42
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArShapeDumper::execute
virtual StatusCode execute() override
Definition: LArShapeDumper.cxx:202
LArBadChannel.h
ILArPedestal
Definition: ILArPedestal.h:12
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArShapeDumper::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArShapeDumper.h:102
DataHandle::cptr
const_pointer_type cptr() const
safer explicit ptr accessor
LArShapeDumper::LArShapeDumper
LArShapeDumper(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArShapeDumper.cxx:43
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArSamples::DataStore::addEvent
unsigned int addEvent(EventData *eventData)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:55
LArPhysWave.h
LArShapeDumper::m_digitsKey
std::string m_digitsKey
Definition: LArShapeDumper.h:92
LArOnlineID_Base::slot
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...
Definition: LArOnlineID_Base.cxx:1961
LArBadChannelMask::buildBitMask
StatusCode buildBitMask(const std::vector< std::string > &problemsToMask, MsgStream &msg)
Definition: LArBadChannelMask.cxx:10
LArRawChannel::quality
uint16_t quality() const
Definition: LArRawChannel.h:174
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
LArSamples
Definition: AbsShape.h:24
LArShapeDumper.h
LArShapeDumper::initialize
virtual StatusCode initialize() override
Definition: LArShapeDumper.cxx:84
LArShapeDumper::m_nNoDigits
unsigned m_nNoDigits
Definition: LArShapeDumper.h:89
LArShapeComplete.h
LArSamples::EventData::addRoI
void addRoI(float eta, float phi, const char *name="", const char *label="")
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:73
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
LArShapeDumper::m_triggerNames
std::vector< std::string > m_triggerNames
Definition: LArShapeDumper.h:98
CaloNoise::getNoise
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
Definition: CaloNoise.h:34
LArShapeDumper::m_nLArError
unsigned m_nLArError
Definition: LArShapeDumper.h:88
LArBadChannelMask::cellShouldBeMasked
bool cellShouldBeMasked(const LArBadChannelCont *bcCont, const HWIdentifier &hardwareId) const
Definition: LArBadChannelMask.h:42
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArShapeDumper::m_nPrescaledAway
unsigned m_nPrescaledAway
Definition: LArShapeDumper.h:87
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
LArOFIterResultsContainer.h
ShapeInfo.h
LArShapeDumper::m_count
unsigned m_count
Definition: LArShapeDumper.h:84
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
xAOD::EventInfo_v1::Error
@ Error
The sub-detector issued an error.
Definition: EventInfo_v1.h:349
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
LArShapeDumper::m_caloType
std::string m_caloType
Definition: LArShapeDumper.h:93
LArShapeDumper::m_doAllEvents
bool m_doAllEvents
Definition: LArShapeDumper.h:129
CaloDetDescriptor.h
Definition of CaloDetDescriptor.
LArOnlineID_Base::isFCALchannel
bool isFCALchannel(const HWIdentifier id) const
Definition: LArOnlineID_Base.cxx:1657
LArSamples::DataStore::footprint
double footprint() const
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:97
LArAutoCorrComplete
This class implements the ILArAutoCorr interface.
Definition: LArAutoCorrComplete.h:26
DataContainer.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LArShapeDumper::m_channelsKey
std::string m_channelsKey
Definition: LArShapeDumper.h:92
LArSamples::DataStore::hist_cont
HistoryContainer *& hist_cont(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:67
LArOnlineID::isEMECchannel
bool isEMECchannel(const HWIdentifier id) const override final
Definition: LArOnlineID.cxx:774
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LArDigit.h
LArShapeDumper::m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Definition: LArShapeDumper.h:103
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArRawChannel
Liquid Argon ROD output object base class.
Definition: LArRawChannel.h:40
LArShapeDumper::m_fileName
std::string m_fileName
Definition: LArShapeDumper.h:81
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArOFIterResultsContainer
Definition: LArOFIterResultsContainer.h:14
LArShapeDumper::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition: LArShapeDumper.h:107
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
LArSamples::DataStore::nChannels
unsigned int nChannels() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:53
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
ITk::EventData
InDet::SiSpacePointsSeedMakerEventData EventData
Definition: ITkSiSpacePointsSeedMaker.h:63
LArSamples::EventData::setTriggerData
void setTriggerData(const std::vector< unsigned int > &words)
Definition: EventData.cxx:75
run
Definition: run.py:1
LArShapeDumper::m_minADCMax
int m_minADCMax
Definition: LArShapeDumper.h:95
LArAutoCorrComplete.h
LArShapeDumper::m_maxChannels
unsigned m_maxChannels
Definition: LArShapeDumper.h:85
LArSamples::HistoryContainer::cell_info
CellInfo * cell_info() const
Definition: HistoryContainer.h:57
EventData.h
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
AthAlgorithm
Definition: AthAlgorithm.h:47
LArOnlineID_Base::feb_Id
HWIdentifier feb_Id(int barrel_ec, int pos_neg, int feedthrough, int slot) const
Create feb_Id from fields.
Definition: LArOnlineID_Base.cxx:1483
CaloNoise
Definition: CaloNoise.h:16
Trig::ChainGroup
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h:51
ILArShape.h
LArShapeDumper::m_energyCut
double m_energyCut
Definition: LArShapeDumper.h:94
ROIB::RoIBResult::cTPResult
const CTPResult & cTPResult() const
Gets the CTP part of the L1 RDO.
Definition: RoIBResult.cxx:60
LArShapeDumper::m_doHEC
bool m_doHEC
Definition: LArShapeDumper.h:130
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
LArSamples::DataStore
storage of the time histories of all the cells
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:32
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArSamples::CellInfo
Definition: CellInfo.h:31
LArOnlineID_Base::isEMBchannel
bool isEMBchannel(const HWIdentifier id) const
Definition: LArOnlineID_Base.cxx:1652
EventInfo.h
LArShapeDumper::m_pedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Definition: LArShapeDumper.h:118
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
ROIB::CTPResult::TAV
const std::vector< CTPRoI > TAV() const
get trigger result after veto
LArSamples::HistoryContainer::cellInfo
const CellInfo * cellInfo() const
Definition: HistoryContainer.h:43
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:81
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LArADC2MeV
Definition: LArADC2MeV.h:21
LArShapeDumper::start
virtual StatusCode start() override
Definition: LArShapeDumper.cxx:131
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition: CaloGain.h:18
LArShapeDumper::m_bcDataKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Definition: LArShapeDumper.h:115
LArShapeDumper::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArShapeDumper.h:120
LArShapeDumper::m_doRoIs
bool m_doRoIs
Definition: LArShapeDumper.h:129
LArSamples::DataContainer
Definition: DataContainer.h:25
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
LArSamples::DataStore::addRun
unsigned int addRun(RunData *eventData)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:62
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LArShapeDumper::m_runData
std::unique_ptr< LArSamples::RunData > m_runData
Definition: LArShapeDumper.h:136
LArShapeDumper::m_samples
LArSamples::DataStore * m_samples
Definition: LArShapeDumper.h:135
LArShapeDumper::finalize
virtual StatusCode finalize() override
Definition: LArShapeDumper.cxx:477
ILArPedestal.h
LArSamples::HistoryContainer
Definition: HistoryContainer.h:29
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArShapeDumper::m_doStream
bool m_doStream
Definition: LArShapeDumper.h:128
LArFebErrorSummary
Holds information from the FEB Error Summary.
Definition: LArFebErrorSummary.h:23
LArSamples::HistoryContainer::add
void add(const DataContainer *data)
append data (takes ownership)
Definition: HistoryContainer.h:46
LArShapeDumper::m_dumpChannelInfos
bool m_dumpChannelInfos
Definition: LArShapeDumper.h:129
LArShapeDumper::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArShapeDumper.h:111
LArShapeDumper::m_doFCAL
bool m_doFCAL
Definition: LArShapeDumper.h:130
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArShapeDumper::m_autoCorr
const DataHandle< ILArAutoCorr > m_autoCorr
Definition: LArShapeDumper.h:125
LArShapeDumper::stop
virtual StatusCode stop() override
Definition: LArShapeDumper.cxx:470
LArShapeDumper::m_random
TRandom m_random
Definition: LArShapeDumper.h:138
LArShapeDumper::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArShapeDumper.h:112
LArRawChannel::time
int time() const
Definition: LArRawChannel.h:170
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
xAOD::EventInfo_v1::errorState
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
Definition: EventInfo_v1.cxx:817
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArShapeDumper::m_prescale
int m_prescale
Definition: LArShapeDumper.h:83
LArRawChannel::energy
int energy() const
Definition: LArRawChannel.h:166
LArShapeDumper::m_triggerGroups
std::vector< const Trig::ChainGroup * > m_triggerGroups
Definition: LArShapeDumper.h:137
TrigRoiDescriptor.h
merge.status
status
Definition: merge.py:17
LArFebErrorSummary.h
LArShapeDumper::m_onlyEmptyBC
bool m_onlyEmptyBC
Definition: LArShapeDumper.h:133
LArShapeDumper::m_doTrigger
bool m_doTrigger
Definition: LArShapeDumper.h:128
LArShapeDumper::m_nWrongBunchGroup
unsigned m_nWrongBunchGroup
Definition: LArShapeDumper.h:86
TileAANtupleConfig.rawChannelContainer
rawChannelContainer
Definition: TileAANtupleConfig.py:120
LArOnlineID::isHECchannel
bool isHECchannel(const HWIdentifier id) const override final
Definition: LArOnlineID.cxx:734
LArShapeDumper::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArShapeDumper.h:124
Trig::ChainGroup::getListOfTriggers
std::vector< std::string > getListOfTriggers() const
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:467
CaloGain::LARLOWGAIN
@ LARLOWGAIN
Definition: CaloGain.h:18
LArShapeDumper::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: LArShapeDumper.h:109
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
ILArPedestal::pedestalRMS
virtual float pedestalRMS(const HWIdentifier &id, int gain) const =0
access to RMS of Pedestal index by Identifier, and gain setting
LArShapeDumper::m_doEM
bool m_doEM
Definition: LArShapeDumper.h:130
LArShapeDumper::m_dumpDisc
bool m_dumpDisc
Definition: LArShapeDumper.h:97
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
CellInfo.h
StoreGateSvc.h
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
LArShapeDumper::makeEvent
int makeEvent(LArSamples::EventData *&eventData, int run, int event, int lumiBlock, int bunchXing) const
Definition: LArShapeDumper.cxx:521
LArShapeDumper::~LArShapeDumper
~LArShapeDumper()
Definition: LArShapeDumper.cxx:79
LArShapeDumper::m_doAllLvl1
bool m_doAllLvl1
Definition: LArShapeDumper.h:129
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
LArSamples::DataStore::writeTrees
bool writeTrees(const char *fileName)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:110
LArAutoCorrComplete::autoCorr
virtual AutoCorrRef_t autoCorr(const HWIdentifier &CellID, int gain) const
Definition: LArAutoCorrComplete.cxx:29
WriteCellNoiseToCool.noise
noise
Definition: WriteCellNoiseToCool.py:380
TrigConf::TriggerItem
Definition: TriggerItem.h:25
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
LArShapeDumper::m_noiseSignifCut
double m_noiseSignifCut
Definition: LArShapeDumper.h:94
LArOnlineID_Base::feedthrough_Id
HWIdentifier feedthrough_Id(int barrel_ec, int pos_neg, int feedthrough) const
Create a feedthrough identifier from fields.
Definition: LArOnlineID_Base.cxx:1404
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
BunchCrossingCondData::isFilled
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Definition: BunchCrossingCondData.h:339
LArVectorProxy
Proxy for accessing a range of float values like a vector.
Definition: LArVectorProxy.h:38
LArRawChannelContainer
Container for LArRawChannel (IDC using LArRawChannelCollection)
Definition: LArRawChannelContainer.h:26
LArSamples::DataStore::makeNewHistory
HistoryContainer * makeNewHistory(const IdentifierHash &hash, CellInfo *info)
append data (takes ownership of everything)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:38
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34