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

#include <TileRawChannelBuilderFlatFilter.h>

Inheritance diagram for TileRawChannelBuilderFlatFilter:
Collaboration diagram for TileRawChannelBuilderFlatFilter:

Public Member Functions

 TileRawChannelBuilderFlatFilter (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor.
 ~TileRawChannelBuilderFlatFilter ()
 Destructor.
virtual StatusCode initialize ()
 Initializer.
virtual StatusCode finalize ()
virtual TileRawChannel * rawChannel (const TileDigits *digits, const EventContext &ctx)
 Builder virtual method to be implemented by subclasses.
void flatFilter (const std::vector< uint32_t > &digits, const int gain, double &amplitude, double &time) const
 Filter given digits using FlatFilter method.
void flatFilter (const std::vector< float > &digits, const int gain, double &amplitude, double &time) const
 Filter given digits using FlatFilter method.
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

bool isSignalInFrame (const std::vector< float > &digits, double deltaCut, double rmsCut, int &frameMax, int &frameMin, double &frameMean, double &frameRMS) const
 Find min and max sample Calculate mean and RMS of all samples.
double getPedestal (const std::vector< float > &digits, int pedStart, int pedLgt) const
 Calculate pedestal as mean of <pedLgt> samples starting from <pedStart>.
int getMaxAdder (const std::vector< float > &digits, int filterLength, int signalStart, int signalLength, int &tMax, int &tMaxFrame, int &adderFrame) const
 Get position of maximal adder (sum of <filterLength> samples) in whole frame and in signal window (<signalStart>-><signalStart>+<signalLength> Return position and value of maximal adder in frame.
int getMaxSample (const std::vector< float > &digits, int signalStart, int signalLength, int &tMax, int &tMaxFrame, int &sampleFrame) const
double calculatePeak (const std::vector< float > &digits, int peakPos, double ped, double &position) const
double calculateFlatFilter (const std::vector< float > &digits, int filterStart, int filterLength, double ped, double &position) const
 Calculate energy using flat filter Sum of <filterLength> samples starting at <filterStart> Requires pedestal value and returns position of peak.
double getTime (const std::vector< float > &digits, int signalStart, int signalLength, double ped) const
 Calculate the time of signal in window of <signalLength> starting at <signalStart> Result is sum of time for every sample weighted with amplitude and divided by sum of times.
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

Gaudi::Property< int > m_pedStart {this, "PedStart", 0, "Start of pedestal window"}
Gaudi::Property< int > m_pedLength {this, "PedLength", 1, "Length of pedestal window"}
Gaudi::Property< int > m_pedOffset {this, "PedOffset", 0, "If > 0 ped can be taken after signal as well"}
Gaudi::Property< int > m_signalStart {this, "SignalStart", 1, "Start of signal window"}
Gaudi::Property< int > m_signalLength {this, "SignalLength", 8, "Length of signal window"}
Gaudi::Property< int > m_filterLength {this, "FilterLength", 5, "Filter length"}
Gaudi::Property< int > m_frameLength {this, "FrameLength", 9, "Frame length (number of samples)"}
Gaudi::Property< double > m_deltaCutLo {this, "DeltaCutLo", 4.5, "Cut for signalInFrame, low gain"}
Gaudi::Property< double > m_deltaCutHi {this, "DeltaCutHi", 8.5, "Cut for signalInFrame, high gain"}
Gaudi::Property< double > m_rmsCutLo {this, "RMSCutLo", 1.0, "RMS cut for signalInFrame, low gain"}
Gaudi::Property< double > m_rmsCutHi {this, "RMSCutHi", 2.5, "RMS cut for signalInFrame, high 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

Definition at line 39 of file TileRawChannelBuilderFlatFilter.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

◆ TileRawChannelBuilderFlatFilter()

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

Constructor.

Definition at line 41 of file TileRawChannelBuilderFlatFilter.cxx.

43 : TileRawChannelBuilder(type, name, parent)
44{
45 //declare interfaces
46 declareInterface< TileRawChannelBuilder >( this );
47 declareInterface< TileRawChannelBuilderFlatFilter >(this);
48
49 m_rawChannelContainerKey = "TileRawChannelFlat";
50}
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
TileRawChannelBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.

◆ ~TileRawChannelBuilderFlatFilter()

TileRawChannelBuilderFlatFilter::~TileRawChannelBuilderFlatFilter ( )

Destructor.

Definition at line 55 of file TileRawChannelBuilderFlatFilter.cxx.

55 {
56}

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

◆ calculateFlatFilter()

double TileRawChannelBuilderFlatFilter::calculateFlatFilter ( const std::vector< float > & digits,
int filterStart,
int filterLength,
double ped,
double & position ) const
private

Calculate energy using flat filter Sum of <filterLength> samples starting at <filterStart> Requires pedestal value and returns position of peak.

Parameters
digitsVector of didits(double>
filterStartStart position for filter
filterLengthNumber of samples
pedPedestal value
positionStorage place for position of peak
Returns
Energy

Definition at line 402 of file TileRawChannelBuilderFlatFilter.cxx.

403 {
404
405 int t, sum = 0;
406 double energy;
407
409 ATH_MSG_VERBOSE( "Calc flat filter Filter: " << filterStart
410 << "->" << (filterStart + filterLength)
411 << " pedestal=" << ped );
412 }
413
414 // calculate sum of filter_length samples
415 for (t = filterStart; t < filterStart+filterLength; ++t)
416 sum += (int)digits.at(t);
417
418 // subtract pedestal
419 energy = (double)sum - ped * filterLength;
420
421 // calculate center of the filter and convert to nanoseconds
422 position = (filterStart + (filterLength-1)/2.) * 25.;
423
425 ATH_MSG_VERBOSE( "Flat amplitude=" << energy
426 << " position=" << position );
427 }
428
429 return(energy);
430}
#define ATH_MSG_VERBOSE(x,...)
#define TILE_FLATFILTERBUILDERVERBOSE
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.

◆ calculatePeak()

double TileRawChannelBuilderFlatFilter::calculatePeak ( const std::vector< float > & digits,
int peakPos,
double ped,
double & position ) const
private

Definition at line 346 of file TileRawChannelBuilderFlatFilter.cxx.

347 {
348
349 int y_1, y0, y1;
350 double peak, tmax, A, B, C;
351
353 ATH_MSG_VERBOSE( "Calculating peak, Pos " << peakPos
354 << " Pedestal " << ped );
355 }
356
357 if ((peakPos == 0) || (peakPos == m_frameLength - 1)) {
358 // peak at the boundary
359 tmax = peakPos;
360 peak = digits.at(peakPos);
361 } else {
362 // let's say that "peak_pos" is X=0 point
363 y_1 = (int) digits.at(peakPos - 1); // ordinate at X=-1
364 y0 = (int) digits.at(peakPos); // ordinate at X=0
365 y1 = (int) digits.at(peakPos + 1); // ordinate at X=1
366
367 // coefficients A,B,C of Y(x) = A*x^2 + B*x + C
368 C = y0;
369 B = (y1 - y_1) / 2.;
370 A = y1 - B - C;
371
372 if (A < 0.0) {
373 // amplitude at peak_pos is local maximim
374 tmax = peakPos - B / (A * 2.);
375 peak = C - B * B / (A * 4.);
376 }
377 else if ( y_1 == y0 && y0 == y1 ) {
378 // flat distribution, no peak at all
379 tmax = peakPos;
380 peak = y0;
381 }
382 else {
383 // there is no local maximim
384 // phase has negative sign to indicate that,
385 // peak is amplitude at peak_pos
386 tmax = -peakPos;
387 peak = y0;
388 }
389 }
390
391 // subtract pedestal
392 peak -= ped;
393 // convert to nanoseconds
394 position = tmax * 25.;
395
397 ATH_MSG_VERBOSE( "Found Peak " << peak << " at " << position );
398
399 return (peak);
400}
struct color C

◆ 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,...)
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

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

◆ finalize()

StatusCode TileRawChannelBuilderFlatFilter::finalize ( )
virtual

Reimplemented from TileRawChannelBuilder.

Definition at line 73 of file TileRawChannelBuilderFlatFilter.cxx.

73 {
74
75 ATH_MSG_DEBUG( "Finalizing" );
76 return StatusCode::SUCCESS;
77}

◆ flatFilter() [1/2]

void TileRawChannelBuilderFlatFilter::flatFilter ( const std::vector< float > & digits,
const int gain,
double & amplitude,
double & time ) const

Filter given digits using FlatFilter method.

Parameters
digitsas vector of double
amplitude
time

Definition at line 467 of file TileRawChannelBuilderFlatFilter.cxx.

468 {
469
470 int frameMax = 0;
471 int frameMin = 0;
472 double frameMean = 0.0;
473 double frameRMS = 0.0;
474 bool signal = false;
475 double pedestal = 0.0;
476
477 //int adderMax = 0; // maximum of adder
478 int tAdder = 0; // time for adder
479 int tAdderFrame = 0;
480 int adderMaxFrame = 0;
481
482 //int sampleMax = 0;
483 int tSample = 0;
484 int tSampleFrame = 0;
485 int sampleMaxFrame = 0;
486
487 //double peakAmplitude;
488 //double peakEnergy;
489 //double peakTime;
490 //double flatEnergy;
491
492 double flatFilter; // non calibrated energy from flat filter
493 double flatTime;
494
495 if (msgLvl(MSG::VERBOSE)) {
496 msg(MSG::VERBOSE) << "Digits." << samples.size() << " {";
497 for (unsigned i = 0; i < samples.size(); i++) {
498 msg(MSG::VERBOSE) << samples[i] << " ";
499 }
500 msg(MSG::VERBOSE) << "}" << endmsg;
501 }
502
503 // check if signal in frame
504 signal = isSignalInFrame(samples,
505 (gain % 2) ? m_deltaCutHi : m_deltaCutLo,
506 (gain % 2) ? m_rmsCutHi : m_rmsCutLo,
507 frameMax, frameMin, frameMean, frameRMS);
508
509 if (signal && (m_pedOffset < 0)) {
510 // take pedestal before signal
511 // and if number of samples before signal is not enough -
512 // use samples at the end of the frame
513 pedestal = getPedestal(samples, tAdder + m_pedOffset, -m_pedLength);
514 } else {
515 // fixed position of pedestal window for channel without signal
516 pedestal = getPedestal(samples, m_pedStart, m_pedLength);
517 }
518
519 //------------------ Flat Filter ---------------
521 , tAdder , tAdderFrame, adderMaxFrame);
522
523 // look for max. sample inside maxAdder
524 /*sampleMax =*/getMaxSample(samples, tAdder, m_filterLength, tSample
525 , tSampleFrame, sampleMaxFrame);
526
527 // position of the peak is always in the signal window even if
528 // real maximum is outside signal window
529 //peakAmplitude = calculatePeak (samples, tSample, pedestal, peakTime);
530 //peakEnergy = calibrateCSL(calibratePeak(peakAmplitude, adcId), adcId);
531
532 // flat filter method
533 // position of the filter is always in the signal window even if
534 // real maximum is outside signal window
535 flatFilter = calculateFlatFilter(samples, tAdder, m_filterLength, pedestal, flatTime);
536
537 //ZZZ: No calibration at all!
538 //flatEnergy = calibrateCSL(calibrateFlatFilter(flatFilter,adcId),adcId);
539
540 // calculate time of the signal as weighted sum of all samples in signal window
541 time = getTime(samples, m_signalStart, m_signalLength, pedestal);
542 if (time <= 0.0) time = -flatTime;
543
544 amplitude = flatFilter;
545}
double calculateFlatFilter(const std::vector< float > &digits, int filterStart, int filterLength, double ped, double &position) const
Calculate energy using flat filter Sum of <filterLength> samples starting at <filterStart> Requires p...
double getTime(const std::vector< float > &digits, int signalStart, int signalLength, double ped) const
Calculate the time of signal in window of <signalLength> starting at <signalStart> Result is sum of t...
bool isSignalInFrame(const std::vector< float > &digits, double deltaCut, double rmsCut, int &frameMax, int &frameMin, double &frameMean, double &frameRMS) const
Find min and max sample Calculate mean and RMS of all samples.
int getMaxSample(const std::vector< float > &digits, int signalStart, int signalLength, int &tMax, int &tMaxFrame, int &sampleFrame) const
int getMaxAdder(const std::vector< float > &digits, int filterLength, int signalStart, int signalLength, int &tMax, int &tMaxFrame, int &adderFrame) const
Get position of maximal adder (sum of <filterLength> samples) in whole frame and in signal window (<s...
double getPedestal(const std::vector< float > &digits, int pedStart, int pedLgt) const
Calculate pedestal as mean of <pedLgt> samples starting from <pedStart>.
void flatFilter(const std::vector< uint32_t > &digits, const int gain, double &amplitude, double &time) const
Filter given digits using FlatFilter method.
time(flags, cells_name, *args, **kw)
tSample
Definition master.py:51
MsgStream & msg
Definition testRead.cxx:32

◆ flatFilter() [2/2]

void TileRawChannelBuilderFlatFilter::flatFilter ( const std::vector< uint32_t > & digits,
const int gain,
double & amplitude,
double & time ) const

Filter given digits using FlatFilter method.

Parameters
digitsas vector of unsigned 32 bit integers
amplitude
time

Definition at line 547 of file TileRawChannelBuilderFlatFilter.cxx.

548 {
549
550 std::vector<float> dVec;
551
553 ATH_MSG_VERBOSE( "TileRawChannelBuilderFlatFilter - Invoked with vector<int>..");
554
555 dVec.reserve(digits.size());
556 for (uint32_t i = 0; i < digits.size(); i++) {
557 dVec.push_back((float) digits[i]);
558 }
559 return flatFilter(dVec, gain, amplitude, time);
560}

◆ getMaxAdder()

int TileRawChannelBuilderFlatFilter::getMaxAdder ( const std::vector< float > & digits,
int filterLength,
int signalStart,
int signalLength,
int & tMax,
int & tMaxFrame,
int & adderFrame ) const
private

Get position of maximal adder (sum of <filterLength> samples) in whole frame and in signal window (<signalStart>-><signalStart>+<signalLength> Return position and value of maximal adder in frame.

Parameters
digitsVector if digits(double)
filterLength
signalStartStart of signal window
signalLengthLength of signal window
returnPosition of max adder

Definition at line 204 of file TileRawChannelBuilderFlatFilter.cxx.

206 {
207 int i, t, minW, maxW, adder, adderWindow;
208 int tm=0, maxAdder=-1;
209
211 ATH_MSG_VERBOSE( "Getting adder flgt " << filterLength
212 << " Signal " << signalStart
213 << "->" << (signalStart + signalLength) );
214 }
215
216 // left and right limits for signal window
217 minW = signalStart;
218 maxW = signalStart + signalLength - filterLength + 1;
219
220 // max adder inside signal window
221 for (t = minW; t < maxW; ++t) {
222 adder = 0;
223 // sum of all samples in window
224 for (i = t; i < t+filterLength; ++i) adder += (int)digits.at(i);
225 // store maximum
226 if ( adder > maxAdder ) {
227 tm = t;
228 maxAdder = adder;
229 }
230 }
231
232 // return parameters for max adder in signal window
233 tMax = tm;
234
235 adderWindow = maxAdder;
236
237 // right limit for whole frame
238 maxW = m_frameLength - filterLength + 1;
239
240 // max adder after signal window
241 for ( ; t < maxW; ++t) {
242 adder = 0;
243 for (i = t; i < t+filterLength; ++i) adder += (int)digits.at(i);
244
245 if ( adder > maxAdder ) {
246 tm = t;
247 maxAdder = adder;
248 }
249 }
250
251 // max adder before signal window
252 for (t = 0; t < minW; ++t) {
253 adder = 0;
254 for (i = t; i < t+filterLength; ++i)
255 adder += (int)digits.at(i);
256
257 if ( adder > maxAdder ) {
258 tm = t;
259 maxAdder = adder;
260 }
261 }
262
263 // return parameters for max adder in whole frame
264 tMaxFrame = tm;
265 adderFrame = maxAdder;
266
268 ATH_MSG_VERBOSE( "Got max adder, tMax=" << tMax
269 << " tMaxFrame=" << tMaxFrame
270 << " maxAdder=" << maxAdder
271 << " adderWindow=" << adderWindow );
272 }
273
274 return adderWindow;
275}

◆ getMaxSample()

int TileRawChannelBuilderFlatFilter::getMaxSample ( const std::vector< float > & digits,
int signalStart,
int signalLength,
int & tMax,
int & tMaxFrame,
int & sampleFrame ) const
private

Definition at line 277 of file TileRawChannelBuilderFlatFilter.cxx.

278 {
279
280 int t, minW, maxW, sampleWindow;
281 int tm = 0, maxSample = -1;
282
284 ATH_MSG_VERBOSE( "Getting max sample, Signal " << signalStart
285 << "->" << (signalStart + signalLength) );
286 }
287
288 // left and right limits for signal window
289 minW = signalStart;
290 maxW = signalStart + signalLength;
291
292 // max sample inside signal window take leftmost maximum
293 for (t = minW; t < maxW; ++t) {
294 if ((int) digits.at(t) > maxSample) {
295 tm = t;
296 maxSample = (int) digits.at(t);
297 }
298 }
299
300 // let's check if we have more than one sample with the same amplitude
301 // in such a case take central sample and also
302 // avoid maximum at the boundary (tm=minW)
303 for (t = tm + 1; t < maxW; ++t)
304 if ((int) digits.at(t) != maxSample) break;
305
306 t -= tm; // number of identical samples
307 if (t == 2 && tm == minW) ++tm; // move from the boundary
308 else tm += (t - 1) / 2; // center of the window
309
310 // return parameters for max sample in signal window
311 tMax = tm;
312 sampleWindow = maxSample;
313
314 // right limit for whole frame
315 maxW = m_frameLength;
316
317 // max sample after signal window
318 for ( ; t < maxW; ++t) {
319 if ( (int)digits.at(t) > maxSample ) {
320 tm = t;
321 maxSample = (int)digits.at(t);
322 }
323 }
324
325 // max sample before signal window
326 for (t = 0; t < minW; ++t) {
327 if ( (int)digits.at(t) > maxSample ) {
328 tm = t;
329 maxSample = (int)digits.at(t);
330 }
331 }
332
333 // return parameters for max adder in whole frame
334 tMaxFrame = tm;
335 sampleFrame = maxSample;
336
338 ATH_MSG_VERBOSE( "Got max sample " << sampleFrame
339 << " tMaxFrame=" << tMaxFrame
340 << " tMax=" << tMax );
341 }
342
343 return sampleWindow;
344}

◆ getOverflowedChannels()

Overflows_t & TileRawChannelBuilder::getOverflowedChannels ( void )
inherited

Definition at line 37 of file TileRawChannelBuilder.cxx.

37 {
38 return m_overflows;
39}

◆ getPedestal()

double TileRawChannelBuilderFlatFilter::getPedestal ( const std::vector< float > & digits,
int pedStart,
int pedLgt ) const
private

Calculate pedestal as mean of <pedLgt> samples starting from <pedStart>.

Parameters
digitsVector of digits(double)
pedStartStart of pedestal
pedLgtLength of pedestal
Returns
Pedestal value

Definition at line 161 of file TileRawChannelBuilderFlatFilter.cxx.

162 {
163 int i, t, sum = 0;
164 double ped;
165
167 ATH_MSG_VERBOSE( "Getting pedestal " << pedStart
168 << "->" << (pedStart + pedLgt) );
169 }
170
171 if (pedLgt == 0)
172 return 0.0;
173 else if (pedLgt < 0) {
174 // calculate sum of ped_length samples starting from ped_start
175 // and go to the left (negative direction)
176 // if number of samples is not enough, start from the end of the frame */
177 pedLgt *= -1;
178 t = pedStart;
179 for (i = 0; i < pedLgt; ++i) {
180 if (t < 0) t += m_frameLength;
181 sum += (int) digits.at(t--);
182 }
183 }
184 else {
185 // calculate sum of ped_length samples starting from ped_start
186 // and go to the right
187 // if number of samples is not enough, start from the begining of the frame */
188 t = pedStart;
189 for (i = 0; i < pedLgt; ++i) {
190 if (t == m_frameLength) t -= m_frameLength;
191 sum += (int) digits.at(t++);
192 }
193 }
194
195 // calculate mean ped
196 ped = (double) sum / (double) pedLgt;
197
198 if (TILE_FLATFILTERBUILDERVERBOSE) ATH_MSG_VERBOSE( "Got pedestal " << ped );
199
200 return (ped);
201}

◆ getTileRawChannelContainerID()

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

Definition at line 41 of file TileRawChannelBuilder.cxx.

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

◆ getTime()

double TileRawChannelBuilderFlatFilter::getTime ( const std::vector< float > & digits,
int signalStart,
int signalLength,
double ped ) const
private

Calculate the time of signal in window of <signalLength> starting at <signalStart> Result is sum of time for every sample weighted with amplitude and divided by sum of times.

Parameters
digitsVector of digits(double)
signalStartStart of signal
signalLengthLength of signal in samples
pedPedestal value
Returns
Time of signal

Definition at line 432 of file TileRawChannelBuilderFlatFilter.cxx.

433 {
434
435 int t, tmax = signalStart + signalLength;
436 double position, val, sig = 0.0, sum = 0.0;
437
439 ATH_MSG_VERBOSE( "Getting time Signal: " << signalStart
440 << "->" << (signalStart + signalLength)
441 << " pedestal=" << ped );
442 }
443
444 // calculate sum of samples and sum of samples weighted with time
445 for (t = signalStart; t < tmax; ++t) {
446 val = (int) (digits.at(t) - ped);
447 sig += val;
448 sum += val * t;
449 }
450
451 if (sig > 0.0 && sum > 0) {
452 position = sum / sig;
453 // convert to nanoseconds
454 if (position < tmax) position *= 25.0;
455 else position = 0.0;
456
457 } else {
458 position = 0.0;
459 }
460
462 ATH_MSG_VERBOSE( "Got time " << position );
463
464 return (position);
465}

◆ initialize()

StatusCode TileRawChannelBuilderFlatFilter::initialize ( )
virtual

Initializer.

Reimplemented from TileRawChannelBuilder.

Definition at line 61 of file TileRawChannelBuilderFlatFilter.cxx.

61 {
62
63 ATH_MSG_INFO( "TileRawChannelBuilderFlatFilter::initialize()" );
64
66
67 // init in superclass
69
70 return StatusCode::SUCCESS;
71}
#define ATH_MSG_INFO(x,...)
#define CHECK(...)
Evaluate an expression and check for errors.
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 & TileRawChannelBuilderFlatFilter::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 31 of file TileRawChannelBuilderFlatFilter.cxx.

31 {
33 //return TileRawChannelBuilder::interfaceID();
34}
static const InterfaceID IID_ITileRawChannelBuilderFlatFilter("TileRawChannelBuilderFlatFilter", 1, 0)

◆ isSignalInFrame()

bool TileRawChannelBuilderFlatFilter::isSignalInFrame ( const std::vector< float > & digits,
double deltaCut,
double rmsCut,
int & frameMax,
int & frameMin,
double & frameMean,
double & frameRMS ) const
private

Find min and max sample Calculate mean and RMS of all samples.

Returns true i signal is found

Parameters
digitsVector of digits(double)
delatCutDelta cut value
rmsCutRMS cut value
frameMaxStorage for max sample
frameMinStorage for frame min
frameMeanStorage for frame mean
frameRMSStorage for frame RMS
Returns
If signal was found

Definition at line 130 of file TileRawChannelBuilderFlatFilter.cxx.

131 {
132
133 int t, val;
134 // First compute the values that will be used to decide
135 min = 65536;
136 max = 0;
137 mean = 0.0;
138 rms = 0.0;
139
141 ATH_MSG_VERBOSE( "Checking for signal in frame" );
142
143 for (t = 0; t < m_frameLength; ++t) {
144 val = (int)digits.at(t);
145 mean += val;
146 rms += val*val;
147 if ( val < min ) min = val;
148 if ( val > max ) max = val;
149 }
150
153 rms = sqrt(rms - mean*mean);
154 if ( ( (max-min) >= deltaCut ) &&
155 ( rms >= rmsCut ) ) {
156 return true;
157 }
158 else return false;
159}
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
void mean(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")

◆ 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 * TileRawChannelBuilderFlatFilter::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 79 of file TileRawChannelBuilderFlatFilter.cxx.

79 {
80
82
83 const HWIdentifier adcId = digits->adc_HWID();
84 int gain = m_tileHWID->adc(adcId);
85
86 ATH_MSG_VERBOSE( "Running FlatFilter for TileRawChannel with HWID "
87 << m_tileHWID->to_string(adcId) );
88
89 // tmp variables for filtering
90 double amplitude = 0.0;
91 double time = 0.0;
92
93 // use flat filter
94 flatFilter(digits->samples(), gain, amplitude, time);
95
96 unsigned int drawerIdx(0), channel(0), adc(0);
97 m_tileIdTransforms->getIndices(adcId, drawerIdx, channel, adc);
98
99 // flat filter calib
100 if (m_calibrateEnergy) {
101 amplitude = m_tileToolEmscale->doCalibCis(drawerIdx, channel, adc, amplitude);
102 }
103
104 ATH_MSG_VERBOSE( "Creating RawChannel a=" << amplitude << " t=" << time );
105
106 // return new TileRawChannel
107 // TileRawChannel *rawCh = new TileRawChannel(adcId,amplitude,time,0.0);
108
109 DataPool<TileRawChannel> tileRchPool(m_dataPoollSize);
110 TileRawChannel *rawCh = tileRchPool.nextElementPtr();
111 rawCh->assign (adcId, amplitude, time, 0, 0);
112
113 if (m_correctTime) {
114 time -= m_tileToolTiming->getSignalPhase(drawerIdx, channel, adc);
115 rawCh->insertTime(time);
116 ATH_MSG_VERBOSE( "Correcting time, new time=" << rawCh->time() );
117 }
118
119 if (TileID::HIGHGAIN == gain) {
120 ++m_nChH;
121 m_RChSumH += amplitude;
122 } else {
123 ++m_nChL;
124 m_RChSumL += amplitude;
125 }
126
127 return rawCh;
128}
ToolHandle< TileCondToolTiming > m_tileToolTiming
Gaudi::Property< int > m_dataPoollSize
Gaudi::Property< bool > m_correctTime
ToolHandle< TileCondIdTransforms > m_tileIdTransforms
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_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_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_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_deltaCutHi

Gaudi::Property<double> TileRawChannelBuilderFlatFilter::m_deltaCutHi {this, "DeltaCutHi", 8.5, "Cut for signalInFrame, high gain"}
private

Definition at line 163 of file TileRawChannelBuilderFlatFilter.h.

163{this, "DeltaCutHi", 8.5, "Cut for signalInFrame, high gain"};

◆ m_deltaCutLo

Gaudi::Property<double> TileRawChannelBuilderFlatFilter::m_deltaCutLo {this, "DeltaCutLo", 4.5, "Cut for signalInFrame, low gain"}
private

Definition at line 162 of file TileRawChannelBuilderFlatFilter.h.

162{this, "DeltaCutLo", 4.5, "Cut for signalInFrame, low gain"};

◆ 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_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_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_filterLength

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_filterLength {this, "FilterLength", 5, "Filter length"}
private

Definition at line 158 of file TileRawChannelBuilderFlatFilter.h.

158{this, "FilterLength", 5, "Filter length"};

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

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_frameLength {this, "FrameLength", 9, "Frame length (number of samples)"}
private

Definition at line 159 of file TileRawChannelBuilderFlatFilter.h.

159{this, "FrameLength", 9, "Frame length (number of samples)"};

◆ 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_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_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_overflows

Overflows_t TileRawChannelBuilder::m_overflows
protectedinherited

Definition at line 206 of file TileRawChannelBuilder.h.

◆ m_pedLength

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_pedLength {this, "PedLength", 1, "Length of pedestal window"}
private

Definition at line 154 of file TileRawChannelBuilderFlatFilter.h.

154{this, "PedLength", 1, "Length of pedestal window"};

◆ m_pedOffset

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_pedOffset {this, "PedOffset", 0, "If > 0 ped can be taken after signal as well"}
private

Definition at line 155 of file TileRawChannelBuilderFlatFilter.h.

155{this, "PedOffset", 0, "If > 0 ped can be taken after signal as well"};

◆ m_pedStart

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_pedStart {this, "PedStart", 0, "Start of pedestal window"}
private

Definition at line 153 of file TileRawChannelBuilderFlatFilter.h.

153{this, "PedStart", 0, "Start of pedestal window"};

◆ 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

◆ m_rmsCutHi

Gaudi::Property<double> TileRawChannelBuilderFlatFilter::m_rmsCutHi {this, "RMSCutHi", 2.5, "RMS cut for signalInFrame, high gain"}
private

Definition at line 166 of file TileRawChannelBuilderFlatFilter.h.

166{this, "RMSCutHi", 2.5, "RMS cut for signalInFrame, high gain"};

◆ m_rmsCutLo

Gaudi::Property<double> TileRawChannelBuilderFlatFilter::m_rmsCutLo {this, "RMSCutLo", 1.0, "RMS cut for signalInFrame, low gain"}
private

Definition at line 165 of file TileRawChannelBuilderFlatFilter.h.

165{this, "RMSCutLo", 1.0, "RMS cut for signalInFrame, low gain"};

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

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_signalLength {this, "SignalLength", 8, "Length of signal window"}
private

Definition at line 157 of file TileRawChannelBuilderFlatFilter.h.

157{this, "SignalLength", 8, "Length of signal window"};

◆ m_signalStart

Gaudi::Property<int> TileRawChannelBuilderFlatFilter::m_signalStart {this, "SignalStart", 1, "Start of signal window"}
private

Definition at line 156 of file TileRawChannelBuilderFlatFilter.h.

156{this, "SignalStart", 1, "Start of signal window"};

◆ 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_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_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: