ATLAS Offline Software
Loading...
Searching...
No Matches
LArCaliWaveBuilder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
12
14
17
18#include <fstream>
19
20
21using CLHEP::megahertz;
22using CLHEP::ns;
23
24
25LArCaliWaveBuilder::LArCaliWaveBuilder(const std::string& name, ISvcLocator* pSvcLocator)
26 : AthAlgorithm(name, pSvcLocator),
27 m_groupingType("ExtendedFeedThrough"), // SubDetector, Single, FeedThrough
28 m_onlineID(nullptr),
30{
31 declareProperty("UseAccumulatedDigits", m_useAccumulatedDigits=true);
33 declareProperty("KeyOutput", m_keyoutput="LArCaliWave");
34 declareProperty("SubtractPed", m_pedSub=true);
35 declareProperty("NBaseline", m_baseline=1);
36 declareProperty("SamplingPeriod", m_SamplingPeriod=1./(40.08*megahertz));
37 declareProperty("NSteps", m_NStep=24); // Number of Delay Steps. FIXME: Try to get this information for somewhere else
38 declareProperty("ADCsaturation", m_ADCsatur=0) ;
39 declareProperty("GroupingType", m_groupingType);
40 declareProperty("UseDacAndIsPulsedIndex", m_useDacAndIsPulsedIndex=false);
41 declareProperty("CheckEmptyPhases", m_checkEmptyPhases=false);
42 declareProperty("RecAllCells", m_recAll=false);
43 declareProperty("UsePattern", m_usePatt=-1);
44 declareProperty("UseParams", m_useParams=false); // Read LArCalibParams from DetStore ?
45 declareProperty("UseParamsSel", m_useParamsSel=false); // Use LArCalibParams from DetStore for event selection ?
46 declareProperty("isSC", m_isSC=false);
47 declareProperty("NumSubStep", m_NSubStep=1);
48
49
51
53
54}
55
57= default;
58
60{
61 if (m_keylistproperty.empty()) {
62 m_keylistproperty.emplace_back("HIGH");
63 m_keylistproperty.emplace_back("MEDIUM");
64 m_keylistproperty.emplace_back("LOW");
65 }
67
68 //FIXME probably useless because m_wave isn't written anywhere
69 StatusCode sc=m_waves.setGroupingType(m_groupingType,msg());
70 if (sc.isFailure()) {
71 ATH_MSG_ERROR( "Failed to set groupingType for LArCaliWave intermediate object" );
72 return sc;
73 }
74
75 ATH_MSG_INFO( "Initialize intermediate Wave object" );
76 sc=m_waves.initialize();
77 if (sc.isFailure()) {
78 ATH_MSG_ERROR( "Failed initialize LArCaliWave intermediate object" );
79 return sc;
80 }
81
84
85
87 ATH_MSG_INFO( "Empty phases check selected." );
88
89 //Get pedestal from CondStore
90 ATH_CHECK( m_pedKey.initialize(m_pedSub) );
91
92 //Get Online helper from DetStore
93 if ( m_isSC ) {
94 const LArOnline_SuperCellID* ll;
95 ATH_CHECK( detStore()->retrieve(ll, "LArOnline_SuperCellID") );
96 m_onlineID = static_cast<const LArOnlineID_Base*>(ll);
97 ATH_MSG_DEBUG(" Found the LArOnline_SuperCellID helper. ");
98 } else { // m_isSC
99 const LArOnlineID* ll;
100 ATH_CHECK( detStore()->retrieve(ll, "LArOnlineID") );
101 m_onlineID = static_cast<const LArOnlineID_Base*>(ll);
102 ATH_MSG_DEBUG(" Found the LArOnlineID helper. ");
103 }
104
105 ATH_CHECK( m_cablingKey.initialize() );
106 ATH_CHECK( m_cablingKeySC.initialize(m_isSC) );
107
108 if(m_usePatt >= 0 && !m_useParamsSel) {
109 ATH_MSG_ERROR("Inconsistent configuration, for UsePattern > 0 the UseParams must be true");
110 return StatusCode::FAILURE;
111 }
112
114
115 return StatusCode::SUCCESS;
116}
117
118
119StatusCode LArCaliWaveBuilder::execute(const EventContext& ctx)
120{
121 // using EvtId
122 m_event_counter=ctx.eventID().event_number()+1;// evt. starts from 0
123
124 const LArCalibParams* calibParams = nullptr;
125 const LArCalibLineMapping *clcabling=nullptr;
126 if(m_useParamsSel || m_useParams) { // we have to check in which event we are, reading only ones corresponding
127 // to our pattern
128 ATH_CHECK(detStore()->retrieve(calibParams,"LArCalibParams"));
129 unsigned numPatt=calibParams->getNumberPatterns(HWIdentifier(0));
130
131 unsigned counter=m_event_counter;
133 if (counter % calibParams->NTrigger(HWIdentifier(1007091712)) != 0U) return StatusCode::SUCCESS;
134 }
135
136 counter /= calibParams->NTrigger(HWIdentifier(1007091712));
137 unsigned iDAC;
138 unsigned iDel;
139 for(iDAC=1; iDAC<=calibParams->getNumberDACs(HWIdentifier(0)); ++iDAC) {
140 for(iDel=0; iDel<calibParams->getNumberDelays(HWIdentifier(0)); ++iDel) {
141 if(counter <= m_NSubStep*iDAC*iDel*numPatt + m_NSubStep*m_usePatt && counter > m_NSubStep*iDAC*iDel*numPatt+ m_NSubStep*(m_usePatt-1) ) {
142 break;
143 }
144 }
145 if(iDel<calibParams->getNumberDelays(HWIdentifier(0))) break;
146 }
147 if(iDAC>calibParams->getNumberDACs(HWIdentifier(0))) return StatusCode::SUCCESS;
148
149 ATH_MSG_DEBUG("Good event "<<m_event_counter<<" : "<<counter<<" for pattern " << m_usePatt << " out of " << numPatt << " patterns " << calibParams->NTrigger(HWIdentifier(1007091712)) <<" triggers "<<iDAC<<" iDAC "<<iDel<<" iDel");
150 ATH_MSG_DEBUG("Good event "<<m_NSubStep*iDAC*iDel*numPatt+ m_NSubStep*(m_usePatt-1) <<" : " << m_NSubStep*iDAC*iDel*numPatt + m_NSubStep*m_usePatt);
151
153 clcabling =*clHdl;
154 if(!clcabling) {
155 ATH_MSG_WARNING( "Do not have calib line mapping from key " << m_calibMapKey.key() );
156 return StatusCode::FAILURE;
157 }
158
159 }
160
161 if ( m_event_counter < 100 || m_event_counter%100==0 )
162 ATH_MSG_INFO( "Processing event " << m_event_counter );
163
164 if (m_keylist.empty()) {
165 ATH_MSG_ERROR( "Key list is empty! No containers to process!" );
166 return StatusCode::FAILURE;
167 }
168
169
170 // execute() method...
172 return executeWithAccumulatedDigits(calibParams, clcabling);
173 else
174 return executeWithStandardDigits(calibParams, clcabling);
175}
176
178{
179 StatusCode sc;
180
181 const LArAccumulatedCalibDigitContainer* larAccumulatedCalibDigitContainer = nullptr;
182
183 std::vector<std::string>::const_iterator key_it=m_keylist.begin();
184 std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
185 int foundkey = 0;
186 for (;key_it!=key_it_e; ++key_it) { //Loop over all containers that are to be processed (e.g. different gains)
187
188 sc = evtStore()->retrieve(larAccumulatedCalibDigitContainer,*key_it);
189 if (sc.isFailure()) {
190 ATH_MSG_WARNING( "Cannot read LArAccumulatedCalibDigitContainer from StoreGate! key=" << *key_it );
191 if ( (std::next(key_it) == key_it_e) && foundkey==0 ){
192 ATH_MSG_ERROR("None of the provided LArAccumulatedDigitContainer keys could be read");
193 return StatusCode::FAILURE;
194 }else{
195 continue;
196 }
197 }
198 foundkey+=1;
199
200 const LArFebErrorSummary* febErrSum=nullptr;
201 if (evtStore()->contains<LArFebErrorSummary>("LArFebErrorSummary")) {
202 sc=evtStore()->retrieve(febErrSum);
203 if (sc.isFailure()) {
204 ATH_MSG_ERROR( "Failed to retrieve FebErrorSummary object!" );
205 return sc;
206 }
207 }
208 else
209 if (m_event_counter==0)
210 ATH_MSG_WARNING( "No FebErrorSummaryObject found! Feb errors not checked!" );
211
212 HWIdentifier lastFailedFEB(0);
213 LArAccumulatedCalibDigitContainer::const_iterator it=larAccumulatedCalibDigitContainer->begin();
214 LArAccumulatedCalibDigitContainer::const_iterator it_end=larAccumulatedCalibDigitContainer->end();
215
216 if (it == it_end) {
217 ATH_MSG_DEBUG("LArAccumulatedCalibDigitContainer with key=" << *key_it << " is empty ");
218 continue; // at this event LArAccumulatedCalibDigitContainer is empty, do not even try to loop on it...
219 }
220
221 const float delayScale = larAccumulatedCalibDigitContainer->getDelayScale();
222 const float deltaDelay = 25*ns/(delayScale*m_NStep);
223
224 for (;it!=it_end; ++it) { // Loop over all cells
225
226 bool ispulsed=false;
227 if(m_useParams && calibParams && clcabling) { // got LArCalibParams from DetStore
228 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
229 for (const HWIdentifier &calibLineHWID : calibLineLeg) {// loop calib lines
230 ispulsed |= calibParams->isPulsed(m_event_counter,calibLineHWID);
231 }
232 } else {
233 ispulsed=(*it)->isPulsed();
234 }
235 if ( (!m_recAll) && !ispulsed ) {
236 ATH_MSG_DEBUG( "Non pulsed cell " << m_onlineID->channel_name((*it)->hardwareID())<<" in evt. "<<m_event_counter );
237 continue; // Check if cell is pulsed
238 }
239 HWIdentifier chid=(*it)->hardwareID();
240 HWIdentifier febid=m_onlineID->feb_Id(chid);
241 if (febErrSum) {
242 const uint16_t febErrs=febErrSum->feb_error(febid);
243 if (febErrs & m_fatalFebErrorPattern) {
244 if (febid!=lastFailedFEB) {
245 lastFailedFEB=febid;
246 ATH_MSG_ERROR( "Event " << m_event_counter << " Feb " << m_onlineID->channel_name(febid)
247 << " reports error(s):" << febErrSum->error_to_string(febErrs) << ". Data ignored." );
248 }
249 continue;
250 }
251 }
252 CaloGain::CaloGain gain=(*it)->gain();
253
254 if (gain<0 || gain>CaloGain::LARNGAIN) {
255 ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
256 return StatusCode::FAILURE;
257 }
258
259 // transform sampleSum vector from uint32_t to double
260 std::vector<double> samplesum;
261 std::vector < uint64_t >::const_iterator samplesum_it=(*it)->sampleSum().begin();
262 std::vector < uint64_t >::const_iterator samplesum_it_e=(*it)->sampleSum().end();
263 for (;samplesum_it!=samplesum_it_e; ++samplesum_it)
264 samplesum.push_back((double)(*samplesum_it));
265
266 // transform sample2Sum vector from uint32_t to double
267 std::vector<double> sample2sum;
268 std::vector < uint64_t >::const_iterator sample2sum_it=(*it)->sample2Sum().begin();
269 std::vector < uint64_t >::const_iterator sample2sum_it_e=(*it)->sample2Sum().end();
270 for (;sample2sum_it!=sample2sum_it_e; ++sample2sum_it)
271 sample2sum.push_back((double)(*sample2sum_it));
272
273 WaveMap& waveMap = m_waves.get(chid,gain);
274
275 //make dacPulsed which has dac and four bits of is pulsed info
276 int dacPulsed;
277 float delay = (*it)->delay();
278 int dac=(*it)->DAC();
279 int index;
280 int pulsed=0;
281 if(m_useParams && calibParams && clcabling) { // get LArCalibParams from DetStore
282 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
283 if(calibLineLeg.empty()) {
284 ATH_MSG_WARNING("Why do not have calib lines for "<<(*it)->hardwareID()<<" ?");
285 continue;
286 }
287 dac=calibParams->DAC(m_event_counter,calibLineLeg[0]);
288 dacPulsed=dac;
289 delay = calibParams->Delay(m_event_counter,calibLineLeg[0]);
290 for (unsigned i=0; i<calibLineLeg.size(); ++i) {// loop calib lines
291 if(calibParams->isPulsed(m_event_counter,calibLineLeg[i])){
292 ATH_MSG_DEBUG((*it)->hardwareID().get_identifier32().get_compact() << " GR: line pulsed true, line="<<i+1);
293 dacPulsed=(dacPulsed | (0x1 << (15+i+1)));
294 pulsed=(pulsed | (0x1 << (15+i+1)));
295 }
296
297 }
298 } else {
299 dacPulsed=(*it)->DAC();
300 for(int iLine=1;iLine<5;iLine++){
301 if((*it)->isPulsed(iLine)){
302 ATH_MSG_DEBUG((*it)->hardwareID().get_identifier32().get_compact() <<" GRAV: line pulsed true, line="<<iLine);
303 dacPulsed=(dacPulsed | (0x1 << (15+iLine)));
304 pulsed=(pulsed | (0x1 << (15+iLine)));
305 }
306 }
307 }
308
309 if(m_useDacAndIsPulsedIndex){//switch used to turn on the option to have indexs that are DAC and isPulsed info
310 index = dacPulsed;
311 } else {
312 index = dac;
313 }
314
315 ATH_MSG_DEBUG( "Cell " << m_onlineID->channel_name(chid) << " gain: "<<gain );
316 ATH_MSG_DEBUG( "with " << (*it)->sampleSum().size() << " samples " << index << " DAC " << delay << " delay " << dacPulsed << " dacPulsed " << pulsed << " pulsed");
317
318 WaveMap::iterator itm = waveMap.find(index);
319
320 if ( itm == waveMap.end() ) { // A new LArCaliWave is booked
321 LArCaliWave wave(samplesum.size()*m_NStep, m_dt, dac, pulsed, LArWave::meas);
322 itm = (waveMap.insert(WaveMap::value_type(index,wave))).first;
323 ATH_MSG_DEBUG("index: "<<index<<" new wave inserted");
324 }
325 (*itm).second.addAccumulatedEvent(int(std::roundf(delay/deltaDelay)), m_NStep,
326 samplesum, sample2sum, (*it)->nTriggers());
327
328 } //End loop over all cells
329 } //End loop over all containers
330
331 return StatusCode::SUCCESS;
332}
333
334
336{
337 StatusCode sc;
338
339 const LArCalibDigitContainer* larCalibDigitContainer = nullptr;
340
341 std::vector<std::string>::const_iterator key_it=m_keylist.begin();
342 std::vector<std::string>::const_iterator key_it_e=m_keylist.end();
343
344 for (;key_it!=key_it_e; ++key_it) { //Loop over all containers that are to be processed (e.g. different gains)
345
346 sc = evtStore()->retrieve(larCalibDigitContainer,*key_it);
347 if (sc.isFailure()) {
348 ATH_MSG_WARNING( "Cannot read LArCalibDigitContainer from StoreGate! key=" << *key_it );
349 continue; // Try next container
350 }
351
352 LArCalibDigitContainer::const_iterator it=larCalibDigitContainer->begin();
353 LArCalibDigitContainer::const_iterator it_end=larCalibDigitContainer->end();
354
355 if (it == it_end) {
356 ATH_MSG_INFO( "LArCalibDigitContainer with key=" << *key_it << " is empty " );
357 continue; // at this event LArCalibDigitContainer is empty, do not even try to loop on it...
358 }
359
360 const float delayScale = larCalibDigitContainer->getDelayScale();
361 const float deltaDelay = 25*ns/(delayScale*m_NStep);
362
363 for (;it!=it_end; ++it) { // Loop over all cells
364
365 bool pulsed=false;
366 int dac = (*it)->DAC();
367 float delay= (*it)->delay();
368 if(m_useParams && calibParams && clcabling) { // get LArCalibParams from DetStore
369 const std::vector<HWIdentifier>& calibLineLeg = clcabling->calibSlotLine((*it)->hardwareID());
370 dac=calibParams->DAC(m_event_counter,calibLineLeg[0]); // assuming all calib. boards configured equally
371 delay = calibParams->Delay(m_event_counter,calibLineLeg[0]);
372 for (const HWIdentifier &calibLineHWID : calibLineLeg) {// loop calib lines
373 pulsed |= calibParams->isPulsed(m_event_counter,calibLineHWID);
374 }
375 } else {
376 pulsed=(*it)->isPulsed();
377 }
378 if ((!m_recAll) && !pulsed ) continue ; // Check if cell is pulsed
379
380 HWIdentifier chid=(*it)->hardwareID();
381 CaloGain::CaloGain gain=(*it)->gain();
382
383 if (gain<0 || gain>CaloGain::LARNGAIN) {
384 ATH_MSG_ERROR( "Found not-matching gain number ("<< (int)gain <<")" );
385 return StatusCode::FAILURE;
386 }
387
388 // transform samples vector from uint32_t to double
389 std::vector<double> samples;
390 for (short sample : (*it)->samples())
391 samples.push_back((double)(sample));
392
393 WaveMap& waveMap = m_waves.get(chid,gain);
394 WaveMap::iterator itm = waveMap.find(dac);
395
396 if ( itm == waveMap.end() ) { // A new LArCaliWave is booked
397 LArCaliWave wave(samples.size()*m_NStep, m_dt, (*it)->DAC(), 0x1, LArWave::meas );
398 itm = (waveMap.insert(WaveMap::value_type((*it)->DAC(),wave))).first;
399 }
400
401 (*itm).second.addEvent((int)roundf(delay/deltaDelay), m_NStep, samples);
402
403 } //End loop over all cells
404 } //End loop over all containers
405
406 return StatusCode::SUCCESS;
407}
408
409
410
412{
413 // Create wave container using feedthru grouping and initialize
414 auto caliWaveContainer = std::make_unique<LArCaliWaveContainer>();
415
416 StatusCode sc=caliWaveContainer->setGroupingType(m_groupingType,msg());
417 if (sc.isFailure()) {
418 ATH_MSG_ERROR( "Failed to set groupingType for LArCaliWaveContainer object" );
419 return sc;
420 }
421
422 ATH_MSG_INFO( "Initialize final Wave object" );
423 sc=caliWaveContainer->initialize();
424 if (sc.isFailure()) {
425 ATH_MSG_ERROR( "Failed initialize LArCaliWaveContainer object" );
426 return sc;
427 }
428
429 const EventContext& ctx = Gaudi::Hive::currentContext();
430 const LArOnOffIdMapping* cabling(nullptr);
431 if( m_isSC ){
433 cabling = {*cablingHdl};
434 if(!cabling) {
435 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKeySC.key());
436 return StatusCode::FAILURE;
437 }
438
439 }else{
441 cabling = {*cablingHdl};
442 if(!cabling) {
443 ATH_MSG_ERROR("Do not have mapping object " << m_cablingKey.key());
444 return StatusCode::FAILURE;
445 }
446 }
448 const ILArPedestal* larPedestal{*pedHdl};
449 if(m_pedSub && !larPedestal) {
450 ATH_MSG_DEBUG("No pedestal(s) found ");
451 ATH_MSG_INFO( "Using fake (baseline) pedestal subtraction..." );
452 }
453
454 LArWaveHelper wHelper;
455 int NCaliWave=0;
456
457 // Loop over all gains
458 for (unsigned k=0;k<(int)CaloGain::LARNGAIN;k++) {
459
461
463 WaveContainer::ConditionsMapIterator cell_it = m_waves.begin(gain) ;
464 WaveContainer::ConditionsMapIterator cell_it_e = m_waves.end(gain);
465
466 HWIdentifier lastId;
467
468 for (; cell_it!=cell_it_e; ++cell_it) {
469
470
471 // Get id of this cell - use id from first cell in map
472 //
473 // Some accumulations may be empty and we must skip this
474 // cell. WaveContainer has all 128 channels for each FEB
475 // with at least ONE being read out.
476 //
477
478 const HWIdentifier hwId = cell_it.channelId();
479 if ((!m_recAll) && (!cabling->isOnlineConnected(hwId))) {
480
481 //ATH_MSG_INFO( "Skipping disconnected channel: "<<MSG::hex<<hwId<<MSG::dec );
482 continue; //Ignore disconnected channels
483 }
484
485 const WaveMap& waveMap = (*cell_it);
486 if (waveMap.empty()) {
487 ATH_MSG_INFO( "Empty accumulated wave. Last id: " << MSG::hex
488 //<< lastId << " " << emId->show_to_string(lastId) );
489 << lastId << " this id: "<<hwId<<MSG::dec );
490 continue;
491 }
492
493 lastId = hwId; // save previous id for debug printout
494
495 // Get the vector of waves for this chid,gain
496 LArCaliWaveContainer::LArCaliWaves& dacWaves = caliWaveContainer->get(hwId, gain);
497
498 std::map<int, LArCaliWave>::const_iterator dac_it = cell_it->begin();
499 std::map<int, LArCaliWave>::const_iterator dac_it_e = cell_it->end();
500
501 HWIdentifier chid = cell_it.channelId();
502
503 for (; dac_it != dac_it_e; ++dac_it) {
504
505 const LArCaliWave& thisWave = dac_it->second ;
506
507 if (m_checkEmptyPhases) {
508 const std::vector<int>& thisTriggers = thisWave.getTriggers();
509 for (unsigned i=0;i<thisTriggers.size();++i) {
510 if (thisTriggers[i]==0) {
511 ATH_MSG_FATAL( "Empty phase found in channel 0x" << MSG::hex << chid << MSG::dec
512 << "., aborting reconstruction. Sorry." );
513 return StatusCode::FAILURE;
514 }
515 }
516 }
517
518 float pedAve = 0.;
519
520 if ( m_pedSub ) {
521 if ( larPedestal ) {
522 float pedestal = larPedestal->pedestal(chid,gain);
523 if (pedestal <= (1.0+LArElecCalib::ERRORCODE)) {
524 ATH_MSG_DEBUG("No pedestal(s) found for channel 0x" << MSG::hex << chid << MSG::dec);
525 ATH_MSG_INFO( "Using fake (baseline) pedestal subtraction..." );
526 pedAve = wHelper.getBaseline(thisWave,m_baseline) ;
527 } else {
528 pedAve = pedestal;
529 }
530 } else {
531 pedAve = wHelper.getBaseline(thisWave,m_baseline) ;
532 }
533 ATH_MSG_DEBUG("Pedestal for channel 0x" << MSG::hex << chid << MSG::dec << " is = " << pedAve << " ADC");
534 }
535
536 double waveMax = thisWave.getSample( wHelper.getMax(thisWave) ) ;
537 if ( (!m_recAll) && m_ADCsatur>0 && waveMax>=m_ADCsatur ) {
538 ATH_MSG_INFO( "Absolute ADC saturation at DAC = " << thisWave.getDAC() << " ... skip!" ) ;
539 continue ;
540 } else {
541 dacWaves.emplace_back(((thisWave)+(-pedAve)).getWave() ,
542 thisWave.getErrors(),
543 thisWave.getTriggers(),
544 thisWave.getDt(),
545 thisWave.getDAC(),
546 thisWave.getIsPulsedInt(),
547 thisWave.getFlag() );
548
549 NCaliWave++;
550 }
551
552 } // end of loop DACs
553
554 // intermediate map cleanup (save memory)
555 cell_it->clear();
556
557 } //end loop cells
558
559 } //end loop over m_keyList
560
561 ATH_MSG_INFO( " Summary : Number of cells with a CaliWave reconstructed : " << NCaliWave );
562 ATH_MSG_INFO( " Summary : Number of Barrel PS cells side A or C (connected+unconnected): 3904+ 192 = 4096 " );
563 ATH_MSG_INFO( " Summary : Number of Barrel cells side A or C (connected+unconnected): 50944+2304 = 53248 " );
564 ATH_MSG_INFO( " Summary : Number of EMEC cells side A or C (connected+unconnected): 31872+3456 = 35328 " );
565 ATH_MSG_INFO( " Summary : Number of HEC cells side A or C (connected+unconnected): 2816+ 256 = 3072 " );
566 ATH_MSG_INFO( " Summary : Number of FCAL cells side A or C (connected+unconnected): 1762+ 30 = 1792 " );
567
568 // Record in detector store with key (m_keyoutput)
569 ATH_CHECK( detStore()->record(std::move(caliWaveContainer), m_keyoutput) );
570
571 ATH_MSG_INFO( "LArCaliWaveBuilder has finished." );
572 return StatusCode::SUCCESS;
573}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double delay(std::size_t d)
static Double_t sc
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
Container class for LArAccumulatedCalibDigit.
double getDelayScale() const
get the delay Scale
const LArOnlineID_Base * m_onlineID
virtual StatusCode stop()
StatusCode execute(const EventContext &ctx)
Execute method.
SG::ReadCondHandleKey< LArCalibLineMapping > m_calibMapKey
SG::ReadCondHandleKey< ILArPedestal > m_pedKey
std::vector< std::string > m_keylistproperty
StatusCode executeWithStandardDigits(const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
std::vector< std::string > m_keylist
std::map< int, LArCaliWave > WaveMap
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKeySC
LArCaliWaveBuilder(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode executeWithAccumulatedDigits(const LArCalibParams *calibParams, const LArCalibLineMapping *clcabling)
int getIsPulsedInt() const
isPulsed value
int getDAC() const
DAC value.
Container class for LArCalibDigit.
double getDelayScale() const
get delay scale
const std::vector< HWIdentifier > & calibSlotLine(const HWIdentifier id) const
unsigned getNumberDelays(const HWIdentifier calibModuleID) const
unsigned Delay(const unsigned event, const HWIdentifier calibLineID) const
bool isPulsed(const unsigned event, const HWIdentifier calibLineID) const
unsigned getNumberPatterns(const HWIdentifier calibModuleID) const
unsigned getNumberDACs(const HWIdentifier calibModuleID) const
unsigned DAC(const unsigned event, const HWIdentifier calibLineID) const
unsigned NTrigger(const HWIdentifier calibModuleID) const
ConditionsMap::iterator ConditionsMapIterator
Holds information from the FEB Error Summary.
static std::string error_to_string(uint16_t error)
interpret the error in string
uint16_t feb_error(HWIdentifier febid) const
get error for feb
Helper for the Liquid Argon Calorimeter cell identifiers.
const std::vector< int > & getTriggers() const
trigger vector
const std::vector< double > & getErrors() const
error vector
double getBaseline(const LArWave &theWave, unsigned nBase) const
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
const double & getSample(const unsigned int i) const
Amplitude per time bin.
Definition LArWave.h:53
const double & getDt() const
delta time
Definition LArWave.h:50
unsigned getFlag() const
flag: ...
Definition LArWave.h:178
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116
@ LARNGAIN
Definition CaloGain.h:19
Definition index.py:1