ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TileCisDefaultCalibTool Class Reference

#include <TileCisDefaultCalibTool.h>

Inheritance diagram for TileCisDefaultCalibTool:
Collaboration diagram for TileCisDefaultCalibTool:

Public Member Functions

 TileCisDefaultCalibTool (const std::string &type, const std::string &name, const IInterface *pParent)
 
virtual ~TileCisDefaultCalibTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode initNtuple (int runNumber, int runType, TFile *rootfile) override
 
virtual StatusCode execute () override
 
virtual StatusCode finalizeCalculations () override
 
virtual StatusCode writeNtuple (int runNumber, int runType, TFile *rootfile) override
 
virtual StatusCode finalize () override
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

enum  QualityType {
  includedBit = 0, calibratedBit = 1, rangeBit = 2, probBit = 3,
  noiseBit = 4, injRMSBit = 5, digiErrorBit = 6, probChi2Bit = 7,
  edgeSamp = 8, nextToEdgeSamp = 9, stuckbitBit = 10
}
 
typedef std::map< uint32_t, int > TDACIntMap
 
typedef std::map< uint32_t, double > TDACDoubleMap
 
typedef std::map< uint32_t, double >::iterator TDACDoubleMapIter
 
typedef std::map< HWIdentifier, TDACIntMap * > TAdcIntMap
 
typedef std::map< HWIdentifier, TDACDoubleMap * > TAdcDoubleMap
 
typedef std::map< HWIdentifier, TDACDoubleMap * >::iterator TAdcDoubleMapIter
 
using Tile = TileCalibUtils
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

int chanIsConnected (int ros, int chan)
 
void setBit (QualityType qb, int &bitflag)
 
void unsetBit (QualityType qb, int &bitflag)
 
TString arrayString (int ros, int drawer, int chan, int gain)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

TAdcIntMap m_NEvtMap
 
TAdcIntMap m_NDigitalErrorsMap
 
TAdcDoubleMap m_MeanMap
 
TAdcDoubleMap m_MeanSqMap
 
const TileHWIDm_tileHWID
 
const TileCablingServicem_cabling
 
ServiceHandle< TileCablingSvcm_cablingSvc
 
ToolHandle< ITileStuckBitsProbsToolm_stuckBitsProbs
 
SG::ReadHandleKey< TileDQstatusm_dqStatusKey
 
SG::ReadHandleKey< TileDigitsContainerm_digitsContainerKey
 
SG::ReadHandleKey< TileRawChannelContainerm_rawChannelContainerKey
 
std::string m_rawChannelContainerName
 
std::string m_ntupleID
 
std::string m_DigitsContainerName
 
bool m_useSmallCap
 
bool m_removePed
 
double m_maxPed
 
double m_phaseMin
 
double m_phaseMax
 
double m_chargeMaxHi
 
double m_chargeMinHi
 
double m_chargeMaxLo
 
double m_chargeMinLo
 
double m_linfitMaxHi
 
double m_linfitMinHi
 
double m_linfitMaxLo
 
double m_linfitMinLo
 
double m_linfitMaxHiDemo
 
double m_linfitMinHiDemo
 
double m_linfitMaxLoDemo
 
double m_linfitMinLoDemo
 
bool m_doSampleChecking
 
float(* m_calib )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_qflag )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_nDAC )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_nDigitalErrors )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
float(* m_chi2 )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_edgeSample )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_nextToEdgeSample )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
int(* m_sampleBit )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBITS]
 
unsigned short(* m_bitStatus )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBSTATUS]
 
int(* m_numSamp )[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
 
TMap * m_scanMap
 
TMap * m_scanMapRMS
 
double m_defaultCalib [4] = {0., 0., 0., 0.}
 
double m_dac2Charge [4] = {0., 0., 0., 0.}
 
double m_chargeMin [4] = {0., 0., 0., 0.}
 
double m_chargeMax [4] = {0., 0., 0., 0.}
 
double m_linfitMin [4] = {0., 0., 0., 0.}
 
double m_linfitMax [4] = {0., 0., 0., 0.}
 
double m_maxAmp [4] = {0., 0., 0., 0.}
 
std::vector< int > m_fragIDsDemonstrators
 
std::string m_infoName
 
const TileInfom_tileInfo
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 42 of file TileCisDefaultCalibTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ TAdcDoubleMap

Definition at line 81 of file TileCisDefaultCalibTool.h.

◆ TAdcDoubleMapIter

Definition at line 82 of file TileCisDefaultCalibTool.h.

◆ TAdcIntMap

Definition at line 80 of file TileCisDefaultCalibTool.h.

◆ TDACDoubleMap

typedef std::map<uint32_t, double> TileCisDefaultCalibTool::TDACDoubleMap
private

Definition at line 76 of file TileCisDefaultCalibTool.h.

◆ TDACDoubleMapIter

typedef std::map<uint32_t, double>::iterator TileCisDefaultCalibTool::TDACDoubleMapIter
private

Definition at line 77 of file TileCisDefaultCalibTool.h.

◆ TDACIntMap

typedef std::map<uint32_t, int> TileCisDefaultCalibTool::TDACIntMap
private

Definition at line 75 of file TileCisDefaultCalibTool.h.

◆ Tile

Definition at line 142 of file TileCisDefaultCalibTool.h.

Member Enumeration Documentation

◆ QualityType

Enumerator
includedBit 
calibratedBit 
rangeBit 
probBit 
noiseBit 
injRMSBit 
digiErrorBit 
probChi2Bit 
edgeSamp 
nextToEdgeSamp 
stuckbitBit 

Definition at line 60 of file TileCisDefaultCalibTool.h.

60  {
61  includedBit = 0,
62  calibratedBit = 1,
63  rangeBit = 2,
64  probBit = 3,
65  noiseBit = 4,
66  injRMSBit = 5,
67  digiErrorBit = 6,
68  probChi2Bit = 7,
69  edgeSamp = 8,
70  nextToEdgeSamp = 9,
71  stuckbitBit = 10
72  };

Constructor & Destructor Documentation

◆ TileCisDefaultCalibTool()

TileCisDefaultCalibTool::TileCisDefaultCalibTool ( const std::string &  type,
const std::string &  name,
const IInterface *  pParent 
)

Definition at line 35 of file TileCisDefaultCalibTool.cxx.

37  : AthAlgTool(type, name, pParent)
38  , m_tileHWID(nullptr)
39  , m_cabling(nullptr)
40  , m_cablingSvc("TileCablingSvc", name)
41  , m_scanMap(nullptr)
42  , m_scanMapRMS(nullptr)
43  , m_tileInfo(nullptr)
44 {
45  declareInterface<ITileCalibTool>(this);
46 
47  declareProperty("NtupleID", m_ntupleID = "h3000");
48 
49  declareProperty("removePed", m_removePed = true);
50  declareProperty("useSmallCap", m_useSmallCap = false);
51  declareProperty("phaseMin", m_phaseMin = -10);
52  declareProperty("phaseMax", m_phaseMax = 300);
53 
54  declareProperty("maxPed", m_maxPed = 45.);
55 
56  declareProperty("chargeMinHi", m_chargeMinHi = 0.5);
57  declareProperty("chargeMaxHi", m_chargeMaxHi = 12.5);
58  declareProperty("chargeMinLo", m_chargeMinLo = 31.5);
59  declareProperty("chargeMaxLo", m_chargeMaxLo = 800.0);
60 
61  declareProperty("linfitMinHi", m_linfitMinHi = 3.0);
62  declareProperty("linfitMaxHi", m_linfitMaxHi = 10.0);
63  declareProperty("linfitMinLo", m_linfitMinLo = 300.0);
64  declareProperty("linfitMaxLo", m_linfitMaxLo = 700.0);
65 
66  declareProperty("linfitMinHiDemo", m_linfitMinHiDemo = 6.0);
67  declareProperty("linfitMaxHiDemo", m_linfitMaxHiDemo = 20.0);
68  declareProperty("linfitMinLoDemo", m_linfitMinLoDemo = 300.0);
69  declareProperty("linfitMaxLoDemo", m_linfitMaxLoDemo = 700.0);
70 
71  declareProperty("doSampleChecking", m_doSampleChecking = true); // do sample checking by default
72  declareProperty("TileDQstatus", m_dqStatusKey = "TileDQstatus");
73  declareProperty("TileInfoName", m_infoName = "TileInfo");
74 
75  declareProperty("FragIDsDemonstrators", m_fragIDsDemonstrators, "List of Tile frag IDs of demonstrators, which have different CIS circuits than the legacy ones");
76 
77  // Initialize arrays for results
83 
84  // Initialize sample check arrays
87 
91 }

◆ ~TileCisDefaultCalibTool()

TileCisDefaultCalibTool::~TileCisDefaultCalibTool ( )
virtual

Definition at line 93 of file TileCisDefaultCalibTool.cxx.

93  {
94 
95  delete[] m_calib;
96  delete[] m_qflag;
97  delete[] m_nDAC;
98  delete[] m_nDigitalErrors;
99  delete[] m_chi2;
100  delete[] m_edgeSample;
101  delete[] m_nextToEdgeSample;
102  delete[] m_sampleBit;
103  delete[] m_bitStatus;
104  delete[] m_numSamp;
105 
106 }

Member Function Documentation

◆ arrayString()

TString TileCisDefaultCalibTool::arrayString ( int  ros,
int  drawer,
int  chan,
int  gain 
)
inlineprivate

Definition at line 196 of file TileCisDefaultCalibTool.h.

196  {
197  TString str = "";
198  str += ros;
199  str += "_";
200  str += drawer;
201  str += "_";
202  str += chan;
203  str += "_";
204  str += gain;
205  return str;
206  }

◆ chanIsConnected()

int TileCisDefaultCalibTool::chanIsConnected ( int  ros,
int  chan 
)
inlineprivate

Definition at line 183 of file TileCisDefaultCalibTool.h.

183  {
184  if (m_cabling->channel2hole(ros, chan) < 0) return 0; //negative means not connected
185  return 1;
186  }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

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

95 { return m_detStore; }

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode TileCisDefaultCalibTool::execute ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 195 of file TileCisDefaultCalibTool.cxx.

195  {
196 
197  ATH_MSG_DEBUG( "execute()" );
198 
199  // Get the DQ digital check information
200  const EventContext& ctx = Gaudi::Hive::currentContext();
201  const TileDQstatus* theDQstatus = SG::makeHandle (m_dqStatusKey, ctx).get();
202 
203  // Get event's CIS parameters
204  const uint32_t *cispar = theDQstatus->cispar();
205  uint32_t dac = cispar[6];
206  uint32_t phase = cispar[5];
207  uint32_t cap = cispar[7];
208  int cap_ind = (cap > 10) ? 0 : 1; // 100 pF or 5 pF
209  double chargeAll[4];
210  for (int i=0; i<4; ++i)
211  chargeAll[i] = dac * m_dac2Charge[i];
212 
213  // Check if event should be used in calibration
214  bool pass = true;
215  if (cap == 100 && m_useSmallCap)
216  pass = false;
217  else if (cap == 5 && !m_useSmallCap) pass = false;
218  if (phase > m_phaseMax) pass = false;
219  if (phase < m_phaseMin) pass = false;
220  if (cispar[6] == 120) { // Reject garbage events at the beginning of files. This DAQ
221  pass = false; // setting isn't used during a normal CIS scan FYI.
222  }
223 
224  // Get TileRawChannelContainer
226  ATH_CHECK( container.isValid() );
227 
228  // Create iterator over RawChannelContainer
229  TileRawChannelContainer::const_iterator itColl = (*container).begin();
230  TileRawChannelContainer::const_iterator itCollEnd = (*container).end();
232 
233  if (pass) {
234 
235  // Go through all TileRawChannelCollections
236  for (; itColl != itCollEnd; ++itColl) {
237 
238  int fragId = (*itColl)->identify();
239  bool demonstrator = (std::binary_search(m_fragIDsDemonstrators.begin(), m_fragIDsDemonstrators.end(), fragId));
240  int gain_offset = (demonstrator) ? 2 : 0;
241  double charge = chargeAll[cap_ind+gain_offset];
242 
243  // go through all TileRawChannels in collection
244  it = (*itColl)->begin();
245  itEnd = (*itColl)->end();
246 
247  for (; it != itEnd; ++it) {
248 
249  // get hardware id to identify adc channel
250  HWIdentifier hwid = (*it)->adc_HWID();
251  int ros = m_tileHWID->ros(hwid); // LBA=1 LBC=2 EBA=3 EBC=4
252  int drawer = m_tileHWID->drawer(hwid); // 0 to 63
253  int chan = m_tileHWID->channel(hwid); // 0 to 47 channel not PMT
254  int gain = m_tileHWID->adc(hwid); // low=0 high=1
255 
256  // check if channel is connected
257  // if( !chanIsConnected(ros,chan) ) continue;
258 
259  // Is channel empty? DQ version
260  if (theDQstatus->isChEmpty(ros, drawer, chan)) continue;
261 
262  // find dac maps for adc channel
263  TDACIntMap *NEvtDacMap = (m_NEvtMap)[hwid];
264  TDACIntMap *NDigitalErrorsDacMap = (m_NDigitalErrorsMap)[hwid];
265  TDACDoubleMap *MeanDacMap = (m_MeanMap)[hwid];
266  TDACDoubleMap *MeanSqDacMap = (m_MeanSqMap)[hwid];
267 
268  // create new dac maps if they don't exist
269  if (NEvtDacMap == nullptr) {
270  NEvtDacMap = (m_NEvtMap)[hwid] = new TDACIntMap;
271  NDigitalErrorsDacMap = (m_NDigitalErrorsMap)[hwid] = new TDACIntMap;
272  MeanDacMap = (m_MeanMap)[hwid] = new TDACDoubleMap;
273  MeanSqDacMap = (m_MeanSqMap)[hwid] = new TDACDoubleMap;
274  }
275 
276  // check that charge is less than chargeMax (depends on gain)
277  if (charge > m_chargeMin[gain+gain_offset] && charge < m_chargeMax[gain+gain_offset]) {
278 
279  double amp = (*it)->amplitude();
280 
281  // Hack to get rid of pedestal events: need more sophisticated method!
282  if ( (amp > 40.) || (gain == 0 && amp > 6.) || (!m_removePed) ) {
283 
284  // Digital error check
285  if (!(theDQstatus->isAdcDQgood(ros, drawer, chan, gain))) {
286  ATH_MSG_DEBUG( "Skipping Module: " << ros << drawer + 1
287  << " channel: " << chan
288  << " ADC: " << gain
289  << " due to DQ error found." );
290 
291  (*NDigitalErrorsDacMap)[dac] += 1;
292  continue;
293 
294  } else {
295 
296  // increment entries for current dac value
297  (*NEvtDacMap)[dac] += 1;
298  (*MeanDacMap)[dac] += amp;
299  (*MeanSqDacMap)[dac] += amp*amp;
300  }
301 
302  }
303 
304  } // end if (min < charge < max)
305  }
306  }
307  } // end if pass
308 
309  if (m_doSampleChecking) {
310  // Get TileDigitsContainer
312  ATH_CHECK( digContainer.isValid() );
313 
314  // Create iterator over RawDigitsContainer
315  TileDigitsContainer::const_iterator digItColl = digContainer->begin();
316  TileDigitsContainer::const_iterator digItCollEnd = digContainer->end();
317 
318  for (; digItColl != digItCollEnd; ++digItColl) {
319 
320  TileDigitsCollection::const_iterator digIt = (*digItColl)->begin();
321  TileDigitsCollection::const_iterator digItEnd = (*digItColl)->end();
322 
323  if (digIt != digItEnd) {
324 
325  int fragId = (*digItColl)->identify();
326  bool demonstrator = (std::binary_search(m_fragIDsDemonstrators.begin(), m_fragIDsDemonstrators.end(), fragId));
327  int gain_offset = (demonstrator) ? 2 : 0;
328  double charge = chargeAll[cap_ind+gain_offset];
329 
330  HWIdentifier adc_id = (*digIt)->adc_HWID();
331  int ros = m_tileHWID->ros(adc_id); // LBA=1 LBC=2 EBA=3 EBC=4
332  int drawer = m_tileHWID->drawer(adc_id); // 0 to 63
333 
334  // not clear how to handle this. if not 7 get off? MM - 4 June 2009
335  int numSamples = (*digIt)->NtimeSamples();
336  if (numSamples != 7) {
337  m_doSampleChecking = false;
338  break;
339  }
340 
341  for (; digIt != digItEnd; ++digIt) {
342 
343  adc_id = (*digIt)->adc_HWID();
344  int chan = m_tileHWID->channel(adc_id); // 0 to 47 channel not PMT
345  int gain = m_tileHWID->adc(adc_id); // low=0 high=1
346 
347  std::vector<float> theDigits = (*digIt)->samples();
348 
349  //MM - skip channels with digital errors
350  if (!(theDQstatus->isAdcDQgood(ros, drawer, chan, gain))) {
351  continue;
352  }
353 
354  // Loop over samples for bit analysis
355  // We don't need to use the same cuts as the "Edge Sample" analysis
356  for(unsigned int sampNum = 0; sampNum < theDigits.size(); sampNum++) {
357 
358  // Count the total number of samples taken by an ADC
359  m_numSamp[ros][drawer][chan][gain] += 1;
360  int k = 0;
361  int quotient = theDigits[sampNum];
362 
363  // convert sample to binary number
364  while(quotient!=0) {
365  if((quotient % 2) == 1) {
366  // If the bit is one, store info in the array
367  m_sampleBit[ros][drawer][chan][gain][k] += 1;
368  }
369 
370  quotient = quotient / 2;
371  k += 1;
372  } // end binary conversion
373  } //end sample loop
374 
375  if (pass && charge > m_linfitMin[gain+gain_offset] && charge < m_linfitMax[gain+gain_offset]) {
376 
377  std::vector<float> theDigits = (*digIt)->samples();
378  float maxSampVal = -1.;
379  int maxSampNum = -1;
380 
381  for (unsigned int sampNum = 0; sampNum < theDigits.size(); sampNum++) {
382  if (theDigits[sampNum] > maxSampVal) {
383  maxSampVal = theDigits[sampNum];
384  maxSampNum = sampNum + 1;
385  }
386  }
387 
388  if (maxSampNum == 1 || maxSampNum == 7) {
389  m_edgeSample[ros][drawer][chan][gain] = 1;
390  } else if (maxSampNum == 2 || maxSampNum == 6) {
392  }
393 
394  } // end digits iterator
395  }
396  } // end digits collections
397 
398  } // end if pass
399 
400  } // end m_doSampleChecking
401 
402  return StatusCode::SUCCESS;
403 }

◆ 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

◆ finalize()

StatusCode TileCisDefaultCalibTool::finalize ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 834 of file TileCisDefaultCalibTool.cxx.

834  {
835 
836  ATH_MSG_INFO( "finalize()" );
837 
838  return StatusCode::SUCCESS;
839 }

◆ finalizeCalculations()

StatusCode TileCisDefaultCalibTool::finalizeCalculations ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 405 of file TileCisDefaultCalibTool.cxx.

405  {
406 
407  ATH_MSG_INFO( "finalizeCalculations()" );
408 
409  // The values of 81.454 and 1.295 were derived from runs:
410  // 72652 73305 72653 72661 79259 78023 79781 78026
411  // to calibrate the detector, and looking at the mean good calibration value
412  double meanCalib[4];
413  meanCalib[0] = 1.295;
414  meanCalib[1] = 81.454;
415  // values for demonstrator were taken from run 416970
416  meanCalib[2] = 1.26282;
417  meanCalib[3] = 40.9303;
418 
419  // hardware id (key to maps)
420  HWIdentifier hwid;
421 
422  // dac maps
423  TDACDoubleMap* MeanDacMap;
424  TDACDoubleMap* MeanSqDacMap;
425  TDACIntMap* NEvtDacMap;
426  TDACIntMap* NDigitalErrorsDacMap;
427 
428  // count number of points in dac map (for TGraph)
429  int npt, pt;
430 
431  // temporary objects for loop
432  TGraphErrors* gr;
433  TGraphErrors* grrms;
434  uint32_t dac;
435  double charge, mean, mean2, meansq, rms, err, ratio;
436  int nevt, ndigerr = 0;
437  int badPts;
438  double maxRMS;
439  double maxPointInFitRange;
440 
441  // linear fit for the calibration factor
442  TF1 *fslope = new TF1("fslope", "[0]*x", 0, 1000);
443 
444  m_scanMap = new TMap(20000, 1);
445  m_scanMapRMS = new TMap(20000, 1);
446 
447  // iterators over adc maps
448  TAdcDoubleMapIter adcIter(m_MeanMap.begin());
449  TAdcDoubleMapIter adcIterE(m_MeanMap.end());
450 
451  // loop over all adcs
452  for (; adcIter != adcIterE; ++adcIter) {
453  hwid = (adcIter)->first;
454  MeanDacMap = (adcIter)->second;
455  MeanSqDacMap = m_MeanSqMap[hwid];
456  NEvtDacMap = m_NEvtMap[hwid];
457  NDigitalErrorsDacMap = m_NDigitalErrorsMap[hwid];
458 
459  int ros = m_tileHWID->ros(hwid); // LBA=1 LBC=2 EBA=3 EBC=4
460  int drawer = m_tileHWID->drawer(hwid); // 0 to 63
461  int chan = m_tileHWID->channel(hwid); // 0 to 47 channel not PMT
462  int gain = m_tileHWID->adc(hwid); // low=0 high=1
463 
464  int fragId = (ros << 8) | drawer;
465  bool demonstrator = (std::binary_search(m_fragIDsDemonstrators.begin(), m_fragIDsDemonstrators.end(), fragId));
466  int gain_offset = (demonstrator) ? 2 : 0;
467  int gain_ind = gain + gain_offset;
468  int cap_ind = (m_useSmallCap) ? 1 : 0;
469  double dac2Charge = m_dac2Charge[cap_ind+gain_offset];
470  double prevMean = 0.0, deltaMean = 0.0, averSlope = 0.0;
471  double prevCharge = 0.0, deltaCharge = 0.0, deltaChargeMin = 999999.;
472  double prevSlope = 0.0, slope = 0.0, maxGoodAmp=0.0, minGoodAmp = 999999.;
473  double maxGoodCharge = m_linfitMax[gain_ind], minGoodCharge = 999999.;
474  double maxCharge = 0.0, minCharge = 999999., maxAmp = 0.0, minAmp = 999999.;
475  bool signalInRange = true;
476  int nptGood = 0;
477 
478  // find number of points in graph for this adc
479  npt = MeanDacMap->size();
480  m_nDAC[ros][drawer][chan][gain] = npt;
481  gr = new TGraphErrors(npt);
482  grrms = new TGraphErrors(npt);
483 
484  if (npt == 0) {
485  m_calib[ros][drawer][chan][gain] = 0;
486  m_chi2[ros][drawer][chan][gain] = 0.0;
487  ATH_MSG_DEBUG( "npt==0 for adc channel "
488  << ros << "/" << drawer << "/" << chan << "/" << gain );
489  } else {
490 
491  // update quality flag: adc channel is included in run
493 
494  // iterator over dacs
495  TDACDoubleMapIter dacIter((*MeanDacMap).begin());
496  TDACDoubleMapIter dacIterE((*MeanDacMap).end());
497 
498  // initialize current point
499  pt = 0;
500  badPts = 0;
501  maxPointInFitRange = 0.0;
502  maxRMS = 0.0;
503  for (; dacIter != dacIterE; ++dacIter) {
504  dac = (dacIter)->first;
505  mean = (dacIter)->second;
506  meansq = (*MeanSqDacMap)[dac];
507  nevt = (*NEvtDacMap)[dac];
508  ndigerr = (*NDigitalErrorsDacMap)[dac];
509 
510  mean = mean / nevt;
511  mean2 = mean * mean;
512  meansq = meansq / nevt;
513 
514  rms = (meansq <= mean2) ? 0. : sqrt(meansq - mean2);
515  err = sqrt(rms * rms / nevt + 0.5 * 0.5); // 0.5 is the absolute systematic uncertainty on the measurement
516 
517  // find charge for this dac
518  charge = dac * dac2Charge;
519 
520  if (mean < m_maxAmp[gain_ind] ) {
521  if (charge>maxCharge) maxCharge = charge;
522  if (charge<minCharge) minCharge = charge;
523  if (mean>maxAmp) maxAmp = mean;
524  if (mean<minAmp) minAmp = mean;
525  }
526 
527  deltaMean = mean - prevMean;
528  deltaCharge = charge - prevCharge;
529  if (deltaCharge != 0) {
530  slope = deltaMean / deltaCharge;
531  if (deltaCharge<deltaChargeMin) deltaChargeMin = deltaCharge;
532  }
533 
534  // check for problems in calibration range
535  if (charge > m_linfitMin[gain_ind] && charge < m_linfitMax[gain_ind]) {
536  if (mean > m_maxAmp[gain_ind] ) {
537  signalInRange = false;
538  ATH_MSG_DEBUG( "Too high amp in "
539  << ros << "/" << drawer
540  << "/" << chan << "/" << gain
541  << " charge " << charge
542  << " amp " << mean
543  << " => Ignoring this point ");
544  } else {
545  if (prevSlope != 0) {
546  double R = std::abs(slope/prevSlope);
547  double R1 = (nptGood>1) ? (slope / averSlope) : 1.;
548  if (R<0.025 || (nptGood>2 && R1>2.5 && R>2.5) || (nptGood==2 && R1>4.1) ) {
549  // amplitude not changed (within +/- 2.5%) or changed too much, ignore this point
550  ATH_MSG_WARNING( "Wrong amp in "
551  << ros << "/" << drawer
552  << "/" << chan << "/" << gain
553  << " charge " << charge
554  << " amp " << mean
555  << " dC " << deltaCharge
556  << " dA " << deltaMean
557  << " expected dA " << prevSlope*deltaCharge
558  << " aver dA " << averSlope*deltaCharge
559  << " rms " << rms
560  << " => Removing this point ");
561  continue;
562  }
563  }
564  if (signalInRange) {
565  maxGoodCharge = charge;
566  if (charge<minGoodCharge) minGoodCharge = charge;
567  if (mean>maxGoodAmp) maxGoodAmp = mean;
568  if (mean<minGoodAmp) minGoodAmp = mean;
569  }
570  prevMean = mean;
571  prevCharge = charge;
572  if (slope > 0) {
573  prevSlope = slope;
574  }
575  ++nptGood;
576  averSlope += (slope - averSlope) / nptGood;
577  if (slope < 0) {
578  --nptGood;
579  }
580  if (averSlope < 0) {
581  nptGood = 0;
582  averSlope = 0.;
583  }
584  }
585 
586  if (rms < 0.01) badPts++;
587  if (mean > maxPointInFitRange) maxPointInFitRange = mean;
588  if (rms > maxRMS) maxRMS = rms;
589 
590  } else if (charge <= m_linfitMin[gain_ind] && charge > 0) {
591 
592  slope = mean/charge;
593  if (prevSlope !=0 ) {
594  double R = slope / prevSlope;
595  if (R>0.4 && R<2.5) {
596  prevMean = mean;
597  prevCharge = charge;
598  prevSlope = (prevSlope + slope)/2.;
599  }
600  } else {
601  double R = slope / m_defaultCalib[gain_ind];
602  if (R>0.4 && R<2.5) {
603  prevSlope = slope;
604  }
605  }
606  } else if (nptGood < 3 && signalInRange && charge >= m_linfitMax[gain_ind] && mean < m_maxAmp[gain_ind] && prevSlope != 0) {
607  double R = slope/prevSlope;
608  if (R>0.9 && R<1.1) {
609  maxGoodCharge = charge;
610  if (charge<minGoodCharge) minGoodCharge = charge;
611  ++nptGood;
612  }
613  }
614 
615  // set point and errors in tgraph
616  gr->SetPoint(pt, charge, mean);
617  gr->SetPointError(pt, 0.0, err);
618 
619  grrms->SetPoint(pt, charge, mean);
620  grrms->SetPointError(pt, 0.0, rms);
621 
622  pt++;
623  } // end of for all DAC values
624 
625  // remove empty points at the end
626  for (int i=npt-1; i>=pt; --i)
627  gr->RemovePoint(i);
628 
629  slope = (prevMean > 0 && prevCharge > 0) ? prevMean/prevCharge : m_defaultCalib[gain_ind];
630  fslope->SetParameter(0, slope);
631  if (maxGoodCharge > m_linfitMax[gain_ind]) {
632  ATH_MSG_WARNING( "Extending fit range for "
633  << ros << "/" << drawer
634  << "/" << chan << "/" << gain
635  << " up to " << maxGoodCharge
636  << " pC; N good points " << nptGood);
637  }
638 
639  if (deltaChargeMin>999.) deltaChargeMin = 0.1;
640  else deltaChargeMin *= 0.5;
641  gr->Fit("fslope", "q", "", minGoodCharge-deltaChargeMin, maxGoodCharge+deltaChargeMin);
642  ATH_MSG_VERBOSE( "Fit for "
643  << ros << "/" << drawer
644  << "/" << chan << "/" << gain
645  << " minC " << minGoodCharge
646  << " maxC " << maxGoodCharge
647  << " deltaC " << deltaChargeMin*2
648  << " minA " << minGoodAmp
649  << " maxA " << maxGoodAmp
650  << " nptG " << nptGood
651  << " slope " << slope
652  << " fit " << fslope->GetParameter(0));
653  if (nptGood < 3) {
654  const char * bms[3] = {"No good points to fit ",
655  "Only one point to fit ",
656  "Only two points to fit "};
657  const char * ems[3] = {" => Put zero slope",
658  "",
659  ""};
660  ATH_MSG_WARNING( bms[nptGood]
661  << ros << "/" << drawer
662  << "/" << chan << "/" << gain
663  << " charge " << charge
664  << " amp " << mean
665  << " slope " << slope
666  << " fit " << fslope->GetParameter(0)
667  << ems[nptGood]);
668  }
669  slope = (nptGood > 0) ? fslope->GetParameter(0) : 0.;
670 
671  if (slope > 0.) {
672  if (maxGoodCharge > minGoodCharge) {
673  averSlope = (maxGoodAmp-minGoodAmp)/(maxGoodCharge-minGoodCharge);
674  if (slope > 2.5 * averSlope) {
675  ATH_MSG_WARNING( "Average slope and fit slope do not match "
676  << ros << "/" << drawer
677  << "/" << chan << "/" << gain
678  << " charge " << charge
679  << " amp " << mean
680  << " avslope " << averSlope
681  << " fit " << slope
682  << " => Put zero slope");
683  slope = 0.;
684  }
685  } else if (maxCharge > minCharge) {
686  averSlope = (maxAmp-minAmp)/(maxCharge-minCharge);
687  if (slope > 10. * averSlope) {
688  ATH_MSG_WARNING( "AVERAGE slope and fit slope do not match "
689  << ros << "/" << drawer
690  << "/" << chan << "/" << gain
691  << " charge " << charge
692  << " amp " << mean
693  << " AVslope " << averSlope
694  << " fit " << slope
695  << " => Put zero slope");
696  slope = 0.;
697  }
698  }
699  }
700 
701  m_nDigitalErrors[ros][drawer][chan][gain] = ndigerr;
702 
703  // Set this bit if there aren't any digital errors
704  if (ndigerr == 0) {
706  }
707 
708  m_calib[ros][drawer][chan][gain] = slope;
709  if (fslope->GetNDF() == 0)
710  m_chi2[ros][drawer][chan][gain] = 0.0;
711  else
712  m_chi2[ros][drawer][chan][gain] = fslope->GetChisquare() / fslope->GetNDF();
713 
714  // Set this bit if there is a good Chi2 probability
715  if (TMath::Prob(fslope->GetChisquare(), fslope->GetNDF()) > 2.e-6) {
717  }
718 
719  // update quality flag if calibration is successful
720  if (!badPts && fslope->GetNDF() > 0) setBit(calibratedBit, m_qflag[ros][drawer][chan][gain]);
721 
722  // update quality flag if calibration is within 5% of nominal
723  // saved for legacy support
724  ratio = (slope / m_defaultCalib[gain_ind]);
725  if (ratio > 0.95 && ratio < 1.05) setBit(rangeBit, m_qflag[ros][drawer][chan][gain]);
726 
727  // update quality flag if calibration if the probability of this calibration
728  // constant, given a 1.6% gaussian-sigma of the calibration constants, is greater
729  // than 1/10000 (number of channels)
730  //
731  // Mathemica code: NSolve[Erf[x/(1.6*Sqrt[2])] == 0.9999, x]
732  // x -> 6.22495
733  ratio = (slope / meanCalib[gain_ind]);
734  if (ratio > 0.9378 && ratio < 1.0623) setBit(probBit, m_qflag[ros][drawer][chan][gain]);
735 
736  // If the maximum response in the fit range is less than 600 ADC counts, then
737  // all the response in most likely noise
738  if (maxPointInFitRange > 600) {
740  }
741 
742  // RMS criteria. If any collection of injections at a fixed-charge has
743  // an RMS less than 5 ADC counts, then set this bit.
744  if (maxRMS < 5.0) {
746  }
747 
748  // set the sample check bits
749 
750  // this bit is set if there were no events found in the fit range
751  // with the maximum sample value in the first or last sample
752 
753  if (m_edgeSample[ros][drawer][chan][gain] == 0) {
755  }
756  // this bit is set if there were no events found in the fit range
757  // with the maximum sample value in the second or sixth sample
758  if (m_nextToEdgeSample[ros][drawer][chan][gain] == 0) {
760  }
761 
762  // Determine failure/passing of StuckBit quality flag
763  // And store information about bits in an array
764  // which will be written to the ntuple
765  int NoStuckBit = 1;
766  for(int i = 0; i < NBITS; i++) {
767  // If a bit is stuck at zero...
768  if(m_sampleBit[ros][drawer][chan][gain][i] == 0 && (m_numSamp[ros][drawer][chan][gain] != 0)) {
769  // write information to m_bitStatus array of shorts
770  // each bit in short corresponds to a bit in an adc
771  // with 6 short bits left over
772  m_bitStatus[ros][drawer][chan][gain][0] += (1<<i);
773  NoStuckBit = 0;
774  ATH_MSG_DEBUG( "\n\nBIT STUCK AT ZERO: "
775  << ros << " " << drawer << " " << chan << " " << gain << " " << i << "\n");
776 
777  }
778  // Same for a bit stuck at one
779  else if (m_sampleBit[ros][drawer][chan][gain][i] == m_numSamp[ros][drawer][chan][gain] && (m_numSamp[ros][drawer][chan][gain] != 0)) {
780  m_bitStatus[ros][drawer][chan][gain][1] += (1<<i);
781  NoStuckBit = 0;
782  ATH_MSG_DEBUG( "\n\nBIT STUCK AT ONE: "
783  << ros << " " << drawer << " " << chan << " " << gain << " " << i << "\n");
784  }
785  } //end bit loop
786 
787  // If no stuck bits are found, this adc passes StuckBit m_qflag
788  if(NoStuckBit) {
790  }
791 
792  gr->SetName("scan_" + arrayString(ros, drawer, chan, gain));
793  grrms->SetName("scan_" + arrayString(ros, drawer, chan, gain));
794 
795  m_scanMap->Add(new TObjString("scan" + arrayString(ros, drawer, chan, gain)), gr);
796  m_scanMapRMS->Add(new TObjString("scan" + arrayString(ros, drawer, chan, gain)), grrms);
797  }
798  }
799  return StatusCode::SUCCESS;
800 }

◆ initialize()

StatusCode TileCisDefaultCalibTool::initialize ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 108 of file TileCisDefaultCalibTool.cxx.

108  {
109  ATH_MSG_INFO( "initialize()" );
110 
111  // get TileHWID helper
113 
114  // get TileCabling Service
115  CHECK( m_cablingSvc.retrieve() );
116  m_cabling = m_cablingSvc->cablingService();
117  int runPeriod = m_cabling->runPeriod();
118 
119  if (runPeriod==3) {
120  std::vector<int> v = { 0x10d }; // LBA14 is demonstrator in RUN3
121 
122  if ( m_fragIDsDemonstrators.size() == 0) {
124  }
125  }
126 
127  if ( m_fragIDsDemonstrators.size() != 0) {
128 
130 
131  std::ostringstream os;
132  for (int fragID : m_fragIDsDemonstrators) {
133  os << " 0x" << std::hex << fragID << std::dec;
134  }
135 
136  ATH_MSG_INFO("Special settings in histograms for demonstrator modules (frag IDs):" << os.str());
137  }
138 
140 
141  // get TileInfo
143 
144  // set important constants
145  m_dac2Charge[0] = 100.* 2.0 * 4.096 / double(m_tileInfo->ADCmax()); // 100 pF * 2 for legacy
146  m_dac2Charge[1] = 5.2 * 2.0 * 4.096 / double(m_tileInfo->ADCmax()); // effective 5.2 pF * 2 for 5 pF capacitor
147  m_dac2Charge[2] = 200.* 4.096 / double(m_tileInfo->ADCmax()); // 200 pF for demonstrator - similar to legacy
148  m_dac2Charge[3] = 5.2 * 4.096 / double(m_tileInfo->ADCmax()); // effective value of small capacitor is twice smaller for demonstrator
149 
150  // the same overflow limit for the moment, can be changed later
155 
156  m_defaultCalib[0] = 1.29;
157  m_defaultCalib[1] = 81.8;
159  m_defaultCalib[3] = m_defaultCalib[1] / 2;
160 
161  if (!m_useSmallCap) {
165  m_chargeMin[3] = m_chargeMinHi * 2;
166  }
167 
171  m_chargeMax[3] = m_chargeMaxHi * 2; // high gain in demo is up to 25 pC istead of 12.5 pC
172 
177 
182 
185 
186  return StatusCode::SUCCESS;
187 }

◆ initNtuple()

StatusCode TileCisDefaultCalibTool::initNtuple ( int  runNumber,
int  runType,
TFile *  rootfile 
)
overridevirtual

Implements ITileCalibTool.

Definition at line 189 of file TileCisDefaultCalibTool.cxx.

189  {
190  ATH_MSG_INFO( "initialize(" << runNumber << "," << runType << "," << rootFile << ")" );
191 
192  return StatusCode::SUCCESS;
193 }

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

static const InterfaceID& ITileCalibTool::interfaceID ( )
inlinestaticinherited

Definition at line 21 of file ITileCalibTool.h.

21 { return IID_ITileCalibTool; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

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

◆ 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 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ setBit()

void TileCisDefaultCalibTool::setBit ( QualityType  qb,
int &  bitflag 
)
inlineprivate

Definition at line 188 of file TileCisDefaultCalibTool.h.

188  {
189  bitflag |= (1 << qb);
190  }

◆ 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 DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

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

◆ unsetBit()

void TileCisDefaultCalibTool::unsetBit ( QualityType  qb,
int &  bitflag 
)
inlineprivate

Definition at line 192 of file TileCisDefaultCalibTool.h.

192  {
193  bitflag &= ~(1 << qb);
194  }

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

◆ writeNtuple()

StatusCode TileCisDefaultCalibTool::writeNtuple ( int  runNumber,
int  runType,
TFile *  rootfile 
)
overridevirtual

Implements ITileCalibTool.

Definition at line 802 of file TileCisDefaultCalibTool.cxx.

802  {
803 
804  ATH_MSG_INFO( "writeNtuple(" << runNumber << "," << runType << "," << rootFile << ")" );
805 
806  TTree *t = new TTree(m_ntupleID.c_str(), "TileCalib-Ntuple");
807  t->Branch("RunNumber", &runNumber, "runNo/I");
808  t->Branch("calib", *m_calib, "calib[5][64][48][2]/F");
809  t->Branch("qflag", *m_qflag, "qflag[5][64][48][2]/I");
810  t->Branch("nDAC", *m_nDAC, "nDAC[5][64][48][2]/I");
811  t->Branch("nDigitalErrors", *m_nDigitalErrors, "nDigitalErrors[5][64][48][2]/I");
812  t->Branch("chi2", *m_chi2, "chi2[5][64][48][2]/F");
813  t->Branch("BitStatus", *m_bitStatus, "BitStatus[5][64][48][2][4]/s");
814 
815  if (!m_stuckBitsProbs.empty()) {
816  if (m_stuckBitsProbs.retrieve().isFailure()) {
817  ATH_MSG_WARNING("Impossible to get ITileStuckBitsProbsTool and stuck bits probabilities!");
818  } else {
819  m_stuckBitsProbs->saveStuckBitsProbabilities(t);
820  }
821  }
822 
823  // Fill with current values (i.e. tree will have only one entry for this whole run)
824  t->Fill();
825  t->Write();
826 
827  // Save graphs for all calibrated adc channels
828  m_scanMap->Write("cisScans", TObject::kSingleKey);
829  m_scanMapRMS->Write("cisScansRMS", TObject::kSingleKey);
830 
831  return StatusCode::SUCCESS;
832 }

Member Data Documentation

◆ m_bitStatus

unsigned short(* TileCisDefaultCalibTool::m_bitStatus)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBSTATUS]
private

Definition at line 162 of file TileCisDefaultCalibTool.h.

◆ m_cabling

const TileCablingService* TileCisDefaultCalibTool::m_cabling
private

Definition at line 93 of file TileCisDefaultCalibTool.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileCisDefaultCalibTool::m_cablingSvc
private

Definition at line 94 of file TileCisDefaultCalibTool.h.

◆ m_calib

float(* TileCisDefaultCalibTool::m_calib)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 144 of file TileCisDefaultCalibTool.h.

◆ m_chargeMax

double TileCisDefaultCalibTool::m_chargeMax[4] = {0., 0., 0., 0.}
private

Definition at line 172 of file TileCisDefaultCalibTool.h.

◆ m_chargeMaxHi

double TileCisDefaultCalibTool::m_chargeMaxHi
private

Definition at line 123 of file TileCisDefaultCalibTool.h.

◆ m_chargeMaxLo

double TileCisDefaultCalibTool::m_chargeMaxLo
private

Definition at line 125 of file TileCisDefaultCalibTool.h.

◆ m_chargeMin

double TileCisDefaultCalibTool::m_chargeMin[4] = {0., 0., 0., 0.}
private

Definition at line 171 of file TileCisDefaultCalibTool.h.

◆ m_chargeMinHi

double TileCisDefaultCalibTool::m_chargeMinHi
private

Definition at line 124 of file TileCisDefaultCalibTool.h.

◆ m_chargeMinLo

double TileCisDefaultCalibTool::m_chargeMinLo
private

Definition at line 126 of file TileCisDefaultCalibTool.h.

◆ m_chi2

float(* TileCisDefaultCalibTool::m_chi2)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 148 of file TileCisDefaultCalibTool.h.

◆ m_dac2Charge

double TileCisDefaultCalibTool::m_dac2Charge[4] = {0., 0., 0., 0.}
private

Definition at line 170 of file TileCisDefaultCalibTool.h.

◆ m_defaultCalib

double TileCisDefaultCalibTool::m_defaultCalib[4] = {0., 0., 0., 0.}
private

Definition at line 169 of file TileCisDefaultCalibTool.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitsContainerKey

SG::ReadHandleKey<TileDigitsContainer> TileCisDefaultCalibTool::m_digitsContainerKey
private
Initial value:
{this,
"TileDigitsContainer", "TileDigitsCnt", "Tile digits container"}

Definition at line 99 of file TileCisDefaultCalibTool.h.

◆ m_DigitsContainerName

std::string TileCisDefaultCalibTool::m_DigitsContainerName
private

Definition at line 106 of file TileCisDefaultCalibTool.h.

◆ m_doSampleChecking

bool TileCisDefaultCalibTool::m_doSampleChecking
private

Definition at line 140 of file TileCisDefaultCalibTool.h.

◆ m_dqStatusKey

SG::ReadHandleKey<TileDQstatus> TileCisDefaultCalibTool::m_dqStatusKey
private

Definition at line 98 of file TileCisDefaultCalibTool.h.

◆ m_edgeSample

int(* TileCisDefaultCalibTool::m_edgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 153 of file TileCisDefaultCalibTool.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fragIDsDemonstrators

std::vector<int> TileCisDefaultCalibTool::m_fragIDsDemonstrators
private

Definition at line 176 of file TileCisDefaultCalibTool.h.

◆ m_infoName

std::string TileCisDefaultCalibTool::m_infoName
private

Definition at line 179 of file TileCisDefaultCalibTool.h.

◆ m_linfitMax

double TileCisDefaultCalibTool::m_linfitMax[4] = {0., 0., 0., 0.}
private

Definition at line 174 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxHi

double TileCisDefaultCalibTool::m_linfitMaxHi
private

Definition at line 129 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxHiDemo

double TileCisDefaultCalibTool::m_linfitMaxHiDemo
private

Definition at line 135 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxLo

double TileCisDefaultCalibTool::m_linfitMaxLo
private

Definition at line 131 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxLoDemo

double TileCisDefaultCalibTool::m_linfitMaxLoDemo
private

Definition at line 137 of file TileCisDefaultCalibTool.h.

◆ m_linfitMin

double TileCisDefaultCalibTool::m_linfitMin[4] = {0., 0., 0., 0.}
private

Definition at line 173 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinHi

double TileCisDefaultCalibTool::m_linfitMinHi
private

Definition at line 130 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinHiDemo

double TileCisDefaultCalibTool::m_linfitMinHiDemo
private

Definition at line 136 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinLo

double TileCisDefaultCalibTool::m_linfitMinLo
private

Definition at line 132 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinLoDemo

double TileCisDefaultCalibTool::m_linfitMinLoDemo
private

Definition at line 138 of file TileCisDefaultCalibTool.h.

◆ m_maxAmp

double TileCisDefaultCalibTool::m_maxAmp[4] = {0., 0., 0., 0.}
private

Definition at line 175 of file TileCisDefaultCalibTool.h.

◆ m_maxPed

double TileCisDefaultCalibTool::m_maxPed
private

Definition at line 115 of file TileCisDefaultCalibTool.h.

◆ m_MeanMap

TAdcDoubleMap TileCisDefaultCalibTool::m_MeanMap
private

Definition at line 88 of file TileCisDefaultCalibTool.h.

◆ m_MeanSqMap

TAdcDoubleMap TileCisDefaultCalibTool::m_MeanSqMap
private

Definition at line 89 of file TileCisDefaultCalibTool.h.

◆ m_nDAC

int(* TileCisDefaultCalibTool::m_nDAC)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 146 of file TileCisDefaultCalibTool.h.

◆ m_nDigitalErrors

int(* TileCisDefaultCalibTool::m_nDigitalErrors)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 147 of file TileCisDefaultCalibTool.h.

◆ m_NDigitalErrorsMap

TAdcIntMap TileCisDefaultCalibTool::m_NDigitalErrorsMap
private

Definition at line 87 of file TileCisDefaultCalibTool.h.

◆ m_NEvtMap

TAdcIntMap TileCisDefaultCalibTool::m_NEvtMap
private

Definition at line 86 of file TileCisDefaultCalibTool.h.

◆ m_nextToEdgeSample

int(* TileCisDefaultCalibTool::m_nextToEdgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 154 of file TileCisDefaultCalibTool.h.

◆ m_ntupleID

std::string TileCisDefaultCalibTool::m_ntupleID
private

Definition at line 105 of file TileCisDefaultCalibTool.h.

◆ m_numSamp

int(* TileCisDefaultCalibTool::m_numSamp)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 164 of file TileCisDefaultCalibTool.h.

◆ m_phaseMax

double TileCisDefaultCalibTool::m_phaseMax
private

Definition at line 119 of file TileCisDefaultCalibTool.h.

◆ m_phaseMin

double TileCisDefaultCalibTool::m_phaseMin
private

Definition at line 118 of file TileCisDefaultCalibTool.h.

◆ m_qflag

int(* TileCisDefaultCalibTool::m_qflag)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
private

Definition at line 145 of file TileCisDefaultCalibTool.h.

◆ m_rawChannelContainerKey

SG::ReadHandleKey<TileRawChannelContainer> TileCisDefaultCalibTool::m_rawChannelContainerKey
private
Initial value:
{this,
"TileRawChannelContainer", "TileRawChannelFit", "Tile raw channel container"}

Definition at line 101 of file TileCisDefaultCalibTool.h.

◆ m_rawChannelContainerName

std::string TileCisDefaultCalibTool::m_rawChannelContainerName
private

Definition at line 104 of file TileCisDefaultCalibTool.h.

◆ m_removePed

bool TileCisDefaultCalibTool::m_removePed
private

Definition at line 112 of file TileCisDefaultCalibTool.h.

◆ m_sampleBit

int(* TileCisDefaultCalibTool::m_sampleBit)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBITS]
private

Definition at line 159 of file TileCisDefaultCalibTool.h.

◆ m_scanMap

TMap* TileCisDefaultCalibTool::m_scanMap
private

Definition at line 166 of file TileCisDefaultCalibTool.h.

◆ m_scanMapRMS

TMap* TileCisDefaultCalibTool::m_scanMapRMS
private

Definition at line 167 of file TileCisDefaultCalibTool.h.

◆ m_stuckBitsProbs

ToolHandle<ITileStuckBitsProbsTool> TileCisDefaultCalibTool::m_stuckBitsProbs
private
Initial value:
{this,
"StuckBitsProbsTool","","Tile stuck bits probabilities tool"}

Definition at line 95 of file TileCisDefaultCalibTool.h.

◆ m_tileHWID

const TileHWID* TileCisDefaultCalibTool::m_tileHWID
private

Definition at line 92 of file TileCisDefaultCalibTool.h.

◆ m_tileInfo

const TileInfo* TileCisDefaultCalibTool::m_tileInfo
private

Definition at line 180 of file TileCisDefaultCalibTool.h.

◆ m_useSmallCap

bool TileCisDefaultCalibTool::m_useSmallCap
private

Definition at line 108 of file TileCisDefaultCalibTool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
TileCisDefaultCalibTool::m_sampleBit
int(* m_sampleBit)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBITS]
Definition: TileCisDefaultCalibTool.h:159
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileCisDefaultCalibTool::m_scanMap
TMap * m_scanMap
Definition: TileCisDefaultCalibTool.h:166
RunTileTBMonitoring.fragID
fragID
Definition: RunTileTBMonitoring.py:212
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
TileCisDefaultCalibTool::m_chi2
float(* m_chi2)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:148
ReadOfcFromCool.phase
phase
Definition: ReadOfcFromCool.py:127
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
mean
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="")
Definition: dependence.cxx:254
TileCisDefaultCalibTool::m_infoName
std::string m_infoName
Definition: TileCisDefaultCalibTool.h:179
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TileCisDefaultCalibTool::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Definition: TileCisDefaultCalibTool.h:94
TileCisDefaultCalibTool::stuckbitBit
@ stuckbitBit
Definition: TileCisDefaultCalibTool.h:71
TileCisDefaultCalibTool::noiseBit
@ noiseBit
Definition: TileCisDefaultCalibTool.h:65
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TileCisDefaultCalibTool::digiErrorBit
@ digiErrorBit
Definition: TileCisDefaultCalibTool.h:67
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TileCisDefaultCalibTool::m_linfitMin
double m_linfitMin[4]
Definition: TileCisDefaultCalibTool.h:173
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TileCisDefaultCalibTool::m_dac2Charge
double m_dac2Charge[4]
Definition: TileCisDefaultCalibTool.h:170
test_pyathena.pt
pt
Definition: test_pyathena.py:11
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
gr
#define gr
TileCisDefaultCalibTool::TAdcDoubleMapIter
std::map< HWIdentifier, TDACDoubleMap * >::iterator TAdcDoubleMapIter
Definition: TileCisDefaultCalibTool.h:82
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TileCisDefaultCalibTool::m_linfitMinHiDemo
double m_linfitMinHiDemo
Definition: TileCisDefaultCalibTool.h:136
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TileCisDefaultCalibTool::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileCisDefaultCalibTool.h:98
HWIdentifier
Definition: HWIdentifier.h:13
TileCisDefaultCalibTool::m_nDigitalErrors
int(* m_nDigitalErrors)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:147
TileDQstatus::isChEmpty
static int isChEmpty(int partition, int drawer, int ch)
True if channel is not fully implemented.
TileCisDefaultCalibTool::m_chargeMinLo
double m_chargeMinLo
Definition: TileCisDefaultCalibTool.h:126
TileCisDefaultCalibTool::m_defaultCalib
double m_defaultCalib[4]
Definition: TileCisDefaultCalibTool.h:169
TileCisDefaultCalibTool::m_MeanMap
TAdcDoubleMap m_MeanMap
Definition: TileCisDefaultCalibTool.h:88
NBITS
#define NBITS
Definition: TileCisDefaultCalibTool.h:32
TileCisDefaultCalibTool::m_linfitMaxLo
double m_linfitMaxLo
Definition: TileCisDefaultCalibTool.h:131
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileCisDefaultCalibTool::m_linfitMaxHiDemo
double m_linfitMaxHiDemo
Definition: TileCisDefaultCalibTool.h:135
TileCisDefaultCalibTool::probBit
@ probBit
Definition: TileCisDefaultCalibTool.h:64
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
TileCisDefaultCalibTool::m_stuckBitsProbs
ToolHandle< ITileStuckBitsProbsTool > m_stuckBitsProbs
Definition: TileCisDefaultCalibTool.h:95
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
TileCalibUtils::MAX_DRAWER
static const unsigned int MAX_DRAWER
Number of drawers in ROS 1-4.
Definition: TileCalibUtils.h:139
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
TileCisDefaultCalibTool::m_calib
float(* m_calib)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:144
TileCisDefaultCalibTool::rangeBit
@ rangeBit
Definition: TileCisDefaultCalibTool.h:63
TileCisDefaultCalibTool::m_linfitMinHi
double m_linfitMinHi
Definition: TileCisDefaultCalibTool.h:130
TileCisDefaultCalibTool::m_linfitMinLo
double m_linfitMinLo
Definition: TileCisDefaultCalibTool.h:132
TileDQstatus
Class that holds Data Quality fragment information and provides functions to extract the data quality...
Definition: TileDQstatus.h:49
TileCisDefaultCalibTool::m_chargeMaxLo
double m_chargeMaxLo
Definition: TileCisDefaultCalibTool.h:125
TileHWID::adc
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
Definition: TileHWID.h:193
TileCisDefaultCalibTool::m_cabling
const TileCablingService * m_cabling
Definition: TileCisDefaultCalibTool.h:93
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TileCisDefaultCalibTool::m_edgeSample
int(* m_edgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:153
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileCisDefaultCalibTool::m_linfitMaxLoDemo
double m_linfitMaxLoDemo
Definition: TileCisDefaultCalibTool.h:137
TileCisDefaultCalibTool::m_maxPed
double m_maxPed
Definition: TileCisDefaultCalibTool.h:115
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileCisDefaultCalibTool::m_maxAmp
double m_maxAmp[4]
Definition: TileCisDefaultCalibTool.h:175
TileCisDefaultCalibTool::m_removePed
bool m_removePed
Definition: TileCisDefaultCalibTool.h:112
TileCisDefaultCalibTool::m_linfitMax
double m_linfitMax[4]
Definition: TileCisDefaultCalibTool.h:174
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileCisDefaultCalibTool::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileCisDefaultCalibTool.h:92
TileCisDefaultCalibTool::TDACDoubleMap
std::map< uint32_t, double > TDACDoubleMap
Definition: TileCisDefaultCalibTool.h:76
TileCisDefaultCalibTool::m_NEvtMap
TAdcIntMap m_NEvtMap
Definition: TileCisDefaultCalibTool.h:86
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
makeComparison.rootFile
rootFile
Definition: makeComparison.py:27
TileCisDefaultCalibTool::m_nDAC
int(* m_nDAC)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:146
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:79
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TileCisDefaultCalibTool::probChi2Bit
@ probChi2Bit
Definition: TileCisDefaultCalibTool.h:68
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TileCalibUtils::MAX_ROS
static const unsigned int MAX_ROS
Number of ROSs
Definition: TileCalibUtils.h:138
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
python.OnlineISConfiguration.runType
def runType
Definition: OnlineISConfiguration.py:112
NBSTATUS
#define NBSTATUS
Definition: TileCisDefaultCalibTool.h:33
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TileDQstatus::isAdcDQgood
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
Definition: TileDQstatus.cxx:178
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
TileCisDefaultCalibTool::m_chargeMin
double m_chargeMin[4]
Definition: TileCisDefaultCalibTool.h:171
TileCisDefaultCalibTool::m_useSmallCap
bool m_useSmallCap
Definition: TileCisDefaultCalibTool.h:108
integrator_ascii2db.dac
dac
Definition: integrator_ascii2db.py:126
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TileCisDefaultCalibTool::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileCisDefaultCalibTool.h:101
TileCisDefaultCalibTool::nextToEdgeSamp
@ nextToEdgeSamp
Definition: TileCisDefaultCalibTool.h:70
TileCisDefaultCalibTool::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileCisDefaultCalibTool.h:99
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TileCisDefaultCalibTool::includedBit
@ includedBit
Definition: TileCisDefaultCalibTool.h:61
TileCisDefaultCalibTool::m_bitStatus
unsigned short(* m_bitStatus)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBSTATUS]
Definition: TileCisDefaultCalibTool.h:162
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TileCisDefaultCalibTool::m_chargeMaxHi
double m_chargeMaxHi
Definition: TileCisDefaultCalibTool.h:123
charge
double charge(const T &p)
Definition: AtlasPID.h:756
TileCisDefaultCalibTool::m_scanMapRMS
TMap * m_scanMapRMS
Definition: TileCisDefaultCalibTool.h:167
TileCisDefaultCalibTool::m_ntupleID
std::string m_ntupleID
Definition: TileCisDefaultCalibTool.h:105
TileCisDefaultCalibTool::m_fragIDsDemonstrators
std::vector< int > m_fragIDsDemonstrators
Definition: TileCisDefaultCalibTool.h:176
TileCisDefaultCalibTool::TDACDoubleMapIter
std::map< uint32_t, double >::iterator TDACDoubleMapIter
Definition: TileCisDefaultCalibTool.h:77
TileDQstatus::cispar
const uint32_t * cispar() const
CIS parameters.
Definition: TileDQstatus.h:152
TileCisDefaultCalibTool::m_NDigitalErrorsMap
TAdcIntMap m_NDigitalErrorsMap
Definition: TileCisDefaultCalibTool.h:87
TileCisDefaultCalibTool::m_nextToEdgeSample
int(* m_nextToEdgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:154
python.PyAthena.v
v
Definition: PyAthena.py:154
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TileCisDefaultCalibTool::m_chargeMinHi
double m_chargeMinHi
Definition: TileCisDefaultCalibTool.h:124
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TileCisDefaultCalibTool::m_phaseMax
double m_phaseMax
Definition: TileCisDefaultCalibTool.h:119
TileCablingService::channel2hole
static int channel2hole(int ros, int channel)
Definition: TileCablingService.cxx:1946
DeMoScan.first
bool first
Definition: DeMoScan.py:536
beamspotnt.rms
rms
Definition: bin/beamspotnt.py:1266
TileCisDefaultCalibTool::m_doSampleChecking
bool m_doSampleChecking
Definition: TileCisDefaultCalibTool.h:140
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
TileCisDefaultCalibTool::injRMSBit
@ injRMSBit
Definition: TileCisDefaultCalibTool.h:66
TileCisDefaultCalibTool::setBit
void setBit(QualityType qb, int &bitflag)
Definition: TileCisDefaultCalibTool.h:188
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
TileCisDefaultCalibTool::arrayString
TString arrayString(int ros, int drawer, int chan, int gain)
Definition: TileCisDefaultCalibTool.h:196
TileCisDefaultCalibTool::edgeSamp
@ edgeSamp
Definition: TileCisDefaultCalibTool.h:69
TileCalibUtils::MAX_CHAN
static const unsigned int MAX_CHAN
Number of channels in drawer.
Definition: TileCalibUtils.h:141
TileCisDefaultCalibTool::TDACIntMap
std::map< uint32_t, int > TDACIntMap
Definition: TileCisDefaultCalibTool.h:75
TileCisDefaultCalibTool::m_tileInfo
const TileInfo * m_tileInfo
Definition: TileCisDefaultCalibTool.h:180
TileCablingService::runPeriod
int runPeriod() const
Definition: TileCablingService.h:280
TileCisDefaultCalibTool::m_phaseMin
double m_phaseMin
Definition: TileCisDefaultCalibTool.h:118
TileCisDefaultCalibTool::m_linfitMinLoDemo
double m_linfitMinLoDemo
Definition: TileCisDefaultCalibTool.h:138
TileCisDefaultCalibTool::m_chargeMax
double m_chargeMax[4]
Definition: TileCisDefaultCalibTool.h:172
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileCisDefaultCalibTool::m_qflag
int(* m_qflag)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:145
TileCisDefaultCalibTool::calibratedBit
@ calibratedBit
Definition: TileCisDefaultCalibTool.h:62
TileInfo::ADCmax
int ADCmax() const
Returns the maximum ADC output (10 bits --> 1023)
Definition: TileInfo.h:71
TileCisDefaultCalibTool::m_MeanSqMap
TAdcDoubleMap m_MeanSqMap
Definition: TileCisDefaultCalibTool.h:89
fitman.k
k
Definition: fitman.py:528
TileCisDefaultCalibTool::m_numSamp
int(* m_numSamp)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:164
TileCisDefaultCalibTool::m_linfitMaxHi
double m_linfitMaxHi
Definition: TileCisDefaultCalibTool.h:129
TileCalibUtils::MAX_GAIN
static const unsigned int MAX_GAIN
Number of gains per channel
Definition: TileCalibUtils.h:142