ATLAS Offline Software
LArShapeDumper.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "LArRawEvent/LArDigit.h"
8 #include "GaudiKernel/INTupleSvc.h"
11 #include "LArElecCalib/ILArShape.h"
12 
16 
18 #include "CaloDetDescr/CaloDetDescrElement.h"
22 #include "LArCafJobs/ShapeInfo.h"
23 #include "LArCafJobs/CellInfo.h"
24 #include "LArCafJobs/RunData.h"
25 #include "LArCafJobs/EventData.h"
28 #include "TFile.h"
29 #include "TMath.h"
30 
31 #include <regex>
32 
33 
34 #include <vector>
35 #include <iostream>
36 using std::cout;
37 using std::endl;
38 
39 using namespace LArSamples;
40 
41 
42 LArShapeDumper::LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocator) :
43  AthAlgorithm(name, pSvcLocator),
44  m_count(0),
45  m_nWrongBunchGroup(0),
46  m_nPrescaledAway(0),
47  m_nLArError(0),
48  m_nNoDigits(0),
49  m_nNoDigitsSC(0),
50  m_onlineHelper(nullptr),
51  m_onlineHelperSC(nullptr),
52  m_doEM(false),
53  m_doHEC(false),
54  m_doFCAL(false),
55  m_doSC(false),
56  m_samples(nullptr)
57 {
58  declareProperty("FileName", m_fileName = "samples.root");
59  declareProperty("MaxChannels", m_maxChannels = 200000);
60  declareProperty("Prescale", m_prescale = 1);
61  declareProperty("CaloType", m_caloType = "EMHECFCALSC");
62  declareProperty("EnergyCut", m_energyCut = -1);
63  declareProperty("EnergyCutSC", m_energyCutSC = -1);
64  declareProperty("NoiseSignifCut", m_noiseSignifCut = 3);
65  declareProperty("MinADCMax", m_minADCMax = -1);
66  declareProperty("MinADCMaxSC", m_minADCMaxSC = -1);
67  declareProperty("Gains", m_gainSpec = "HIGH,MEDIUM,LOW");
68  declareProperty("DumpDisconnected", m_dumpDisc = false);
69  declareProperty("DoStream", m_doStream = false);
70  declareProperty("DoTrigger", m_doTrigger = true);
71  declareProperty("DoOFCIter", m_doOFCIter = true);
72  declareProperty("DoAllEvents", m_doAllEvents = true);
73  declareProperty("DumpChannelInfos", m_dumpChannelInfos = false);
74  declareProperty("DoRoIs", m_doRoIs = true);
75  declareProperty("TriggerNames", m_triggerNames);
76  declareProperty("DoAllLvl1", m_doAllLvl1 = true);
77  declareProperty("onlyEmptyBC",m_onlyEmptyBC=false);
78 
79  m_bcMaskSC.setSC();
80 }
81 
82 
84 {
85 }
86 
87 
89 {
90  ATH_MSG_DEBUG ("in initialize()");
91 
92  m_samples = new DataStore();
93 
94  std::transform(m_caloType.begin(), m_caloType.end(), m_caloType.begin(), toupper);
95  m_doEM = (m_caloType.find("EM") != std::string::npos);
96  m_doHEC = (m_caloType.find("HEC") != std::string::npos);
97  m_doFCAL = (m_caloType.find("FCAL") != std::string::npos);
98  m_doSC = (m_caloType.find("SC") != std::string::npos);
99 
101  ATH_CHECK( m_BCKey.initialize() );
102  ATH_CHECK( m_BCKeySC.initialize(m_doSC) );
107 
110 
116 
117  ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
120  if(m_doSC) ATH_CHECK( detStore()->retrieve(m_onlineHelperSC, "LArOnline_SuperCellID") );
121 
125 
126 
127  if (m_doTrigger) {
128  CHECK( m_trigDec.retrieve() );
129  }
130 
131  ATH_CHECK( m_dumperTool.retrieve() );
132 
134 
135  std::transform(m_gainSpec.begin(), m_gainSpec.end(), m_gainSpec.begin(), toupper);
136  m_gains[CaloGain::LARHIGHGAIN] = (m_gainSpec.find("HIGH") != std::string::npos);
137  m_gains[CaloGain::LARMEDIUMGAIN] = (m_gainSpec.find("MEDIUM") != std::string::npos);
138  m_gains[CaloGain::LARLOWGAIN] = (m_gainSpec.find("LOW") != std::string::npos);
139 
140  //if (m_onlyEmptyBC)
141  //ATH_CHECK(m_bcidTool.retrieve());
142 
143  return StatusCode::SUCCESS;
144 }
145 
146 
148 {
149  m_runData = std::make_unique<RunData>(0);
150 
151  if (m_doTrigger) {
152  std::vector<std::regex> regexs;
153  regexs.reserve(m_triggerNames.size());
154 for (const std::string& name : m_triggerNames) {
155  regexs.push_back(std::regex(name));
156  }
157 
158  std::vector<std::string> chains = m_trigDec->getListOfTriggers();
159  std::vector<std::string> myChains;
160  std::cmatch match;
161 
162  for (const std::string& chain : chains) {
163  ATH_MSG_INFO ( "Configured chain : " << chain );
164  for (const std::regex& regex : regexs) {
165  if (std::regex_match(chain.c_str(), match, regex)) myChains.push_back(chain);
166  }
167  }
168  for (const std::string& group : m_trigDec->getListOfGroups())
169  ATH_MSG_INFO ( "Configured group : " << group );
170  const Trig::ChainGroup* calibStreamGroup = m_trigDec->getChainGroup("Calibration");
171  if (calibStreamGroup) {
172  std::vector<std::string> chains = calibStreamGroup->getListOfTriggers();
173  ATH_MSG_INFO ( "Chains for Calibration group:" );
174  for (const std::string& chain : chains)
175  ATH_MSG_INFO ( "Calib chain : " << chain );
176  }
177 
178  unsigned int idx = 0;
179 
180  if (m_doAllLvl1) {
181  const Trig::ChainGroup* group = m_trigDec->getChainGroup("L1_.*");
182  for (const std::string& l1Item : group->getListOfTriggers()) {
183  const TrigConf::TriggerItem* confItem = m_trigDec->ExperimentalAndExpertMethods().getItemConfigurationDetails(l1Item);
184  if (!confItem) {
185  ATH_MSG_WARNING ( "LVL1 item " << l1Item << ", obtained from TrigConfig, cannot be retrieved!" );
186  continue;
187  }
188  int pos = confItem->ctpId();
189  if (pos < 0 || pos >= 256) {
190  ATH_MSG_WARNING ( "LVL1 item " << l1Item << "has out-of-range ctpId " << pos );
191  continue;
192  }
193  m_runData->addBit(l1Item.c_str(), pos);
194  ATH_MSG_INFO ( "Adding LVL1 trigger bit for " << l1Item << " at position " << pos );
195  }
196  idx = 256;
197  }
198 
199  for (const std::string& name : myChains) {
200  if (m_trigDec->getListOfTriggers(name).empty()) {
201  ATH_MSG_WARNING ( "Requested trigger name " << name << " is not configured in this run" );
202  continue;
203  }
204  const Trig::ChainGroup* group = m_trigDec->getChainGroup(name);
205  if (!group) {
206  ATH_MSG_WARNING ( "Could not retrieve chain group for trigger " << name );
207  continue;
208  }
209  m_runData->addBit(name.c_str(), idx++);
210  m_triggerGroups.push_back(group);
211  ATH_MSG_INFO ( "Adding trigger bit for " << name << " at position " << idx-1 );
212  }
213  }
214  return StatusCode::SUCCESS;
215 }
216 
217 
219 {
220  m_count++;
221  const EventContext& ctx = Gaudi::Hive::currentContext();
222  if ((m_prescale > 1 && m_random.Rndm() > 1.0/m_prescale) || m_prescale <= 0) {
223  ATH_MSG_VERBOSE ( "======== prescaling event "<< m_count << " ========" );
225  return StatusCode::SUCCESS;
226  }
227 
228  ATH_MSG_VERBOSE ( "======== executing event "<< m_count << " ========" );
229 
230  const xAOD::EventInfo* eventInfo = nullptr;
231  ATH_CHECK( evtStore()->retrieve(eventInfo) );
232 
233  int event = eventInfo->eventNumber();
234  int run = eventInfo->runNumber();
235  int lumiBlock = eventInfo->lumiBlock();
236  int bunchId = eventInfo->bcid();
237 
238 
240  ATH_MSG_DEBUG("Ignoring Event b/c of LAr ERROR");
241  m_nLArError++;
242  return StatusCode::SUCCESS;
243  }
244 
245 
247  const BunchCrossingCondData* bunchCrossing=*bccd;
248  if (!bunchCrossing) {
249  ATH_MSG_ERROR("Failed to retrieve Bunch Crossing obj");
250  return StatusCode::FAILURE;
251  }
252 
254  ATH_CHECK(caloMgrHandle.isValid());
255  const CaloDetDescrManager* caloMgr = *caloMgrHandle;
256 
257  if (m_onlyEmptyBC) {
258  if (!bccd->isFilled(bunchId)) {
259  ATH_MSG_DEBUG("Ignoring Event with bunch crossing type ");
261  return StatusCode::SUCCESS;
262  }
263  }
264 
265 
266  EventData* eventData = nullptr;
267  int eventIndex = -1;
268  if (m_doAllEvents) {
269  eventIndex = makeEvent(eventData, run, event, lumiBlock, bunchId);
270  if (eventIndex < 0) return StatusCode::FAILURE;
271  }
272 
274  if(!hdlDigit.isValid()) {
275  ATH_MSG_WARNING( "Unable to retrieve LArDigitContainer with key " << m_digitsKey << " from DetectorStore. " );
276  return StatusCode::SUCCESS;
277  } else
278  ATH_MSG_DEBUG( "Got LArDigitContainer with key " << m_digitsKey.key() );
279  const LArDigitContainer* larDigitContainer = &(*hdlDigit);
280 
281  if (larDigitContainer->empty()) {
282  ATH_MSG_WARNING ( "LArDigitContainer with key=" << m_digitsKey.key() << " is empty!" );
283  m_nNoDigits++;
284  return StatusCode::SUCCESS;
285  }
286 
288  if(!hdlRaw.isValid()) {
289  ATH_MSG_WARNING( "Unable to retrieve LArRawChannelsContainer with key " << m_channelsKey.key() << " from DetectorStore. " );
290  return StatusCode::SUCCESS;
291  } else
292  ATH_MSG_DEBUG( "Got LArRawChannelsContainer with key " << m_channelsKey.key() );
293  const LArRawChannelContainer* rawChannelContainer = &(*hdlRaw);;
294 
295  if (rawChannelContainer->empty()) {
296  ATH_MSG_WARNING ( "LArRawChannelContainer with key=" << m_channelsKey << " is empty!" );
297  m_nNoDigits++;
298  return StatusCode::SUCCESS;
299  }
300 
301 
302 
304  const LArOnOffIdMapping* cabling=*cablingHdl;
305  if(!cabling) {
306  ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" );
307  return StatusCode::FAILURE;
308  }
309 
311  const LArADC2MeV* adc2MeV=*adc2mevHdl;
312  if(!adc2MeV) {
313  ATH_MSG_ERROR( "Failed to retreive ADC2MeV cond obj" );
314  return StatusCode::FAILURE;
315  }
316 
318  const ILArPedestal* pedestals=*pedHdl;
319  if (!pedestals) {
320  ATH_MSG_ERROR("Failed to retrieve pedestal cond obj");
321  return StatusCode::FAILURE;
322  }
323 
324  const ILArAutoCorr* aCorr=nullptr;
325  if(m_dumperTool->doShape()) {
327  aCorr=*acorrHdl;
328  if (!aCorr) {
329  ATH_MSG_ERROR("Failed to retrieve AutoCorr cond obj");
330  return StatusCode::FAILURE;
331  }
332  }
333 
335  const LArBadChannelCont *bcCont {*readHandle};
336  if(!bcCont) {
337  ATH_MSG_ERROR( "Do not have Bad chan container " << m_BCKey.key() );
338  return StatusCode::FAILURE;
339  }
340 
341  const LArOFIterResultsContainer* ofIterResult = nullptr;
342  if (m_doOFCIter) {
343  if (evtStore()->contains<LArOFIterResultsContainer> ("LArOFIterResult")) {
344  ATH_CHECK( evtStore()->retrieve(ofIterResult, "LArOFIterResult") );
345  } else {
346  ATH_MSG_WARNING("Do not have LArOFIterResult in this event");
347  }
348  }
349 
350  const LArFebErrorSummary* larFebErrorSummary = nullptr;
351  ATH_CHECK( evtStore()->retrieve(larFebErrorSummary, "LArFebErrorSummary") );
352  const std::map<unsigned int,uint16_t>& febErrorMap = larFebErrorSummary->get_all_febs();
353  std::map<unsigned int, const LArRawChannel*> channelsToKeep;
354 
355  for (LArRawChannelContainer::const_iterator channel = rawChannelContainer->begin();
356  channel != rawChannelContainer->end(); ++channel)
357  {
358  if (m_energyCut > 0 && TMath::Abs(channel->energy()) < m_energyCut) continue;
359  if (m_bcMask.cellShouldBeMasked(bcCont,channel->channelID())) continue;
360 
361  IdentifierHash hash = m_onlineHelper->channel_Hash(channel->channelID());
362 
363  if (!hash.is_valid()) {
364  ATH_MSG_FATAL ( "Found a LArRawChannel whose HWIdentifier (" << channel->channelID()
365  << ") does not correspond to a valid hash -- returning StatusCode::FAILURE." );
366  return StatusCode::FAILURE;
367  }
368  channelsToKeep[hash] = &*channel;
369  if (m_dumpChannelInfos) {
371  CellInfo* info = nullptr;
372  if (!histCont) {
373  HWIdentifier channelID = channel->hardwareID();
374  const Identifier id = cabling->cnvToIdentifier(channelID);
375  const CaloDetDescrElement* caloDetElement = caloMgr->get_element(id);
376  info = m_dumperTool->makeCellInfo(channelID, id, caloDetElement);
377  if (!info) continue;
379  }
380  }
381  }
382 
383  std::map<HWIdentifier, LArOFIterResultsContainer::const_iterator> ofcResultPosition;
384  if (m_doOFCIter && ofIterResult) {
385  for (LArOFIterResultsContainer::const_iterator ofResult = ofIterResult->begin();
386  ofResult != ofIterResult->end(); ++ofResult)
387  ofcResultPosition[ofResult->getChannelID()] = ofResult;
388 
389  ATH_MSG_DEBUG ( "njpbSizes : " << larDigitContainer->size()
390  << " " << (ofIterResult ? ofIterResult->size() : 0) << " "
391  << rawChannelContainer->size() << " " << channelsToKeep.size() );
392  }
394  const CaloNoise* noiseCDO=*noiseHdl;
395 
396  for (LArDigitContainer::const_iterator digit = larDigitContainer->begin();
397  digit != larDigitContainer->end(); ++digit)
398  {
399  //Check Energy selection
400  IdentifierHash hash = m_onlineHelper->channel_Hash((*digit)->channelID());
401 
402  std::map<unsigned int, const LArRawChannel*>::const_iterator findChannel = channelsToKeep.find(hash);
403  if (findChannel == channelsToKeep.end()) continue;
404  const LArRawChannel* rawChannel = findChannel->second;
405 
406  //Check detector part
407  HWIdentifier channelID = (*digit)->hardwareID();
408  if ((m_onlineHelper->isEMBchannel(channelID) || m_onlineHelper->isEMECchannel(channelID)) && !m_doEM) continue;
409  if (m_onlineHelper->isHECchannel(channelID) && !m_doHEC) continue;
410  if (m_onlineHelper->isFCALchannel(channelID) && !m_doFCAL) continue;
411 
412  //Check gain
413  CaloGain::CaloGain gain=(*digit)->gain();
414  if (gain >= CaloGain::LARNGAIN || m_gains[gain] == false) continue;
415 
416  //Check if connected
417  const bool connected = cabling->isOnlineConnected(channelID);
418  if (!connected && !m_dumpDisc) continue;
419 
420  // Check ADCMax selection
421  float pedestal = pedestals->pedestal(channelID, gain);
422  float pedestalRMS = pedestals->pedestalRMS(channelID, gain);
423  if (m_minADCMax > 0 || m_noiseSignifCut > 0) {
424  const std::vector<short>& samples = (*digit)->samples();
425  double maxValue = -1;
426  for (short sample : samples)
427  if (sample - pedestal > maxValue) maxValue = sample - pedestal;
428  if (m_minADCMax > 0 && fabs(maxValue) < m_minADCMax) continue;
429  if (m_noiseSignifCut > 0 && fabs(maxValue) < pedestalRMS*m_noiseSignifCut) continue;
430  }
431 
432  const Identifier id = cabling->cnvToIdentifier(channelID);
433  const CaloDetDescrElement* caloDetElement = nullptr;
434 
436  CellInfo* info = nullptr;
437  if (!histCont) {
438  if (!caloDetElement) caloDetElement = caloMgr->get_element(id);
439  info = m_dumperTool->makeCellInfo(channelID, id, caloDetElement);
440  if (!info) continue;
441  histCont = m_samples->makeNewHistory(hash, info);
442  }
443  else
444  info = histCont->cell_info();
445 
446  float noise = -1;
447  unsigned int status = 0xFFFFFFFF;
448  if (connected) {
449  if (!caloDetElement) caloDetElement = caloMgr->get_element(id);
450  noise = noiseCDO->getNoise(id,gain);
451  status = bcCont->status(channelID).packedData();
452  HWIdentifier febId = m_onlineHelper->feb_Id(m_onlineHelper->feedthrough_Id(channelID), m_onlineHelper->slot(channelID));
453  std::map<unsigned int,uint16_t>::const_iterator findError = febErrorMap.find(febId.get_identifier32().get_compact());
454  if (findError != febErrorMap.end()) {
455  unsigned int febErrWord = findError->second;
456  status = status & (febErrWord >> 17);
457  }
458  }
459 
460  //std::vector<float> autoCorr;
462  if (m_dumperTool->doShape()) {
463  const LArAutoCorrComplete* autoCorrObj = dynamic_cast<const LArAutoCorrComplete*>(aCorr);
464  if (!autoCorrObj)
465  ATH_MSG_WARNING ( "AutoCorr object is not of type LArAutoCorrComplete!" );
466  else
467  autoCorr = autoCorrObj->autoCorr(channelID, gain);
468  }
469 
470  if (!info->shape((*digit)->gain())) // this happens if doAllShapes is off
471  info->setShape((*digit)->gain(), m_dumperTool->retrieveShape(channelID, gain));
472 
473  if (!eventData) {
474  eventIndex = makeEvent(eventData, run, event, lumiBlock, bunchId); // this happens if doAllEvents is off
475  if (eventIndex < 0) return StatusCode::FAILURE;
476  }
477 
478  DataContainer* data =
479  new DataContainer((*digit)->gain(), (*digit)->samples(),
480  rawChannel->energy(),
481  rawChannel->time()/double(1000),
482  rawChannel->quality(),
483  eventIndex,
484  autoCorr,
485  noise, pedestal, pedestalRMS, status);
486 
487  // std::map<HWIdentifier, LArOFIterResultsContainer::const_iterator>::const_iterator findResult = ofcResultPosition.find(channelID);
488 // if (findResult != ofcResultPosition.end()) {
489 // LArOFIterResultsContainer::const_iterator ofResult = findResult->second;
490 // if (ofResult->getValid() && ofResult->getConverged())
491 // data->setADCMax(ofResult->getAmplitude());
492 // }
493 // else
494 // msg() << MSG::INFO << "OFResult for channel 0x" << MSG::hex << channelID << MSG::dec
495 // << " not found. (size was " << ofcResultPosition.size() << ")" << endmsg;
496 
497 
498  const auto ramp=adc2MeV->ADC2MEV(channelID,gain); //dudu
499  data->setADCMax(rawChannel->energy()/ramp[1]); //pow(ADCPeak,i); //dudu
500 
501 
502  histCont->add(data);
503  }
504 
505  if(m_doSC) {
506  std::map<unsigned int, const LArRawSC*> scToKeep;
507 
509  if(!hdlSC.isValid()) {
510  ATH_MSG_WARNING( "Unable to retrieve LArRawSCContainer with key " << m_rawscKey << " from EventStore. " );
511  return StatusCode::SUCCESS;
512  } else
513  ATH_MSG_DEBUG( "Got LArRawSCContainer with key " << m_rawscKey.key() );
514 
515  if (hdlSC->empty()) {
516  ATH_MSG_WARNING ( "LArRawSCContainer with key=" << m_rawscKey.key() << " is empty!" );
517  return StatusCode::SUCCESS;
518  }
519 
521  if(!hdlrecoSC.isValid()) {
522  ATH_MSG_WARNING( "Unable to retrieve LArRawSCContainer with key " << m_rawRecomputedscKey << " from EventStore. " );
523  return StatusCode::SUCCESS;
524  } else
525  ATH_MSG_DEBUG( "Got LArRawSCContainer with key " << m_rawRecomputedscKey.key() );
526 
527  if (hdlrecoSC->empty()) {
528  ATH_MSG_WARNING ( "LArRawSCContainer with key=" << m_rawRecomputedscKey.key() << " is empty!" );
529  return StatusCode::SUCCESS;
530  }
531 
533  const LArOnOffIdMapping* cablingSC=*cablingHdl;
534  if(!cablingSC) {
535  ATH_MSG_ERROR( "Do not have cabling object LArOnOffIdMapping" );
536  return StatusCode::FAILURE;
537  }
538 
540  ATH_CHECK(caloMgrHandle.isValid());
541  const CaloSuperCellDetDescrManager* caloMgrSC = *caloMgrHandle;
542 
544  const ILArPedestal* pedestalsSC=*pedHdl;
545  if (!pedestals) {
546  ATH_MSG_ERROR("Failed to retrieve pedestal cond obj for SC");
547  return StatusCode::FAILURE;
548  }
549 
550  std::map<unsigned int, std::pair<float, std::pair<float,float> > > channelsToKeepSC;
551 
552  for (const LArRawSC* rawSC : *hdlSC) { // from bytestream
553 
554  // is SC masked ?
555  if (m_bcMaskSC.cellShouldBeMasked(bcCont,rawSC->hardwareID())) continue;
556 
557  const std::vector<unsigned short>& bcids = rawSC->bcids();
558  const std::vector<int>& energies = rawSC->energies();
559  const std::vector<bool>& satur = rawSC->satur();
560 
561  // Look for bcid:
562  float scEne = 0;
563  float defValue = -99999999.;
564 
565  const size_t nBCIDs = bcids.size();
566  size_t i = 0;
567  for (i = 0; i < nBCIDs && bcids[i] != bunchId; i++)
568  ;
569  if(i==nBCIDs) continue;
570  if (satur[i]) continue;
571 
572  scEne = energies[i];
573  if (m_energyCutSC > 0 && TMath::Abs(scEne) < m_energyCutSC) continue;
574  if (m_bcMaskSC.cellShouldBeMasked(bcCont,rawSC->hardwareID())) continue;
575 
576  IdentifierHash hash = m_onlineHelperSC->channel_Hash(rawSC->hardwareID());
577 
578  if (!hash.is_valid()) {
579  ATH_MSG_FATAL ( "Found a LArRawSC whose HWIdentifier (" << rawSC->hardwareID()
580  << ") does not correspond to a valid hash -- returning StatusCode::FAILURE." );
581  return StatusCode::FAILURE;
582  }
583 
584  channelsToKeepSC[hash] = std::make_pair(scEne, std::make_pair(defValue,defValue));
585 
586  if (m_dumpChannelInfos) {
588  CellInfo* info = nullptr;
589  if (!histCont) {
590  HWIdentifier channelID = rawSC->hardwareID();
591  const Identifier id = cablingSC->cnvToIdentifier(channelID);
592  const CaloDetDescrElement* caloDetElement = caloMgrSC->get_element(id);
593  info = m_dumperToolSC->makeCellInfo(channelID, id, caloDetElement);
594  if (!info) continue;
596  }
597  }
598  }
599  ATH_MSG_INFO("SC to keep in this event: "<<channelsToKeepSC.size());
600 
601  for (const LArRawSC* rawSC : *hdlrecoSC) { //reconstructed
602 
603  if (m_bcMaskSC.cellShouldBeMasked(bcCont,rawSC->hardwareID())) continue;
604  IdentifierHash hash = m_onlineHelperSC->channel_Hash(rawSC->hardwareID());
605  if (!hash.is_valid()) {
606  ATH_MSG_FATAL ( "Found a LArRawSC whose HWIdentifier (" << rawSC->hardwareID()
607  << ") does not correspond to a valid hash -- returning StatusCode::FAILURE." );
608  return StatusCode::FAILURE;
609  }
610 
611  // do we keep this SC ?
612  if (channelsToKeepSC.find(hash) == channelsToKeepSC.end()) continue;
613 
614  const std::vector<unsigned short>& bcids = rawSC->bcids();
615  const std::vector<int>& energies = rawSC->energies();
616  const std::vector<int>& tauenergies = rawSC->tauEnergies();
617 
618  // Look for bcid:
619  float scEne = 0;
620  float scTim = -99999999.;
621 
622  const size_t nBCIDs = bcids.size();
623  size_t i = 0;
624  for (i = 0; i < nBCIDs && bcids[i] != bunchId; i++)
625  ;
626  if(i==nBCIDs) continue;
627 
628  scEne = energies[i];
629 
630  if(tauenergies.size() && scEne != 0) scTim = tauenergies[i] / scEne;
631 
632  channelsToKeepSC[hash].second = std::make_pair(scEne, scTim);
633 
634  if (m_dumpChannelInfos) {
636  CellInfo* info = nullptr;
637  if (!histCont) {
638  HWIdentifier channelID = rawSC->hardwareID();
639  const Identifier id = cablingSC->cnvToIdentifier(channelID);
640  const CaloDetDescrElement* caloDetElement = caloMgrSC->get_element(id);
641  info = m_dumperToolSC->makeCellInfo(channelID, id, caloDetElement);
642  if (!info) continue;
644  }
645  }
646  }
647 
649  if(!hdlSCDigit.isValid()) {
650  ATH_MSG_WARNING( "Unable to retrieve LArDigitContainer with key " << m_digitsKeySC << " from DetectorStore. " );
651  return StatusCode::SUCCESS;
652  } else
653  ATH_MSG_DEBUG( "Got LArDigitContainer with key " << m_digitsKeySC.key() );
654  const LArDigitContainer* larSCDigitContainer = &(*hdlSCDigit);
655 
656  if (larSCDigitContainer->empty()) {
657  ATH_MSG_WARNING ( "LArDigitContainer with key=" << m_digitsKeySC.key() << " is empty!" );
658  m_nNoDigitsSC++;
659  return StatusCode::SUCCESS;
660  }
661 
662  for (LArDigitContainer::const_iterator digit = larSCDigitContainer->begin();
663  digit != larSCDigitContainer->end(); ++digit)
664  {
665  //Check Energy selection
666  IdentifierHash hash = m_onlineHelperSC->channel_Hash((*digit)->channelID());
667 
668  std::map<unsigned int, std::pair<float, std::pair<float,float> > >::const_iterator findChannel = channelsToKeepSC.find(hash);
669  if (findChannel == channelsToKeepSC.end()) continue;
670 
671  // Check ADCMax selection
672  float pedestal = pedestalsSC->pedestal((*digit)->channelID(), 0);
673  if (m_minADCMaxSC > 0 ) {
674  const std::vector<short>& samples = (*digit)->samples();
675  double maxValue = -1;
676  for (short sample : samples)
677  if (sample - pedestal > maxValue) maxValue = sample - pedestal;
678  if (fabs(maxValue) < m_minADCMax) continue;
679  }
680 
681  const Identifier id = cablingSC->cnvToIdentifier((*digit)->channelID());
682  const CaloDetDescrElement* caloDetElement = nullptr;
683 
685  CellInfo* info = nullptr;
686  if (!histCont) {
687  if (!caloDetElement) caloDetElement = caloMgrSC->get_element(id);
688  info = m_dumperToolSC->makeCellInfo((*digit)->channelID(), id, caloDetElement);
689  if (!info) continue;
690  histCont = m_samples->makeNewHistorySC(hash, info);
691  }
692  else
693  info = histCont->cell_info();
694 
695  if (!eventData) {
696  eventIndex = makeEvent(eventData, run, event, lumiBlock, bunchId); // this happens if doAllEvents is off
697  if (eventIndex < 0) return StatusCode::FAILURE;
698  }
699 
700  DataContainer* data =
701  new DataContainer((*digit)->gain(), (*digit)->samples(),
702  findChannel->second.first,
703  findChannel->second.second.second,
704  findChannel->second.second.first,
705  eventIndex,
706  LArVectorProxy(),
707  -1, pedestal, 0, 0);
708 
709 
710  histCont->add(data);
711  }
712 
713  } //m_doSC
714 
715  return StatusCode::SUCCESS;
716 }
717 
718 
720 {
721  m_samples->addRun(m_runData.release());
722  return StatusCode::SUCCESS;
723 }
724 
725 
727 {
728  ATH_MSG_DEBUG ("in finalize() ");
729 
730  if (m_prescale>1) ATH_MSG_INFO("Prescale dropped " << m_nPrescaledAway << "/" << m_count << " events");
731  if (m_onlyEmptyBC) ATH_MSG_INFO("Dropped " << m_nWrongBunchGroup << "/" << m_count << " events b/c of wrong bunch group");
732  ATH_MSG_INFO("Dropped " << m_nLArError << "/" << m_count << " Events b/c of LAr Veto (Noise burst or corruption)");
733 
734 
735  int n = 0;
736  for (unsigned int i = 0; i < m_samples->nChannels(); i++)
737  if (m_samples->historyContainer(i)) {
738  if (m_samples->historyContainer(i)->cellInfo() == nullptr)
739  ATH_MSG_INFO ( "Cell with no cellInfo at index " << i << " !!" );
740  //else if (m_samples->historyContainer(i)->cellInfo()->shape() == 0)
741  //msg() << MSG::INFO << "Cell with no ShapeInfo at index " << i << " !!" << endmsg;
742  //msg() << MSG::INFO << "Non-zero cell at index " << i << " " << m_samples->shape(i)->size() << endmsg;
743  n++;
744  }
745 
746  //for (unsigned int i = 0; i < m_samples->nEvents(); i++) {
747  // msg() << MSG::INFO << "Event " << i << " = "
748  // << m_samples->eventData(i)->run() << " " << m_samples->eventData(i)->event()
749  // << "trigger = " << m_samples->eventData(i)->triggers() << ", nRoIs = " << m_samples->eventData(i)->nRoIs() << endmsg;
750  // }
751  ATH_MSG_INFO ( "Non-zero cells = " << n << ", footprint = " << m_samples->footprint() );
752  ATH_MSG_INFO ( "Writing..." );
753 
754  if (!m_doStream) {
755  m_samples->writeTrees(m_fileName.c_str());
756 /* TFile* f = TFile::Open(m_fileName.c_str(), "RECREATE");
757  msg() << MSG::INFO << "Writing (2)..." << endmsg;
758  f->WriteObjectAny(m_samples, "Container", "LArSamples");
759  msg() << MSG::INFO << "Closing..." << endmsg;
760  f->Close();
761  msg() << MSG::INFO << "Deleting..." << endmsg;
762  delete m_samples;*/
763  msg() << MSG::INFO << "Done!" << endmsg;
764  }
765 
766  return StatusCode::SUCCESS;
767 }
768 
769 
771  int run, int event,
772  int lumiBlock, int bunchXing) const
773 {
774  std::vector<unsigned int> triggerWords;
775  if (m_doTrigger) {
776  const ROIB::RoIBResult* l1Result = nullptr;
777  if (evtStore()->retrieve(l1Result).isFailure() || !l1Result) {
778  ATH_MSG_FATAL ( "Could not retrieve RoIBResult!" );
779  return -1;
780  }
781  const std::vector<ROIB::CTPRoI> tav = l1Result->cTPResult().TAV();
782  for (const ROIB::CTPRoI& word : tav)
783  triggerWords.push_back(word.roIWord());
784 
785  for (const std::pair<const TString, unsigned int>& p : m_runData->triggerConfig()) {
786  while (triggerWords.size() <= p.second/32) triggerWords.push_back(0);
787  if (m_trigDec->isPassed(p.first.Data())) {
788  triggerWords[p.second/32] |= (0x1 << (p.second % 32));
789  //msg() << MSG::INFO << "Trigger line " << p.first.Data() << " passed" << endmsg;
790  }
791  }
792  //msg() << MSG::INFO << "Trigger words : ";
793  //for (unsigned int i = 0; i < triggerWords.size(); i++) msg() << MSG::INFO << triggerWords[i] << " ";
794  //msg() << MSG::INFO << endmsg;
795  }
796 
797  eventData = new EventData(event, 0, lumiBlock, bunchXing);
798  if (m_runData->run() == 0) m_runData->setRun(run);
799  eventData->setRunData(m_runData.get());
800  eventData->setTriggerData(triggerWords);
801  if (m_doRoIs) {
802  //msg() << MSG::INFO << "Filling RoI list" << endmsg;
803  for (const Trig::ChainGroup* group : m_triggerGroups) {
804  std::vector<Trig::Feature<TrigRoiDescriptor> > roIs = group->features().get<TrigRoiDescriptor>();
805  for (const Trig::Feature<TrigRoiDescriptor>& roI : roIs) {
806  //msg() << MSG::INFO << "Found an roi for chain ";
807  //for (unsigned int i = 0; i < group->getListOfTriggers().size(); i++) cout << group->getListOfTriggers()[i] << " ";
808  //cout << "@ " << roI.cptr()->eta() << ", " << roI.cptr()->phi() << ", TE = "
809  // << roI.te()->getId() << " " << Trig::getTEName(*roI.te()) << " with label " << roI.label() << endmsg;
810  eventData->addRoI(roI.cptr()->eta(), roI.cptr()->phi(), group->getListOfTriggers()[0].c_str(), roI.label().c_str());
811  //msg() << MSG::INFO << "nRoIs so far = " << eventData->nRoIs() << endmsg;
812  }
813  }
814  }
815  return m_samples->addEvent(eventData);
816 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
RunData.h
LArShapeDumper::m_dumperTool
ToolHandle< ILArShapeDumperTool > m_dumperTool
Definition: LArShapeDumper.h:104
ROIB::CTPRoI
ROIB::CTPRoI contains a RoI delivered by the CTP.
Definition: CTPRoI.h:28
LArRawSC
Liquid Argon SuperCell raw data.
Definition: LArRawSC.h:19
ILArPedestal::pedestal
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArShapeDumper::m_gains
bool m_gains[CaloGain::LARNGAIN]
Definition: LArShapeDumper.h:153
LArShapeDumper::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Definition: LArShapeDumper.h:129
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LArShapeDumper::m_rawRecomputedscKey
SG::ReadHandleKey< LArRawSCContainer > m_rawRecomputedscKey
Definition: LArShapeDumper.h:116
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:1632
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
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:150
LArSamples::EventData::setRunData
void setRunData(const RunData *runData)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:75
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
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:100
RoIBResult.h
LArShapeDumper::m_bcMaskSC
LArBadChannelMask m_bcMaskSC
Definition: LArShapeDumper.h:109
LArSamples::DataStore::historyContainer
const HistoryContainer * historyContainer(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:42
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
LArShapeDumper::execute
virtual StatusCode execute() override
Definition: LArShapeDumper.cxx:218
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:107
LArShapeDumper::LArShapeDumper
LArShapeDumper(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArShapeDumper.cxx:42
m_count
std::uint64_t m_count
the number of times the timer has been started
Definition: ColumnarPhysliteTest.cxx:71
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:109
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:72
LArPhysWave.h
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:1957
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:88
LArShapeDumper::m_nNoDigits
unsigned m_nNoDigits
Definition: LArShapeDumper.h:92
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
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
LArShapeDumper::m_BCKeySC
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKeySC
Definition: LArShapeDumper.h:127
LArShapeDumper::m_triggerNames
std::vector< std::string > m_triggerNames
Definition: LArShapeDumper.h:102
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:91
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:90
xAOD::EventInfo_v1::LAr
@ LAr
The LAr calorimeter.
Definition: EventInfo_v1.h:335
LArShapeDumper::m_channelsKey
SG::ReadHandleKey< LArRawChannelContainer > m_channelsKey
Definition: LArShapeDumper.h:112
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:87
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
CaloSuperCellDetDescrManager
Definition: CaloDetDescrManager.h:490
LArShapeDumper::m_cablingKeySC
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
Definition: LArShapeDumper.h:124
ILArAutoCorr
This class defines the interface for accessing AutoCorrelation parameters for each channel @stereotyp...
Definition: ILArAutoCorr.h:29
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
LArShapeDumper::m_caloType
std::string m_caloType
Definition: LArShapeDumper.h:96
ClusterComm::EventData
@ EventData
LArShapeDumper::m_problemsToMaskSC
Gaudi::Property< std::vector< std::string > > m_problemsToMaskSC
Definition: LArShapeDumper.h:110
LArShapeDumper::m_doAllEvents
bool m_doAllEvents
Definition: LArShapeDumper.h:151
CaloDetDescriptor.h
Definition of CaloDetDescriptor.
LArOnlineID_Base::isFCALchannel
bool isFCALchannel(const HWIdentifier id) const
Definition: LArOnlineID_Base.cxx:1653
LArSamples::DataStore::footprint
double footprint() const
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:133
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
LArSamples::DataStore::hist_cont
HistoryContainer *& hist_cont(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:72
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
LArOnlineID::isEMECchannel
bool isEMECchannel(const HWIdentifier id) const override final
Definition: LArOnlineID.cxx:760
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:108
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:116
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArRawChannel
Liquid Argon ROD output object base class.
Definition: LArRawChannel.h:40
LArShapeDumper::m_fileName
std::string m_fileName
Definition: LArShapeDumper.h:84
beamspotman.n
n
Definition: beamspotman.py:727
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
LArOFIterResultsContainer
Definition: LArOFIterResultsContainer.h:14
LArShapeDumper::m_adc2mevKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
Definition: LArShapeDumper.h:119
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:56
LArShapeDumper::m_rawscKey
SG::ReadHandleKey< LArRawSCContainer > m_rawscKey
Definition: LArShapeDumper.h:115
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
LArSamples::EventData::setTriggerData
void setTriggerData(const std::vector< unsigned int > &words)
Definition: EventData.cxx:75
run
Definition: run.py:1
LArShapeDumper::m_onlineHelperSC
const LArOnline_SuperCellID * m_onlineHelperSC
Definition: LArShapeDumper.h:146
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
LArShapeDumper::m_minADCMaxSC
int m_minADCMaxSC
Definition: LArShapeDumper.h:99
LArShapeDumper::m_minADCMax
int m_minADCMax
Definition: LArShapeDumper.h:99
LArAutoCorrComplete.h
LArShapeDumper::m_maxChannels
unsigned m_maxChannels
Definition: LArShapeDumper.h:88
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
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
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:1479
CaloNoise
Definition: CaloNoise.h:16
Trig::ChainGroup
Definition: ChainGroup.h:51
LArBadChannelMask::setSC
void setSC()
Definition: LArBadChannelMask.h:29
LArShapeDumper::m_doSC
bool m_doSC
Definition: LArShapeDumper.h:152
LArShapeDumper::m_digitsKey
SG::ReadHandleKey< LArDigitContainer > m_digitsKey
Definition: LArShapeDumper.h:111
ILArShape.h
LArShapeDumper::m_energyCut
double m_energyCut
Definition: LArShapeDumper.h:97
LArSamples::DataStore::makeNewHistorySC
HistoryContainer * makeNewHistorySC(const IdentifierHash &hash, CellInfo *info)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:48
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:152
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LArShapeDumper::m_dumperToolSC
ToolHandle< ILArShapeDumperTool > m_dumperToolSC
Definition: LArShapeDumper.h:105
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
RunTileCalibRec.rawChannelContainer
rawChannelContainer
Definition: RunTileCalibRec.py:321
LArShapeDumper::m_nNoDigitsSC
unsigned m_nNoDigitsSC
Definition: LArShapeDumper.h:93
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:1648
EventInfo.h
LArShapeDumper::m_pedestalKey
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
Definition: LArShapeDumper.h:134
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
LArShapeDumper::m_digitsKeySC
SG::ReadHandleKey< LArDigitContainer > m_digitsKeySC
Definition: LArShapeDumper.h:114
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:78
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LArShapeDumper::m_pedestalKeySC
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKeySC
Definition: LArShapeDumper.h:135
LArADC2MeV
Definition: LArADC2MeV.h:21
LArShapeDumper::start
virtual StatusCode start() override
Definition: LArShapeDumper.cxx:147
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition: CaloGain.h:18
LArShapeDumper::m_bcDataKey
SG::ReadCondHandleKey< BunchCrossingCondData > m_bcDataKey
Definition: LArShapeDumper.h:131
LArShapeDumper::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArShapeDumper.h:138
LArShapeDumper::m_doRoIs
bool m_doRoIs
Definition: LArShapeDumper.h:151
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:79
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:108
LArShapeDumper::m_runData
std::unique_ptr< LArSamples::RunData > m_runData
Definition: LArShapeDumper.h:158
LArShapeDumper::m_samples
LArSamples::DataStore * m_samples
Definition: LArShapeDumper.h:157
LArShapeDumper::finalize
virtual StatusCode finalize() override
Definition: LArShapeDumper.cxx:726
LArSamples::HistoryContainer
Definition: HistoryContainer.h:29
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
LArShapeDumper::m_doStream
bool m_doStream
Definition: LArShapeDumper.h:150
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:151
LArShapeDumper::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArShapeDumper.h:123
LArShapeDumper::m_doFCAL
bool m_doFCAL
Definition: LArShapeDumper.h:152
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArShapeDumper::stop
virtual StatusCode stop() override
Definition: LArShapeDumper.cxx:719
LArShapeDumper::m_random
TRandom m_random
Definition: LArShapeDumper.h:160
LArShapeDumper::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArShapeDumper.h:126
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:86
LArShapeDumper::m_energyCutSC
double m_energyCutSC
Definition: LArShapeDumper.h:98
LArRawChannel::energy
int energy() const
Definition: LArRawChannel.h:166
LArShapeDumper::m_triggerGroups
std::vector< const Trig::ChainGroup * > m_triggerGroups
Definition: LArShapeDumper.h:159
TrigRoiDescriptor.h
merge.status
status
Definition: merge.py:16
LArFebErrorSummary.h
LArShapeDumper::m_onlyEmptyBC
bool m_onlyEmptyBC
Definition: LArShapeDumper.h:155
LArShapeDumper::m_doTrigger
bool m_doTrigger
Definition: LArShapeDumper.h:150
LArShapeDumper::m_nWrongBunchGroup
unsigned m_nWrongBunchGroup
Definition: LArShapeDumper.h:89
LArShapeDumper::m_caloSuperCellMgrKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloSuperCellMgrKey
Definition: LArShapeDumper.h:142
LArOnlineID::isHECchannel
bool isHECchannel(const HWIdentifier id) const override final
Definition: LArOnlineID.cxx:720
LArSamples::DataStore::hist_cont_sc
HistoryContainer *& hist_cont_sc(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:73
LArShapeDumper::m_onlineHelper
const LArOnlineID * m_onlineHelper
Definition: LArShapeDumper.h:145
Trig::ChainGroup::getListOfTriggers
std::vector< std::string > getListOfTriggers() const
Definition: ChainGroup.cxx:467
CaloGain::LARLOWGAIN
@ LARLOWGAIN
Definition: CaloGain.h:18
LArShapeDumper::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: LArShapeDumper.h:121
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:328
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:152
LArShapeDumper::m_dumpDisc
bool m_dumpDisc
Definition: LArShapeDumper.h:101
LArShapeDumper::m_acorrKey
SG::ReadCondHandleKey< ILArAutoCorr > m_acorrKey
Definition: LArShapeDumper.h:137
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:770
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
LArShapeDumper::~LArShapeDumper
~LArShapeDumper()
Definition: LArShapeDumper.cxx:83
LArShapeDumper::m_doAllLvl1
bool m_doAllLvl1
Definition: LArShapeDumper.h:151
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:152
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:97
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:1400
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
Identifier
Definition: IdentifierFieldParser.cxx:14
LArSamples::DataStore::makeNewHistory
HistoryContainer * makeNewHistory(const IdentifierHash &hash, CellInfo *info)
append data (takes ownership of everything)
Definition: LArCalorimeter/LArCafJobs/src/DataStore.cxx:40
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34