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

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

#include <TileRawChannelBuilderWienerFilter.h>

Inheritance diagram for TileRawChannelBuilderWienerFilter:
Collaboration diagram for TileRawChannelBuilderWienerFilter:

Public Member Functions

 TileRawChannelBuilderWienerFilter (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
 ~TileRawChannelBuilderWienerFilter ()
 Destructor.
virtual StatusCode initialize () override
 Initialize method.
virtual StatusCode finalize () override
 Finalize method.
virtual TileRawChannel * rawChannel (const TileDigits *digits, const EventContext &ctx) override
 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)
 Computes A,time,ped using OF.
double compute (int ros, int drawer, int channel, int gain, double &pedestal, double &amplitude, double &time, double &phase)
 Gets the BCID index within the train.
int getBCIDIndex (const EventContext &ctx)
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< TileCondToolNoiseSample > m_tileToolNoiseSample
SG::ReadCondHandleKey< BunchCrossingCondData > m_bunchCrossingKey
 Tool to get distance into bunch train.
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_isMC {this, "MC", false, "MC: true => MC; false => data"}
 bool variable for MC: true=> MC; false=> data
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
double m_maxTime
 max allowed time = 25*(m_nSamples-1)/2
double m_minTime
 min allowed time = -25*(m_nSamples-1)/2
const TileWienerFilterWeightsStruct * m_weights
 structure for Wiener Filter weights
std::vector< float > m_digits
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 Wiener Filter. 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-PROC-2019-002 note. Two different versions of the algorithms are currently used: Wiener Optimal (with uses seven sets of weights, optimized for the first three, the middle and the last three BCIDs in the train) and Wiener General (one set of weights for all BCIDs).

Definition at line 48 of file TileRawChannelBuilderWienerFilter.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

◆ TileRawChannelBuilderWienerFilter()

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

Constructor.

Definition at line 42 of file TileRawChannelBuilderWienerFilter.cxx.

44 : TileRawChannelBuilder(type, name, parent)
45 , m_nSignal(0)
46 , m_nNegative(0)
47 , m_nCenter(0)
48 , m_nConst(0)
49 , m_nSamples(0)
51 , m_maxTime(0.0)
52 , m_minTime(0.0)
53 , m_weights(0)
54{
55 //declare interfaces
56 declareInterface< TileRawChannelBuilder >( this );
57 declareInterface< TileRawChannelBuilderWienerFilter >(this);
58
59 m_rawChannelContainerKey = "TileRawChannelWiener";
60}
double m_maxTime
max allowed time = 25*(m_nSamples-1)/2
const TileWienerFilterWeightsStruct * m_weights
structure for Wiener Filter weights
double m_minTime
min allowed time = -25*(m_nSamples-1)/2
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.

◆ ~TileRawChannelBuilderWienerFilter()

TileRawChannelBuilderWienerFilter::~TileRawChannelBuilderWienerFilter ( )

Destructor.

Definition at line 63 of file TileRawChannelBuilderWienerFilter.cxx.

63 {
64}

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 TileRawChannelBuilderWienerFilter::compute ( int ros,
int drawer,
int channel,
int gain,
double & pedestal,
double & amplitude,
double & time,
double & phase )
private

Gets the BCID index within the train.

Definition at line 398 of file TileRawChannelBuilderWienerFilter.cxx.

399 {
400
401 ATH_MSG_VERBOSE( "compute();"
402 << " ros=" << ros
403 << " drawer=" << drawer
404 << " channel=" << channel
405 << " gain=" << gain
406 << " pedestal=" << pedestal
407 << " amplitude=" << amplitude
408 << " time=" << time
409 << " phase=" << phase );
410
411 double chi2 = 0.;
412 return chi2;
413}
double chi2(TH1 *h0, TH1 *h1)

◆ 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 TileRawChannelBuilderWienerFilter::filter ( int ros,
int drawer,
int channel,
int & gain,
double & pedestal,
double & amplitude,
double & time,
const EventContext & ctx )
private

Definition at line 340 of file TileRawChannelBuilderWienerFilter.cxx.

341 {
342
343 ATH_MSG_VERBOSE( "filter()" );
344
345 amplitude = 0.;
346 time = 0.;
347 double chi2 = 0.;
348
349 auto minMaxDigits = std::minmax_element(m_digits.begin(), m_digits.end());
350 float minDigit = *minMaxDigits.first;
351 float maxDigit = *minMaxDigits.second;
352
353 if (maxDigit - minDigit < 0.01) { // constant value in all samples
354
355 pedestal = minDigit;
356 chi2 = 0.;
357 ATH_MSG_VERBOSE( "CASE NO SIGNAL: maxdig-mindig = " << maxDigit << "-" << minDigit
358 << " = " << maxDigit - minDigit );
359
360 m_nConst++;
361
362 } else {
363 double weights[8];
364 memset(weights, 0, sizeof(weights));
365
366 int bcidIndex = getBCIDIndex(ctx);
367
368 // check if it is E3 or E4 cells and if the BCID is available
369 if (ros > 2 && (channel == 0 || channel == 1) && bcidIndex > -1) {
370 ATH_MSG_VERBOSE( "Switch to optimal weights");
371 for (unsigned int i = 0; i < 8; i++) {
372 weights[i] = m_weights->optimalWeights[bcidIndex][i];
373 }
374 } else {
375 ATH_MSG_VERBOSE( "Switch to general weights");
376 for (unsigned int i = 0; i < 8; i++) {
377 weights[i] = m_weights->generalWeights[ros-1][channel][i];
378 }
379 }
380
381 // apply filter
382 for (unsigned int i = 0; i < m_digits.size(); i++) {
383 amplitude += weights[i] * m_digits[i]; // Wiener coefs
384 }
385 amplitude += weights[7]; // Wiener bias
386
387 double phase = 0.;
388 pedestal = getPedestal(ros, drawer, channel, gain, ctx);
389
390 chi2 = compute(ros, drawer, channel, gain, pedestal, amplitude, time, phase);
391
392 m_nSignal++;
393 }
394
395 return chi2;
396}
float getPedestal(int ros, int drawer, int channel, int gain, 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)
Gets the BCID index within the train.
time(flags, cells_name, *args, **kw)

◆ finalize()

StatusCode TileRawChannelBuilderWienerFilter::finalize ( )
overridevirtual

Finalize method.

Reimplemented from TileRawChannelBuilder.

Definition at line 142 of file TileRawChannelBuilderWienerFilter.cxx.

142 {
143
144 if (msgLvl(MSG::VERBOSE)) {
145 msg(MSG::VERBOSE) << "Counters: Signal=" << m_nSignal
146 << " Constant=" << m_nConst
147 << " Total=" << m_nSignal + m_nConst << endmsg;
148 }
149
150 ATH_MSG_DEBUG( "Finalizing" );
151
152 return StatusCode::SUCCESS;
153}
MsgStream & msg
Definition testRead.cxx:32

◆ findMaxDigitPosition()

int TileRawChannelBuilderWienerFilter::findMaxDigitPosition ( )
private

Finds maximum digit position in the pulse.

Gets pedestal estimation for OF1

Definition at line 232 of file TileRawChannelBuilderWienerFilter.cxx.

232 {
233
234 ATH_MSG_VERBOSE( " findMaxDigitPosition()" );
235
236 int iMaxDigit = 0;
237 float maxDigit = 0.;
238 bool saturated = false;
239
240 for (unsigned int i = 0; i < m_digits.size(); i++) {
241 if (m_digits[i] > 1022.99) saturated = true;
242 if (maxDigit < m_digits[i]) {
243 maxDigit = m_digits[i];
244 iMaxDigit = i;
245 }
246 }
247
248 if (msgLvl(MSG::VERBOSE)) {
249 for (unsigned int i = 0; i < m_digits.size(); i++) {
250 msg(MSG::VERBOSE) << " " << m_digits[i];
251 }
252
253 msg(MSG::VERBOSE) << "; Max: digit[" << iMaxDigit << "]=" << maxDigit << endmsg;
254
255 if (saturated) msg(MSG::VERBOSE) << " Samples saturated" << endmsg;
256 }
257
258 return iMaxDigit;
259}
setScaleOne setStatusOne saturated

◆ getBCIDIndex()

int TileRawChannelBuilderWienerFilter::getBCIDIndex ( const EventContext & ctx)
private

Definition at line 301 of file TileRawChannelBuilderWienerFilter.cxx.

301 {
302 int bcidIndex = -1;
303
304 const xAOD::EventInfo* eventInfo(0);
305
306 if (evtStore()->retrieve(eventInfo).isSuccess()) {
307 SG::ReadCondHandle<BunchCrossingCondData> bcData(m_bunchCrossingKey, ctx);
308 if (bcData.isValid()) {
309 const int bcid = eventInfo->bcid();
310 const int distFront = bcData->distanceFromFront(bcid, BunchCrossingCondData::BunchDistanceType::BunchCrossings);
311 const int distTail = bcData->distanceFromTail(bcid, BunchCrossingCondData::BunchDistanceType::BunchCrossings);
312
313 ATH_MSG_VERBOSE( "EventInfo loaded: "
314 << " BCID=" << bcid
315 << " DistFront=" << distFront
316 << " DistTail=" << distTail);
317
318 if (distFront == -1 || distTail == -1) {
319 bcidIndex = -1;
320 } else if (distFront < 3 && distTail > distFront) {
321 bcidIndex = distFront;
322 } else if (distTail < 3 && distTail < distFront) {
323 bcidIndex = 6 - distTail;
324 } else {
325 bcidIndex = 3;
326 }
327 } else {
328 ATH_MSG_VERBOSE("BunchCrossingCondData not available");
329 }
330 } else {
331 ATH_MSG_VERBOSE("EventInfo not available");
332 }
333
334 ATH_MSG_VERBOSE("getBCIDIndex(): bcidIndex=" << bcidIndex);
335
336 return bcidIndex;
337}
ServiceHandle< StoreGateSvc > & evtStore()
@ BunchCrossings
Distance in units of 25 nanoseconds.
SG::ReadCondHandleKey< BunchCrossingCondData > m_bunchCrossingKey
Tool to get distance into bunch train.
EventInfo_v1 EventInfo
Definition of the latest event info version.
setEventNumber setTimeStamp bcid

◆ getOverflowedChannels()

Overflows_t & TileRawChannelBuilder::getOverflowedChannels ( void )
inherited

Definition at line 37 of file TileRawChannelBuilder.cxx.

37 {
38 return m_overflows;
39}

◆ getPedestal()

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

Computes A,time,ped using OF.

If iterations are required, the Iterator method is used

Definition at line 262 of file TileRawChannelBuilderWienerFilter.cxx.

262 {
263 float pedestal = 0.;
264
265 switch (m_pedestalMode.value()) {
266 case -1:
267 // use pedestal from conditions DB
268 pedestal = m_tileToolNoiseSample->getPed(TileCalibUtils::getDrawerIdx(ros, drawer), channel, gain, TileRawChannelUnit::ADCcounts, ctx);
269 break;
270 case 7:
271 pedestal = m_digits[6];
272 break;
273 case 9:
274 pedestal = m_digits[8];
275 break;
276 case 12:
277 pedestal = .5 * (m_digits[0] + m_digits[1]);
278 break;
279 case 17:
280 pedestal = .5 * (m_digits[0] + m_digits[6]);
281 break;
282 case 19:
283 pedestal = .5 * (m_digits[0] + m_digits[8]);
284 break;
285 case 71:
286 pedestal = std::min(m_digits[0], m_digits[6]);
287 break;
288 case 7621:
289 pedestal = 0.5 * std::min(m_digits[0] + m_digits[1], m_digits[5] + m_digits[6]);
290 break;
291 default:
292 pedestal = m_digits[0];
293 break;
294 }
295
296 ATH_MSG_VERBOSE("getPedestal(): pedestal=" << pedestal);
297
298 return pedestal;
299}
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
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 TileRawChannelBuilderWienerFilter::initialize ( )
overridevirtual

Initialize method.

Reimplemented from TileRawChannelBuilder.

Definition at line 66 of file TileRawChannelBuilderWienerFilter.cxx.

66 {
67
68 ATH_MSG_INFO( "initialize()" );
69
70 m_rChType = TileFragHash::WienerFilterOffline; // type for offline Wiener Filter
71
72 // init in superclass
74
75 // get pointer to weights (loaded by the InfoLoader in TileInfo, from TileWienerFilterWeights)
76 m_weights = m_tileInfo->getWienerFilterWeights();
77 ATH_MSG_DEBUG( "Weights loaded" );
78
79 if (m_maxIterations != 1) m_correctTimeNI = false;
80
81 // bits 12-15 - various options
82 // if (m_correctTimeNI) m_bsflags |= 0x1000;
83 if (m_correctAmplitude) m_bsflags |= 0x2000;
84 if (m_maxIterations > 1) m_bsflags |= 0x4000;
85 if (m_bestPhase) m_bsflags |= 0x8000;
86
87 ATH_MSG_DEBUG( " MaxIterations=" << m_maxIterations.value()
88 << " PedestalMode=" << m_pedestalMode.value()
89 << " TimeForConvergence=" << m_timeForConvergence.value()
90 << " ConfTB=" << m_confTB.value()
91 << " Minus1Iteration=" << m_minus1Iter.value()
92 << " AmplitudeCorrection=" << m_correctAmplitude.value()
93 << " TimeCorrection=" << m_correctTimeNI.value()
94 << " Best Phase " << m_bestPhase.value() );
95
96 m_nSamples = m_tileInfo->NdigitSamples();
97 m_t0SamplePosition = m_tileInfo->ItrigSample();
100 ATH_MSG_DEBUG(" NSamples=" << m_nSamples
101 << " T0Sample=" << m_t0SamplePosition
102 << " minTime=" << m_minTime
103 << " maxTime=" << m_maxTime );
104
105 if (m_pedestalMode % 10 > 2 && m_nSamples != m_pedestalMode % 10) {
106 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Changing PedestalMode from " << m_pedestalMode.value();
108 if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << " to " << m_pedestalMode.value() << endmsg;
109 }
110
111 if (m_nSamples != 7 && (m_pedestalMode == 71 || m_pedestalMode == 7621)) {
112 ATH_MSG_ERROR( "Incompatable pedestal mode [" << m_pedestalMode.value()
113 << "] and number of samples [" << m_nSamples << "]" );
114 return StatusCode::FAILURE;
115 }
116
117 m_nSignal = 0;
118 m_nNegative = 0;
119 m_nCenter = 0;
120 m_nConst = 0;
121
122 //=== get TileCondToolNoiseSample
123 ATH_CHECK( m_tileToolNoiseSample.retrieve() );
124
125 if (m_bestPhase) {
126 //=== get TileToolTiming
127 // TileToolTiming can be disabled in the TileRawChannelBuilder
128 if (!m_tileToolTiming.isEnabled()) {
129 m_tileToolTiming.enable();
130 }
131 ATH_CHECK( m_tileToolTiming.retrieve() );
132 }
133
134 //=== get BunchCrossingCondData
135 ATH_CHECK( m_bunchCrossingKey.initialize() );
136
137 ATH_MSG_INFO( "initialization completed" );
138
139 return StatusCode::SUCCESS;
140}
#define ATH_MSG_INFO(x,...)
Gaudi::Property< bool > m_correctTimeNI
If true, resulting time is corrected when using method without iteration.
Gaudi::Property< int > m_maxIterations
maximum number of iteration to perform
Gaudi::Property< bool > m_minus1Iter
bool variable for whether to apply -1 iteration (initial phase guess)
Gaudi::Property< double > m_timeForConvergence
minimum time difference to quit iteration procedure
Gaudi::Property< bool > m_correctAmplitude
If true, resulting amplitude is corrected when using weights for tau=0 without iteration.
Gaudi::Property< bool > m_confTB
use testbeam configuration
ToolHandle< TileCondToolTiming > m_tileToolTiming
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 & TileRawChannelBuilderWienerFilter::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 35 of file TileRawChannelBuilderWienerFilter.cxx.

35 {
37}
static const InterfaceID IID_ITileRawChannelBuilderWienerFilter("TileRawChannelBuilderWienerFilter", 1, 0)

◆ 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 }

◆ 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 * TileRawChannelBuilderWienerFilter::rawChannel ( const TileDigits * digits,
const EventContext & ctx )
overridevirtual

Builder virtual method to be implemented by subclasses.

Parameters
digitsPointer to TileDigitsContainer

Reimplemented from TileRawChannelBuilder.

Definition at line 156 of file TileRawChannelBuilderWienerFilter.cxx.

156 {
157
158 ++m_chCounter;
159
160 double pedestal = 0.;
161 double energy = 0.;
162 double time = 0.;
163 double chi2 = 0.;
164 m_digits = digits->samples();
165 m_digits.erase(m_digits.begin(),m_digits.begin()+m_firstSample);
166 m_digits.resize(m_nSamples);
167 const HWIdentifier adcId = digits->adc_HWID();
168 int gain = m_tileHWID->adc(adcId);
169
170 ATH_MSG_VERBOSE( "Building Raw Channel, with WienerFilter, HWID:" << m_tileHWID->to_string(adcId)
171 << " gain=" << gain );
172
173 int ros = m_tileHWID->ros(adcId);
174 int drawer = m_tileHWID->drawer(adcId);
175 int channel = m_tileHWID->channel(adcId);
176
177 chi2 = filter(ros, drawer, channel, gain, pedestal, energy, time, ctx);
178
179 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
180
181 if (m_calibrateEnergy) {
182 energy = m_tileToolEmscale->doCalibCis(drawerIdx, channel, gain, energy);
183 }
184
185 if (msgLvl(MSG::VERBOSE)) {
186 msg(MSG::VERBOSE) << "Creating WienerFilter RawChannel"
187 << " a=" << energy
188 << " t=" << time
189 << " ped=" << pedestal
190 << " q=" << chi2 << endmsg;
191
192 msg(MSG::VERBOSE) << "digits:";
193
194 for (unsigned int i = 0; i < m_digits.size(); ++i)
195 msg(MSG::VERBOSE) << " " << m_digits[i];
196
197 msg(MSG::VERBOSE) << " " << endmsg;
198 }
199
200 DataPool<TileRawChannel> tileRchPool(m_dataPoollSize);
201 TileRawChannel *rawCh = tileRchPool.nextElementPtr();
202 rawCh->assign (adcId,
203 energy,
204 time,
205 chi2,
206 pedestal);
207
208 if (m_correctTime
209 && (time != 0
210 && time < m_maxTime
211 && time > m_minTime)) {
212
213 time -= m_tileToolTiming->getSignalPhase(drawerIdx, channel, gain);
214 rawCh->insertTime(time);
215
216 ATH_MSG_VERBOSE( "Correcting time, new time=" << rawCh->time() );
217
218 }
219
220 if (TileID::HIGHGAIN == gain) {
221 ++m_nChH;
222 m_RChSumH += energy;
223 } else {
224 ++m_nChL;
225 m_RChSumL += energy;
226 }
227
228 return rawCh;
229}
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> TileRawChannelBuilderWienerFilter::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 98 of file TileRawChannelBuilderWienerFilter.h.

98 {this, "BestPhase", false,
99 "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_bunchCrossingKey

SG::ReadCondHandleKey<BunchCrossingCondData> TileRawChannelBuilderWienerFilter::m_bunchCrossingKey
private
Initial value:
{this,
"BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"}

Tool to get distance into bunch train.

Applies OF algorithm

Definition at line 72 of file TileRawChannelBuilderWienerFilter.h.

72 {this,
73 "BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"};

◆ 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> TileRawChannelBuilderWienerFilter::m_confTB {this, "ConfTB", false, "Use testbeam configuration"}
private

use testbeam configuration

Definition at line 87 of file TileRawChannelBuilderWienerFilter.h.

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

◆ m_correctAmplitude

Gaudi::Property<bool> TileRawChannelBuilderWienerFilter::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 93 of file TileRawChannelBuilderWienerFilter.h.

93 {this, "AmplitudeCorrection", false,
94 "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> TileRawChannelBuilderWienerFilter::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 95 of file TileRawChannelBuilderWienerFilter.h.

95 {this, "TimeCorrection", false,
96 "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> TileRawChannelBuilderWienerFilter::m_digits
private

Definition at line 113 of file TileRawChannelBuilderWienerFilter.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> TileRawChannelBuilderWienerFilter::m_emulateDsp {this, "EmulateDSP", false, "Emulate DSP reconstruction algorithm"}
private

Definition at line 100 of file TileRawChannelBuilderWienerFilter.h.

100{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_isMC

Gaudi::Property<bool> TileRawChannelBuilderWienerFilter::m_isMC {this, "MC", false, "MC: true => MC; false => data"}
private

bool variable for MC: true=> MC; false=> data

Definition at line 90 of file TileRawChannelBuilderWienerFilter.h.

90{this, "MC", false, "MC: true => MC; false => data"};

◆ m_lastDrawer

int TileRawChannelBuilder::m_lastDrawer {-1}
protectedinherited

Definition at line 212 of file TileRawChannelBuilder.h.

212{-1};

◆ m_maxIterations

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

maximum number of iteration to perform

Definition at line 85 of file TileRawChannelBuilderWienerFilter.h.

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

◆ m_maxTime

double TileRawChannelBuilderWienerFilter::m_maxTime
private

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

Definition at line 108 of file TileRawChannelBuilderWienerFilter.h.

◆ m_minTime

double TileRawChannelBuilderWienerFilter::m_minTime
private

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

Definition at line 109 of file TileRawChannelBuilderWienerFilter.h.

◆ m_minus1Iter

Gaudi::Property<bool> TileRawChannelBuilderWienerFilter::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 91 of file TileRawChannelBuilderWienerFilter.h.

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

◆ m_nCenter

int TileRawChannelBuilderWienerFilter::m_nCenter
private

internal counters

Definition at line 103 of file TileRawChannelBuilderWienerFilter.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 TileRawChannelBuilderWienerFilter::m_nConst
private

internal counters

Definition at line 104 of file TileRawChannelBuilderWienerFilter.h.

◆ m_nNegative

int TileRawChannelBuilderWienerFilter::m_nNegative
private

internal counters

Definition at line 102 of file TileRawChannelBuilderWienerFilter.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_notUpgradeCabling

bool TileRawChannelBuilder::m_notUpgradeCabling {true}
protectedinherited

Definition at line 215 of file TileRawChannelBuilder.h.

215{true};

◆ m_nSamples

int TileRawChannelBuilderWienerFilter::m_nSamples
private

number of samples in the data

Definition at line 106 of file TileRawChannelBuilderWienerFilter.h.

◆ m_nSignal

int TileRawChannelBuilderWienerFilter::m_nSignal
private

internal counters

Definition at line 101 of file TileRawChannelBuilderWienerFilter.h.

◆ m_overflows

Overflows_t TileRawChannelBuilder::m_overflows
protectedinherited

Definition at line 206 of file TileRawChannelBuilder.h.

◆ m_pedestalMode

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

pedestal mode to use

Definition at line 86 of file TileRawChannelBuilderWienerFilter.h.

86{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 TileRawChannelBuilderWienerFilter::m_t0SamplePosition
private

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

Definition at line 107 of file TileRawChannelBuilderWienerFilter.h.

◆ 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> TileRawChannelBuilderWienerFilter::m_tileToolNoiseSample
private
Initial value:
{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile noise sample tool"}

Definition at line 69 of file TileRawChannelBuilderWienerFilter.h.

69 {this,
70 "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> TileRawChannelBuilderWienerFilter::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 88 of file TileRawChannelBuilderWienerFilter.h.

88 {this, "TimeForConvergence", 0.5,
89 "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.

◆ m_weights

const TileWienerFilterWeightsStruct* TileRawChannelBuilderWienerFilter::m_weights
private

structure for Wiener Filter weights

Definition at line 111 of file TileRawChannelBuilderWienerFilter.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: