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

Reconstructs Tile digitized pulses (ie, computes amplitude, time and pedestal) as a linear combination of the samples. More...

#include <TileRawChannelBuilderOpt2Filter.h>

Inheritance diagram for TileRawChannelBuilderOpt2Filter:
Collaboration diagram for TileRawChannelBuilderOpt2Filter:

Public Member Functions

 TileRawChannelBuilderOpt2Filter (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
 ~TileRawChannelBuilderOpt2Filter ()
 Destructor.
virtual StatusCode initialize ()
 Initialize method.
virtual StatusCode finalize ()
 Finalize method.
virtual TileRawChannel * rawChannel (const TileDigits *digits, const EventContext &ctx)
 Builder virtual method to be implemented by subclasses.
virtual StatusCode createContainer (const EventContext &ctx)
 Create container in SG with name given by parameter (m_rawChannelContainerKey).
virtual StatusCode commitContainer (const EventContext &ctx)
 Commit RawChannelContiner in SG and make const.
void initLog (const EventContext &ctx)
void endLog ()
StatusCode build (const TileDigitsCollection *collection, const EventContext &ctx)
void resetDrawer ()
void resetOverflows (void)
Overflows_t & getOverflowedChannels (void)
std::string getTileRawChannelContainerID (void)
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 sysInitialize () override
 Perform system initialization for an algorithm.
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

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool InterfaceID.
static double correctAmp (double phase, bool of2=true)
 Amplitude correction factor according to the time when using weights for tau=0 without iterations.
static double correctTime (double phase, bool of2=true)
 Time correction factor.
static int CorruptedData (int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)
static const char * BadPatternName (float ped)

Protected Member Functions

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.

Protected Attributes

SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::ReadHandleKey< TileRawChannelContainer > m_DSPContainerKey {this, "DSPContainer", "", "DSP Container key"}
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
std::unique_ptr< TileMutableRawChannelContainer > m_rawChannelCnt
TileFragHash::TYPE m_rChType {TileFragHash::Default}
TileRawChannelUnit::UNIT m_rChUnit {TileRawChannelUnit::ADCcounts}
unsigned int m_bsflags {0}
Gaudi::Property< int > m_firstSample {this, "FirstSample", 0, "First sample to start with the analysis"}
Gaudi::Property< bool > m_calibrateEnergy {this, "calibrateEnergy", false, "Calibrate energy"}
Gaudi::Property< bool > m_correctTime {this, "correctTime", false, "Correct time"}
Gaudi::Property< bool > m_useDSP {this, "UseDSPCorrection", true, "Use DSP noise correction for incomplete containers"}
Gaudi::Property< float > m_ampMinThresh
Gaudi::Property< float > m_timeMinThresh
Gaudi::Property< float > m_timeMaxThresh
Gaudi::Property< int > m_runType {this, "RunType", 0, "Run type used to override value of trigType in event"}
const TileID * m_tileID {nullptr}
const TileHWID * m_tileHWID {nullptr}
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
ToolHandle< TileCondToolTiming > m_tileToolTiming
ToolHandle< TileCondIdTransforms > m_tileIdTransforms
ServiceHandle< TileCablingSvc > m_cablingSvc
 Name of Tile cabling service.
const TileCablingService * m_cabling {nullptr}
 TileCabling instance.
Gaudi::Property< std::vector< int > > m_demoFragIDs
int m_trigType {0}
bool m_idophys {false}
bool m_idolas {false}
bool m_idoped {false}
bool m_idocis {false}
int m_cischan {-1}
double m_capdaq {100.}
unsigned int m_evtCounter {0}
unsigned int m_chCounter {0}
int m_nChL {0}
int m_nChH {0}
double m_RChSumL {0.}
double m_RChSumH {0.}
Overflows_t m_overflows
Gaudi::Property< int > m_dataPoollSize {this, "DataPoolSize", -1, "Data pool size"}
int m_error [MAX_CHANNELS]
int m_lastDrawer {-1}
bool m_badDrawer {false}
bool m_notUpgradeCabling {true}
Gaudi::Property< std::string > m_infoName {this, "TileInfoName", "TileInfo", "Name of TileInfo object"}
const TileInfo * m_tileInfo {nullptr}
int m_i_ADCmax {0}
float m_f_ADCmax {0.f}
int m_i_ADCmaxPlus1 {0}
float m_f_ADCmaxPlus1 {0.f}
float m_ADCmaxMinusEps {0.f}
float m_ADCmaskValueMinusEps {0.f}
 indicates channels which were masked in background dataset

Static Protected Attributes

static const int MAX_CHANNELS = 48
static const int MAX_DMUS = 16

Private Types

typedef ServiceHandle< StoreGateSvc > StoreGateSvc_t

Private Member Functions

double filter (int ros, int drawer, int channel, int &gain, double &pedestal, double &amplitude, double &time, const EventContext &ctx)
int findMaxDigitPosition ()
 Finds maximum digit position in the pulse.
float getPedestal (int ros, int drawer, int channel, int gain, const EventContext &ctx)
 Apply the number of iterations needed for reconstruction by calling the Filter method.
int iterate (int ros, int drawer, int channel, int gain, double &pedestal, double &amplitude, double &time, double &chi2, const EventContext &ctx)
 Computes A,time,ped using OF.
double compute (int ros, int drawer, int channel, int gain, double &pedestal, double &amplitude, double &time, double &phase, const EventContext &ctx)
void ofc2int (int nDigits, double *w_off, short *w_int, short &scale)
void fill_drawer_errors (const EventContext &ctx, const TileDigitsCollection *collection)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< ITileCondToolOfc > m_tileCondToolOfc
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
 Applies OF algorithm.
Gaudi::Property< int > m_maxIterations {this, "MaxIterations", 5, "Maximum number of iteration to perform"}
 maximum number of iteration to perform
Gaudi::Property< int > m_pedestalMode {this, "PedestalMode", 17, "Pedestal mode to use"}
 pedestal mode to use
Gaudi::Property< bool > m_confTB {this, "ConfTB", false, "Use testbeam configuration"}
 use testbeam configuration
Gaudi::Property< double > m_timeForConvergence
 minimum time difference to quit iteration procedure
Gaudi::Property< bool > m_of2 {this, "OF2", true, "OF method: true => OF2; false => OF1"}
 bool variable for OF method: true=> OF2; false=> OF1
Gaudi::Property< bool > m_minus1Iter
 bool variable for whether to apply -1 iteration (initial phase guess)
Gaudi::Property< bool > m_correctAmplitude
 If true, resulting amplitude is corrected when using weights for tau=0 without iteration.
Gaudi::Property< bool > m_correctTimeNI
 If true, resulting time is corrected when using method without iteration.
Gaudi::Property< bool > m_bestPhase
Gaudi::Property< bool > m_emulateDsp {this, "EmulateDSP", false, "Emulate DSP reconstruction algorithm"}
int m_nSignal
 internal counters
int m_nNegative
 internal counters
int m_nCenter
 internal counters
int m_nConst
 internal counters
int m_nSamples
 number of samples in the data
int m_t0SamplePosition
 position of peak sample = (m_nSamples-1)/2
Gaudi::Property< double > m_maxTime {this, "MaxTime", -1.0, "Max allowed time"}
 max allowed time = 25*(m_nSamples-1)/2
Gaudi::Property< double > m_minTime {this, "MinTime", 0.0, "Min allowed time"}
 min allowed time = -25*(m_nSamples-1)/2
std::vector< float > m_digits
Gaudi::Property< int > m_noiseThresholdHG {this, "NoiseThresholdHG", 5, "Noise threshold for high gain"}
Gaudi::Property< int > m_noiseThresholdLG {this, "NoiseThresholdLG", 3, "Noise threshold for low gain"}
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

Reconstructs Tile digitized pulses (ie, computes amplitude, time and pedestal) as a linear combination of the samples.

This class implements an energy reconstruction method known as Optimal Filtering. It takes as input the digital samples from the digitizer boards in the front-end electronics and outputs the amplitude, time and pedestal of the pulse. Full details and fundaments of the method can be found in the ATL-TILECAL-2005-001 note. Two different versions of the algorithms are currently used: OF1 (with 2 parameters: amplitude and time) and OF2 (with 3 parameters (amplitude, time and pedestal).

OFCs are calculated on-the-fly (using TileCondToolOfc) or are extracted from COOL database (TileCondToolOfcCool). In case of non-iterative procedure, optionally, the initial, "best phase", can be extracted from COOL DB by means of TileCondToolTiming.

Definition at line 47 of file TileRawChannelBuilderOpt2Filter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileRawChannelBuilderOpt2Filter()

TileRawChannelBuilderOpt2Filter::TileRawChannelBuilderOpt2Filter ( const std::string & type,
const std::string & name,
const IInterface * parent )

Constructor.

Definition at line 52 of file TileRawChannelBuilderOpt2Filter.cxx.

54 : TileRawChannelBuilder(type, name, parent)
55 , m_nSignal(0)
56 , m_nNegative(0)
57 , m_nCenter(0)
58 , m_nConst(0)
59 , m_nSamples(0)
61{
62 //declare interfaces
63 declareInterface< TileRawChannelBuilder >( this );
64 declareInterface< TileRawChannelBuilderOpt2Filter >(this);
65
66 m_rawChannelContainerKey = "TileRawChannelOpt2";
67}
int m_nSamples
number of samples in the data
int m_t0SamplePosition
position of peak sample = (m_nSamples-1)/2
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
TileRawChannelBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.

◆ ~TileRawChannelBuilderOpt2Filter()

TileRawChannelBuilderOpt2Filter::~TileRawChannelBuilderOpt2Filter ( )

Destructor.

Definition at line 70 of file TileRawChannelBuilderOpt2Filter.cxx.

70 {
71}

Member Function Documentation

◆ BadPatternName()

const char * TileRawChannelBuilder::BadPatternName ( float ped)
staticinherited

Definition at line 424 of file TileRawChannelBuilder.cxx.

424 {
425 static const char * const errname[26] = {
426 "-10 - good signal",
427 "-9 - underflow",
428 "-8 - overflow",
429 "-7 - underflow and overflow",
430 "-6 - constant signal",
431 "-5 - disconnected channel",
432 "-4 - half a drawer masked",
433 "-3 - bad DQ status",
434 "-2 - underflow in all samples",
435 "-1 - overflow in all samples",
436 "0 - unknown error",
437 "1 - jump from zero to saturation",
438 "2 - samples with zeros",
439 "3 - at least two saturated. others - close to pedestal",
440 "4 - two distinct levels with at least 2 samples each",
441 "5 - pedestal with jump up in one sample",
442 "6 - pedestal with jump down in one sample",
443 "7 - signal with jump up in one sample",
444 "8 - signal with jump down in one sample",
445 "9 - base line above threshold in low gain",
446 "10 - jump down in first sample in low gain",
447 "11 - jump down in last sample in low gain",
448 "12 - jump up in one sample above const",
449 "13 - jump down in one sample below const",
450 "14 - unrecoverable timing jump",
451 "15 - unknown error"
452 };
453
454 return errname[std::min(25, std::max(0, int((ped + 500) * 1e-4)))];
455}

◆ build()

StatusCode TileRawChannelBuilder::build ( const TileDigitsCollection * collection,
const EventContext & ctx )
inherited

Definition at line 458 of file TileRawChannelBuilder.cxx.

459{
460
461 int frag = coll->identify();
462
463 // make sure that error array is up-to-date
464 if (frag != m_lastDrawer && m_notUpgradeCabling) {
465 fill_drawer_errors(ctx, coll);
466 }
467
468 // Iterate over all digits in this collection
469 TileDigitsCollection::const_iterator digitItr = coll->begin();
470 TileDigitsCollection::const_iterator lastDigit = coll->end();
471
472 for (; digitItr != lastDigit; ++digitItr) {
473
474 TileRawChannel* rch = rawChannel((*digitItr), ctx);
475
477
478 int err = m_error[m_tileHWID->channel(rch->adc_HWID())];
479
480 if (err) {
481 if (err == -8 || err == -7) m_overflows.push_back(std::make_pair(rch, (*digitItr)));
482 float ped = rch->pedestal() + 100000 + 10000 * err;
483 rch->setPedestal(ped);
484 if (msgLvl(MSG::VERBOSE) && !m_badDrawer) {
485 if (err < -5) {
486 msg(MSG::VERBOSE) << "BadCh " << m_tileHWID->to_string(rch->adc_HWID())
487 << " warning = " << BadPatternName(ped) << endmsg;
488 } else {
489 msg(MSG::VERBOSE) << "BadCh " << m_tileHWID->to_string(rch->adc_HWID())
490 << " error = " << BadPatternName(ped) << endmsg;
491 }
492 }
493 }
494
495 }
496
497 ATH_CHECK( m_rawChannelCnt->push_back (rch) );
498 }
499
500 IdentifierHash hash = m_rawChannelCnt->hashFunc().hash(coll->identify());
501 TileRawChannelCollection* rawChannelCollection = m_rawChannelCnt->indexFindPtr(hash);
502 rawChannelCollection->setLvl1Id(coll->getLvl1Id());
503 rawChannelCollection->setLvl1Type(coll->getLvl1Type());
504 rawChannelCollection->setDetEvType(coll->getDetEvType());
505 rawChannelCollection->setRODBCID(coll->getRODBCID());
506
507 return StatusCode::SUCCESS;
508}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition DataVector.h:861
static const char * BadPatternName(float ped)
std::unique_ptr< TileMutableRawChannelContainer > m_rawChannelCnt
void fill_drawer_errors(const EventContext &ctx, const TileDigitsCollection *collection)
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx)
Builder virtual method to be implemented by subclasses.
float pedestal(void) const
void setPedestal(float ped)
void setLvl1Type(uint32_t lvl1Type)
Setter for level1 type from ROD header.
void setLvl1Id(uint32_t lvl1Id)
Setter for level1 id from ROD header.
void setRODBCID(uint32_t rodBCID)
Setter for BCID from ROD header.
void setDetEvType(uint32_t detEvType)
Setter for detector event type from ROD header.
HWIdentifier adc_HWID(void) const
Definition TileRawData.h:53

◆ commitContainer()

StatusCode TileRawChannelBuilder::commitContainer ( const EventContext & ctx)
virtualinherited

Commit RawChannelContiner in SG and make const.

Definition at line 510 of file TileRawChannelBuilder.cxx.

511{
512
513 const TileDQstatus* DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
514
515 ToolHandleArray<ITileRawChannelTool>::iterator itrTool = m_noiseFilterTools.begin();
516 ToolHandleArray<ITileRawChannelTool>::iterator endTool = m_noiseFilterTools.end();
517
518 if ( m_useDSP && !m_DSPContainerKey.key().empty() &&
519 (DQstatus->incompleteDigits() || m_chCounter<12288) && itrTool!=endTool )
520 {
521 const TileRawChannelContainer * dspCnt = SG::makeHandle (m_DSPContainerKey, ctx).get();
522 ATH_MSG_DEBUG( "Incomplete container - use noise filter corrections from DSP container" );
523
524 uint32_t bsFlags = dspCnt->get_bsflags();
525 std::vector<IdentifierHash> hashes = m_rawChannelCnt->GetAllCurrentHashes();
526 std::vector<IdentifierHash> dspHashes = dspCnt->GetAllCurrentHashes();
527 if (bsFlags == 0) {
528 ATH_MSG_WARNING("Problem in applying noise corrections: DSP container ("
529 << m_DSPContainerKey.key() << ") seems to be emtpy!");
530 } else if (hashes != dspHashes) {
531 ATH_MSG_ERROR( " Error in applying noise corrections; "
532 "hash vectors do not match.");
533 } else {
534 // Go through all TileRawChannelCollections
535 for (IdentifierHash hash : hashes) {
536 TileRawChannelCollection* coll = m_rawChannelCnt->indexFindPtr (hash);
537 const TileRawChannelCollection* dcoll = dspCnt->indexFindPtr (hash);
538
539 if (coll->identify() != dcoll->identify()) {
540
541 ATH_MSG_ERROR( " Error in applying noise corrections " << MSG::hex
542 << " collection IDs 0x" << coll->identify() << " and 0x" << dcoll->identify()
543 << " do not match " << MSG::dec );
544 break;
545 }
546
547 // iterate over all channels in a collection
550
551 for (TileRawChannel* rch : *coll) {
552 HWIdentifier adc_id = rch->adc_HWID();
553 while (dspItr != dspLast && adc_id != (*dspItr)->adc_HWID()) {
554 ++dspItr;
555 }
556 if (dspItr != dspLast) {
557 float corr = (*dspItr)->pedestal();
558 ATH_MSG_VERBOSE( "Ch "<<m_tileHWID->to_string(adc_id)
559 <<" amp " << rch->amplitude() << " ped " << rch->pedestal()
560 << " corr " << corr );
561 if (corr<10000.) {
562 rch->setAmplitude (rch->amplitude() - corr); // just baseline shift
563 rch->setPedestal (rch->pedestal() + corr); // just baseline shift
564 } else {
565 float ped = rch->pedestal();
566 if (corr > ped) {
567 rch->setPedestal (fmod(ped,10000.) + int(corr)/10000 * 10000); // changing error status
568 ATH_MSG_VERBOSE( "New error status in ped "<<rch->pedestal());
569 }
570 }
571 } else {
572 ATH_MSG_WARNING(" Problem in applying noise corrections "
573 << " can not find channel in DSP container with HWID "
574 << m_tileHWID->to_string(adc_id) );
575 dspItr = dcoll->begin();
576 }
577 }
578 }
579 }
580
581 } else {
582
583 for (ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools) {
584 if (noiseFilterTool->process(*m_rawChannelCnt.get(), ctx).isFailure()) {
585 ATH_MSG_ERROR( " Error status returned from noise filter " );
586 } else {
587 ATH_MSG_DEBUG( "Noise filter applied to the container" );
588 }
589 }
590
591 }
592
593 ATH_MSG_DEBUG( " nCh=" << m_chCounter
594 << " nChH/L=" << m_nChH << "/" << m_nChL
595 << " RChSumH/L=" << m_RChSumH << "/" << m_RChSumL );
596
597 SG::WriteHandle<TileRawChannelContainer> rawChannelsContainer(m_rawChannelContainerKey, ctx);
598 ATH_CHECK( rawChannelsContainer.record(std::move(m_rawChannelCnt)) );
599
600 endLog();
601
602 return StatusCode::SUCCESS;
603}
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_VERBOSE(x,...)
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current TileRawChannelContainer
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 std::vector< IdentifierHash > GetAllCurrentHashes() const override final
Returns a collection of all hashes availiable in this IDC.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
bool incompleteDigits() const
A few extra items (from TileBeamInfoProvider).
Gaudi::Property< bool > m_useDSP
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
SG::ReadHandleKey< TileRawChannelContainer > m_DSPContainerKey
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
uint32_t get_bsflags() const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
setEventNumber uint32_t

◆ compute()

double TileRawChannelBuilderOpt2Filter::compute ( int ros,
int drawer,
int channel,
int gain,
double & pedestal,
double & amplitude,
double & time,
double & phase,
const EventContext & ctx )
private

Definition at line 541 of file TileRawChannelBuilderOpt2Filter.cxx.

542 {
543
544 ATH_MSG_VERBOSE( "compute();"
545 << " ros=" << ros
546 << " drawer=" << drawer
547 << " channel=" << channel
548 << " gain=" << gain );
549
550 int i = 0, digits_size = m_digits.size();
551 double chi2 = 0.;
552 double a[99];
553 double b[99];
554 double c[99];
555 double g[99];
556 double dg[99];
557
558 amplitude = 0.;
559 time = 0.;
560 float ofcPhase = (float) phase;
561 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
562 TileOfcWeightsStruct weights;
563 if (m_tileCondToolOfc->getOfcWeights(drawerIdx, channel, gain, ofcPhase, m_of2, weights, ctx).isFailure())
564 {
565 ATH_MSG_ERROR( "getOfcWeights fails" );
566 return 0;
567 }
568
569 phase = ofcPhase;
570
571 for (i = 0; i < digits_size; ++i) {
572 a[i] = weights.w_a[i];
573 b[i] = weights.w_b[i];
574 g[i] = weights.g[i];
575 dg[i] = weights.dg[i];
576 if (m_of2) c[i] = weights.w_c[i]; // [OptFilterPha+100];
577 }
578
579 // for DSP emulation
580 short a_int[99], ascale = 0, calib = 0, calib_offset = 0;
581 short b_int[99], bscale = 0;
582 unsigned short scale = 0, round = 0, lut = 0;
583 int slope_scale = 0;
584 int dspEnergy = 0, dspTime = 0;
585 if (m_emulateDsp) {
586 dspEnergy = 0;
587 dspTime = 0;
588 slope_scale = (int) truncf(log(std::pow(2., 15) - 1.) / log(2.));
589 calib_offset = (short) roundf(std::pow(2., slope_scale));
590 ofc2int(digits_size, a, a_int, ascale);
591 ofc2int(digits_size, b, b_int, bscale);
592 calib = ascale + slope_scale;
593 }
594
595 ATH_MSG_VERBOSE( "OptFilterPha=" << phase );
596
597 if (m_of2) {
598 if (m_emulateDsp) {
599 pedestal = m_digits[0];
600 for (i = 0; i < digits_size; ++i) {
601 dspEnergy += a_int[i] * ((int) m_digits[i]);
602 dspTime += b_int[i] * ((int) m_digits[i]);
603 amplitude += a[i] * m_digits[i]; //aa temp
604 time += b[i] * m_digits[i]; //aa temp
605 }
606 } else {
607 pedestal = 0.;
608 for (i = 0; i < digits_size; ++i) {
609 amplitude += a[i] * m_digits[i];
610 time += b[i] * m_digits[i];
611 pedestal += c[i] * m_digits[i];
612 }
613 }
614 } else {
615 if (m_emulateDsp) pedestal = m_digits[0];
616 for (i = 0; i < digits_size; ++i) {
617 amplitude += a[i] * (m_digits[i] - pedestal);
618 time += b[i] * (m_digits[i] - pedestal);
619 }
620 }
621
622 if (m_emulateDsp) {
624 round = 1 << (ascale - 2);
625 short e2Dsp = (unsigned short) ((dspEnergy + round) >> (ascale - 1));
626 size_t OptInd = abs(e2Dsp);
627 if (OptInd >= (sizeof(lookup) / sizeof(short))) OptInd = 0;
628 lut = lookup[OptInd];
629 scale = bscale - 4 + lookup[0] - 9;
630 round = 1 << (scale - 1);
631 // int told=dspTime;
632 dspTime = (((dspTime + 0x100) >> 9) * lut + round) >> scale;
633 // printf(" 1 OptFilterTime %f OptFilterTimeDSP %d e2 %d round %d lut %d bscale %d scale %d told %d\n",OptFilterTime/OptFilterEne,OptFilterTimeDSP,OptFilterE2DSP,round,lut,bscale,scale,told);
634 time = dspTime / 16.0;
635
636 // printf(" 1 OptFilterEneDSP %d calib_offset %d calib %d \n",OptFilterEneDSP,calib_offset,calib);
637
638 dspEnergy = (dspEnergy + m_i_ADCmaxPlus1) >> 11;
639 // printf(" 2 OptFilterEneDSP %d \n",OptFilterEneDSP);
640 dspEnergy = (dspEnergy * calib_offset + (1 << (calib - 15 - 1))) >> (calib - 15);
641 // printf(" 3 OptFilterEneDSP %d \n",OptFilterEneDSP);
642 double goffset = (gain == 0) ? 512 : 2048;
643 dspEnergy = (int) (dspEnergy + goffset);
644 amplitude = (dspEnergy - goffset) / 16.;
645 }
646
647 bool goodEnergy = (fabs(amplitude) > 1.0e-04);
648 if (goodEnergy) {
649 if (msgLvl(MSG::VERBOSE)) {
650 msg(MSG::VERBOSE) << "OptFilterEne=" << amplitude << endmsg;
651 msg(MSG::VERBOSE) << "OptFilterTime*OptFilterEne=" << time << endmsg;
652 }
653 if (!m_emulateDsp) time /= amplitude;
654 } else {
655 if (msgLvl(MSG::VERBOSE)) {
656 msg(MSG::VERBOSE) << "OptFilterEne=" << amplitude
657 << " ... assuming 0.0" << endmsg;
658 msg(MSG::VERBOSE) << "OptFilterTime*OptFilterEne=" << time
659 << " ... assuming 0.0" << endmsg;
660 }
661 time = amplitude = 0.0;
662 }
663
664 /* new QF in both cases now 02.2010 AA
665 if(!m_emulatedsp) {
666 for (i=0; i<digits_size; ++i){
667 if(OptFilterDigits[i]>0)
668 OptFilterChi2 += 50*fabs(OptFilterDigits[i]-(OptFilterEne*g[i]+OptFilterPed))/OptFilterDigits[i];
669 else
670 OptFilterChi2 += 50*fabs(OptFilterDigits[i]-(OptFilterEne*g[i]+OptFilterPed))/m_f_ADCmaxPlus1;
671 }
672 } else {
673 */
674 for (i = 0; i < digits_size; ++i) {
675 double dqf = m_digits[i] - amplitude * g[i] + amplitude * time * dg[i] - pedestal;
676 chi2 += dqf * dqf;
677 }
678 chi2 = sqrt(chi2);
679 // new QF }
680
681 // std::cout << "emulate " << m_emulatedsp << " OptFilterEne " << OptFilterEne << " OptFilterDigits[3]" << OptFilterDigits[3] << " OptFilterTime="<<OptFilterTime<<" OptFilterPed="<<OptFilterPed<<" OptFilterChi2="<<OptFilterChi2<<" g 3 " << g[3] << " dg 1 3 5 " << dg[1] << " " << dg[3] << " " << dg[5] <<std::endl;
682 if (fabs(chi2) > 1.0e-04 || goodEnergy) {
683 if (msgLvl(MSG::VERBOSE)) {
684 msg(MSG::VERBOSE) << "OptFilterTime=" << time << endmsg;
685 msg(MSG::VERBOSE) << "OptFilterPed=" << pedestal << endmsg;
686 msg(MSG::VERBOSE) << "OptFilterChi2=" << chi2 << endmsg;
687 }
688 } else {
689 if (msgLvl(MSG::VERBOSE)) {
690 msg(MSG::VERBOSE) << "OptFilterTime=" << time << endmsg;
691 msg(MSG::VERBOSE) << "OptFilterPed=" << pedestal << endmsg;
692 msg(MSG::VERBOSE) << "OptFilterChi2=" << chi2
693 << " ... assuming 0.0" << endmsg;
694 }
695 chi2 = 0.0;
696 }
697 return chi2;
698}
static Double_t a
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Gaudi::Property< bool > m_of2
bool variable for OF method: true=> OF2; false=> OF1
ToolHandle< ITileCondToolOfc > m_tileCondToolOfc
void ofc2int(int nDigits, double *w_off, short *w_int, short &scale)
void ascale(TH1F *h, double s_)
double chi2(TH1 *h0, TH1 *h1)
time(flags, cells_name, *args, **kw)
constexpr auto lut(Generator &&f)
float round(const float toRound, const unsigned int decimals)
Definition Mdt.cxx:28
MsgStream & msg
Definition testRead.cxx:32

◆ correctAmp()

double TileRawChannelBuilder::correctAmp ( double phase,
bool of2 = true )
staticinherited

Amplitude correction factor according to the time when using weights for tau=0 without iterations.

Definition at line 612 of file TileRawChannelBuilder.cxx.

612 {
613
614 double corr = 1.0;
615 if (of2) {
616 // estimation from Belen for rel 14.0.0
617 /*double a,b,c;
618 if(fabs(phase)<5.){
619 a=0.137; b=0.0877; c=0.0865;
620 }else{
621 a=0.565; b=0.116; c=0.0751;
622 }
623 corr=(1+(a+b*phase+c*phase*phase)/100.);
624 */
625
626 // estimation from Vakhtang for rel 14.4.0
627 /*double k = (phase < 0.0 ? 0.0009400 : 0.0010160);
628 corr = (1.0 + k * phase * phase);
629 */
630
631 // Parabolic correction from Tigran
632 double a1,a2,b,c;
633 a1 = phase < 0.0 ? 0.000940774 : 0.00102111;
634 a2 = phase < 0.0 ? 0.000759051 : 0.000689625;
635 b = phase < 0.0 ? -2.0 * 7.0 * (a1 - a2) : 2.0 * 12.5 * (a1 - a2);
636 c = phase < 0.0 ? 1.0 - 7.0 * 7.0 * (a1-a2) : 1.0 - 12.5 * 12.5 * (a1-a2);
637 if (phase < 12.5 && phase > -7.0) corr = a1 * phase * phase + 1.0;
638 else corr = phase * ( a2 * phase + b) + c;
639
640
641 } else {
642 /*double a,b,c;
643 if(phase<0){
644 a=1.0002942; b=0.0003528; c=0.0005241;
645 }else{
646 a=1.0001841; b=-0.0004182; c=0.0006167;
647 }
648 corr = a + phase * ( b + c * phase);
649 */
650
651 /*double k = (phase < 0.0 ? 0.0005241 : 0.0006167);
652 corr = (1.0 + k * phase * phase);
653 */
654
655 // 4th degree polynomial correction from Tigran
656 double k1 = (phase < 0.0 ? -0.0000326707:0.000380336);
657 double k2 = (phase < 0.0 ? -0.000560962:-0.000670487);
658 double k3 = (phase < 0.0 ? -0.00000807869:0.00000501773);
659 double k4 = (phase < 0.0 ? -0.000000145008:0.0000000584647);
660
661 corr = 1.0 / (1.0 + (k1 + (k2 + (k3 + k4 *phase)*phase)*phase)*phase);
662
663
664 }
665
666 return corr;
667}

◆ correctTime()

double TileRawChannelBuilder::correctTime ( double phase,
bool of2 = true )
staticinherited

Time correction factor.

Definition at line 671 of file TileRawChannelBuilder.cxx.

671 {
672
673 double correction = 0.0;
674
675 if (of2) {
676 if(phase < 0) {
677 correction = (-0.00695743 + (0.0020673 - (0.0002976 + 0.00000361305 * phase) * phase) * phase) * phase;
678 } else {
679 correction = (0.0130013 + (0.00128769 + (-0.000550218 + 0.00000755344 * phase) * phase) * phase) * phase;
680 }
681 }
682 // OF1 does not need correction
683
684 return correction;
685}
correction(mu, runmode, campaign, run=None)
Definition zlumi_mc_cf.py:4

◆ CorruptedData()

int TileRawChannelBuilder::CorruptedData ( int ros,
int drawer,
int channel,
int gain,
const std::vector< float > & digits,
float & dmin,
float & dmax,
float ADCmaxMinusEps,
float ADCmaskValueMinusEps )
staticinherited

Definition at line 689 of file TileRawChannelBuilder.cxx.

690 {
691 bool eb = (ros > 2);
692 bool ebsp = ((ros == 3 && drawer == 14) || (ros == 4 && drawer == 17));
693 bool empty = ((eb && ((channel > 23 && channel < 30) || channel > 41)) || (ebsp && channel < 3));
694 bool not_gap = !(empty || (eb && (channel == 0 || channel == 1 || channel == 12 || channel == 13))
695 || (ebsp && (channel == 18 || channel == 19)));
696
697 const float epsilon = 4.1; // allow +/- 2 counts fluctuations around const value
698 const float delta[4] = { 29.9, 29.9, 49.9, 99.9 }; // jump levels between constLG, constHG, non-constLG, non-constHG
699 const float level1 = 99.9; // jump from this level to m_i_ADCmax is bad
700 const float level2 = 149.9; // base line at this level in low gain is bad
701 const float narrowLevel[2] = { 29.9, 49.9 }; // minimal amplitude for narrow pulses
702 const float delt = std::min(std::min(std::min(delta[0], delta[1]), std::min(delta[2], delta[3])),
703 std::min(narrowLevel[0], narrowLevel[1]));
704 const float secondMaxLevel = 0.3;
705
706 int error = 0;
707
708 unsigned int nSamp = digits.size();
709 if (nSamp) {
710 dmin = dmax = digits[0];
711 unsigned int pmin = 0;
712 unsigned int pmax = 0;
713 unsigned int nzero = (dmin < 0.01) ? 1 : 0;
714 unsigned int nover = (dmax > ADCmaxMinusEps) ? 1 : 0;
715
716 for (unsigned int i = 1; i < nSamp; ++i) {
717 float dig = digits[i];
718 if (dig > dmax) {
719 dmax = dig;
720 pmax = i;
721 } else if (dig < dmin) {
722 dmin = dig;
723 pmin = i;
724 }
725 if (dig < 0.01) ++nzero;
726 else if (dig > ADCmaxMinusEps) ++nover;
727 }
728
729 float dmaxmin = dmax - dmin;
730 //std::cout << " ros " << ros << " drawer " << drawer << " channel " << channel << " not_gap " << not_gap << " nzero " << nzero << " nover " << nover << std::endl;
731
732 if (dmin > ADCmaxMinusEps) { // overflow in all samples
733 error = (dmin > ADCmaskValueMinusEps) ? -3 : -1; // dmin=m_tileInfo->ADCmaskValue() - masking in overlay job (set in TileDigitsMaker)
734
735 } else if (dmax < 0.01) { // underflow in all samples
736 error = (empty) ? -5 : -2; // set different type of errors for exsiting and non-existing channels
737
738 } else if (dmaxmin < 0.01) { // constant value in all samples
739 error = -6;
740
741 } else if (nzero && nover) { // jump from zero to saturation
742 error = 1;
743
744 } else if ((nzero && (not_gap || empty)) || nzero > 1) { // one sample at zero in normal channel
745 error = 2; // or 2 samples at zero in gap/crack/MBTS
746
747 } else if (gain == 0 && dmin > level2) { // baseline above threshold in low gain is bad
748 error = 9;
749
750 } else if (dmaxmin > delt) { // check that max-min is above minimal allowed jump
751
752 float abovemin = dmax;
753 float belowmax = dmin;
754 unsigned int nmin = 0;
755 unsigned int nmax = 0;
756 for (unsigned int i = 0; i < nSamp; ++i) {
757 float smp = digits[i];
758 if (smp - dmin < epsilon) {
759 ++nmin;
760 }
761 if (dmax - smp < epsilon) {
762 ++nmax;
763 }
764 if (smp < abovemin && smp > dmin) {
765 abovemin = smp;
766 }
767 if (smp > belowmax && smp < dmax) {
768 belowmax = smp;
769 }
770 }
771 // more than two different values - shift index by 2, i.e. use thresholds for non-const levels
772 int gainInd = (abovemin != dmax || belowmax != dmin) ? gain + 2 : gain;
773 bool big_jump = (dmaxmin > delta[gainInd]);
774 bool max_in_middle = (pmax > 0 && pmax < nSamp - 1);
775 bool min_in_middle = (pmin > 0 && pmin < nSamp - 1);
776
777 if (nover > 1 && belowmax < level1) { // at least two saturated. others - close to pedestal
778 error = 3;
779 } else if (nmax + nmin == nSamp && big_jump) {
780 if (nmax > 1 && nmin > 1) { // at least 2 samples at two distinct levels
781 error = 4;
782 } else if (nmax == 1) {
783 if (max_in_middle) { // jump up in one sample, but not at the edge
784 error = 5;
785 }
786 } else if (nmin == 1) { // jump down in one sample
787 error = 6;
788 }
789 }
790 if (error == 0 && dmaxmin > narrowLevel[gain]) {
791 float secondMax = dmaxmin * secondMaxLevel;
792 float dminPlus = dmin + secondMax;
793 float dmaxMinus = dmax - secondMax;
794 if (not_gap) { // jumps above two (or one) neighbour samples
795 if (max_in_middle && std::max(digits[pmax - 1], digits[pmax + 1]) < dminPlus) {
796 error = 7; // jump up in one sample in the middle, which is much higher than two neighbours
797 } else if (min_in_middle && std::min(digits[pmin - 1], digits[pmin + 1]) > dmaxMinus) {
798 error = 8; // jump down in one sample, which is much lower than two neighbours
799 } else if (big_jump && gain == 0) { // check first and last sample only in low gain
800 if (pmin == 0 && digits[1] > dmax - secondMax) {
801 error = 10; // jump down in first sample. which is much lower than next one
802 } else if (pmin == nSamp - 1 && digits[pmin - 1] > dmax - secondMax) {
803 error = 11; // jump down in last sample. which is much lower than previous one
804 }
805 }
806 }
807 if (!error && big_jump) { // jumps above all samples
808 if ((max_in_middle || gain == 0) && nmax == 1 && belowmax < dminPlus) {
809 error = 12; // jump up in one sample in the middle, which is much higher than all others
810 } else if ((min_in_middle || gain == 0) && nmin == 1 && abovemin > dmaxMinus) {
811 error = 13; // jump down in one sample, which is much lower than all others (
812 }
813 }
814 }
815 }
816
817 } else {
818 dmin = dmax = 0.0;
819 }
820
821 return error;
822}
const int nmax(200)
static const Attributes_t empty

◆ createContainer()

StatusCode TileRawChannelBuilder::createContainer ( const EventContext & ctx)
virtualinherited

Create container in SG with name given by parameter (m_rawChannelContainerKey).

Definition at line 199 of file TileRawChannelBuilder.cxx.

199 {
200 initLog(ctx);
201
202 // create TRC container
203 m_rawChannelCnt = std::make_unique<TileMutableRawChannelContainer>(true, m_rChType, m_rChUnit, SG::VIEW_ELEMENTS);
204 ATH_CHECK( m_rawChannelCnt->status() );
205 m_rawChannelCnt->set_bsflags(m_bsflags);
206
207 ATH_MSG_DEBUG( "Created TileRawChannelContainer '" << m_rawChannelContainerKey.key() << "'" );
208
209 return StatusCode::SUCCESS;
210}
TileRawChannelUnit::UNIT m_rChUnit
void initLog(const EventContext &ctx)
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::detStore ( ) const
inlineinherited

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

Definition at line 95 of file AthCommonDataStore.h.

◆ endLog()

void TileRawChannelBuilder::endLog ( )
inherited

Definition at line 605 of file TileRawChannelBuilder.cxx.

605 {
606 m_chCounter = 0;
607 m_nChL = m_nChH = 0;
608 m_RChSumL = m_RChSumH = 0.0;
609
610}

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ fill_drawer_errors()

void TileRawChannelBuilder::fill_drawer_errors ( const EventContext & ctx,
const TileDigitsCollection * collection )
privateinherited

Definition at line 266 of file TileRawChannelBuilder.cxx.

268{
269 const TileDQstatus* DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
270
271 int frag = coll->identify();
272 int ros = (frag >> 8);
273 int drawer = (frag & 0xff);
274
275 m_lastDrawer = frag;
276
277 memset(m_error, 0, sizeof(m_error));
278 int dmuerr[MAX_DMUS] = {0};
279 int nch = 0;
280 bool bigain = DQstatus->isBiGain();
281 if (!bigain) { // in bigain runs we don't have DQ status fragment
282 for (int ch = 0; ch < MAX_CHANNELS; ch += 3) {
283 if (!DQstatus->isAdcDQgood(ros, drawer, ch, 0)) {
284 m_error[ch + 2] = m_error[ch + 1] = m_error[ch] = -3;
285 dmuerr[ch / 3] = 3;
286 nch += 3;
287 }
288 }
289 }
290 if (nch == MAX_CHANNELS) { // all bad - nothing to do
291 m_badDrawer = true;
292 ATH_MSG_VERBOSE( "Drawer 0x" << MSG::hex << frag << MSG::dec
293 << " is bad - skipping bad patterns check " );
294 return;
295 } else {
296 m_badDrawer = false;
297 ATH_MSG_VERBOSE( "Drawer 0x" << MSG::hex << frag << MSG::dec
298 << " looking for bad patterns in digits" );
299 }
300
301 float mindig, maxdig;
302 int nchbad[2] = { 0, 0 };
303
304 // Iterate over all digits in this collection
305 TileDigitsCollection::const_iterator digitItr = coll->begin();
306 TileDigitsCollection::const_iterator lastDigit = coll->end();
307
308 for (; digitItr != lastDigit; ++digitItr) {
309 const TileDigits * pDigits = (*digitItr);
310 HWIdentifier adcId = pDigits->adc_HWID();
311 int channel = m_tileHWID->channel(adcId);
312 int gain = m_tileHWID->adc(adcId);
313
314 if (m_error[channel]) {
315 ATH_MSG_VERBOSE( "BadCh " << ros
316 << "/" << drawer
317 << "/" << channel
318 << "/" << gain << " BAD DQ STATUS ");
319
320 } else {
321
322 int err = CorruptedData(ros, drawer, channel, gain, pDigits->samples(), mindig, maxdig, m_ADCmaxMinusEps, m_ADCmaskValueMinusEps);
323
324 if (err) {
325
327 if (err > -5) {
328 ++dmuerr[channel / 3];
329 ++nchbad[channel / 24];
330 }
331
332 if (msgLvl(MSG::VERBOSE)) {
333
334 msg(MSG::VERBOSE) << "BadCh " << ros
335 << "/" << drawer
336 << "/" << channel
337 << "/" << gain;
338 if (err < -5) msg(MSG::VERBOSE) << " Warning " << err;
339 else msg(MSG::VERBOSE) << " Error " << err;
340 if (mindig > m_ADCmaskValueMinusEps) msg(MSG::VERBOSE) << " BADDQ";
341 if (maxdig > m_ADCmaxMinusEps) msg(MSG::VERBOSE) << " Overflow";
342 if (mindig < 0.1) msg(MSG::VERBOSE) << " Underflow";
343 if (err < 0) msg(MSG::VERBOSE) << " Const";
344
345 msg(MSG::VERBOSE) << " samp=";
346 std::vector<float> digits = pDigits->samples();
347 for (unsigned int i = 0; i < digits.size(); ++i) {
348 msg(MSG::VERBOSE) << " " << digits[i];
349 }
350 msg(MSG::VERBOSE) << endmsg;
351 }
352
353 } else {
354 if (mindig < 0.01) err += 1;
355 if (maxdig > m_ADCmaxMinusEps) err += 2;
356 if (err) m_error[channel] = err - 10;
357 }
358 }
359 }
360
361 // check if we want to mask half a drawer
362 // in this case set error = -4 for channels which were good before
363
364 int ndmubad[2] = { 0, 0 };
365 int dmu = 0;
366 for (; dmu < MAX_DMUS / 2; ++dmu) { // first half
367 if (dmuerr[dmu] > 1)
368 ++ndmubad[0]; // count DMUs with at least two bad channels
369 }
370 for (; dmu < MAX_DMUS; ++dmu) { // second half
371 if (dmuerr[dmu] > 1)
372 ++ndmubad[1]; // count DMUs with at least two bad channels
373 }
374
375 int ndmulimit[2] = { 3, 3 }; // max number of bad DMUs when half-drawer is not yet masked
376 // if 4 DMUs will be bad - mask whole half-drawer
377 if (frag > 0x2ff) { // if extended barrel
378 if (frag == 0x30e || frag == 0x411)
379 ndmulimit[0] = 4; // in EB special one DMU is always bad (missing)
380 ndmulimit[1] = 5; // in second half of EB 4 DMUs ara always bad (missing)
381 // only if 7 DMUs are bad, mask whole half-drawer
382 }
383
384 bool printall = true;
385 for (int p = 0; p < 2; ++p) {
386 if (ndmubad[p] > ndmulimit[p] && nchbad[p] > 0) {
387 if (msgLvl(MSG::VERBOSE)) {
388 msg(MSG::VERBOSE) << "Drawer 0x" << MSG::hex << frag << MSG::dec
389 << " masking whole " << ((p) ? "second" : "first")
390 << " half" << endmsg;
391 if (printall) {
392 msg(MSG::VERBOSE) << "nDMuErr ";
393 for (int d = 0; d < MAX_DMUS; ++d) {
394 msg(MSG::VERBOSE) << " " << dmuerr[d];
395 }
396 msg(MSG::VERBOSE) << " total " << ndmubad[p] << " errors" << endmsg;
397
398 msg(MSG::VERBOSE) << "ChErr ";
399 int ch = 0;
400 while (ch < MAX_CHANNELS-2) {
401 msg(MSG::VERBOSE) << " " << m_error[ch++];
402 msg(MSG::VERBOSE) << " " << m_error[ch++];
403 msg(MSG::VERBOSE) << " " << m_error[ch++];
404 msg(MSG::VERBOSE) << " ";
405 }
406
407 msg(MSG::VERBOSE) << " total " << nchbad[p]
408 << " bad patterns" << endmsg;
409 printall = false;
410 }
411 }
412 int ch = (p) ? MAX_CHANNELS / 2 : 0;
413 int chmax = (p) ? MAX_CHANNELS : MAX_CHANNELS / 2;
414 for (; ch < chmax; ++ch) {
415 if (m_error[ch] == 0 || m_error[ch] < -5) { // channel was good before
416 m_error[ch] = -4;
417 }
418 }
419 }
420 }
421
422}
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
bool isBiGain() const
returns gain mode of run
const std::vector< float > & samples() const
Definition TileDigits.h:58
float m_ADCmaskValueMinusEps
indicates channels which were masked in background dataset
static int CorruptedData(int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)

◆ filter()

double TileRawChannelBuilderOpt2Filter::filter ( int ros,
int drawer,
int channel,
int & gain,
double & pedestal,
double & amplitude,
double & time,
const EventContext & ctx )
private

Definition at line 324 of file TileRawChannelBuilderOpt2Filter.cxx.

325 {
326
327 ATH_MSG_VERBOSE( "filter()" );
328
329 amplitude = 0.;
330 time = 0.;
331 double chi2 = 0.;
332
333 auto minMaxDigits = std::minmax_element(m_digits.begin(), m_digits.end());
334 float minDigit = *minMaxDigits.first;
335 float maxDigit = *minMaxDigits.second;
336
337 if (maxDigit - minDigit < 0.01) { // constant value in all samples
338
339 pedestal = minDigit;
340 chi2 = 0.;
341 ATH_MSG_VERBOSE( "CASE NO SIGNAL: maxdig-mindig = " << maxDigit << "-" << minDigit
342 << " = " << maxDigit - minDigit );
343
344 m_nConst++;
345
346 } else {
347
348 pedestal = getPedestal(ros, drawer, channel, gain, ctx);
349 double phase = 0.;
350 int nIterations = 0;
351
352 if (m_maxIterations == 1) { // Without iterations
353 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
354 // AA 3.10.08 --- take best phase from COOL
355 if (m_bestPhase) {
356 // AS 19.11.09 - note minus sign here - time in DB is opposite to best phase
357 phase = -m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
358 ATH_MSG_VERBOSE( "Best phase: " << phase
359 << " drawerIdx " << drawerIdx
360 << " channel " << channel );
361 }
362
363 double ofcPhase(phase);
364 chi2 = compute(ros, drawer, channel, gain, pedestal, amplitude, time, ofcPhase, ctx);
365
366 // If weights for tau=0 are used, deviations are seen in the amplitude =>
367 // function to correct the amplitude
369 && amplitude > m_ampMinThresh
370 && time > m_timeMinThresh
371 && time < m_timeMaxThresh) {
372
373 amplitude *= correctAmp(time, m_of2);
374 ATH_MSG_VERBOSE( "Amplitude corrected by " << correctAmp(time, m_of2)
375 << " new amplitude is " << amplitude );
376 }
377
378 if (m_correctTimeNI ) {
379 ATH_MSG_VERBOSE( "Time " << time
380 << " is corrected by " << correctTime(time, m_of2)
381 << ", new time is " << time + correctTime(time, m_of2));
382
383 time += correctTime(time, m_of2);
384 }
385
386 time += (phase - ofcPhase); // correct time if actual phase used in the calculation is different from required
387
388 if (time > m_maxTime) time = m_maxTime;
389 if (time < m_minTime) time = m_minTime;
390
391 m_nSignal++;
392
393 } else { // With iterations => 3 cases defined for correct pedestal treatment
394
395 // values used for pedestal-like events when iterations are performed
396 //const int sigma_hi = 5;
397 //const int sigma_lo = 3;
399 int digits_size_1 = m_digits.size() - 1;
400
401 // Signal events: OF with iterations
402 if ((maxDigit - m_digits[0] > sigma)
403 || (m_digits[0] - m_digits[digits_size_1] > 4 * sigma)) {
404
405 ATH_MSG_VERBOSE( "CASE Signal: maxdig-OptFilterDigits[0]="
406 << maxDigit - m_digits[0]
407 << " OptFilterDigits[0]-OptFilterDigits[ digits_size_1]="
408 << m_digits[0] - m_digits[digits_size_1] );
409
410 nIterations = iterate(ros, drawer, channel, gain, pedestal, amplitude, time, chi2, ctx);
411
412 ATH_MSG_VERBOSE( "number of iterations= " << nIterations );
413
414 m_nSignal++;
415 } else if (m_digits[0] - minDigit > sigma) { //Pedestal events: OF with negative iterations
416
417 if (msgLvl(MSG::VERBOSE)) {
418 msg(MSG::VERBOSE) << "CASE NEGATIVE: maxdig-OptFilterDigits[0]="
419 << maxDigit - m_digits[0]
420 << " OptFilterDigits[0]-OptFilterDigits[digits_size_1]="
421 << m_digits[0] - m_digits[digits_size_1] << endmsg;
422 msg(MSG::VERBOSE) << "OptFilterDigits[0]-mindig="
423 << m_digits[0] - minDigit << endmsg;
424 }
425
426 for (int i = 0; i <= digits_size_1; i++) // Mirror around pedestal
427 m_digits[i] = pedestal - (m_digits[i] - pedestal);
428
429 nIterations = iterate(ros, drawer, channel, gain, pedestal, amplitude, time, chi2, ctx);
430
431 amplitude = -amplitude;
432
433 ++m_nNegative;
434
435 } else { // Gaussian center: no iterations and phase=0
436
437 if (msgLvl(MSG::VERBOSE)) {
438 msg(MSG::VERBOSE) << "CASE CENTER: maxdig-OptFilterDigits[0]="
439 << maxDigit - m_digits[0]
440 << " OptFilterDigits[0]-OptFilterDigits[digits_size_1]="
441 << m_digits[0] - m_digits[digits_size_1] << endmsg;
442 msg(MSG::VERBOSE) << "OptFilterDigits[0]-mindig="
443 << m_digits[0] - minDigit
444 << endmsg;
445 }
446
447 if (m_bestPhase) {
448 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
449 // AS 19.11.09 - note minus sign here - time in DB is opposite to best phase
450 phase = -m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
451 ATH_MSG_VERBOSE( "Best phase: " << phase
452 << " drawerIdx " << drawerIdx
453 << " channel " << channel );
454 }
455
456 chi2 = compute(ros, drawer, channel, gain, pedestal, amplitude, time, phase, ctx);
457
458 // If weights for tau=0 are used, deviations are seen in the amplitude =>
459 // function to correct the amplitude
461 && amplitude > m_ampMinThresh
462 && time > m_timeMinThresh
463 && time < m_timeMaxThresh) {
464
465 amplitude *= correctAmp(time, m_of2);
466 ATH_MSG_VERBOSE( "Amplitude corrected by " << correctAmp(time, m_of2)
467 << " new amplitude is " << amplitude );
468 }
469
470 if (m_bestPhase) {
471 time = -phase;
472 chi2 = -chi2;
473 } else {
474 time = 0.;
475 }
476
477 m_nCenter++;
478
479 }
480
481 }
482
483 }
484
485 return chi2;
486}
Gaudi::Property< bool > m_correctTimeNI
If true, resulting time is corrected when using method without iteration.
Gaudi::Property< double > m_minTime
min allowed time = -25*(m_nSamples-1)/2
Gaudi::Property< double > m_maxTime
max allowed time = 25*(m_nSamples-1)/2
int iterate(int ros, int drawer, int channel, int gain, double &pedestal, double &amplitude, double &time, double &chi2, const EventContext &ctx)
Computes A,time,ped using OF.
float getPedestal(int ros, int drawer, int channel, int gain, const EventContext &ctx)
Apply the number of iterations needed for reconstruction by calling the Filter method.
Gaudi::Property< int > m_maxIterations
maximum number of iteration to perform
Gaudi::Property< bool > m_correctAmplitude
If true, resulting amplitude is corrected when using weights for tau=0 without iteration.
double compute(int ros, int drawer, int channel, int gain, double &pedestal, double &amplitude, double &time, double &phase, const EventContext &ctx)
ToolHandle< TileCondToolTiming > m_tileToolTiming
static double correctTime(double phase, bool of2=true)
Time correction factor.
Gaudi::Property< float > m_timeMinThresh
Gaudi::Property< float > m_timeMaxThresh
Gaudi::Property< float > m_ampMinThresh
static double correctAmp(double phase, bool of2=true)
Amplitude correction factor according to the time when using weights for tau=0 without iterations.

◆ finalize()

StatusCode TileRawChannelBuilderOpt2Filter::finalize ( )
virtual

Finalize method.

Reimplemented from TileRawChannelBuilder.

Definition at line 154 of file TileRawChannelBuilderOpt2Filter.cxx.

154 {
155
156 if (msgLvl(MSG::VERBOSE)) {
157 if (m_maxIterations == 1) { // Without iterations
158 msg(MSG::VERBOSE) << "Counters: Signal=" << m_nSignal
159 << " Constant=" << m_nConst
160 << " Total=" << m_nSignal + m_nConst << endmsg;
161 } else {
162 msg(MSG::VERBOSE) << "Counters: Signal=" << m_nSignal
163 << " Negat=" << m_nNegative
164 << " Center=" << m_nCenter
165 << " Constant=" << m_nConst
166 << " Total=" << m_nSignal + m_nNegative + m_nConst + m_nCenter << endmsg;
167 }
168 }
169
170 ATH_MSG_DEBUG( "Finalizing" );
171
172 return StatusCode::SUCCESS;
173}

◆ findMaxDigitPosition()

int TileRawChannelBuilderOpt2Filter::findMaxDigitPosition ( )
private

Finds maximum digit position in the pulse.

Gets pedestal estimation for OF1

Definition at line 254 of file TileRawChannelBuilderOpt2Filter.cxx.

254 {
255
256 ATH_MSG_VERBOSE( " findMaxDigitPosition()" );
257
258 int iMaxDigit = 0;
259 float maxDigit = 0.;
260 bool saturated = false;
261
262 for (unsigned int i = 0; i < m_digits.size(); i++) {
263 if (m_digits[i] > m_ADCmaxMinusEps) saturated = true;
264 if (maxDigit < m_digits[i]) {
265 maxDigit = m_digits[i];
266 iMaxDigit = i;
267 }
268 }
269
270 if (msgLvl(MSG::VERBOSE)) {
271 for (unsigned int i = 0; i < m_digits.size(); i++) {
272 msg(MSG::VERBOSE) << " " << m_digits[i];
273 }
274
275 msg(MSG::VERBOSE) << "; Max: digit[" << iMaxDigit << "]=" << maxDigit << endmsg;
276
277 if (saturated) msg(MSG::VERBOSE) << " Samples saturated" << endmsg;
278 }
279
280 return iMaxDigit;
281}
setScaleOne setStatusOne saturated

◆ getOverflowedChannels()

Overflows_t & TileRawChannelBuilder::getOverflowedChannels ( void )
inherited

Definition at line 37 of file TileRawChannelBuilder.cxx.

37 {
38 return m_overflows;
39}

◆ getPedestal()

float TileRawChannelBuilderOpt2Filter::getPedestal ( int ros,
int drawer,
int channel,
int gain,
const EventContext & ctx )
private

Apply the number of iterations needed for reconstruction by calling the Filter method.

Definition at line 284 of file TileRawChannelBuilderOpt2Filter.cxx.

284 {
285 float pedestal = 0.;
286
287 switch (m_pedestalMode.value()) {
288 case -1:
289 // use pedestal from conditions DB
290 pedestal = m_tileToolNoiseSample->getPed(TileCalibUtils::getDrawerIdx(ros, drawer), channel, gain, TileRawChannelUnit::ADCcounts, ctx);
291 break;
292 case 7:
293 pedestal = m_digits[6];
294 break;
295 case 9:
296 pedestal = m_digits[8];
297 break;
298 case 12:
299 pedestal = .5 * (m_digits[0] + m_digits[1]);
300 break;
301 case 17:
302 pedestal = .5 * (m_digits[0] + m_digits[6]);
303 break;
304 case 19:
305 pedestal = .5 * (m_digits[0] + m_digits[8]);
306 break;
307 case 71:
308 pedestal = std::min(m_digits[0], m_digits[6]);
309 break;
310 case 7621:
311 pedestal = 0.5 * std::min(m_digits[0] + m_digits[1], m_digits[5] + m_digits[6]);
312 break;
313 default:
314 pedestal = m_digits[0];
315 break;
316 }
317
318 ATH_MSG_VERBOSE("getPedestal(): pedestal=" << pedestal);
319
320 return pedestal;
321}
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
Applies OF algorithm.
Gaudi::Property< int > m_pedestalMode
pedestal mode to use

◆ getTileRawChannelContainerID()

std::string TileRawChannelBuilder::getTileRawChannelContainerID ( void )
inherited

Definition at line 41 of file TileRawChannelBuilder.cxx.

41 {
42 return m_rawChannelContainerKey.key();
43}

◆ initialize()

StatusCode TileRawChannelBuilderOpt2Filter::initialize ( )
virtual

Initialize method.

Reimplemented from TileRawChannelBuilder.

Definition at line 74 of file TileRawChannelBuilderOpt2Filter.cxx.

74 {
75
76 ATH_MSG_INFO( "initialize()" );
77
78 m_rChType = TileFragHash::OptFilterOffline; // type for offline Opt Filter
79
80 // init in superclass
82
83 if (m_maxIterations != 1) m_correctTimeNI = false;
84
85 // bits 12-15 - various options
86 // if (m_correctTimeNI) m_bsflags |= 0x1000;
87 if (m_correctAmplitude) m_bsflags |= 0x2000;
88 if (m_maxIterations > 1) m_bsflags |= 0x4000;
89 if (m_bestPhase) m_bsflags |= 0x8000;
90
91 ATH_MSG_DEBUG( " MaxIterations=" << m_maxIterations.value()
92 << " PedestalMode=" << m_pedestalMode.value()
93 << " TimeForConvergence=" << m_timeForConvergence.value()
94 << " ConfTB=" << m_confTB.value()
95 << " OF2=" << m_of2.value()
96 << " Minus1Iteration=" << m_minus1Iter.value()
97 << " AmplitudeCorrection=" << m_correctAmplitude.value()
98 << " TimeCorrection=" << m_correctTimeNI.value()
99 << " Best Phase " << m_bestPhase.value() );
100
101 ATH_MSG_DEBUG( " NoiseThresholdHG=" << m_noiseThresholdHG.value()
102 << " NoiseThresholdLG=" << m_noiseThresholdLG.value());
103
104 m_nSamples = m_tileInfo->NdigitSamples();
105 m_t0SamplePosition = m_tileInfo->ItrigSample();
106 if (m_maxTime < m_minTime) { // set time window if it was not set from jobOptions
109 }
110 ATH_MSG_DEBUG(" NSamples=" << m_nSamples
111 << " T0Sample=" << m_t0SamplePosition
112 << " minTime=" << m_minTime.value()
113 << " maxTime=" << m_maxTime.value() );
114
115 if (m_pedestalMode % 10 > 2 && m_nSamples != m_pedestalMode % 10) {
116 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Changing PedestalMode from " << m_pedestalMode.value();
118 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " to " << m_pedestalMode.value() << endmsg;
119 }
120
121
122 if (m_nSamples != 7 && (m_pedestalMode == 71 || m_pedestalMode == 7621)) {
123 ATH_MSG_ERROR( "Incompatable pedestal mode [" << m_pedestalMode.value()
124 << "] and number of samples [" << m_nSamples << "]" );
125 return StatusCode::FAILURE;
126 }
127
128 m_nSignal = 0;
129 m_nNegative = 0;
130 m_nCenter = 0;
131 m_nConst = 0;
132
133 //=== get TileCondToolOfc
134 ATH_CHECK( m_tileCondToolOfc.retrieve() );
135
136 //=== get TileCondToolNoiseSample
137 ATH_CHECK( m_tileToolNoiseSample.retrieve(EnableTool{m_pedestalMode == -1}) );
138
139 if (m_bestPhase) {
140 //=== get TileToolTiming
141 // TileToolTiming can be disabled in the TileRawChannelBuilder
142 if (!m_tileToolTiming.isEnabled()) {
143 m_tileToolTiming.enable();
144 }
145 ATH_CHECK( m_tileToolTiming.retrieve() );
146 }
147
148 ATH_MSG_INFO( "initialization completed" );
149
150 return StatusCode::SUCCESS;
151}
#define ATH_MSG_INFO(x,...)
Gaudi::Property< bool > m_confTB
use testbeam configuration
Gaudi::Property< double > m_timeForConvergence
minimum time difference to quit iteration procedure
Gaudi::Property< bool > m_minus1Iter
bool variable for whether to apply -1 iteration (initial phase guess)
virtual StatusCode initialize()
Initializer.

◆ initLog()

void TileRawChannelBuilder::initLog ( const EventContext & ctx)
inherited

Definition at line 212 of file TileRawChannelBuilder.cxx.

212 {
213
214 const TileDQstatus* DQstatus = SG::makeHandle (m_DQstatusKey, ctx).get();
215
216 // update only if there is new event
217 if (m_evtCounter != ctx.evt()) {
218
219 m_evtCounter = ctx.evt();
220 if (m_runType != 0) m_trigType = m_runType;
221 else m_trigType = DQstatus->trigType();
222
223 if (0 == m_trigType) {
224 m_idophys = (DQstatus->calibMode() == 0);
225 m_idolas = false;
226 m_idoped = false;
227 m_idocis = (DQstatus->calibMode() == 1);
228 } else {
229 m_idophys = (m_trigType <= 1);
230 m_idolas = ((m_trigType == 2) || (m_trigType == 3));
231 m_idoped = ((m_trigType == 4) || (m_trigType == 5));
232 m_idocis = ((m_trigType == 8) || (m_trigType == 9));
233 }
234
235 const unsigned int *cispar = DQstatus->cispar();
236 if (0 == cispar[7]) { // if capdaq not set, it can't be CIS event
237 if (m_idocis) { // cis flag was set incorrectly, change to ped
238 m_idoped = true;
239 m_idocis = false;
240 }
241 m_capdaq = 0.0;
242 } else {
243 m_capdaq = (cispar[7] < 10) ? 5.2 : 100.0;
244 }
245 m_cischan = cispar[8] - 1; // channel where CIS is fired (-1 = all channels)
246
247 ATH_MSG_DEBUG( "Trig type is " << m_trigType
248 << "; dophys is " << ((m_idophys) ? "true" : "false")
249 << "; dolas is " << ((m_idolas) ? "true" : "false")
250 << "; doped is " << ((m_idoped) ? "true" : "false")
251 << "; docis is " << ((m_idocis) ? "true" : "false")
252 << "; capacitor is " << m_capdaq
253 << "; cis chan is " << m_cischan );
254 }
255}
int trigType() const
Trigger type.
uint32_t calibMode() const
Calibration mode.
const uint32_t * cispar() const
CIS parameters.
Gaudi::Property< int > m_runType

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

const InterfaceID & TileRawChannelBuilderOpt2Filter::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 45 of file TileRawChannelBuilderOpt2Filter.cxx.

45 {
47}
static const InterfaceID IID_ITileRawChannelBuilderOpt2Filter("TileRawChannelBuilderOpt2Filter", 1, 0)

◆ iterate()

int TileRawChannelBuilderOpt2Filter::iterate ( int ros,
int drawer,
int channel,
int gain,
double & pedestal,
double & amplitude,
double & time,
double & chi2,
const EventContext & ctx )
private

Computes A,time,ped using OF.

If iterations are required, the Iterator method is used

Definition at line 489 of file TileRawChannelBuilderOpt2Filter.cxx.

490 {
491
492 ATH_MSG_VERBOSE( "iterate()" );
493
494 int nIterations = 0;
495 double savePhase = 0.0;
496 double phase = 0.0;
497 time = -1000.;
498
499 // Mythic -1 iteration or DSP emulation case
500 if (m_minus1Iter || (m_emulateDsp && (m_maxIterations > 1)))
502
503 while ((time > m_timeForConvergence
504 || time < (-1.) * m_timeForConvergence
505 || m_emulateDsp)
506 && nIterations < m_maxIterations) {
507
508 chi2 = compute(ros, drawer, channel, gain, pedestal, amplitude, time, phase, ctx);
509
510 savePhase = phase;
511
512 if (m_emulateDsp)
513 phase -= round(time); // rounding phase to integer like in DSP
514 else
515 phase -= time; // no rounding at all for OFC on the fly
516
517 if (phase > m_maxTime) phase = m_maxTime;
518 if (phase < m_minTime) phase = m_minTime;
519
520 ++nIterations;
521 ATH_MSG_VERBOSE( " OptFilter computed with phase=" << savePhase
522 << " Time=" << time
523 << " END ITER=" << nIterations
524 << " new phase=" << phase
525 << " chi2=" << chi2
526 << " Amp=" << amplitude );
527 }
528
529 time -= savePhase;
530 if (time > m_maxTime) time = m_maxTime;
531 if (time < m_minTime) time = m_minTime;
532
533 ATH_MSG_VERBOSE( "OptFilterEne=" << amplitude
534 << " Phase=" << savePhase
535 << " Absolute Time=" << time );
536
537 return nIterations;
538}
int findMaxDigitPosition()
Finds maximum digit position in the pulse.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ ofc2int()

void TileRawChannelBuilderOpt2Filter::ofc2int ( int nDigits,
double * w_off,
short * w_int,
short & scale )
private

Definition at line 701 of file TileRawChannelBuilderOpt2Filter.cxx.

701 {
702 // Number of bits of the integer word (signed -1 )
703 int numberBits = 16;
704 numberBits = numberBits - 1;
705
706 // Get Absolute Maximum
707 double max = -10000.;
708 double sum = 0.;
709 for (int i = 0; i < nDigits; i++) {
710 sum += w_off[i];
711 if (fabs(w_off[i]) > max) max = fabs(w_off[i]);
712 // printf("idig = %d weight = %f \n",i, w_off[i]);
713 }
714 if (fabs(sum) > max) max = fabs(sum);
715
716 // Get Scale at Maximum
717 scale = 0;
718 if (max != 0) scale = (int) truncf(log((std::pow(2., numberBits) - 1.) / max) / log(2.));
719
720 // Convert to Integer the weights and the sum
721 for (int i = 0; i < nDigits; i++)
722 w_int[i] = (short) roundf(w_off[i] * std::pow(2., scale));
723 //aa w_sum_dsp = (short) roundf(sum*std::pow(2.,scale));
724
725
726/*
727 if (msgLvl(MSG::VERBOSE)) {
728 printf("\nAbsolute Max value = %15.8f -> Scale = %3d\n",max,scale);
729
730 for (int i=0; i<ndigits; i++)
731 {
732 if ( i == 0){
733 printf("\n Offline Off*Scale Dsp/scale Dsp Scale \n");
734 printf("----------------------------------------------------------------------------------\n");
735 printf(" %17.10f %17.10f %17.10f 0x%04X %3d \n",
736 w_off[i],w_off[i]*std::pow(2.,scale), w_int[i]/std::pow(2.,scale),(unsigned int) w_int[i] ,scale);
737 } else {
738 printf(" %17.10f %17.10f %17.10f 0x%04X \n",
739 w_off[i],w_off[i]*std::pow(2.,scale), w_int[i]/std::pow(2.,scale),(unsigned int)w_int[i]);
740 }
741 }
742 //aa printf(" %17.10f %17.10f %17.10f 0x%04X <- SUM\n",
743 //aa sum,sum*std::pow(2.,scale),w_sum_dsp/std::pow(2.,scale),(unsigned int)w_sum_dsp);
744 }
745*/
746 return;
747}
#define max(a, b)
Definition cfImp.cxx:41

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ rawChannel()

TileRawChannel * TileRawChannelBuilderOpt2Filter::rawChannel ( const TileDigits * digits,
const EventContext & ctx )
virtual

Builder virtual method to be implemented by subclasses.

Parameters
digitsPointer to TileDigitsContainer

Reimplemented from TileRawChannelBuilder.

Definition at line 176 of file TileRawChannelBuilderOpt2Filter.cxx.

176 {
177
178 ++m_chCounter;
179
180 double pedestal = 0.;
181 double energy = 0.;
182 double time = 0.;
183 double chi2 = 0.;
184 m_digits = digits->samples();
185 m_digits.erase(m_digits.begin(),m_digits.begin()+m_firstSample);
186 m_digits.resize(m_nSamples);
187 const HWIdentifier adcId = digits->adc_HWID();
188 int gain = m_tileHWID->adc(adcId);
189
190 ATH_MSG_VERBOSE( "Building Raw Channel, with OptFilter, HWID:" << m_tileHWID->to_string(adcId)
191 << " gain=" << gain );
192
193 int ros = m_tileHWID->ros(adcId);
194 int drawer = m_tileHWID->drawer(adcId);
195 int channel = m_tileHWID->channel(adcId);
196
197 chi2 = filter(ros, drawer, channel, gain, pedestal, energy, time, ctx);
198
199 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
200
201 if (m_calibrateEnergy) {
202 energy = m_tileToolEmscale->doCalibCis(drawerIdx, channel, gain, energy);
203 }
204
205 if (msgLvl(MSG::VERBOSE)) {
206 msg(MSG::VERBOSE) << "Creating OptFilter RawChannel"
207 << " a=" << energy
208 << " t=" << time
209 << " ped=" << pedestal
210 << " q=" << chi2 << endmsg;
211
212 msg(MSG::VERBOSE) << "digits:";
213
214 for (unsigned int i = 0; i < m_digits.size(); ++i)
215 msg(MSG::VERBOSE) << " " << m_digits[i];
216
217 msg(MSG::VERBOSE) << " " << endmsg;
218 }
219
220 // return new TileRawChannel
221 // TileRawChannel *rawCh = new TileRawChannel(adcId,OptFilterEne,OptFilterTime,OptFilterChi2,OptFilterPed);
222 DataPool<TileRawChannel> tileRchPool(m_dataPoollSize);
223 TileRawChannel *rawCh = tileRchPool.nextElementPtr();
224 rawCh->assign (adcId,
225 energy,
226 time,
227 chi2,
228 pedestal);
229
230 if (m_correctTime
231 && (time != 0
232 && time < m_maxTime
233 && time > m_minTime)) {
234
235 time -= m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
236 rawCh->insertTime(time);
237
238 ATH_MSG_VERBOSE( "Correcting time, new time=" << rawCh->time() );
239
240 }
241
242 if (TileID::HIGHGAIN == gain) {
243 ++m_nChH;
244 m_RChSumH += energy;
245 } else {
246 ++m_nChL;
247 m_RChSumL += energy;
248 }
249
250 return rawCh;
251}
double filter(int ros, int drawer, int channel, int &gain, double &pedestal, double &amplitude, double &time, const EventContext &ctx)
Gaudi::Property< int > m_dataPoollSize
Gaudi::Property< bool > m_correctTime
Gaudi::Property< int > m_firstSample
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
Gaudi::Property< bool > m_calibrateEnergy
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
void insertTime(float time)
float time(int ind=0) const

◆ 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< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ resetDrawer()

void TileRawChannelBuilder::resetDrawer ( )
inherited

Definition at line 28 of file TileRawChannelBuilder.cxx.

28 {
29 m_lastDrawer = -1;
30 m_badDrawer = false;
31}

◆ resetOverflows()

void TileRawChannelBuilder::resetOverflows ( void )
inherited

Definition at line 33 of file TileRawChannelBuilder.cxx.

33 {
34 m_overflows.clear();
35}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_ADCmaskValueMinusEps

float TileRawChannelBuilder::m_ADCmaskValueMinusEps {0.f}
protectedinherited

indicates channels which were masked in background dataset

Definition at line 225 of file TileRawChannelBuilder.h.

225{0.f};

◆ m_ADCmaxMinusEps

float TileRawChannelBuilder::m_ADCmaxMinusEps {0.f}
protectedinherited

Definition at line 224 of file TileRawChannelBuilder.h.

224{0.f};

◆ m_ampMinThresh

Gaudi::Property<float> TileRawChannelBuilder::m_ampMinThresh
protectedinherited
Initial value:
{this, "AmpMinForAmpCorrection", 15.0,
"Correct amplitude if it's above amplitude threshold (in ADC counts)"}

Definition at line 152 of file TileRawChannelBuilder.h.

152 {this, "AmpMinForAmpCorrection", 15.0,
153 "Correct amplitude if it's above amplitude threshold (in ADC counts)"};

◆ m_badDrawer

bool TileRawChannelBuilder::m_badDrawer {false}
protectedinherited

Definition at line 213 of file TileRawChannelBuilder.h.

213{false};

◆ m_bestPhase

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_bestPhase
private
Initial value:
{this, "BestPhase", false,
"Use best phase from COOL DB in fixed phase mode (i.e., no iterations)"}

Definition at line 100 of file TileRawChannelBuilderOpt2Filter.h.

100 {this, "BestPhase", false,
101 "Use best phase from COOL DB in fixed phase mode (i.e., no iterations)"}; // if true, use best phase from COOL DB in "fixed phase" mode (i.e., no iterations)

◆ m_bsflags

unsigned int TileRawChannelBuilder::m_bsflags {0}
protectedinherited

Definition at line 138 of file TileRawChannelBuilder.h.

138{0};

◆ m_cabling

const TileCablingService* TileRawChannelBuilder::m_cabling {nullptr}
protectedinherited

TileCabling instance.

Definition at line 185 of file TileRawChannelBuilder.h.

185{nullptr};

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileRawChannelBuilder::m_cablingSvc
protectedinherited
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Name of Tile cabling service.

Definition at line 182 of file TileRawChannelBuilder.h.

182 { this,
183 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_calibrateEnergy

Gaudi::Property<bool> TileRawChannelBuilder::m_calibrateEnergy {this, "calibrateEnergy", false, "Calibrate energy"}
protectedinherited

Definition at line 142 of file TileRawChannelBuilder.h.

142{this, "calibrateEnergy", false, "Calibrate energy"};

◆ m_capdaq

double TileRawChannelBuilder::m_capdaq {100.}
protectedinherited

Definition at line 196 of file TileRawChannelBuilder.h.

196{100.}; // Capacitor

◆ m_chCounter

unsigned int TileRawChannelBuilder::m_chCounter {0}
protectedinherited

Definition at line 199 of file TileRawChannelBuilder.h.

199{0};

◆ m_cischan

int TileRawChannelBuilder::m_cischan {-1}
protectedinherited

Definition at line 195 of file TileRawChannelBuilder.h.

195{-1}; // which channel is fired by CIS

◆ m_confTB

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_confTB {this, "ConfTB", false, "Use testbeam configuration"}
private

use testbeam configuration

Definition at line 89 of file TileRawChannelBuilderOpt2Filter.h.

89{this, "ConfTB", false, "Use testbeam configuration"};

◆ m_correctAmplitude

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_correctAmplitude
private
Initial value:
{this, "AmplitudeCorrection", false,
"Correct resulting amplitude when using weights for tau=0 without iteration"}

If true, resulting amplitude is corrected when using weights for tau=0 without iteration.

Definition at line 95 of file TileRawChannelBuilderOpt2Filter.h.

95 {this, "AmplitudeCorrection", false,
96 "Correct resulting amplitude when using weights for tau=0 without iteration"};

◆ m_correctTime

Gaudi::Property<bool> TileRawChannelBuilder::m_correctTime {this, "correctTime", false, "Correct time"}
protectedinherited

Definition at line 145 of file TileRawChannelBuilder.h.

145{this, "correctTime", false, "Correct time"};

◆ m_correctTimeNI

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_correctTimeNI
private
Initial value:
{this, "TimeCorrection", false,
"Correct resulting time when using method without iteration"}

If true, resulting time is corrected when using method without iteration.

Definition at line 97 of file TileRawChannelBuilderOpt2Filter.h.

97 {this, "TimeCorrection", false,
98 "Correct resulting time when using method without iteration"};

◆ m_dataPoollSize

Gaudi::Property<int> TileRawChannelBuilder::m_dataPoollSize {this, "DataPoolSize", -1, "Data pool size"}
protectedinherited

Definition at line 207 of file TileRawChannelBuilder.h.

207{this, "DataPoolSize", -1, "Data pool size"};

◆ m_demoFragIDs

Gaudi::Property<std::vector<int> > TileRawChannelBuilder::m_demoFragIDs
protectedinherited
Initial value:
{this,
"DemoFragIDs", {}, "List of Tile frag IDs with new electronics (demonstrator)"}

Definition at line 187 of file TileRawChannelBuilder.h.

187 {this,
188 "DemoFragIDs", {}, "List of Tile frag IDs with new electronics (demonstrator)"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digits

std::vector<float> TileRawChannelBuilderOpt2Filter::m_digits
private

Definition at line 114 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_DQstatusKey

SG::ReadHandleKey<TileDQstatus> TileRawChannelBuilder::m_DQstatusKey
protectedinherited
Initial value:
{this, "TileDQstatus",
"TileDQstatus",
"TileDQstatus key"}

Definition at line 120 of file TileRawChannelBuilder.h.

120 {this, "TileDQstatus",
121 "TileDQstatus",
122 "TileDQstatus key"};

◆ m_DSPContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileRawChannelBuilder::m_DSPContainerKey {this, "DSPContainer", "", "DSP Container key"}
protectedinherited

Definition at line 125 of file TileRawChannelBuilder.h.

126{this, "DSPContainer", "", "DSP Container key"};

◆ m_emulateDsp

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_emulateDsp {this, "EmulateDSP", false, "Emulate DSP reconstruction algorithm"}
private

Definition at line 102 of file TileRawChannelBuilderOpt2Filter.h.

102{this, "EmulateDSP", false, "Emulate DSP reconstruction algorithm"}; // if true, emulate DSP reconstruction algorithm

◆ m_error

int TileRawChannelBuilder::m_error[MAX_CHANNELS]
protectedinherited

Definition at line 211 of file TileRawChannelBuilder.h.

◆ m_evtCounter

unsigned int TileRawChannelBuilder::m_evtCounter {0}
protectedinherited

Definition at line 198 of file TileRawChannelBuilder.h.

198{0};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_f_ADCmax

float TileRawChannelBuilder::m_f_ADCmax {0.f}
protectedinherited

Definition at line 221 of file TileRawChannelBuilder.h.

221{0.f};

◆ m_f_ADCmaxPlus1

float TileRawChannelBuilder::m_f_ADCmaxPlus1 {0.f}
protectedinherited

Definition at line 223 of file TileRawChannelBuilder.h.

223{0.f};

◆ m_firstSample

Gaudi::Property<int> TileRawChannelBuilder::m_firstSample {this, "FirstSample", 0, "First sample to start with the analysis"}
protectedinherited

Definition at line 140 of file TileRawChannelBuilder.h.

140{this, "FirstSample", 0, "First sample to start with the analysis"};

◆ m_i_ADCmax

int TileRawChannelBuilder::m_i_ADCmax {0}
protectedinherited

Definition at line 220 of file TileRawChannelBuilder.h.

220{0};

◆ m_i_ADCmaxPlus1

int TileRawChannelBuilder::m_i_ADCmaxPlus1 {0}
protectedinherited

Definition at line 222 of file TileRawChannelBuilder.h.

222{0};

◆ m_idocis

bool TileRawChannelBuilder::m_idocis {false}
protectedinherited

Definition at line 194 of file TileRawChannelBuilder.h.

194{false}; // CIS fitting

◆ m_idolas

bool TileRawChannelBuilder::m_idolas {false}
protectedinherited

Definition at line 192 of file TileRawChannelBuilder.h.

192{false}; // Laser fitting

◆ m_idoped

bool TileRawChannelBuilder::m_idoped {false}
protectedinherited

Definition at line 193 of file TileRawChannelBuilder.h.

193{false}; // Ped run, phys fitting

◆ m_idophys

bool TileRawChannelBuilder::m_idophys {false}
protectedinherited

Definition at line 191 of file TileRawChannelBuilder.h.

191{false}; // Phys fitting

◆ m_infoName

Gaudi::Property<std::string> TileRawChannelBuilder::m_infoName {this, "TileInfoName", "TileInfo", "Name of TileInfo object"}
protectedinherited

Definition at line 218 of file TileRawChannelBuilder.h.

218{this, "TileInfoName", "TileInfo", "Name of TileInfo object"};

◆ m_lastDrawer

int TileRawChannelBuilder::m_lastDrawer {-1}
protectedinherited

Definition at line 212 of file TileRawChannelBuilder.h.

212{-1};

◆ m_maxIterations

Gaudi::Property<int> TileRawChannelBuilderOpt2Filter::m_maxIterations {this, "MaxIterations", 5, "Maximum number of iteration to perform"}
private

maximum number of iteration to perform

Definition at line 87 of file TileRawChannelBuilderOpt2Filter.h.

87{this, "MaxIterations", 5, "Maximum number of iteration to perform"};

◆ m_maxTime

Gaudi::Property<double> TileRawChannelBuilderOpt2Filter::m_maxTime {this, "MaxTime", -1.0, "Max allowed time"}
private

max allowed time = 25*(m_nSamples-1)/2

Definition at line 110 of file TileRawChannelBuilderOpt2Filter.h.

110{this, "MaxTime", -1.0, "Max allowed time"};

◆ m_minTime

Gaudi::Property<double> TileRawChannelBuilderOpt2Filter::m_minTime {this, "MinTime", 0.0, "Min allowed time"}
private

min allowed time = -25*(m_nSamples-1)/2

Definition at line 111 of file TileRawChannelBuilderOpt2Filter.h.

111{this, "MinTime", 0.0, "Min allowed time"};

◆ m_minus1Iter

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_minus1Iter
private
Initial value:
{this, "Minus1Iteration", false,
"Apply -1 iteration (initial phase guess)"}

bool variable for whether to apply -1 iteration (initial phase guess)

Definition at line 93 of file TileRawChannelBuilderOpt2Filter.h.

93 {this, "Minus1Iteration", false,
94 "Apply -1 iteration (initial phase guess)"};

◆ m_nCenter

int TileRawChannelBuilderOpt2Filter::m_nCenter
private

internal counters

Definition at line 105 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_nChH

int TileRawChannelBuilder::m_nChH {0}
protectedinherited

Definition at line 202 of file TileRawChannelBuilder.h.

202{0};

◆ m_nChL

int TileRawChannelBuilder::m_nChL {0}
protectedinherited

Definition at line 201 of file TileRawChannelBuilder.h.

201{0};

◆ m_nConst

int TileRawChannelBuilderOpt2Filter::m_nConst
private

internal counters

Definition at line 106 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_nNegative

int TileRawChannelBuilderOpt2Filter::m_nNegative
private

internal counters

Definition at line 104 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_noiseFilterTools

ToolHandleArray<ITileRawChannelTool> TileRawChannelBuilder::m_noiseFilterTools
protectedinherited
Initial value:
{this,
"NoiseFilterTools", {}, "Tile noise filter tools"}

Definition at line 166 of file TileRawChannelBuilder.h.

166 {this,
167 "NoiseFilterTools", {}, "Tile noise filter tools"};

◆ m_noiseThresholdHG

Gaudi::Property<int> TileRawChannelBuilderOpt2Filter::m_noiseThresholdHG {this, "NoiseThresholdHG", 5, "Noise threshold for high gain"}
private

Definition at line 116 of file TileRawChannelBuilderOpt2Filter.h.

116{this, "NoiseThresholdHG", 5, "Noise threshold for high gain"};

◆ m_noiseThresholdLG

Gaudi::Property<int> TileRawChannelBuilderOpt2Filter::m_noiseThresholdLG {this, "NoiseThresholdLG", 3, "Noise threshold for low gain"}
private

Definition at line 117 of file TileRawChannelBuilderOpt2Filter.h.

117{this, "NoiseThresholdLG", 3, "Noise threshold for low gain"};

◆ m_notUpgradeCabling

bool TileRawChannelBuilder::m_notUpgradeCabling {true}
protectedinherited

Definition at line 215 of file TileRawChannelBuilder.h.

215{true};

◆ m_nSamples

int TileRawChannelBuilderOpt2Filter::m_nSamples
private

number of samples in the data

Definition at line 108 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_nSignal

int TileRawChannelBuilderOpt2Filter::m_nSignal
private

internal counters

Definition at line 103 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_of2

Gaudi::Property<bool> TileRawChannelBuilderOpt2Filter::m_of2 {this, "OF2", true, "OF method: true => OF2; false => OF1"}
private

bool variable for OF method: true=> OF2; false=> OF1

Definition at line 92 of file TileRawChannelBuilderOpt2Filter.h.

92{this, "OF2", true, "OF method: true => OF2; false => OF1"};

◆ m_overflows

Overflows_t TileRawChannelBuilder::m_overflows
protectedinherited

Definition at line 206 of file TileRawChannelBuilder.h.

◆ m_pedestalMode

Gaudi::Property<int> TileRawChannelBuilderOpt2Filter::m_pedestalMode {this, "PedestalMode", 17, "Pedestal mode to use"}
private

pedestal mode to use

Definition at line 88 of file TileRawChannelBuilderOpt2Filter.h.

88{this, "PedestalMode", 17, "Pedestal mode to use"};

◆ m_rawChannelCnt

std::unique_ptr<TileMutableRawChannelContainer> TileRawChannelBuilder::m_rawChannelCnt
protectedinherited

Definition at line 133 of file TileRawChannelBuilder.h.

◆ m_rawChannelContainerKey

SG::WriteHandleKey<TileRawChannelContainer> TileRawChannelBuilder::m_rawChannelContainerKey
protectedinherited
Initial value:
{this,"TileRawChannelContainer","TileRawChannelFiltered",
"Output Tile raw channels container key"}

Definition at line 129 of file TileRawChannelBuilder.h.

129 {this,"TileRawChannelContainer","TileRawChannelFiltered",
130 "Output Tile raw channels container key"};

◆ m_RChSumH

double TileRawChannelBuilder::m_RChSumH {0.}
protectedinherited

Definition at line 204 of file TileRawChannelBuilder.h.

204{0.};

◆ m_RChSumL

double TileRawChannelBuilder::m_RChSumL {0.}
protectedinherited

Definition at line 203 of file TileRawChannelBuilder.h.

203{0.};

◆ m_rChType

TileFragHash::TYPE TileRawChannelBuilder::m_rChType {TileFragHash::Default}
protectedinherited

Definition at line 136 of file TileRawChannelBuilder.h.

◆ m_rChUnit

TileRawChannelUnit::UNIT TileRawChannelBuilder::m_rChUnit {TileRawChannelUnit::ADCcounts}
protectedinherited

Definition at line 137 of file TileRawChannelBuilder.h.

◆ m_runType

Gaudi::Property<int> TileRawChannelBuilder::m_runType {this, "RunType", 0, "Run type used to override value of trigType in event"}
protectedinherited

Definition at line 160 of file TileRawChannelBuilder.h.

160{this, "RunType", 0, "Run type used to override value of trigType in event"};

◆ m_t0SamplePosition

int TileRawChannelBuilderOpt2Filter::m_t0SamplePosition
private

position of peak sample = (m_nSamples-1)/2

Definition at line 109 of file TileRawChannelBuilderOpt2Filter.h.

◆ m_tileCondToolOfc

ToolHandle<ITileCondToolOfc> TileRawChannelBuilderOpt2Filter::m_tileCondToolOfc
private
Initial value:
{this,
"TileCondToolOfc", "TileCondToolOfc", "Tile OFC tool"}

Definition at line 69 of file TileRawChannelBuilderOpt2Filter.h.

69 {this,
70 "TileCondToolOfc", "TileCondToolOfc", "Tile OFC tool"};

◆ m_tileHWID

const TileHWID* TileRawChannelBuilder::m_tileHWID {nullptr}
protectedinherited

Definition at line 164 of file TileRawChannelBuilder.h.

164{nullptr};

◆ m_tileID

const TileID* TileRawChannelBuilder::m_tileID {nullptr}
protectedinherited

Definition at line 163 of file TileRawChannelBuilder.h.

163{nullptr};

◆ m_tileIdTransforms

ToolHandle<TileCondIdTransforms> TileRawChannelBuilder::m_tileIdTransforms
protectedinherited
Initial value:
{this,
"TileCondIdTransforms", "TileCondIdTransforms",
"Tile tool to tranlate hardware identifier to the drawerIdx, channel, and adc"}

Definition at line 175 of file TileRawChannelBuilder.h.

175 {this,
176 "TileCondIdTransforms", "TileCondIdTransforms",
177 "Tile tool to tranlate hardware identifier to the drawerIdx, channel, and adc"};

◆ m_tileInfo

const TileInfo* TileRawChannelBuilder::m_tileInfo {nullptr}
protectedinherited

Definition at line 219 of file TileRawChannelBuilder.h.

219{nullptr};

◆ m_tileToolEmscale

ToolHandle<TileCondToolEmscale> TileRawChannelBuilder::m_tileToolEmscale
protectedinherited
Initial value:
{this,
"TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"}

Definition at line 169 of file TileRawChannelBuilder.h.

169 {this,
170 "TileCondToolEmscale", "TileCondToolEmscale", "Tile EM scale calibration tool"};

◆ m_tileToolNoiseSample

ToolHandle<TileCondToolNoiseSample> TileRawChannelBuilderOpt2Filter::m_tileToolNoiseSample
private
Initial value:
{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"}

Applies OF algorithm.

Definition at line 72 of file TileRawChannelBuilderOpt2Filter.h.

72 {this,
73 "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"};

◆ m_tileToolTiming

ToolHandle<TileCondToolTiming> TileRawChannelBuilder::m_tileToolTiming
protectedinherited
Initial value:
{this,
"TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"}

Definition at line 172 of file TileRawChannelBuilder.h.

172 {this,
173 "TileCondToolTiming", "TileCondToolTiming", "Tile timing tool"};

◆ m_timeForConvergence

Gaudi::Property<double> TileRawChannelBuilderOpt2Filter::m_timeForConvergence
private
Initial value:
{this, "TimeForConvergence", 0.5,
"Minimum time difference to quit iteration procedure"}

minimum time difference to quit iteration procedure

Definition at line 90 of file TileRawChannelBuilderOpt2Filter.h.

90 {this, "TimeForConvergence", 0.5,
91 "Minimum time difference to quit iteration procedure"};

◆ m_timeMaxThresh

Gaudi::Property<float> TileRawChannelBuilder::m_timeMaxThresh
protectedinherited
Initial value:
{this, "TimeMaxForAmpCorrection", 12.5,
"Correct amplitude if time is below time max threshold"}

Definition at line 156 of file TileRawChannelBuilder.h.

156 {this, "TimeMaxForAmpCorrection", 12.5,
157 "Correct amplitude if time is below time max threshold"};

◆ m_timeMinThresh

Gaudi::Property<float> TileRawChannelBuilder::m_timeMinThresh
protectedinherited
Initial value:
{this, "TimeMinForAmpCorrection", -12.5,
"Correct amplitude if time is above time min threshold"}

Definition at line 154 of file TileRawChannelBuilder.h.

154 {this, "TimeMinForAmpCorrection", -12.5,
155 "Correct amplitude if time is above time min threshold"};

◆ m_trigType

int TileRawChannelBuilder::m_trigType {0}
protectedinherited

Definition at line 190 of file TileRawChannelBuilder.h.

190{0};

◆ m_useDSP

Gaudi::Property<bool> TileRawChannelBuilder::m_useDSP {this, "UseDSPCorrection", true, "Use DSP noise correction for incomplete containers"}
protectedinherited

Definition at line 149 of file TileRawChannelBuilder.h.

149{this, "UseDSPCorrection", true, "Use DSP noise correction for incomplete containers"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ MAX_CHANNELS

const int TileRawChannelBuilder::MAX_CHANNELS = 48
staticprotectedinherited

Definition at line 209 of file TileRawChannelBuilder.h.

◆ MAX_DMUS

const int TileRawChannelBuilder::MAX_DMUS = 16
staticprotectedinherited

Definition at line 210 of file TileRawChannelBuilder.h.


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