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, V, H > &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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &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 41 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 80 of file TileCisDefaultCalibTool.h.

◆ TAdcDoubleMapIter

Definition at line 81 of file TileCisDefaultCalibTool.h.

◆ TAdcIntMap

Definition at line 79 of file TileCisDefaultCalibTool.h.

◆ TDACDoubleMap

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

Definition at line 75 of file TileCisDefaultCalibTool.h.

◆ TDACDoubleMapIter

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

Definition at line 76 of file TileCisDefaultCalibTool.h.

◆ TDACIntMap

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

Definition at line 74 of file TileCisDefaultCalibTool.h.

◆ Tile

Definition at line 141 of file TileCisDefaultCalibTool.h.

Member Enumeration Documentation

◆ QualityType

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

Definition at line 59 of file TileCisDefaultCalibTool.h.

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

Constructor & Destructor Documentation

◆ TileCisDefaultCalibTool()

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

Definition at line 33 of file TileCisDefaultCalibTool.cxx.

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

◆ ~TileCisDefaultCalibTool()

TileCisDefaultCalibTool::~TileCisDefaultCalibTool ( )
virtual

Definition at line 91 of file TileCisDefaultCalibTool.cxx.

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

Member Function Documentation

◆ arrayString()

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

Definition at line 195 of file TileCisDefaultCalibTool.h.

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

◆ chanIsConnected()

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

Definition at line 182 of file TileCisDefaultCalibTool.h.

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

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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, V, H > &  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 191 of file TileCisDefaultCalibTool.cxx.

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

◆ 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 830 of file TileCisDefaultCalibTool.cxx.

830  {
831 
832  ATH_MSG_INFO( "finalize()" );
833 
834  return StatusCode::SUCCESS;
835 }

◆ finalizeCalculations()

StatusCode TileCisDefaultCalibTool::finalizeCalculations ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 401 of file TileCisDefaultCalibTool.cxx.

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

◆ initialize()

StatusCode TileCisDefaultCalibTool::initialize ( )
overridevirtual

Implements ITileCalibTool.

Definition at line 106 of file TileCisDefaultCalibTool.cxx.

106  {
107  ATH_MSG_INFO( "initialize()" );
108 
109  // get TileHWID helper
111 
112  // get TileCabling Service
113  CHECK( m_cablingSvc.retrieve() );
114  m_cabling = m_cablingSvc->cablingService();
115  int runPeriod = m_cabling->runPeriod();
116 
117  if (runPeriod==3) {
118  if ( m_fragIDsDemonstrators.empty()) {
119  m_fragIDsDemonstrators.push_back (0x10d); // LBA14 is demonstrator in RUN3
120  }
121  }
122 
123  if ( not m_fragIDsDemonstrators.empty() ) {
124 
126 
127  std::ostringstream os;
128  for (int fragID : m_fragIDsDemonstrators) {
129  os << " 0x" << std::hex << fragID << std::dec;
130  }
131 
132  ATH_MSG_INFO("Special settings in histograms for demonstrator modules (frag IDs):" << os.str());
133  }
134 
136 
137  // get TileInfo
139 
140  // set important constants
141  m_dac2Charge[0] = 100.* 2.0 * 4.096 / double(m_tileInfo->ADCmax()); // 100 pF * 2 for legacy
142  m_dac2Charge[1] = 5.2 * 2.0 * 4.096 / double(m_tileInfo->ADCmax()); // effective 5.2 pF * 2 for 5 pF capacitor
143  m_dac2Charge[2] = 200.* 4.096 / double(m_tileInfo->ADCmax()); // 200 pF for demonstrator - similar to legacy
144  m_dac2Charge[3] = 5.2 * 4.096 / double(m_tileInfo->ADCmax()); // effective value of small capacitor is twice smaller for demonstrator
145 
146  // the same overflow limit for the moment, can be changed later
151 
152  m_defaultCalib[0] = 1.29;
153  m_defaultCalib[1] = 81.8;
155  m_defaultCalib[3] = m_defaultCalib[1] / 2;
156 
157  if (!m_useSmallCap) {
161  m_chargeMin[3] = m_chargeMinHi * 2;
162  }
163 
167  m_chargeMax[3] = m_chargeMaxHi * 2; // high gain in demo is up to 25 pC istead of 12.5 pC
168 
173 
178 
181 
182  return StatusCode::SUCCESS;
183 }

◆ initNtuple()

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

Implements ITileCalibTool.

Definition at line 185 of file TileCisDefaultCalibTool.cxx.

185  {
186  ATH_MSG_INFO( "initialize(" << runNumber << "," << runType << "," << rootFile << ")" );
187 
188  return StatusCode::SUCCESS;
189 }

◆ 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 187 of file TileCisDefaultCalibTool.h.

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

◆ 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 191 of file TileCisDefaultCalibTool.h.

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

◆ 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 798 of file TileCisDefaultCalibTool.cxx.

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

Member Data Documentation

◆ m_bitStatus

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

Definition at line 161 of file TileCisDefaultCalibTool.h.

◆ m_cabling

const TileCablingService* TileCisDefaultCalibTool::m_cabling
private

Definition at line 92 of file TileCisDefaultCalibTool.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileCisDefaultCalibTool::m_cablingSvc
private

Definition at line 93 of file TileCisDefaultCalibTool.h.

◆ m_calib

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

Definition at line 143 of file TileCisDefaultCalibTool.h.

◆ m_chargeMax

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

Definition at line 171 of file TileCisDefaultCalibTool.h.

◆ m_chargeMaxHi

double TileCisDefaultCalibTool::m_chargeMaxHi
private

Definition at line 122 of file TileCisDefaultCalibTool.h.

◆ m_chargeMaxLo

double TileCisDefaultCalibTool::m_chargeMaxLo
private

Definition at line 124 of file TileCisDefaultCalibTool.h.

◆ m_chargeMin

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

Definition at line 170 of file TileCisDefaultCalibTool.h.

◆ m_chargeMinHi

double TileCisDefaultCalibTool::m_chargeMinHi
private

Definition at line 123 of file TileCisDefaultCalibTool.h.

◆ m_chargeMinLo

double TileCisDefaultCalibTool::m_chargeMinLo
private

Definition at line 125 of file TileCisDefaultCalibTool.h.

◆ m_chi2

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

Definition at line 147 of file TileCisDefaultCalibTool.h.

◆ m_dac2Charge

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

Definition at line 169 of file TileCisDefaultCalibTool.h.

◆ m_defaultCalib

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

Definition at line 168 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 98 of file TileCisDefaultCalibTool.h.

◆ m_DigitsContainerName

std::string TileCisDefaultCalibTool::m_DigitsContainerName
private

Definition at line 105 of file TileCisDefaultCalibTool.h.

◆ m_doSampleChecking

bool TileCisDefaultCalibTool::m_doSampleChecking
private

Definition at line 139 of file TileCisDefaultCalibTool.h.

◆ m_dqStatusKey

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

Definition at line 97 of file TileCisDefaultCalibTool.h.

◆ m_edgeSample

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

Definition at line 152 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 175 of file TileCisDefaultCalibTool.h.

◆ m_infoName

std::string TileCisDefaultCalibTool::m_infoName
private

Definition at line 178 of file TileCisDefaultCalibTool.h.

◆ m_linfitMax

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

Definition at line 173 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxHi

double TileCisDefaultCalibTool::m_linfitMaxHi
private

Definition at line 128 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxHiDemo

double TileCisDefaultCalibTool::m_linfitMaxHiDemo
private

Definition at line 134 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxLo

double TileCisDefaultCalibTool::m_linfitMaxLo
private

Definition at line 130 of file TileCisDefaultCalibTool.h.

◆ m_linfitMaxLoDemo

double TileCisDefaultCalibTool::m_linfitMaxLoDemo
private

Definition at line 136 of file TileCisDefaultCalibTool.h.

◆ m_linfitMin

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

Definition at line 172 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinHi

double TileCisDefaultCalibTool::m_linfitMinHi
private

Definition at line 129 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinHiDemo

double TileCisDefaultCalibTool::m_linfitMinHiDemo
private

Definition at line 135 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinLo

double TileCisDefaultCalibTool::m_linfitMinLo
private

Definition at line 131 of file TileCisDefaultCalibTool.h.

◆ m_linfitMinLoDemo

double TileCisDefaultCalibTool::m_linfitMinLoDemo
private

Definition at line 137 of file TileCisDefaultCalibTool.h.

◆ m_maxAmp

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

Definition at line 174 of file TileCisDefaultCalibTool.h.

◆ m_maxPed

double TileCisDefaultCalibTool::m_maxPed
private

Definition at line 114 of file TileCisDefaultCalibTool.h.

◆ m_MeanMap

TAdcDoubleMap TileCisDefaultCalibTool::m_MeanMap
private

Definition at line 87 of file TileCisDefaultCalibTool.h.

◆ m_MeanSqMap

TAdcDoubleMap TileCisDefaultCalibTool::m_MeanSqMap
private

Definition at line 88 of file TileCisDefaultCalibTool.h.

◆ m_nDAC

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

Definition at line 145 of file TileCisDefaultCalibTool.h.

◆ m_nDigitalErrors

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

Definition at line 146 of file TileCisDefaultCalibTool.h.

◆ m_NDigitalErrorsMap

TAdcIntMap TileCisDefaultCalibTool::m_NDigitalErrorsMap
private

Definition at line 86 of file TileCisDefaultCalibTool.h.

◆ m_NEvtMap

TAdcIntMap TileCisDefaultCalibTool::m_NEvtMap
private

Definition at line 85 of file TileCisDefaultCalibTool.h.

◆ m_nextToEdgeSample

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

Definition at line 153 of file TileCisDefaultCalibTool.h.

◆ m_ntupleID

std::string TileCisDefaultCalibTool::m_ntupleID
private

Definition at line 104 of file TileCisDefaultCalibTool.h.

◆ m_numSamp

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

Definition at line 163 of file TileCisDefaultCalibTool.h.

◆ m_phaseMax

double TileCisDefaultCalibTool::m_phaseMax
private

Definition at line 118 of file TileCisDefaultCalibTool.h.

◆ m_phaseMin

double TileCisDefaultCalibTool::m_phaseMin
private

Definition at line 117 of file TileCisDefaultCalibTool.h.

◆ m_qflag

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

Definition at line 144 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 100 of file TileCisDefaultCalibTool.h.

◆ m_rawChannelContainerName

std::string TileCisDefaultCalibTool::m_rawChannelContainerName
private

Definition at line 103 of file TileCisDefaultCalibTool.h.

◆ m_removePed

bool TileCisDefaultCalibTool::m_removePed
private

Definition at line 111 of file TileCisDefaultCalibTool.h.

◆ m_sampleBit

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

Definition at line 158 of file TileCisDefaultCalibTool.h.

◆ m_scanMap

TMap* TileCisDefaultCalibTool::m_scanMap
private

Definition at line 165 of file TileCisDefaultCalibTool.h.

◆ m_scanMapRMS

TMap* TileCisDefaultCalibTool::m_scanMapRMS
private

Definition at line 166 of file TileCisDefaultCalibTool.h.

◆ m_stuckBitsProbs

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

Definition at line 94 of file TileCisDefaultCalibTool.h.

◆ m_tileHWID

const TileHWID* TileCisDefaultCalibTool::m_tileHWID
private

Definition at line 91 of file TileCisDefaultCalibTool.h.

◆ m_tileInfo

const TileInfo* TileCisDefaultCalibTool::m_tileInfo
private

Definition at line 179 of file TileCisDefaultCalibTool.h.

◆ m_useSmallCap

bool TileCisDefaultCalibTool::m_useSmallCap
private

Definition at line 107 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:158
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileCisDefaultCalibTool::m_scanMap
TMap * m_scanMap
Definition: TileCisDefaultCalibTool.h:165
RunTileTBMonitoring.fragID
fragID
Definition: RunTileTBMonitoring.py:212
TileCisDefaultCalibTool::m_chi2
float(* m_chi2)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:147
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:178
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TileCisDefaultCalibTool::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Definition: TileCisDefaultCalibTool.h:93
TileCisDefaultCalibTool::stuckbitBit
@ stuckbitBit
Definition: TileCisDefaultCalibTool.h:70
TileCisDefaultCalibTool::noiseBit
@ noiseBit
Definition: TileCisDefaultCalibTool.h:64
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
TileCisDefaultCalibTool::digiErrorBit
@ digiErrorBit
Definition: TileCisDefaultCalibTool.h:66
TileCisDefaultCalibTool::m_linfitMin
double m_linfitMin[4]
Definition: TileCisDefaultCalibTool.h:172
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
skel.it
it
Definition: skel.GENtoEVGEN.py:407
python.SystemOfUnits.second
float second
Definition: SystemOfUnits.py:135
TileCisDefaultCalibTool::m_dac2Charge
double m_dac2Charge[4]
Definition: TileCisDefaultCalibTool.h:169
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:81
ReadBchFromCrest.ros
ros
Definition: ReadBchFromCrest.py:73
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
TileCisDefaultCalibTool::m_linfitMinHiDemo
double m_linfitMinHiDemo
Definition: TileCisDefaultCalibTool.h:135
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
TileCisDefaultCalibTool::m_dqStatusKey
SG::ReadHandleKey< TileDQstatus > m_dqStatusKey
Definition: TileCisDefaultCalibTool.h:97
HWIdentifier
Definition: HWIdentifier.h:13
TileCisDefaultCalibTool::m_nDigitalErrors
int(* m_nDigitalErrors)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:146
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:125
TileCisDefaultCalibTool::m_defaultCalib
double m_defaultCalib[4]
Definition: TileCisDefaultCalibTool.h:168
TileCisDefaultCalibTool::m_MeanMap
TAdcDoubleMap m_MeanMap
Definition: TileCisDefaultCalibTool.h:87
NBITS
#define NBITS
Definition: TileCisDefaultCalibTool.h:31
TileCisDefaultCalibTool::m_linfitMaxLo
double m_linfitMaxLo
Definition: TileCisDefaultCalibTool.h:130
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
TileCisDefaultCalibTool::m_linfitMaxHiDemo
double m_linfitMaxHiDemo
Definition: TileCisDefaultCalibTool.h:134
TileCisDefaultCalibTool::probBit
@ probBit
Definition: TileCisDefaultCalibTool.h:63
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:94
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:143
TileCisDefaultCalibTool::rangeBit
@ rangeBit
Definition: TileCisDefaultCalibTool.h:62
TileCisDefaultCalibTool::m_linfitMinHi
double m_linfitMinHi
Definition: TileCisDefaultCalibTool.h:129
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileCisDefaultCalibTool::m_linfitMinLo
double m_linfitMinLo
Definition: TileCisDefaultCalibTool.h:131
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:124
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:92
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TileCisDefaultCalibTool::m_edgeSample
int(* m_edgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:152
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:183
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileCisDefaultCalibTool::m_linfitMaxLoDemo
double m_linfitMaxLoDemo
Definition: TileCisDefaultCalibTool.h:136
TileCisDefaultCalibTool::m_maxPed
double m_maxPed
Definition: TileCisDefaultCalibTool.h:114
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
TileCisDefaultCalibTool::m_maxAmp
double m_maxAmp[4]
Definition: TileCisDefaultCalibTool.h:174
TileCisDefaultCalibTool::m_removePed
bool m_removePed
Definition: TileCisDefaultCalibTool.h:111
TileCisDefaultCalibTool::m_linfitMax
double m_linfitMax[4]
Definition: TileCisDefaultCalibTool.h:173
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
TileCisDefaultCalibTool::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileCisDefaultCalibTool.h:91
TileCisDefaultCalibTool::TDACDoubleMap
std::map< uint32_t, double > TDACDoubleMap
Definition: TileCisDefaultCalibTool.h:75
TileCisDefaultCalibTool::m_NEvtMap
TAdcIntMap m_NEvtMap
Definition: TileCisDefaultCalibTool.h:85
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:145
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:80
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:67
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
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:226
python.OnlineISConfiguration.runType
def runType
Definition: OnlineISConfiguration.py:112
NBSTATUS
#define NBSTATUS
Definition: TileCisDefaultCalibTool.h:32
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:170
TileCisDefaultCalibTool::m_useSmallCap
bool m_useSmallCap
Definition: TileCisDefaultCalibTool.h:107
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:100
TileCisDefaultCalibTool::nextToEdgeSamp
@ nextToEdgeSamp
Definition: TileCisDefaultCalibTool.h:69
TileCisDefaultCalibTool::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileCisDefaultCalibTool.h:98
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
TileCisDefaultCalibTool::includedBit
@ includedBit
Definition: TileCisDefaultCalibTool.h:60
TileCisDefaultCalibTool::m_bitStatus
unsigned short(* m_bitStatus)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN][NBSTATUS]
Definition: TileCisDefaultCalibTool.h:161
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
TileCisDefaultCalibTool::m_chargeMaxHi
double m_chargeMaxHi
Definition: TileCisDefaultCalibTool.h:122
charge
double charge(const T &p)
Definition: AtlasPID.h:997
TileCisDefaultCalibTool::m_scanMapRMS
TMap * m_scanMapRMS
Definition: TileCisDefaultCalibTool.h:166
TileCisDefaultCalibTool::m_ntupleID
std::string m_ntupleID
Definition: TileCisDefaultCalibTool.h:104
TileCisDefaultCalibTool::m_fragIDsDemonstrators
std::vector< int > m_fragIDsDemonstrators
Definition: TileCisDefaultCalibTool.h:175
TileCisDefaultCalibTool::TDACDoubleMapIter
std::map< uint32_t, double >::iterator TDACDoubleMapIter
Definition: TileCisDefaultCalibTool.h:76
TileDQstatus::cispar
const uint32_t * cispar() const
CIS parameters.
Definition: TileDQstatus.h:152
TileCisDefaultCalibTool::m_NDigitalErrorsMap
TAdcIntMap m_NDigitalErrorsMap
Definition: TileCisDefaultCalibTool.h:86
TileCisDefaultCalibTool::m_nextToEdgeSample
int(* m_nextToEdgeSample)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:153
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:294
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:123
TileCisDefaultCalibTool::m_phaseMax
double m_phaseMax
Definition: TileCisDefaultCalibTool.h:118
TileCablingService::channel2hole
static int channel2hole(int ros, int channel)
Definition: TileCablingService.cxx:1946
DeMoScan.first
bool first
Definition: DeMoScan.py:534
beamspotnt.rms
rms
Definition: bin/beamspotnt.py:1265
TileCisDefaultCalibTool::m_doSampleChecking
bool m_doSampleChecking
Definition: TileCisDefaultCalibTool.h:139
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
TileCisDefaultCalibTool::injRMSBit
@ injRMSBit
Definition: TileCisDefaultCalibTool.h:65
TileCisDefaultCalibTool::setBit
void setBit(QualityType qb, int &bitflag)
Definition: TileCisDefaultCalibTool.h:187
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
TileCisDefaultCalibTool::arrayString
TString arrayString(int ros, int drawer, int chan, int gain)
Definition: TileCisDefaultCalibTool.h:195
TileCisDefaultCalibTool::edgeSamp
@ edgeSamp
Definition: TileCisDefaultCalibTool.h:68
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:74
TileCisDefaultCalibTool::m_tileInfo
const TileInfo * m_tileInfo
Definition: TileCisDefaultCalibTool.h:179
TileCablingService::runPeriod
int runPeriod() const
Definition: TileCablingService.h:280
TileCisDefaultCalibTool::m_phaseMin
double m_phaseMin
Definition: TileCisDefaultCalibTool.h:117
TileCisDefaultCalibTool::m_linfitMinLoDemo
double m_linfitMinLoDemo
Definition: TileCisDefaultCalibTool.h:137
TileCisDefaultCalibTool::m_chargeMax
double m_chargeMax[4]
Definition: TileCisDefaultCalibTool.h:171
TileCisDefaultCalibTool::m_qflag
int(* m_qflag)[Tile::MAX_DRAWER][Tile::MAX_CHAN][Tile::MAX_GAIN]
Definition: TileCisDefaultCalibTool.h:144
TileCisDefaultCalibTool::calibratedBit
@ calibratedBit
Definition: TileCisDefaultCalibTool.h:61
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:88
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:163
TileCisDefaultCalibTool::m_linfitMaxHi
double m_linfitMaxHi
Definition: TileCisDefaultCalibTool.h:128
TileCalibUtils::MAX_GAIN
static const unsigned int MAX_GAIN
Number of gains per channel
Definition: TileCalibUtils.h:142