|  | ATLAS Offline Software
    | 
 
 
 
This tool sets bad status for channels with 25ns or 50ns timing jump.  
 More...
#include <TileTimeBCOffsetFilter.h>
|  | 
| int | find_partner (int ros, int channel) const | 
|  | 
| bool | drawer_ok (int ros, int drawer, const TileBadChannels *badChannels, std::vector< int > &channel_time_ok, std::vector< int > &bad_dmu) const | 
|  | 
| bool | ch_masked_or_empty (int ros, int drawer, int channel, int gain, const TileBchStatus &chStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState) const | 
|  | 
| float | ref_digits_maxmindiff (int ros, int drawer, int ref_channel) const | 
|  | 
This tool sets bad status for channels with 25ns or 50ns timing jump. 
Definition at line 54 of file TileTimeBCOffsetFilter.h.
◆ TileTimeBCOffsetFilter()
      
        
          | TileTimeBCOffsetFilter::TileTimeBCOffsetFilter | ( | const std::string & | type, | 
        
          |  |  | const std::string & | name, | 
        
          |  |  | const IInterface * | parent | 
        
          |  | ) |  |  | 
      
 
 
◆ ~TileTimeBCOffsetFilter()
  
  | 
        
          | virtual TileTimeBCOffsetFilter::~TileTimeBCOffsetFilter | ( |  | ) |  |  | inlinevirtual | 
 
 
◆ ch_masked_or_empty()
◆ drawer_ok()
  
  | 
        
          | bool TileTimeBCOffsetFilter::drawer_ok | ( | int | ros, |  
          |  |  | int | drawer, |  
          |  |  | const TileBadChannels * | badChannels, |  
          |  |  | std::vector< int > & | channel_time_ok, |  
          |  |  | std::vector< int > & | bad_dmu |  
          |  | ) |  | const |  | private | 
 
Definition at line 351 of file TileTimeBCOffsetFilter.cxx.
  361   const int nchan_dmu = 3; 
 
  366       int dmu = 
ch/nchan_dmu;
 
  368         bad_dmu.push_back(dmu);
 
  372         channel_time_ok[
ch] = -1;
 
  374         channel_time_ok[
ch] = +1;
 
 
 
 
◆ finalize()
  
  | 
        
          | StatusCode TileTimeBCOffsetFilter::finalize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ find_partner()
  
  | 
        
          | int TileTimeBCOffsetFilter::find_partner | ( | int | ros, |  
          |  |  | int | channel |  
          |  | ) |  | const |  | private | 
 
Definition at line 400 of file TileTimeBCOffsetFilter.cxx.
  404     -1,  4,  3,  2,  1,  8,  7,  6,  5,
 
  405     10,  9, 12, 11, 14, 13, 18, 17, 16, 15,
 
  406     20, 19, 22, 21, 26, 25, 24, 23,
 
  407     28, 27, 32, -1, -1, 29,
 
  408     34, 33, 38, 37, 36, 35,
 
  409     40, 39, 44, 47, -1, 41, 46, 45, 42
 
  414     -1, -1, 15, 14, 17, 16,
 
  415     -1, -1, 21, 20, 23, 22,
 
  416     -1, -1, -1, -1, -1, -1,
 
  417     35, 32, 31, -1, -1, 30,
 
  418     39, 38, 37, 36, 41, 40,
 
  419     -1, -1, -1, -1, -1, -1
 
 
 
 
◆ initialize()
  
  | 
        
          | StatusCode TileTimeBCOffsetFilter::initialize | ( |  | ) |  |  | overridevirtual | 
 
 
◆ process()
Definition at line 101 of file TileTimeBCOffsetFilter.cxx.
  115   const char * 
part[5] = {
"AUX",
"LBA",
"LBC",
"EBA",
"EBC"};
 
  116   const int nchan_dmu = 3; 
 
  124       ATH_MSG_DEBUG(
"drawer container does not contain all channels");
 
  135     std::vector<int> bad_dmu;
 
  139         if (channel_time_ok[
ch]!=0) {
 
  141                            << std::setw(2) << std::setfill(
'0') << 
drawer+1
 
  142                            << 
" channel " << std::setw(2) << std::setfill(
' ') << 
ch );
 
  150     for (
int dmu : bad_dmu) {
 
  152       int dmu_offset = dmu * nchan_dmu;
 
  160       bool ch_status[nchan_dmu+1];
 
  161       int ch_number[nchan_dmu+1];
 
  162       float ch_amp[nchan_dmu+1];
 
  163       float ch_time[nchan_dmu+1];
 
  164       bool ch_mask[nchan_dmu+1];
 
  167       int ch_p = -1, ch_0 = -1;
 
  168       float ch_p_amp = -1000000;
 
  169       for(
int i=0; 
i < nchan_dmu; ++
i) {
 
  170         int ch = 
i+dmu_offset;
 
  172         if ((ch_p_tmp >= 0) && (ch_p_tmp/nchan_dmu != dmu)) { 
 
  176             ATH_MSG_ERROR(
"Channels in drawer collection are out of order");
 
  181           if (channel_time_ok[ch_p_tmp]==0 &&
 
  187             if (amp > ch_p_amp) {
 
  200       ch_status[0] = channel_time_ok[ch_p];
 
  202       ch_status[1] = channel_time_ok[ch_0];
 
  204       for(
int i=0; 
i < nchan_dmu; ++
i) {
 
  205         int ch = 
i+dmu_offset;
 
  208           ch_status[
index] = channel_time_ok[
ch];
 
  215       for(
int i=0; 
i <= nchan_dmu; ++
i) {
 
  216         int ch = ch_number[
i];
 
  220           ATH_MSG_ERROR(
"Channels in drawer collection are out of order");
 
  235           ch_time[
i]   = rch->
time();
 
  237           if ((
i > 0) && (ch_status[
i]!=0)) ++nprob;
 
  241       ATH_MSG_VERBOSE( 
"DMU " << dmu << 
" number of problems found " << nprob);
 
  242       if (nprob == 0) 
continue; 
 
  254       bool ene_above = 
false;
 
  255       for(
int i=0; 
i <= nchan_dmu; ++
i) {
 
  256         ene_above = ene_above || ((ch_number[
i] >= 0) && (std::abs(ch_amp[
i]) > ene_threshold));
 
  259         ATH_MSG_VERBOSE(
"Absolute energy above threshold in at least one relevant channel");
 
  262         bool time_dmu_same = 
true;
 
  263         float time_dmu_aver = 0;
 
  265         for(
int i=1; (
i <= nchan_dmu) && time_dmu_same; ++
i) {
 
  267           time_dmu_aver += ch_time[
i];
 
  269           for(
int j=
i+1; (j <= nchan_dmu) && time_dmu_same; ++j) {
 
  271               time_dmu_same = time_dmu_same &&
 
  276         if (time_dmu_same && (n_dmu_aver != 0)) {
 
  277           time_dmu_aver /= n_dmu_aver;
 
  280           int expected_sign = 0;
 
  281           for(
int i=1; 
i <= nchan_dmu; ++
i) {
 
  282             if (ch_number[
i] >= 0) {
 
  283               expected_sign = channel_time_ok[ch_number[
i]];
 
  285                               << std::setw(2) << std::setfill(
'0') << 
drawer+1
 
  286                               << 
": " << expected_sign);
 
  290           bool time_offset = 
false; 
 
  291           switch (expected_sign) 
 
  304                             << std::setw(2) << std::setfill(
'0') << 
drawer+1
 
  305                             << 
" ch " << std::setw(2) << std::setfill(
' ') << ch_number[0]
 
  306                             << 
" run " << ctx.eventID().run_number()
 
  307                             << 
" evt " <<  ctx.eventID().event_number());
 
  310             float sample_threshold;
 
  319             sample_threshold = sample_threshold - 0.5; 
 
  320             if (ref_maxmindiff > sample_threshold) { 
 
  321               for(
int i=1; 
i <= nchan_dmu; ++
i) {
 
  322                 if (ch_number[
i] >= 0) ch_mask[
i] = 
true;
 
  331       for(
int i=1; 
i<= nchan_dmu;++
i) {
 
  332         if ((ch_number[
i] >= 0) && ch_mask[
i]) {
 
  334                          << std::setw(2) << std::setfill(
'0') << 
drawer+1
 
  335                          << 
" ch " << std::setw(2) << std::setfill(
' ') << ch_number[
i]
 
  336                          << 
" ene " << ch_amp[
i]
 
  337                          << 
" time " << ch_time[
i]
 
  338                          << 
" ref_ene " << ch_amp[0]
 
  339                          << 
" ref_time " << ch_time[0]
 
  340                          << 
" run " << ctx.eventID().run_number()
 
  341                          << 
" evt " <<  ctx.eventID().event_number() );
 
  348   return StatusCode::SUCCESS;
 
 
 
 
◆ ref_digits_maxmindiff()
  
  | 
        
          | float TileTimeBCOffsetFilter::ref_digits_maxmindiff | ( | int | ros, |  
          |  |  | int | drawer, |  
          |  |  | int | ref_channel |  
          |  | ) |  | const |  | private | 
 
Definition at line 427 of file TileTimeBCOffsetFilter.cxx.
  431   float max_min_diff = 0.;
 
  441     if (digits_ros == 
ros && digits_drawer == 
drawer) {
 
  442       bool ref_ch_is_in_coll = 
false;
 
  443       for (
uint i_ch = 0; i_ch < digitsCollection->size(); i_ch++) {
 
  444         const TileDigits * tdig = digitsCollection->at(i_ch);
 
  447         if (ch_number == ref_channel) {
 
  448           std::vector<float> ref_samples = tdig->
samples();
 
  450           float max_sample = *max_element(ref_samples.begin(), ref_samples.end());             
 
  451           float min_sample = *min_element(ref_samples.begin(), ref_samples.end());               
 
  452           max_min_diff = max_sample - min_sample;               
 
  453           ATH_MSG_VERBOSE(
"Reference channel: max - min sample = " << max_min_diff);
 
  454           ref_ch_is_in_coll = 
true;
 
  457       if (!ref_ch_is_in_coll) {
 
 
 
 
◆ m_badChannelsKey
◆ m_cabling
◆ m_cablingSvc
Initial value:{ this,
        "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}
Definition at line 81 of file TileTimeBCOffsetFilter.h.
 
 
◆ m_checkDCS
  
  | 
        
          | bool TileTimeBCOffsetFilter::m_checkDCS |  | private | 
 
 
◆ m_DCSStateKey
◆ m_digitsContainerKey
Initial value:{this,"TileDigitsContainer","TileDigitsCnt",
                                                                "Input Tile digits container key"}
Definition at line 103 of file TileTimeBCOffsetFilter.h.
 
 
◆ m_DQstatusKey
◆ m_emScaleKey
Initial value:{this,
        "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}
Name of TileEMScale in condition store. 
Definition at line 93 of file TileTimeBCOffsetFilter.h.
 
 
◆ m_ene_threshold_1chan
  
  | 
        
          | float TileTimeBCOffsetFilter::m_ene_threshold_1chan |  | private | 
 
 
◆ m_ene_threshold_3chan
  
  | 
        
          | float TileTimeBCOffsetFilter::m_ene_threshold_3chan |  | private | 
 
 
◆ m_ene_threshold_aver_time
  
  | 
        
          | float TileTimeBCOffsetFilter::m_ene_threshold_aver_time |  | private | 
 
 
◆ m_sample_diffmaxmin_threshold_hg
  
  | 
        
          | float TileTimeBCOffsetFilter::m_sample_diffmaxmin_threshold_hg |  | private | 
 
 
◆ m_sample_diffmaxmin_threshold_lg
  
  | 
        
          | float TileTimeBCOffsetFilter::m_sample_diffmaxmin_threshold_lg |  | private | 
 
 
◆ m_tileHWID
◆ m_time_threshold_diff
  
  | 
        
          | float TileTimeBCOffsetFilter::m_time_threshold_diff |  | private | 
 
 
◆ m_time_threshold_ref_ch
  
  | 
        
          | float TileTimeBCOffsetFilter::m_time_threshold_ref_ch |  | private | 
 
 
The documentation for this class was generated from the following files:
 
def retrieve(aClass, aKey=None)
int find_partner(int ros, int channel) const
bool isTimingDmuBcOffset() const
const TileCablingService * m_cabling
TileCabling instance.
bool drawer_ok(int ros, int drawer, const TileBadChannels *badChannels, std::vector< int > &channel_time_ok, std::vector< int > &bad_dmu) const
float pedestal(void) const
Class holding bad channel problems.
float m_ene_threshold_3chan
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
void setPedestal(float ped)
Identifier h2s_cell_id_index(const HWIdentifier &id, int &index, int &pmt) const
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
float m_time_threshold_ref_ch
#define ATH_MSG_VERBOSE(x)
HWIdentifier adc_HWID(void) const
bool isStatusBad(unsigned int ros, unsigned int drawer) const
Return true if given Tile drawer considered as bad by summary drawer states per LVPS otherwise return...
float time(int ind=0) const
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
float ref_digits_maxmindiff(int ros, int drawer, int ref_channel) const
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Class that holds Data Quality fragment information and provides functions to extract the data quality...
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
float m_ene_threshold_1chan
float amplitude(int ind=0) const
float m_sample_diffmaxmin_threshold_lg
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
float m_sample_diffmaxmin_threshold_hg
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ServiceHandle< TileCablingSvc > m_cablingSvc
const std::vector< float > & samples() const
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
Collection * indexFindPtr(IdentifierHash hash)
Look up a (non-const) collection via hash.
StatusCode initialize(bool used=true)
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
bool isTimingDmuBcOffsetNeg() const
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
const TileHWID * m_tileHWID
Pointer to TileHWID.
Condition object to keep Tile DCS status from DB.
float m_time_threshold_diff
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
float m_ene_threshold_aver_time
const T * at(size_type n) const
Access an element, as an rvalue.
bool ch_masked_or_empty(int ros, int drawer, int channel, int gain, const TileBchStatus &chStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState) const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
static const unsigned int MAX_CHAN
Number of channels in drawer.
size_type size() const noexcept
Returns the number of elements in the collection.
@ OnlineMegaElectronVolts
const_pointer_type cptr()