ATLAS Offline Software
Loading...
Searching...
No Matches
TBECLArRawChannelBuilder Class Reference

#include <TBECLArRawChannelBuilder.h>

Inheritance diagram for TBECLArRawChannelBuilder:
Collaboration diagram for TBECLArRawChannelBuilder:

Public Member Functions

 TBECLArRawChannelBuilder (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) override
 Execute method.
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const LArOnlineIDm_onlineHelper
const CaloCell_IDm_calo_id
SG::ReadCondHandleKey< LArOnOffIdMappingm_cablingKey {this,"keyCabling", "LArOnOffIdMap", "Input key for Id mapping"}
SG::ReadCondHandleKey< ILArHVScaleCorrm_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}
std::string m_DataLocation
std::string m_ChannelContainerName
bool m_useTDC
bool m_useRamp
bool m_useShape
bool m_ConvertADCToHighGain
float m_Ecut
int m_initialTimeSampleShift
int m_NOFCPhases
int m_NOFCTimeBins
bool m_useIntercept [4]
bool m_useOFCPhase
bool m_phaseInv
float m_ramp_max [3]
double m_SamplingPeriode
float m_OFCTimeBin
bool m_binHalfOffset
bool m_allowTimeJump
int m_pedestalFallbackMode
unsigned int m_iPedestal
unsigned int m_shapeMode
unsigned m_skipSaturCells
short m_AdcMax
int m_noEnergy
int m_noTime
int m_noShape
int m_noShapeDer
int m_saturation
int m_lastNoEnergy
int m_lastNoTime
int m_lastNoShape
int m_lastNoShapeDer
float m_aveNoEnergy
float m_aveNoTime
float m_aveNoShape
float m_aveNoShapeDer
float m_aveSaturCells
int m_nEvents
float m_aveChannels
bool m_hvcorr
double m_SamplingPeriodeUpperLimit
double m_SamplingPeriodeLowerLimit
const LArEM_IDm_emId
float m_adc2mev [30]
SG::ReadCondHandleKey< ILArOFCm_ofcKey {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object" }
 Property: OFC coefficients (conditions input).
SG::ReadCondHandleKey< LArADC2MeVm_adc2mevKey { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" }
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 25 of file TBECLArRawChannelBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TBECLArRawChannelBuilder()

TBECLArRawChannelBuilder::TBECLArRawChannelBuilder ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 26 of file TBECLArRawChannelBuilder.cxx.

26 :
27 AthAlgorithm(name, pSvcLocator),
29 m_calo_id(0),
30 m_DataLocation("FREE"),
31 m_ChannelContainerName("LArRawChannels"),
32 m_useTDC(false),
33 m_useRamp(true),
34 m_useShape(true),
36 m_Ecut(256*MeV),
38 m_ramp_max(),
39 m_noEnergy(0),
40 m_noTime(0),
41 m_noShape(0),
42 m_noShapeDer(0),
43 m_saturation(0),
45 m_lastNoTime(0),
49 m_aveNoTime(0),
50 m_aveNoShape(0),
53 m_nEvents(0),
57 m_emId(0),
58 m_adc2mev()
59 //m_NOFCPhases(24),
60 //m_NOFCTimeBins(24)
61 {
62 //m_useIntercept={false,false,false,false};
63 declareProperty("LArRawChannelContainerName",m_ChannelContainerName);
64 declareProperty("DataLocation", m_DataLocation );
65 declareProperty("UseTDC", m_useTDC);
66 declareProperty("UseRamp",m_useRamp);
67 declareProperty("UseShape",m_useShape);
68 declareProperty("ConvertADCToHighGain",m_ConvertADCToHighGain);
69 declareProperty("Ecut", m_Ecut);
70 declareProperty("UseHighGainRampIntercept", m_useIntercept[CaloGain::LARHIGHGAIN]=false);
71 declareProperty("UseMedGainRampIntercept", m_useIntercept[CaloGain::LARMEDIUMGAIN]=false);
72 declareProperty("UseLowGainRampIntercept", m_useIntercept[CaloGain::LARLOWGAIN]=false);
73 declareProperty("InitialTimeSampleShift", m_initialTimeSampleShift);
74 declareProperty("NOFCTimeBins", m_NOFCTimeBins=25); //Number of OFC time bins in a sampling periode
76 declareProperty("NOFCPhases", m_NOFCPhases); //Total number of available OFC sets
77 declareProperty("UseOFCPhase", m_useOFCPhase=false);
78 declareProperty("PhaseInversion", m_phaseInv=false);
79 declareProperty("SamplingPeriod", m_SamplingPeriode=1/(40.08*megahertz));
81 declareProperty("BinHalfOffset", m_binHalfOffset=false);
82 declareProperty("AllowTimeSampleJump", m_allowTimeJump=true);
83 declareProperty("PedestalFallbackMode", m_pedestalFallbackMode=0); // 0=only DB, 1=Only if missing,
84 declareProperty("PedestalSample", m_iPedestal=0); // 2=Low, 3=Low+Me dium, 4=All LAr
85 declareProperty("ShapeMode", m_shapeMode=0);
86 declareProperty("SkipSaturCellsMode", m_skipSaturCells=0);
87 declareProperty("ADCMax", m_AdcMax=4095);
88 declareProperty("HVcorr", m_hvcorr=false);
89}
static const double MeV
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
@ LARMEDIUMGAIN
Definition CaloGain.h:18
@ LARLOWGAIN
Definition CaloGain.h:18
@ LARHIGHGAIN
Definition CaloGain.h:18

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TBECLArRawChannelBuilder::execute ( const EventContext & ctx)
overridevirtual

Execute method.

Implements AthAlgorithm.

Definition at line 180 of file TBECLArRawChannelBuilder.cxx.

181{
182
183 //Counters for errors & warnings per event
184 int noEnergy = 0; // Number of completly failed channels in a given event
185 int BadTiming = 0; // Number of channels with bad timing in a given event
186 int noTime = 0; // Number of channels without time info in a given event
187 int noShape = 0; // Number of channels without Shape (= with no quality factor) in a given event
188 int noShapeDer = 0; // Number of channels without ShapeDerivative in a given event
189 int highE = 0; // Number of channels with 'high' (above threshold) energy in a given event
190 int saturation = 0; // Number of saturating channels in a given event
191
192 const ILArHVScaleCorr *oflHVCorr=nullptr;
193 if(m_hvcorr) {
194 SG::ReadCondHandle<ILArHVScaleCorr> oflHVCorrHdl(m_offlineHVScaleCorrKey, ctx);
195 oflHVCorr = *oflHVCorrHdl;
196 if(!oflHVCorr) {
197 ATH_MSG_ERROR( "Could not get the HVScaleCorr from key " << m_offlineHVScaleCorrKey.key() );
198 return StatusCode::FAILURE;
199 }
200 }
201 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey, ctx};
202 const LArOnOffIdMapping* cabling{*cablingHdl};
203 if(!cabling) {
204 ATH_MSG_ERROR( "Could not get the cabling mapping from key " << m_cablingKey.key() );
205 return StatusCode::FAILURE;
206 }
207
208 //Pointer to input data container
209 const LArDigitContainer* digitContainer=NULL;//Pointer to LArDigitContainer
210 //const TBPhase* theTBPhase; //Pointer to Testbeam TDC-Phase object (if needed)
211 float PhaseTime=0; //Testbeam TDC phase (if needed)
212 float globalTimeOffset=0;
213 //Pointer to conditions data objects
214 const ILArFEBTimeOffset* larFebTimeOffset=NULL;
215 const ILArShape* larShape=NULL;
216 //Retrieve Digit Container
217
218 ATH_CHECK( evtStore()->retrieve(digitContainer,m_DataLocation) );
219
220 //Retrieve calibration data
221 const ILArPedestal* larPedestal=nullptr;
222 ATH_CHECK( detStore()->retrieve(larPedestal) );
223
224 if (m_useShape) {
225 ATH_MSG_DEBUG ( "Retrieving LArShape object" );
226 StatusCode sc=detStore()->retrieve(larShape);
227 if (sc.isFailure()) {
228 ATH_MSG_WARNING ( "Can't retrieve LArShape from Conditions Store" << std::endl
229 << "Quality factor will not be caluclated." );
230 larShape=NULL;
231 }
232 }
233
234 ATH_MSG_DEBUG ( "Retrieving LArOFC object" );
235 SG::ReadCondHandle<ILArOFC> larOFC (m_ofcKey, ctx);
236
237 const LArADC2MeV* adc2mev = nullptr;
238 if (m_useRamp) {
239 SG::ReadCondHandle<LArADC2MeV> adc2mevH (m_adc2mevKey, ctx);
240 adc2mev = *adc2mevH;
241 }
242
243 //retrieve TDC
244 if (m_useTDC) { //All this timing business is only necessary if the readout and the beam are not in phase (Testbeam)
245 const TBPhase* theTBPhase = nullptr;
246 const ILArGlobalTimeOffset* larGlobalTimeOffset = nullptr;
247 ATH_CHECK( evtStore()->retrieve(theTBPhase,"TBPhase") );
248 //Get Phase in nanoseconds
249 PhaseTime = theTBPhase->getPhase();
250 // ###
251 if (m_phaseInv) PhaseTime = m_SamplingPeriode - PhaseTime ;
252 ATH_MSG_DEBUG ( " *** Phase = " << PhaseTime );
253 // ###
254
255 //Get Global Time Offset
256 StatusCode sc=detStore()->retrieve(larGlobalTimeOffset);
257 if (sc.isSuccess()) globalTimeOffset = larGlobalTimeOffset->TimeOffset();
258
259 //Get FEB time offset
260 sc=detStore()->retrieve(larFebTimeOffset);
261 if (sc.isFailure()) larFebTimeOffset=NULL;
262 }
263
264
265 LArRawChannelContainer* larRawChannelContainer=new LArRawChannelContainer();
266 larRawChannelContainer->reserve(digitContainer->size());
267 StatusCode sc = evtStore()->record(larRawChannelContainer,m_ChannelContainerName);
268 if(sc.isFailure()) {
269 ATH_MSG_ERROR ( "Can't record LArRawChannelContainer in StoreGate" );
270 }
271
272 // Average number of LArDigits per event
273 m_nEvents++;
274 m_aveChannels += digitContainer->size();
275
276 bool debugPrint=false;
277 if (msgLvl(MSG::DEBUG) ) debugPrint=true;
278
279 // Now all data is available, start loop over Digit Container
280 int ntot_raw=0;
281
282 for (const LArDigit* digit : *(digitContainer)) {
283
284 //Data that goes into RawChannel:
285 float energy=0;
286 float time=0;
287 float quality=0;
288
289 int OFCTimeBin=0;
290 int timeSampleShift=m_initialTimeSampleShift;
291
292 //Get data from LArDigit
293 const std::vector<short>& samples=digit->samples();
294 const unsigned nSamples=samples.size();
295 const HWIdentifier chid=digit->channelID();
296 const CaloGain::CaloGain gain=digit->gain();
297
298 // to be used in case of DEBUG output
299 int layer = -99999 ;
300 int eta = -99999 ;
301 int phi = -99999 ;
302 int region = -99999 ;
303 if (msgLvl(MSG::DEBUG) ) {
304 Identifier id ;
305 try {
306 id = cabling->cnvToIdentifier(chid);
307 } catch ( LArID_Exception & except ) {
308 ATH_MSG_DEBUG ( "A Cabling exception was caught for channel 0x!"
309 << MSG::hex << chid.get_compact() << MSG::dec );
310 continue ;
311 }
312 layer = m_emId->sampling(id);
313 eta = m_emId->eta(id);
314 phi = m_emId->phi(id);
315 region = m_emId->region(id);
316 ATH_MSG_VERBOSE ( "Channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
317 << " [ Layer = " << layer << " - Eta = " << eta
318 << " - Phi = " << phi << " - Region = " << region << " ] " );
319 }
320
321 // check for saturation, in case skip channel
322 int nSatur=-1 ;
323 for (unsigned iSample=0;iSample<samples.size();iSample++) {
324 if (samples[iSample]>=m_AdcMax) {
325 nSatur++;
326 break ;
327 }
328 }
329 if ( nSatur>-1 ) {
330 msg() << MSG::DEBUG << "Saturation on channel 0x" << MSG::hex << chid.get_compact() << MSG::dec ;
331 saturation++;
332 }
333 if ( m_skipSaturCells && nSatur>-1 ) {
334 msg() << ". Skipping channel." << endmsg;
335 continue; // Ignore this cell, saturation on at least one sample
336 } else if ( nSatur>-1 ) {
337 msg() << "." << endmsg;
338 }
339
340 //Get conditions data for this channel:
341
342 // Pedestal
343 float pedestal=larPedestal->pedestal(chid,gain);
344
345 float pedestalAverage;
346 if (pedestal < (1.0+LArElecCalib::ERRORCODE)) {
347 if( m_pedestalFallbackMode >= 1 ) {
348 ATH_MSG_DEBUG ( "No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
349 << " Gain " << gain <<". Using time sample " << m_iPedestal );
350 pedestalAverage=samples[m_iPedestal];
351 } else {
352 ATH_MSG_DEBUG ( noEnergy << ". No pedestal found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
353 << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]"
354 << " Gain = " << gain << ". Skipping channel." );
355 noEnergy++;
356 continue;
357 }
358 } else {
359 if( ( m_pedestalFallbackMode>=2 && gain==CaloGain::LARLOWGAIN ) ||
362 ATH_MSG_DEBUG ( "Forcing pedestal fallback for channel 0x" << MSG::hex << chid.get_compact()
363 << MSG::dec << " Gain=" << gain << ". Using time sample " << m_iPedestal );
364 pedestalAverage=samples[m_iPedestal];
365 } else {
366 pedestalAverage=pedestal;
367 }
368 }
369
370 // Optimal Filtering Coefficients
371 ILArOFC::OFCRef_t ofc_a;
372 ILArOFC::OFCRef_t ofc_b;
373 {// get OFC from Conditions Store
374 float febTimeOffset=0;
375 const HWIdentifier febid=m_onlineHelper->feb_Id(chid);
376 if (larFebTimeOffset)
377 febTimeOffset=larFebTimeOffset->TimeOffset(febid);
378 double timeShift=PhaseTime+globalTimeOffset+febTimeOffset;
379 if (debugPrint)
380 msg() << MSG::VERBOSE << "Channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
381 << " phase=" << PhaseTime << " Feb=" << febTimeOffset
382 << " Global=" << globalTimeOffset;
383
384 if (m_useOFCPhase) {
385 const double ofcTimeOffset=larOFC->timeOffset(chid,gain);
386 timeShift+=ofcTimeOffset;
387 if (debugPrint) msg() << MSG::VERBOSE << " OFC=" << ofcTimeOffset;
388 }
389
390 if (debugPrint) msg() << MSG::VERBOSE << " Total=" << timeShift << endmsg;
391
392 if (m_allowTimeJump && timeShift >= m_NOFCPhases*m_OFCTimeBin ) {
393 if (debugPrint) ATH_MSG_VERBOSE ( "Time Sample jump: -1" );
394 timeSampleShift -= 1;
395 //timeShift -= m_NOFCTimeBins*m_OFCTimeBin ;
396 timeShift -= m_SamplingPeriode ;
397 }
398 else if (m_allowTimeJump && timeShift < 0 ) {
399 if (debugPrint) ATH_MSG_VERBOSE ( "Time Sample jump: +1" );
400 timeSampleShift += 1;
401 //timeShift += m_NOFCTimeBins*m_OFCTimeBin ;
402 timeShift += m_SamplingPeriode ;
403 }
404
405 if (m_allowTimeJump && ( timeShift > m_NOFCPhases*m_OFCTimeBin || timeShift < 0 ) ) {
406 BadTiming++;
407 noEnergy++;
408 ATH_MSG_ERROR ( noEnergy << ". Time offset out of range for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
409 << " Found " << timeShift << ", expected ( 0 - " << m_NOFCPhases*m_OFCTimeBin << ") ns. Skipping channel." );
410 continue;
411 }
412
413 if (m_allowTimeJump && timeSampleShift < 0) {
414 BadTiming++;
415 noEnergy++;
416 ATH_MSG_ERROR ( noEnergy << ". Negative time sample (" << timeSampleShift << ") shift for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
417 << " Found. Skipping channel." );
418 continue;
419 }
420
421 OFCTimeBin = (int) ( timeShift / m_OFCTimeBin );
422
423 if ( !m_phaseInv ) // if not done with PhaseTime at the beginning, invert time bin for OFC bin selection
424 OFCTimeBin = ( m_NOFCTimeBins - 1 ) - OFCTimeBin;
425 // do not use the following: 24<PhaseTime<25 you always get OFCTimeBin = -1!
426 //else
427 // OFCTimeBin -= 1 ;
428
429 if (debugPrint) ATH_MSG_VERBOSE ( "OFC bin width = " << m_OFCTimeBin << " - OFCBin = " << OFCTimeBin << " - timeShift = " << timeShift );
430
431 if ( OFCTimeBin < 0 ) {
432 ATH_MSG_ERROR ( "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to 0." );
433 OFCTimeBin=0;
434 } else if ( OFCTimeBin >= m_NOFCPhases ) {
435 ATH_MSG_ERROR ( "Channel " << MSG::hex << chid.get_compact() << MSG::dec << " asks for OFC bin = " << OFCTimeBin << ". Set to (NOFCPhases-1) =" << m_NOFCTimeBins-1 );
436 OFCTimeBin = m_NOFCPhases-1;
437 }
438
439 ofc_a=larOFC->OFC_a(chid,gain,OFCTimeBin);
440 //ofc_b=&(larOFC->OFC_b(chid,gain,OFCTimeBin)); retrieve only when needed
441 }
442
443 //Check if we have OFC for this channel and time bin
444 if (ofc_a.size()==0) {
445 noEnergy++;
446 ATH_MSG_DEBUG ( noEnergy << ". No OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
447 << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]"
448 << " Time bin = " << OFCTimeBin << ", Gain = " << gain << ". Skipping channel." );
449 continue;
450 }
451 if (ofc_a.size()+timeSampleShift>nSamples) {
452 BadTiming++;
453 noEnergy++;
454 if (timeSampleShift==0)
455 ATH_MSG_DEBUG ( "Found LArDigit with " << nSamples << " samples, but OFCs for "
456 << ofc_a.size() << " samples. Skipping Channel ");
457 else //have time sample shift
458 ATH_MSG_DEBUG ( "After time sample shift of " << timeSampleShift << ", " << nSamples-timeSampleShift
459 << " samples left, but have OFCs for " << ofc_a.size() << " samples. Skipping Channel ");
460 continue;
461 }
462
463 //Now apply Optimal Filtering to get ADC peak
464 float ADCPeak=0;
465 for (unsigned i=0;i<(ofc_a.size());i++)
466 ADCPeak+=(samples[i+timeSampleShift]-pedestalAverage)*ofc_a.at(i);
467
468 if (debugPrint) ATH_MSG_VERBOSE ( "ADC Height calculated " << ADCPeak << " TimeBin=" << OFCTimeBin );
469
470 if (m_useRamp) {
471 //ADC2MeV (a.k.a. Ramp)
472 LArVectorProxy ramp = adc2mev->ADC2MEV(chid,gain);
473 //Check ramp coefficents
474 if (ramp.size()==0) {
475 noEnergy++;
476 ATH_MSG_DEBUG ( noEnergy << ". No ADC2MeV data found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
477 << " [ Layer = " << layer << " - Eta = " << eta << " - Phi = " << phi << " - Region = " << region << " ]"
478 << " Gain = " << gain << ". Skipping channel." );
479 continue;
480 }
481
482 // temporary fix for bad ramps... should be done in the DB
483 if(ramp[1]>m_ramp_max[gain] || ramp[1]<0) {
484 noEnergy++;
485 ATH_MSG_DEBUG ( "Bad ramp for channel " << chid << " (ramp[1] = " << ramp[1] << "): skip this channel" );
486 continue;
487 }
488
489 float ADCPeakPower=ADCPeak;
490
491 if (m_useIntercept[gain])
492 energy=ramp[0];
493 //otherwise ignore intercept, E=0;
494 for (unsigned i=1;i<ramp.size();i++)
495 {energy+=ramp[i]*ADCPeakPower; //pow(ADCPeak,i);
496 ADCPeakPower*=ADCPeak;
497 }
498 } else {
499 energy = ADCPeak;
501 energy *= 9.5;
502 Identifier id = cabling->cnvToIdentifier(chid);
503 int is = m_calo_id->calo_sample(id);
504 energy *= m_adc2mev[is]; // Ramp for h.g. scale
505 }
506
507// HV correction
508
509 if (m_hvcorr) {
510// HV tool
511 float hvCorr = oflHVCorr-> HVScaleCorr(chid);
512 energy = energy*hvCorr;
513 }
514
515 //Check if energy is above threshold for time & quality calculation
516 if (energy>m_Ecut) {
517 highE++;
518 ofc_b=larOFC->OFC_b(chid,gain,OFCTimeBin);
519 if (ofc_b.size() != ofc_a.size()) {//don't have proper number of coefficients
520 if (ofc_b.size()==0)
521 ATH_MSG_DEBUG ( "No time-OFC's found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
522 << " Gain "<< gain << " found. Time not calculated." );
523 else
524 ATH_MSG_DEBUG ( "OFC for time size " << ofc_b.size()
525 << " not equal to OFC for energy size " << ofc_a.size()
526 << " Time not calculated " );
527 noTime++;
528 }else{
529 for (unsigned i=0;i<(ofc_b.size());i++)
530 time+=(samples[i+timeSampleShift]-pedestalAverage)*ofc_b.at(i);
531 time/=ADCPeak;
532 // !! Time is now in ns with respect to calibration pulse shape
533 // Used to calculate quality factor
534 }
535 if (debugPrint) ATH_MSG_VERBOSE ( "Time calculated " << time << " TimeBin=" << OFCTimeBin );
536
537 //Calculate Quality factor
538 if (larShape) { //Have shape object
539 //Get Shape & Shape Derivative for this channel
540
541 //const std::vector<float>& shape=larShape->Shape(chid,gain,OFCTimeBin);
542 //const std::vector<float>& shapeDer=larShape->ShapeDer(chid,gain,OFCTimeBin);
543 // ###
544 ILArShape::ShapeRef_t shape=larShape->Shape(chid,gain,OFCTimeBin,m_shapeMode);
545 ILArShape::ShapeRef_t shapeDer=larShape->ShapeDer(chid,gain,OFCTimeBin,m_shapeMode);
546 // ###
547
548 //Check Shape
549 if (shape.size() < ofc_a.size()) {
550 if (shape.size()==0)
551 ATH_MSG_DEBUG ( "No Shape found for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
552 << " Gain "<< gain << ". Quality factor not calculated." );
553 else
554 ATH_MSG_DEBUG ( "Shape size " << shape.size()
555 << "smaller than OFC size " << ofc_a.size()
556 << "for channel 0x" << MSG::hex << chid.get_compact()
557 << MSG::dec << ". Quality factor not calculated." );
558 quality=0; //Can't calculate chi^2, assume good hit.
559 noShape++;
560 }
561 else {//Shape ok
562 if (time!=0 && shapeDer.size()!=shape.size()) {
563 //Send warning
564 ATH_MSG_DEBUG ( "Shape-Derivative has different size than Shape for channel 0x" << MSG::hex << chid.get_compact() << MSG::dec
565 << ". Derivative not taken into accout for quality factor." );
566 noShapeDer++;
567 }//end-if
568 if (time==0 || shapeDer.size()!=shape.size() ) { //Calculate Q without time info
569 for (unsigned i=0;i<(ofc_a.size());i++)
570 quality+=((samples[i+timeSampleShift]-pedestalAverage)-shape[i]*ADCPeak)*
571 ((samples[i+timeSampleShift]-pedestalAverage)-shape[i]*ADCPeak);
572 }
573 else { //All input data ok, calculate Q with time info
574 for (unsigned i=0;i<(ofc_a.size());i++)
575 quality+=((samples[i+timeSampleShift]-pedestalAverage)-((shape[i]-shapeDer[i]*time)*ADCPeak))*
576 ((samples[i+timeSampleShift]-pedestalAverage)-((shape[i]-shapeDer[i]*time)*ADCPeak));
577 }
578 } // end else (Shape ok)
579 } //end if larShape
580 else { //No Shape found at all
581 quality=0; //Can't calculate chi^2, assume good hit.
582 noShape++;
583 }
584 // if (m_useTDC) //Correct time according to EMTB definition (do we really want this?)
585 // time= -time+24.5-tbin;
586 }// end-if energy>Ecut
587 else
588 quality=-1; //in case E<Ecut
589 //time*=1000.0;
590 time=time/picosecond; //Convert time to ps
591 //Make LArRawChannel Object with new data
592
593 uint16_t iquality=0;
594 uint16_t iprovenance=0xA5;
595 if (quality>=0) {
596 iquality = ((int)(quality) ) & 0xFFFF;
597 iprovenance=iprovenance | 0x2000;
598 }
599
600
601 LArRawChannel larRawChannel(chid,(int)energy,(int)time,iquality,iprovenance, gain);
602 larRawChannelContainer->push_back(larRawChannel); //Add to container
603 ntot_raw++;
604 if (debugPrint)
605 ATH_MSG_VERBOSE ( "Got LArRawChannel #" << ntot_raw << ", chid=0x" << MSG::hex << chid.get_compact() << MSG::dec
606 << " e=" << energy << " t=" << time << " Q=" << quality );
607 } // End loop over LArDigits
608
609 ATH_MSG_DEBUG ( ntot_raw << " channels successfully processed, (" << highE << " with high energy)" );
610
611 // deal with bad timing
612 if(BadTiming>=128){
613 ATH_MSG_ERROR ( "Too many channels (" <<BadTiming<< " !) have a bad timing !!" );
614 ATH_MSG_ERROR ( "OFC time constants should be revisited !!!" );
615 ATH_MSG_ERROR ( "Event is skipped" );
616 larRawChannelContainer->clear();
617 //return StatusCode::SUCCESS;
618 }
619
620 // in case of at least one saturating cell, skip all event (if selected)
621 if ( saturation && m_skipSaturCells == 2 ) {
622 ATH_MSG_ERROR ( saturation << " saturating channels were found. Event is skipped." );
623 larRawChannelContainer->clear();
624 }
625
626 //Put this LArRawChannel container in the transient store
627 //sc = evtStore()->record(m_larRawChannelContainer, m_ChannelContainerName);
628 //if(sc.isFailure()) {
629 // log << MSG::ERROR << "Can't record LArRawChannelContainer in StoreGate" << endmsg;
630 //}
631 //else
632 // std::cout << "Successfully recorded LArRawChannelContainer to StoreGate" << std::endl;
633
634 /*
635
636 Error & Warning summary *per event*
637
638 Strategy: 'No Energy' is an ERROR, no time or no quality is a WARNING
639
640 Missing calibration constants are most likly missing for an entire run, threfore:
641 In DEBUG: Print summary for each event if something is missing
642 otherwise: Print summary only for new problems (different number of missing channels)
643
644 Saturatin cells summary is shown in any case, WARNING if not skipped, ERROR if skipped
645
646 */
647
648 if (noEnergy) m_noEnergy++;
649 if (noTime) m_noTime++;
650 if (noShape) m_noShape++;
651 if (noShapeDer) m_noShapeDer++;
652 if (saturation) m_saturation++;
653
654 m_aveNoEnergy += noEnergy;
655 m_aveNoTime += noTime;
656 m_aveNoShape += noShape;
657 m_aveNoShapeDer += noShapeDer;
658 m_aveSaturCells += saturation;
659
660 if ( ( noEnergy!=m_lastNoEnergy
661 || noTime!=m_lastNoTime
662 || noShape>m_lastNoShape
663 || noShapeDer>m_lastNoShapeDer
664 || saturation>0 )
665 || ( msgSvc()->outputLevel(name()) <= MSG::DEBUG && ( noEnergy || noTime || noShape || noShapeDer || saturation ) )
666 ) {
667
668 m_lastNoEnergy = noEnergy;
669 m_lastNoTime = noTime;
670 if (noShape>m_lastNoShape) m_lastNoShape=noShape;
671 if (noShapeDer>m_lastNoShapeDer) m_lastNoShapeDer=noShapeDer;
672 //m_lastSaturCells = saturation ;
673
674 MSG::Level msglvl;
675 if (noEnergy)
676 msglvl=MSG::ERROR;
677 else
678 msglvl=MSG::WARNING;
679 msg() << msglvl << " *** Error & Warning summary for this event *** " << std::endl;
680
681 if ( noEnergy ) {
682 msg() << msglvl << " " << noEnergy << " out of "
683 << digitContainer->size() << " channel(s) skipped due to a lack of basic calibration constants."
684 << std::endl;
685 }
686 if ( noTime ) {
687 msg() << msglvl << " " << noTime << " out of "
688 << highE << " high-enegy channel(s) have no time-info due to a lack of Optimal Filtering Coefficients."
689 << std::endl;
690 }
691 if ( noShape ) {
692 msg() << msglvl << " " << noShape << " out of "
693 << highE << " high-enegy channel(s) have no quality factor due to a lack of shape."
694 << std::endl;
695 }
696 if ( noShapeDer ) {
697 msg() << msglvl << " " << noShapeDer << " out of "
698 << highE << " high-enegy channel(s) lack the derivative of the shape. Not taken into accout for Quality factor."
699 << std::endl;
700 }
701 if ( saturation ) {
702 if ( m_skipSaturCells == 2 )
703 msg() << MSG::ERROR << " " << saturation << " out of "
704 << digitContainer->size() << " channel(s) showed saturations. The complete event was skipped." << std::endl;
705 else if ( m_skipSaturCells == 1 )
706 msg() << MSG::ERROR << " " << saturation << " out of "
707 << digitContainer->size() << " channel(s) showed saturations and were skipped." << std::endl;
708 else
709 msg() << MSG::WARNING << " " << saturation << " out of "
710 << digitContainer->size() << " channel(s) showed saturations." << std::endl;
711 }
712 msg() << endmsg;
713 }
714
715 // lock raw channel container
716 ATH_CHECK( evtStore()->setConst(larRawChannelContainer) );
717
718 return StatusCode::SUCCESS;
719}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
static Double_t sc
Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Old LArRawChannelContainer
Definition LArTPCnv.cxx:86
ServiceHandle< StoreGateSvc > & evtStore()
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
size_type size() const noexcept
Returns the number of elements in the collection.
virtual float TimeOffset(const HWIdentifier fId) const =0
virtual float TimeOffset() const =0
LArVectorProxy OFCRef_t
This class defines the interface for accessing Optimal Filtering coefficients for each channel provid...
Definition ILArOFC.h:26
virtual float pedestal(const HWIdentifier &id, int gain) const =0
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
Definition ILArShape.h:26
virtual ShapeRef_t Shape(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
virtual ShapeRef_t ShapeDer(const HWIdentifier &id, int gain, int tbin=0, int mode=0) const =0
value_type get_compact() const
Get the compact id.
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
Definition LArADC2MeV.h:32
value_type at(size_t i) const
Vector indexing with bounds check.
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
SG::ReadCondHandleKey< ILArHVScaleCorr > m_offlineHVScaleCorrKey
SG::ReadCondHandleKey< ILArOFC > m_ofcKey
Property: OFC coefficients (conditions input).
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
float getPhase() const
Definition TBPhase.h:42
time(flags, cells_name, *args, **kw)
void setConst()
Set the const flag for this expression.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.
@ layer
Definition HitInfo.h:79
setWord1 uint16_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TBECLArRawChannelBuilder::finalize ( )
overridevirtual

Definition at line 721 of file TBECLArRawChannelBuilder.cxx.

722{
723
729
731
732 // Error and Warning Summary for this job:
733
734 ATH_MSG_DEBUG ( " TBECLArRawChannelBuilder::finalize "
735 << m_noEnergy << " " << m_noTime << " " << m_noShape << " " << m_noShapeDer << " " << m_saturation );
736
738 MSG::Level msglvl;
740 msglvl=MSG::ERROR;
741 else
742 msglvl=MSG::WARNING;
743 msg() << msglvl << " *** Error & Warning Summary for all events *** " << std::endl ;
744
745 if (m_noEnergy)
746 msg() << msglvl << " " << m_noEnergy << " events had on average " << (int)round(m_aveNoEnergy)
747 << " channels out of " << (int)round(m_aveChannels) << " without basic calibration constants."
748 << std::endl;
749
750 if (m_noTime)
751 msg() << msglvl << " " << m_noTime << " events had on average " << (int)round(m_aveNoTime)
752 << " channels out of " << (int)round(m_aveChannels) << " without OFCs for timing."
753 << std::endl ;
754
755 if (m_noShape)
756 msg() << msglvl << " " << m_noShape << " events had on average " << (int)round(m_aveNoShape)
757 << " channels out of " << (int)round(m_aveChannels) << " without shape information."
758 << std::endl;
759
760 if (m_noShapeDer)
761 msg() << msglvl << " " << m_noShapeDer << " events had on average " << (int)round(m_aveNoShapeDer)
762 << " channels out of " << (int)round(m_aveChannels) << " without shape derivative."
763 << std::endl;
764
765 if ( m_saturation )
766 msg() << msglvl << " " << m_saturation << " events had on average " << (int)round(m_aveSaturCells)
767 << " out of " << (int)round(m_aveChannels) << " saturating channels."
768 << std::endl ;
769
770 msg() << endmsg;
771 }
772 else
773 ATH_MSG_INFO ( "TBECLArRawChannelBuilder finished without errors or warnings." );
774
775 //if (m_larRawChannelContainer) {
776 //m_larRawChannelContainer->release();
777 //m_larRawChannelContainer = 0;
778 //}
779
780 return StatusCode::SUCCESS;
781}
#define ATH_MSG_INFO(x)
float round(const float toRound, const unsigned int decimals)
Definition Mdt.cxx:27

◆ initialize()

StatusCode TBECLArRawChannelBuilder::initialize ( )
overridevirtual

Definition at line 92 of file TBECLArRawChannelBuilder.cxx.

92 {
93
94 ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
95
96 ATH_CHECK( m_ofcKey.initialize() );
97 ATH_CHECK( m_adc2mevKey.initialize (m_useRamp) );
98
99 if (!m_useRamp)
100 {
101 // pointer to CaloCell ID helper:
102 ATH_CHECK( detStore()->retrieve (m_calo_id, "CaloCell_ID") );
103
104 for (int i=0; i<30; i++) {
105 m_adc2mev[i] = 0;
106 if (i == 6) m_adc2mev[i] = 0.041*637; // EMEC2
107 if (i == 7) m_adc2mev[i] = 0.030*637; // EMEC3
108 if (i == 8) m_adc2mev[i] = 0.00360*3270; // HEC0
109 if (i == 9) m_adc2mev[i] = 0.00380*3270; // HEC1
110 if (i == 10) m_adc2mev[i] = 0.00186*6540; // HEC2
111 if (i == 21 || i == 22) m_adc2mev[i] = 0.1087*767; // FCal1,2
112 if (i == 23) m_adc2mev[i] = 0.1087*1508; // FCal3
113 }
114 }
115
116 // ***
117
118 m_emId=m_calo_id->em_idHelper();
119
120 // translate offline ID into online ID
121 ATH_CHECK( m_cablingKey.initialize() );
122
123 // ***
124
126
127
128 //m_larRawOrdering.setMap(&(*m_roiMap));
129
130 //Set counters for errors and warnings to zero
131 m_noEnergy = 0; // Number of events with at least completly failed channel
132 m_noTime = 0; // Number of events with at least one channel without time info
133 m_noShape = 0; // Number of events with at least one channel without Shape (=with not quality factor);
134 m_noShapeDer = 0; // Number of events with at least one channel without ShapeDerivative (=not taken into accout for quality factor);
135 m_saturation = 0; // Number of events with at least one saturating channel
136
137 m_lastNoEnergy = -1; // Number of completly failed channels in previous event
138 m_lastNoTime = -1; // Number of channels without time info in previous event
139 m_lastNoShape = -1; // Number of channels without Shape (=with not quality factor) in previous event
140 m_lastNoShapeDer = -1; // Number of channels without ShapeDerivative in previous event
141
142 //m_lastSaturCells = -1; // Number of saturating channels without in previous event (not used)
143
144 m_aveNoEnergy = 0.; // Average number of completly failed channels per event
145 m_aveNoTime = 0.; // Average number of channels without time info per event
146 m_aveNoShape = 0.; // Average number of channels without Shape (=with not quality factor) per event
147 m_aveNoShapeDer = 0.; // Average number of channels without ShapeDerivative per event
148 m_aveSaturCells = 0.; // Average number of saturating channels without per event
149
150 m_nEvents = 0 ; // Total number of processed events ;
151 m_aveChannels = 0 ; // Average number of readout channels per event
152
153 if ( m_skipSaturCells > 2 ) m_skipSaturCells = 0 ;
154
158
159 // Validity range for a set of OFC's. If the time shift is larger than this number,
160 // we make a ADC sample jump (e.g. from [0,5] to [1,6]. The second half of the uppermost
161 // bin should already be rounded to the 0th bin of the following ADC sample.
162 if ( m_binHalfOffset ) {
165 } else {
168 }
169
170 ATH_MSG_DEBUG ( "Number of OFC time bins per sampling periode=" << m_NOFCTimeBins );
171 ATH_MSG_DEBUG ( "Sampling Periode=" << m_SamplingPeriode << "ns" );
172 ATH_MSG_DEBUG ( "Sampling Periode Limits: (" << m_SamplingPeriodeLowerLimit
173 << "," << m_SamplingPeriodeUpperLimit << ") ns" );
174
175 return StatusCode::SUCCESS;
176}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_adc2mev

float TBECLArRawChannelBuilder::m_adc2mev[30]
private

Definition at line 99 of file TBECLArRawChannelBuilder.h.

◆ m_adc2mevKey

SG::ReadCondHandleKey<LArADC2MeV> TBECLArRawChannelBuilder::m_adc2mevKey { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" }
private

Definition at line 105 of file TBECLArRawChannelBuilder.h.

106{ this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };

◆ m_AdcMax

short TBECLArRawChannelBuilder::m_AdcMax
private

Definition at line 63 of file TBECLArRawChannelBuilder.h.

◆ m_allowTimeJump

bool TBECLArRawChannelBuilder::m_allowTimeJump
private

Definition at line 57 of file TBECLArRawChannelBuilder.h.

◆ m_aveChannels

float TBECLArRawChannelBuilder::m_aveChannels
private

Definition at line 86 of file TBECLArRawChannelBuilder.h.

◆ m_aveNoEnergy

float TBECLArRawChannelBuilder::m_aveNoEnergy
private

Definition at line 79 of file TBECLArRawChannelBuilder.h.

◆ m_aveNoShape

float TBECLArRawChannelBuilder::m_aveNoShape
private

Definition at line 81 of file TBECLArRawChannelBuilder.h.

◆ m_aveNoShapeDer

float TBECLArRawChannelBuilder::m_aveNoShapeDer
private

Definition at line 82 of file TBECLArRawChannelBuilder.h.

◆ m_aveNoTime

float TBECLArRawChannelBuilder::m_aveNoTime
private

Definition at line 80 of file TBECLArRawChannelBuilder.h.

◆ m_aveSaturCells

float TBECLArRawChannelBuilder::m_aveSaturCells
private

Definition at line 83 of file TBECLArRawChannelBuilder.h.

◆ m_binHalfOffset

bool TBECLArRawChannelBuilder::m_binHalfOffset
private

Definition at line 56 of file TBECLArRawChannelBuilder.h.

◆ m_cablingKey

SG::ReadCondHandleKey<LArOnOffIdMapping> TBECLArRawChannelBuilder::m_cablingKey {this,"keyCabling", "LArOnOffIdMap", "Input key for Id mapping"}
private

Definition at line 38 of file TBECLArRawChannelBuilder.h.

38{this,"keyCabling", "LArOnOffIdMap", "Input key for Id mapping"} ;

◆ m_calo_id

const CaloCell_ID* TBECLArRawChannelBuilder::m_calo_id
private

Definition at line 36 of file TBECLArRawChannelBuilder.h.

◆ m_ChannelContainerName

std::string TBECLArRawChannelBuilder::m_ChannelContainerName
private

Definition at line 42 of file TBECLArRawChannelBuilder.h.

◆ m_ConvertADCToHighGain

bool TBECLArRawChannelBuilder::m_ConvertADCToHighGain
private

Definition at line 44 of file TBECLArRawChannelBuilder.h.

◆ m_DataLocation

std::string TBECLArRawChannelBuilder::m_DataLocation
private

Definition at line 42 of file TBECLArRawChannelBuilder.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_Ecut

float TBECLArRawChannelBuilder::m_Ecut
private

Definition at line 45 of file TBECLArRawChannelBuilder.h.

◆ m_emId

const LArEM_ID* TBECLArRawChannelBuilder::m_emId
private

Definition at line 96 of file TBECLArRawChannelBuilder.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_hvcorr

bool TBECLArRawChannelBuilder::m_hvcorr
private

Definition at line 87 of file TBECLArRawChannelBuilder.h.

◆ m_initialTimeSampleShift

int TBECLArRawChannelBuilder::m_initialTimeSampleShift
private

Definition at line 46 of file TBECLArRawChannelBuilder.h.

◆ m_iPedestal

unsigned int TBECLArRawChannelBuilder::m_iPedestal
private

Definition at line 59 of file TBECLArRawChannelBuilder.h.

◆ m_lastNoEnergy

int TBECLArRawChannelBuilder::m_lastNoEnergy
private

Definition at line 73 of file TBECLArRawChannelBuilder.h.

◆ m_lastNoShape

int TBECLArRawChannelBuilder::m_lastNoShape
private

Definition at line 75 of file TBECLArRawChannelBuilder.h.

◆ m_lastNoShapeDer

int TBECLArRawChannelBuilder::m_lastNoShapeDer
private

Definition at line 76 of file TBECLArRawChannelBuilder.h.

◆ m_lastNoTime

int TBECLArRawChannelBuilder::m_lastNoTime
private

Definition at line 74 of file TBECLArRawChannelBuilder.h.

◆ m_nEvents

int TBECLArRawChannelBuilder::m_nEvents
private

Definition at line 85 of file TBECLArRawChannelBuilder.h.

◆ m_noEnergy

int TBECLArRawChannelBuilder::m_noEnergy
private

Definition at line 66 of file TBECLArRawChannelBuilder.h.

◆ m_NOFCPhases

int TBECLArRawChannelBuilder::m_NOFCPhases
private

Definition at line 47 of file TBECLArRawChannelBuilder.h.

◆ m_NOFCTimeBins

int TBECLArRawChannelBuilder::m_NOFCTimeBins
private

Definition at line 48 of file TBECLArRawChannelBuilder.h.

◆ m_noShape

int TBECLArRawChannelBuilder::m_noShape
private

Definition at line 68 of file TBECLArRawChannelBuilder.h.

◆ m_noShapeDer

int TBECLArRawChannelBuilder::m_noShapeDer
private

Definition at line 69 of file TBECLArRawChannelBuilder.h.

◆ m_noTime

int TBECLArRawChannelBuilder::m_noTime
private

Definition at line 67 of file TBECLArRawChannelBuilder.h.

◆ m_ofcKey

SG::ReadCondHandleKey<ILArOFC> TBECLArRawChannelBuilder::m_ofcKey {this, "OFCKey", "LArOFC", "SG Key of OFC conditions object" }
private

Property: OFC coefficients (conditions input).

Definition at line 102 of file TBECLArRawChannelBuilder.h.

103{this, "OFCKey", "LArOFC", "SG Key of OFC conditions object" };

◆ m_OFCTimeBin

float TBECLArRawChannelBuilder::m_OFCTimeBin
private

Definition at line 55 of file TBECLArRawChannelBuilder.h.

◆ m_offlineHVScaleCorrKey

SG::ReadCondHandleKey<ILArHVScaleCorr> TBECLArRawChannelBuilder::m_offlineHVScaleCorrKey {this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"}
private

Definition at line 39 of file TBECLArRawChannelBuilder.h.

39{this, "keyOfflineHVCorr", "LArHVScaleCorrRecomputed","Key for LArHVScaleCorr"};

◆ m_onlineHelper

const LArOnlineID* TBECLArRawChannelBuilder::m_onlineHelper
private

Definition at line 35 of file TBECLArRawChannelBuilder.h.

◆ m_pedestalFallbackMode

int TBECLArRawChannelBuilder::m_pedestalFallbackMode
private

Definition at line 58 of file TBECLArRawChannelBuilder.h.

◆ m_phaseInv

bool TBECLArRawChannelBuilder::m_phaseInv
private

Definition at line 51 of file TBECLArRawChannelBuilder.h.

◆ m_ramp_max

float TBECLArRawChannelBuilder::m_ramp_max[3]
private

Definition at line 52 of file TBECLArRawChannelBuilder.h.

◆ m_SamplingPeriode

double TBECLArRawChannelBuilder::m_SamplingPeriode
private

Definition at line 54 of file TBECLArRawChannelBuilder.h.

◆ m_SamplingPeriodeLowerLimit

double TBECLArRawChannelBuilder::m_SamplingPeriodeLowerLimit
private

Definition at line 90 of file TBECLArRawChannelBuilder.h.

◆ m_SamplingPeriodeUpperLimit

double TBECLArRawChannelBuilder::m_SamplingPeriodeUpperLimit
private

Definition at line 90 of file TBECLArRawChannelBuilder.h.

◆ m_saturation

int TBECLArRawChannelBuilder::m_saturation
private

Definition at line 70 of file TBECLArRawChannelBuilder.h.

◆ m_shapeMode

unsigned int TBECLArRawChannelBuilder::m_shapeMode
private

Definition at line 60 of file TBECLArRawChannelBuilder.h.

◆ m_skipSaturCells

unsigned TBECLArRawChannelBuilder::m_skipSaturCells
private

Definition at line 62 of file TBECLArRawChannelBuilder.h.

◆ m_useIntercept

bool TBECLArRawChannelBuilder::m_useIntercept[4]
private

Definition at line 49 of file TBECLArRawChannelBuilder.h.

◆ m_useOFCPhase

bool TBECLArRawChannelBuilder::m_useOFCPhase
private

Definition at line 50 of file TBECLArRawChannelBuilder.h.

◆ m_useRamp

bool TBECLArRawChannelBuilder::m_useRamp
private

Definition at line 43 of file TBECLArRawChannelBuilder.h.

◆ m_useShape

bool TBECLArRawChannelBuilder::m_useShape
private

Definition at line 43 of file TBECLArRawChannelBuilder.h.

◆ m_useTDC

bool TBECLArRawChannelBuilder::m_useTDC
private

Definition at line 43 of file TBECLArRawChannelBuilder.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: