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

#include <TilePulseForTileMuonReceiver.h>

Inheritance diagram for TilePulseForTileMuonReceiver:
Collaboration diagram for TilePulseForTileMuonReceiver:

Public Member Functions

 TilePulseForTileMuonReceiver (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~TilePulseForTileMuonReceiver ()
 
virtual StatusCode initialize () override
 initialize method More...
 
virtual StatusCode execute () override
 execute method More...
 
virtual StatusCode finalize () override
 finalize method More...
 
virtual bool isClonable () const override final
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
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 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
 

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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

SG::ReadHandleKey< TileDigitsContainerm_inputDigitContainerKey {this, "InputTileDigitContainer","",""}
 
std::string m_inputDigitContainerName {""}
 
SG::ReadHandleKey< TileHitContainerm_hitContainerKey
 
SG::WriteHandleKey< TileDigitsContainerm_muRcvDigitsContainerKey
 
SG::WriteHandleKey< TileRawChannelContainerm_muRcvRawChannelContainerKey
 
SG::ReadCondHandleKey< TileSamplingFractionm_samplingFractionKey
 Name of TileSamplingFraction in condition store. More...
 
ServiceHandle< TileCablingSvcm_cablingSvc
 Name of Tile cabling service. More...
 
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number service to use. More...
 
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "Tile_PulseForTileMuonReceiver", ""}
 Random Stream Name. More...
 
SG::ReadCondHandleKey< TileSampleNoisem_sampleNoiseKey
 Name of TileSampleNoise in condition store. More...
 
SG::ReadCondHandleKey< TileEMScalem_emScaleKey
 Name of TileEMScale in condition store. More...
 
SG::ReadCondHandleKey< TilePulsem_pulseShapeKey
 Name of TilePulseShape in condition store. More...
 
SG::ReadCondHandleKey< TileBadChannelsm_badChannelsKey
 Name of TileBadChannels in condition store. More...
 
ToolHandle< TileRawChannelBuilderMFm_MuRcvBuildTool
 
Gaudi::Property< std::string > m_infoName {this, "TileInfoName", "TileInfo", "TileInfo object name"}
 
Gaudi::Property< bool > m_integerDigits {this, "IntegerDigits", false, "Round digits (default=false)"}
 
Gaudi::Property< bool > m_maskBadChannels {this, "MaskBadChannels", false, "Remove channels tagged bad (default=false)"}
 
Gaudi::Property< bool > m_useCoolPulseShapes {this, "UseCoolPulseShapes", false, "Pulse shapes from database (default=false)"}
 
Gaudi::Property< bool > m_tileNoise {this, "UseCoolNoise", false, "Noise from database (default=false)"}
 
Gaudi::Property< bool > m_tilePedestal {this, "UseCoolPedestal", false, "Pedestal from database (default=false)"}
 
Gaudi::Property< bool > m_rndmEvtOverlay {this, "RndmEvtOverlay", false, "Pileup and/or noise added by overlaying random events (default=false)"}
 
Gaudi::Property< bool > m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."}
 
const TileIDm_tileID
 
const TileHWIDm_tileHWID
 
const TileInfom_tileInfo
 
const TileCablingServicem_cablingService
 TileCabling instance. More...
 
int m_nSamples
 Number of time slices for each channel. More...
 
int m_iTrig
 Index of the triggering time slice. More...
 
int m_adcMax
 ADC saturation value. More...
 
double m_tileThresh
 Actual threshold value. More...
 
int m_nShape
 Number of bins in pulse shape. More...
 
int m_nBinsPerX
 Number of bins per bunch crossing in pulse shape. More...
 
int m_binTime0
 Index of time=0 bin for pulse shape. More...
 
double m_timeStep
 Time step in pulse shape: 25.0 / nBinsPerX. More...
 
PileUpMergeSvcm_mergeSvc
 Pointer to PileUpMergeService. More...
 
std::vector< double > m_shapeMuonReceiver
 Muon receiver pulse shape. More...
 
int m_runPeriod
 
DataObjIDColl m_extendedExtraObjects
 
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 77 of file TilePulseForTileMuonReceiver.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TilePulseForTileMuonReceiver()

TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 75 of file TilePulseForTileMuonReceiver.cxx.

76  : AthAlgorithm(name, pSvcLocator)
77  , m_tileID(nullptr)
78  , m_tileHWID(nullptr)
79  , m_tileInfo(nullptr)
80  , m_cablingService(nullptr)
81  , m_nSamples(0)
82  , m_iTrig(0)
83  , m_adcMax(0)
84  , m_tileThresh(0.0)
85  , m_nShape(0)
86  , m_nBinsPerX(0)
87  , m_binTime0(0)
88  , m_timeStep(0.0)
89  , m_mergeSvc(nullptr)
90  , m_runPeriod(0)
91 {
92 }

◆ ~TilePulseForTileMuonReceiver()

TilePulseForTileMuonReceiver::~TilePulseForTileMuonReceiver ( )
virtual

Definition at line 96 of file TilePulseForTileMuonReceiver.cxx.

96  {
97 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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 TilePulseForTileMuonReceiver::execute ( )
overridevirtual

execute method

Definition at line 197 of file TilePulseForTileMuonReceiver.cxx.

197  {
198 
199  if (m_runPeriod==0) {
200  ATH_MSG_VERBOSE( "ATT: RUN1 settings TilePulseForTileMuonReceiver will end now" );
201  return StatusCode::SUCCESS;
202  } else {
203  ATH_MSG_DEBUG( "Executing TilePulseForTileMuonReceiver" );
204  }
205 
206  const EventContext& ctx = Gaudi::Hive::currentContext();
207 
208  // Conversion from TMDB channel number to channel number in a drawer: EB (0-3) LB (0-8)
209  // Including the cells used in the "The potential of using the ATLAS Tile calorimeter in Phase-II for the
210  // Level-0 muon trigger" (ATL-COM-TILECAL-2015-007.pdf): ALL D-layer + BC-8.
211  //
212 #define nEBchan 6
213 #define nLBchan 9
214  // EB: D5(L,R),D6(L,R),D4(L,R)
215  int EBchan[nEBchan]={17,16,37,38,3,2};
216  // LB: D0,D1(L,R),D2(L,R),D3(L,R),BC8(L,R)
217  int LBchan[nLBchan]={0,13,14,25,24,41,44,39,40};
218  // Set to maximum possible index
219 #if (nEBchan > nLBchan)
220  double pDigitSamplesArray[nEBchan][7];
221  double pDigitSamplesRndmArray[nEBchan][7];
222 #else
223  double pDigitSamplesArray[nLBchan][7];
224  double pDigitSamplesRndmArray[nLBchan][7];
225 #endif
226 
227  // PULSE
228 
229  // Random generators output arrays
230  //
231  double Rndm[16];
232  double Rndm_dG[1];
233 
234  // Noise and pedestal from db
235  //
236  double pedSim = 0.;
237  double sigma_Hfn1 = 0.;
238  double sigma_Hfn2 = 0.;
239  double sigma_Norm = 0.;
240  double sigmaSim(0.0);
241 
242  // Measured parameters: noise, pedestal and calibration
243  //
244  double muRcv_NoiseSigma;
245  double muRcv_Ped;
246  double muRcv_Calib;
247  double muRcv_Max;
248 
250  ATH_CHECK( emScale.isValid() );
251 
252  const TileBadChannels* badChannels = nullptr;
253  if (m_maskBadChannels) {
255  ATH_CHECK( badChannelsHandle.isValid() );
256  badChannels = *badChannelsHandle;
257  }
258 
259  const TilePulse* pulse = nullptr;
260  if (m_useCoolPulseShapes) {
262  ATH_CHECK( pulseShape.isValid() );
263  pulse = pulseShape.retrieve();
264  }
265 
266  const TileSampleNoise* sampleNoise = nullptr;
267  if (m_tilePedestal || m_tileNoise) {
269  ATH_CHECK( sampleNoiseHandle.isValid() );
270  sampleNoise = sampleNoiseHandle.retrieve();
271  }
272 
273  // Get hit container from TES
274  //
276  ATH_CHECK( hitContainer.isValid() );
277 
278  // Set up buffers for handling information in a single collection.
279  //
280  IdentifierHash idhash;
281  IdContext drawer_context = m_tileHWID->drawer_context();
282 
283  // Get a container for the digits
284  //
285  auto muRcvDigitsContainer = std::make_unique<TileMutableDigitsContainer>(true,
288  ATH_CHECK( muRcvDigitsContainer->status() );
289 
290  // Get a container for the raw channels
291  //
292  auto muRcvRawChannelContainer = std::make_unique<TileMutableRawChannelContainer>(true,
296  ATH_CHECK( muRcvRawChannelContainer->status() );
297 
298  // Prepare container for MC Overlay procedure
299  //
302  std::unique_ptr<TileMutableDigitsContainer> backgroundDigitContainer{};
303 
304  if (m_rndmEvtOverlay) {
305 
306  ATH_MSG_DEBUG("Prepare background container for MC Overlay procedure");
307 
308  backgroundDigitContainer = std::make_unique<TileMutableDigitsContainer>(true,
311  ATH_CHECK( backgroundDigitContainer->status() );
312 
314  typedef PileUpMergeSvc::TimedList<TileDigitsContainer>::type TimedDigitContList;
315  TimedDigitContList digitContList;
317  ATH_MSG_DEBUG( "TileDigitsCnt successfully retrieved ");
318 
319  if (digitContList.size() == 0) {
320  ATH_MSG_WARNING( "No overlay done ... ");
321  return StatusCode::SUCCESS;
322  }
323 
324  TimedDigitContList::iterator iTzeroDigitCont(digitContList.begin());
325  for (const auto* digitCollection : *(iTzeroDigitCont->second)) {
326  for (const auto* digit : *digitCollection) {
327  auto pDigits = std::make_unique<TileDigits>(*digit);
328  ATH_CHECK(backgroundDigitContainer->push_back(std::move(pDigits)));
329  }
330  }
331  } else {
332  SG::ReadHandle<TileDigitsContainer> tileDigitsContainerHandle(m_inputDigitContainerKey, ctx);
333  if (tileDigitsContainerHandle.isValid()) {
334  for (const auto* digitCollection : *tileDigitsContainerHandle) {
335  for (const auto* digit : *digitCollection) {
336  auto pDigits = std::make_unique<TileDigits>(*digit);
337  ATH_CHECK(backgroundDigitContainer->push_back(std::move(pDigits)));
338  }
339  }
340  } else {
341  ATH_MSG_ERROR("ReadHandle to Background Digits is invalid.");
342  return StatusCode::FAILURE;
343  }
344  }
345 
346  collItrRndm = backgroundDigitContainer->begin();
347  lastCollRndm = backgroundDigitContainer->end();
348  }
349 
350  // Vector of digits to set into the container
351  //
352  std::vector<float> digitsBuffer(m_nSamples);
353 
354  // Vector(s) for MC Overlay procedure
355  //
356  std::vector<float> digitsBuffer_rndm(m_nSamples);
357  std::vector<bool> good_bkg( 9 , false );
358 
359  // Prepare RNG service
360  //
361  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, m_randomStreamName);
362  rngWrapper->setSeed( m_randomStreamName, Gaudi::Hive::currentContext() );
363 
365  // (a.0) iterate over collections in the HIT container: access 'ros' and 'drawer'
366  //
368  ATH_CHECK( samplingFraction.isValid() );
369 
370  for (const TileHitCollection* hitCollection : *hitContainer) {
371 
372  // Get array of HWID's for this drawer (stored locally).
373  //
374  HWIdentifier drawer_id = m_tileHWID->drawer_id(hitCollection->identify());
375  int ros = m_tileHWID->ros(drawer_id);
376  int drawer = m_tileHWID->drawer(drawer_id);
377  int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
378  bool eb_ros = ((ros == TileHWID::EXTBAR_POS) || (ros == TileHWID::EXTBAR_NEG));
379  int upperLim = (eb_ros) ? nEBchan : nLBchan;
380 
381  ATH_MSG_VERBOSE("(A.00) Looping over all collections for TMDB in the HIT container");
382  memset(pDigitSamplesArray, 0, sizeof(pDigitSamplesArray));
383 
384  ATH_MSG_VERBOSE("(A.01) Going through collection ROS/DRAWER : "<< ros <<"/"<< drawer);
385  ATH_MSG_DEBUG(" Going through collection ROS/DRAWER : "<< ros <<"/"<< drawer);
386 
388  ATH_MSG_VERBOSE("(A.02) ROS: "<< ros << " drawer: " << drawer << " is connected");
389  } else {
390  ATH_MSG_VERBOSE("(A.02) ROS: "<< ros << " drawer: " << drawer << " is NOT connected");
391  continue;
392  }
393 
394  // Get drawer idhash for later access to the database to get ped and noise
395  //
396  m_tileHWID->get_hash(drawer_id, idhash, &drawer_context);
397 
398  // **************************************************************
399  //
400  // Prepare buffer for MC Overlay procedure: pileup digits
401  //
402 
403  memset(pDigitSamplesRndmArray, 0, sizeof(pDigitSamplesRndmArray));
404 
405  if (m_rndmEvtOverlay && collItrRndm != lastCollRndm) {
406 
407  const TileDigitsCollection *bkgDigitCollection(*collItrRndm);
408 
409  if (hitCollection->identify() != bkgDigitCollection->identify()) {
410  ATH_MSG_ERROR ( "Frag IDs for hit collection and digits overlay collection do not match "
411  << MSG::hex << hitCollection->identify() << " != " << bkgDigitCollection->identify()
412  << MSG::dec );
413  return StatusCode::FAILURE;
414  }
415 
416  ATH_MSG_DEBUG("Prepare buffer (digitsBuffer_rndm) for MC Overlay procdure: pileup digits");
417 
418  for (const auto* bkgDigit : *bkgDigitCollection) {
419  bool good_channel = true;
420  /* Get digit HWIdentifier (= adc_id) */
421  HWIdentifier adc_id_rndm = (*bkgDigit).adc_HWID();
422  int channel = m_tileHWID->channel(adc_id_rndm);
423  ATH_MSG_VERBOSE ( "check channels from adc id in rndm container (TMDB channel): "<< channel );
424  /* Get digits */
425  digitsBuffer_rndm = (*bkgDigit).samples();
426  /* Get number of sample and compare with nSamples */
427  int nsamp_rndm = digitsBuffer_rndm.size();
428  if (nsamp_rndm != m_nSamples) {
429  digitsBuffer_rndm.resize(m_nSamples);
430  if (nsamp_rndm>0) {
431  for (int js=nsamp_rndm; js<m_nSamples; ++js) {
432  digitsBuffer_rndm[js] = digitsBuffer_rndm[js-1];
433  }
434  }
435  }
436  /* Fill the background digits array for the current channel and set a flag if any digit is NULL */
437  for (int j=0; j< m_nSamples;j++) {
438  pDigitSamplesRndmArray[channel][j] = digitsBuffer_rndm[j];
439  // If any digit is 0 something should be wrong so flag it in order to use during overlay the standard
440  // path to fill the expected background level for that channel
441  if (pDigitSamplesRndmArray[channel][j]==0) good_channel = false;
442  }
443  good_bkg[channel] = good_channel;
444 
445  if (msgLvl(MSG::VERBOSE)){
446  msg(MSG::VERBOSE) << " Digits from pileup background " << channel << " " << ros << " " << drawer << " " << m_tileHWID->to_string(adc_id_rndm)<<" | ";
447  for (int j=0; j< (int) digitsBuffer_rndm.size(); j++) msg(MSG::VERBOSE) << digitsBuffer_rndm[j] <<" | ";
448  msg(MSG::VERBOSE) << "---> | ";
449  for (int j=0; j< (int) digitsBuffer_rndm.size(); j++) msg(MSG::VERBOSE) << pDigitSamplesRndmArray[channel][j] << " | ";
450  msg(MSG::VERBOSE) << endmsg;
451  }
452  }
453  ++collItrRndm; // skip to next digi collection
454  }
455 
457  // (a.1) Iterate over all hits in a collection : access 'channel'
458  //
459 
460  if ( hitCollection->empty() ) ATH_MSG_DEBUG("-- No hits in this drawer! Filling channels with either noise and pedestal or MC pileup overlay. --");
461 
462  for (const TileHit* tile_hit : *hitCollection) {
463 
464  // Get the pmt ID
465  //
466  Identifier pmt_id = tile_hit->pmt_ID();
467 
468  // keep only D-cells and in addition cell BC8
469  //
470  int tower = m_tileID->tower(pmt_id);
471  int sample = m_tileID->sample(pmt_id);
472  if ( ! ((sample == TileID::SAMP_D) || (sample == TileID::SAMP_BC && tower == 7)) ) continue;
473 
474  ATH_MSG_VERBOSE("(B.00) ++ Iterate over all the D layer channels with hits");
475 
476  // In COOL database data will be organized acoording to TMDB channel (TMDBchan): 0..n with n=5 in EB and n=8 in LB
477  int TMDBchan;
478  // In here we need to access the real TILE HW channel (TILEchan) that it has a correspondance with TMDB chan given by EBchan and LBNchan
479  int TILEchan;
480 
481  if (eb_ros) {
482  // cells D5, D6 and then D4 at the end
483  if (m_tileID->side(pmt_id) > 0)
484  TMDBchan = 1 - m_tileID->pmt(pmt_id) + ((tower>9) ? (tower - 10) : 4);
485  else
486  TMDBchan = m_tileID->pmt(pmt_id) + ((tower>9) ? (tower - 10) : 4);
487 
488  TILEchan=EBchan[TMDBchan];
489  } else {
490  // Barrel (extension for HL-LHC)
491  if (tower == 0) {
492  TMDBchan = 0; // cell D0, channel 0 always
493  } else {
494  // cells D1. D2, D3 and BC8
495  if (m_tileID->side(pmt_id) > 0)
496  TMDBchan = 1 - m_tileID->pmt(pmt_id) + ((tower<7) ? (tower-1) : 7);
497  else
498  TMDBchan = m_tileID->pmt(pmt_id) + ((tower<7) ? (tower-1) : 7);
499  }
500 
501  TILEchan=LBchan[TMDBchan];
502  }
503 
504  double* pDigitSamples = pDigitSamplesArray[TMDBchan];
505 
506  if (msgLvl(MSG::VERBOSE)){
507  HWIdentifier adc_id = m_tileHWID->adc_id(drawer_id, TMDBchan, TileID::LOWGAIN);
508 
509  ATH_MSG_VERBOSE( "(B.01) Correct pmt being transported in XXchan[]: "<<TMDBchan<<" "<<TILEchan<< "=?"
511  << " For reference get TMDB adc_id: " << m_tileHWID->to_string(adc_id) );
512  ATH_MSG_VERBOSE( "(B.02) New hit in ROS/DRAWER/PMT "<<ros<<"/"<<drawer<<"/"<<TMDBchan<<" ("<<TILEchan<<")"
513  << " pmt_id "<< m_tileID->to_string(pmt_id,-1)
514  << " adc_id "<< m_tileHWID->to_string(adc_id) );
515  }
516 
517  // Scintillator Energy -> Cell Energy (uses sampling fraction)
518  //
520  double hit_calib = samplingFraction->getSamplingFraction(drawerIdx, channel);
521  hit_calib = std::round(hit_calib * 1000) / 1000;
522 
523  ATH_MSG_VERBOSE("------ Sampling fraction: " << hit_calib);
524 
526  // (a.2) Loop over the hits of this channel
527  // Calibrations are applied per subhit and energy added per subhit of a channel
528  //
529 
530  int n_hits = tile_hit->size();
531 
532  ATH_MSG_VERBOSE("------ Number of hits in channel: " << n_hits);
533 
534  for (int ihit = 0; ihit < n_hits; ++ihit) {
535 
536  ATH_MSG_VERBOSE("(C.00) ++ Iterating over the hits of channel " << TILEchan <<": hit " << ihit <<"/"<< n_hits);
537 
538  double e_hit = tile_hit->energy(ihit); // [MeV] energy deposited in scintillator
539  double e_pmt = e_hit * hit_calib; // [MeV] true cell energy
540 
541  ATH_MSG_VERBOSE("(C.01) Energy in scintillator [MeV]: " << e_hit << " true cell energy [MeV]: " << e_pmt);
542 
543  double t_hit = tile_hit->time(ihit);
544 
545  ATH_MSG_VERBOSE("(C.02.01) Phase " << t_hit);
546 
547  // Load pulse
548  //
549  int k = 0;
550  float phase = 0.0;
551  float y = 0.0;
552  float dy = 0.0;
553  double shape = 0.0;
554 
555  int ishift = (int) (t_hit / m_timeStep + 0.5);
556 
557  ATH_MSG_VERBOSE( "(C.02.02) ishift :" << t_hit << "/" << m_timeStep << "+0.5 = " << ishift);
558 
559  if (m_useCoolPulseShapes) {
560  for (int js = 0; js < m_nSamples; ++js) {
561  k = m_binTime0 + (js - m_iTrig) * m_nBinsPerX - ishift;
562  if (k < 0) k = 0;
563  else if (k > m_nShape) k = m_nShape;
564 
565  ATH_MSG_VERBOSE( "(C.02.03) k : " << m_binTime0 << "+(" << js << "-" << m_iTrig << ")*" << m_nBinsPerX << "-" << ishift << " = " << k);
566 
567  phase = (k - m_binTime0) * m_timeStep;
568 
569  ATH_MSG_VERBOSE( "(C.02.04) phase : " << k << "-" << m_binTime0 << "*" << m_timeStep << " = " << phase);
570 
571  pulse->getPulseShapeYDY(drawerIdx, TMDBchan, TileID::LOWGAIN, phase, y, dy);
572  shape = (double) y;
573  pDigitSamples[js] += e_pmt * shape; // MeV
574 
575  ATH_MSG_VERBOSE( "(C.03.0) Sample no.= " << js
576  << " idx= " << k
577  << " Shape wt. = " << shape
578  << " Amp = " << pDigitSamples[js] << " [MeV]");
579  } //END loop over samples
580  } else {
581  for (int js = 0; js < m_nSamples; ++js) {
582  k = m_binTime0 + (js - m_iTrig) * m_nBinsPerX - ishift;
583  if (k < 0) k = 0;
584  else if (k > m_nShape) k = m_nShape;
585 
586  ATH_MSG_VERBOSE( "(C.02.03) k : " << m_binTime0 << "+(" << js << "-" << m_iTrig << ")*" << m_nBinsPerX << "-" << ishift << " = " << k);
587 
588  pDigitSamples[js] += e_pmt * m_shapeMuonReceiver[k]; // MeV
589 
590  ATH_MSG_VERBOSE( "(C.03.0) Sample no.= " << js
591  << " idx= " << k
592  << " Shape wt. = " << m_shapeMuonReceiver[k]
593  << " Amp = " << pDigitSamples[js]
594  << "[MeV] Energy: " << e_pmt << " LOGAIN from TileInfo");
595  } //END loop over samples
596  } // END if (m_useCoolPulseShapes)
597  } // END loop over sub-HITS
598 
599  ATH_MSG_VERBOSE("++ ENDED Loop over hits for a channel");
600  ATH_MSG_DEBUG("(C.04) Went over " << n_hits << " hits for channel"
601  << m_tileHWID->to_string(drawer_id,-2) << "/" << TMDBchan << " (" << TILEchan << ")"
602  << " digits [MeV] "<< pDigitSamples[0]
603  << "/" << pDigitSamples[1]
604  << "/" << pDigitSamples[2]
605  << "/" << pDigitSamples[3]
606  << "/" << pDigitSamples[4]
607  << "/" << pDigitSamples[5]
608  << "/" << pDigitSamples[6]);
609  ATH_MSG_VERBOSE("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
610  } // END loop over a HIT collection
611 
612  ATH_MSG_VERBOSE("++ END loop over a HIT collection");
613 
615  // (a.3) The pulse has a shape and a amplitude in MeV now it is converted into ADC
616  // counts and either add NOISE and PEDESTAL or the OVERLAY digits
617  //
618  // PEDESTAL [ADC counts] and NOISE [ADC counts] as stored in Tile
619  // Conditions (FIXED values but also flag for collection from COOL)
620  //
621  // Keep containers for each module (each partition) the same size
622  // between events i.e. ALL channels are filled even with ZERO energy
623  //
624 
625  ATH_MSG_VERBOSE("++ START filling of channels with background either noise+pedestal or overlay");
626 
627  for (int TMDBchan = 0; TMDBchan < upperLim; ++TMDBchan) {
628 
629  double* pDigitSamples=pDigitSamplesArray[TMDBchan];
630  int TILEchan = (eb_ros) ? EBchan[TMDBchan] : LBchan[TMDBchan];
631 
632  HWIdentifier adc_id = m_tileHWID->adc_id(drawer_id, TMDBchan, TileID::LOWGAIN);
633 
634  ATH_MSG_DEBUG( "(D.) Going now to channel " << " TMDBchan: " << TMDBchan << " TILEchan: " << TILEchan);
635  ATH_MSG_DEBUG( "(D.00) Add noise and pedestal in "
636  << " TMDBchan: " << TMDBchan << " TILEchan: " << TILEchan
637  << " ROS: " << ros
638  << " drawer: " << drawer
639  << " drawer idx: " << drawerIdx
640  << " drawer_id: " << m_tileHWID->to_string(drawer_id,-2)
641  << " channel: " << m_tileHWID->to_string(adc_id,-1));
642  // adc/pCb / MeV/pCb = adc/MeV
643  //
644  muRcv_Max = m_tileInfo->MuRcvMax(adc_id); // [adc]
645  muRcv_Calib = m_tileInfo->MuRcvCalib(adc_id); // pCb->[adc]
646  double mev2ADC_factor = muRcv_Calib / emScale->calibrateChannel(drawerIdx,TILEchan,TileID::LOWGAIN, 1.
649  ATH_MSG_VERBOSE( "(D.01) Channel: "<<ros<<'/'<<drawer<<'/'<< TMDBchan
650  << " adc/pCb: "<< muRcv_Calib
651  << " Mev/pCb: "<< emScale->calibrateChannel( drawerIdx,
652  TILEchan,
654  1.,
657  << " final calibration factor adc/MeV: "<< mev2ADC_factor);
658 
659  ATH_MSG_VERBOSE( "(D.02) Pulse digits [MeV]:"
660  << " " << pDigitSamples[0]
661  << " " << pDigitSamples[1]
662  << " " << pDigitSamples[2]
663  << " " << pDigitSamples[3]
664  << " " << pDigitSamples[4]
665  << " " << pDigitSamples[5]
666  << " " << pDigitSamples[6]
667  << " [All ZERO if there is no hit in channel.] ");
668 
669  if ( good_bkg[TMDBchan] ) {
670  // Collecting digits for MC Overlay procedure from overlay container
671  // IF good digits ere collected (no ZEROS <> good_bkg[TMDBchan]==true) then add the background to the simulated digits
672  // ELSE bad digits (any ZEROS <> good_bkg[TMDBchan]==false) then follow the standard path adding muRcv_Ped and muRvc_NoiseSigma
673 
674  ATH_MSG_DEBUG("++ Adding to signal digits -- The MC PILE-UP OVERLAY digits " << m_rndmEvtOverlay << " " << m_integerDigits);
675 
676  for (int js = 0; js < m_nSamples; ++js) {
677  // Signal
678  //
679  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" E_{Signal} [adc]: "<< pDigitSamples[js] * mev2ADC_factor <<" -- Overlay");
680  digitsBuffer[js] = pDigitSamples[js] * mev2ADC_factor;
681  // Pileup
682  //
683  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" E_{PileUp} [adc]: "<< pDigitSamplesRndmArray[TMDBchan][js] <<" -- Overlay");
684  digitsBuffer[js] += pDigitSamplesRndmArray[TMDBchan][js];
685  // Simulated pulse above allowed maximum
686  //
687  if (digitsBuffer[js] > muRcv_Max) digitsBuffer[js] = muRcv_Max;
688  // Rounding the ADC counts
689  //
690  if (m_integerDigits) digitsBuffer[js] = round(digitsBuffer[js]);
691  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" calibration [adc/MeV] "<< mev2ADC_factor <<"-> E_{Signal+PileUp} [adc]: "<< digitsBuffer[js] <<" -- Overlay");
692  }
693  } else {
694  if (m_rndmEvtOverlay) ATH_MSG_INFO("At least one digit is zero in background file using the stadart path to fill pedestal and noise in digits");
695  // Different for each channel_id might be the case in the future (now a const. in TileInfoLoader.cxx)
696  //
697  muRcv_NoiseSigma = m_tileInfo->MuRcvNoiseSigma(adc_id); // [adc]
698  muRcv_Ped = m_tileInfo->MuRcvPed(adc_id); // [adc]
699 
700  ATH_MSG_VERBOSE( "(D.03) Tile Muon Receiver parameters:"
701  << " noi " << muRcv_NoiseSigma
702  << " ped " << muRcv_Ped
703  << " cal " << muRcv_Calib
704  << " max " << muRcv_Max);
705 
706  // Collecting digits for standard procedure NO OVERLAY: pedestal+noise
707  // ADD digitsBuffer[m_nSamples] WITH Ped and Noise from COOLDB/ATHENA
708  //
709  ATH_MSG_DEBUG("++ Adding to signal digits -- The PEDESTAL + NOISE digits "<< m_tilePedestal <<" "<< m_tileNoise << " " << m_integerDigits);
710  // Collecting pedestal from the database
711  //
712  if (m_tilePedestal) {
713  pedSim = sampleNoise->getPed(idhash, TMDBchan, TileID::LOWGAIN);
714  // As in TileDigitsMaker bug fix for wrong ped value in DB
715  //
716  if (pedSim == 0.0) pedSim = 30.;
717  } else {
718  pedSim = muRcv_Ped;
719  }
720  // Collecting noise from the database
721  //
722  if (m_tileNoise) {
723  // Generate an array to randomize the noise for each digit
724  //
725  RandGaussQ::shootArray(*rngWrapper, m_nSamples, Rndm, 0.0, 1.0);
726  RandFlat::shootArray(*rngWrapper, 1, Rndm_dG, 0.0, 1.0);
727  sigma_Hfn1 = sampleNoise->getHfn1(idhash, TMDBchan, TileID::LOWGAIN);
728  sigma_Hfn2 = sampleNoise->getHfn2(idhash, TMDBchan, TileID::LOWGAIN);
729  if (sigma_Hfn1 > 0 || sigma_Hfn2) {
730  sigma_Norm = sigma_Hfn1 / (sigma_Hfn1 + sigma_Hfn2 * sampleNoise->getHfnNorm(idhash, TMDBchan, TileID::LOWGAIN));
731  } else {
732  sigma_Hfn1 = sampleNoise->getHfn(idhash, TMDBchan, TileID::LOWGAIN);
733  sigma_Norm = 1.;
734  }
735  if (Rndm_dG[0] < sigma_Norm) sigmaSim = sigma_Hfn1;
736  else sigmaSim = sigma_Hfn2;
737  } else {
738  sigmaSim = muRcv_NoiseSigma;
739  }
740  // Loop over samples and either use noise and ped from db or user location (TileInfoLoader.cxx)
741  //
742  for (int js = 0; js < m_nSamples; ++js) {
743  // Signal
744  //
745  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" E [MeV]: "<< pDigitSamples[js]);
746  digitsBuffer[js] = pDigitSamples[js] * mev2ADC_factor;
747  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" calibration [adc/MeV] "<< mev2ADC_factor <<"-> E [adc]: "<< digitsBuffer[js]);
748  // Pedestal (amp)
749  //
750  digitsBuffer[js] += pedSim;
751  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" adding pedestal "<< pedSim <<"-> E [adc]: "<< digitsBuffer[js]);
752  // Noise (rms)
753  //
754  if (m_tileNoise) {
755  digitsBuffer[js] += sigmaSim * Rndm[js];
756  ATH_MSG_VERBOSE( "(D.02.0"<< js+1 <<") sample "<< js+1 <<" adding noise "<< sigmaSim * Rndm[js] <<"-> E [adc]: "<< digitsBuffer[js]);
757  }
758  // Simulated pulse above allowed maximum
759  //
760  if (digitsBuffer[js] > muRcv_Max) digitsBuffer[js] = muRcv_Max;
761  // Rounding the ADC counts
762  //
763  if (m_integerDigits) digitsBuffer[js] = round(digitsBuffer[js]);
764  }
765  }
766 
767  // If channel is good, create TileDigits object and store in container.
768  //
769  bool chanIsBad = false;
770 
771  if (m_maskBadChannels) {
772  TileBchStatus status = badChannels->getAdcStatus( m_tileHWID->adc_id(drawer_id, TILEchan, TileID::LOWGAIN) );
773  chanIsBad = status.isBad();
774  }
775 
776  if (chanIsBad) {
777  for (int js = 0; js < m_nSamples; ++js) {
778  digitsBuffer[js] = 255;// in TMDB we have 8-bit ADCs
779  }
780  ATH_MSG_VERBOSE( "(D.03) Masking Channel: "<< ros << '/' << drawer << '/' << TILEchan <<" ("<< TMDBchan <<") LowGain" );
781  } else {
782  ATH_MSG_VERBOSE( "(D.03) Good Channel : "<< ros << '/' << drawer << '/' << TILEchan <<" ("<< TMDBchan <<") LowGain" );
783  }
784 
785  ATH_MSG_VERBOSE( "++ Changed to TMDB adc_id: " << m_tileHWID->to_string(adc_id) << " and save a TileDigits object into a container." );
786  std::unique_ptr<TileDigits> muonReceiverDigits = std::make_unique<TileDigits>(adc_id, digitsBuffer);
787  ATH_MSG_VERBOSE( "++ Create a TileRawChannelObject object and set it into a container " );
788  TileRawChannel* muRcvRawChannel = m_MuRcvBuildTool->rawChannel(muonReceiverDigits.get(), ctx);
789  ATH_CHECK( muRcvDigitsContainer->push_back(std::move(muonReceiverDigits)) );
790  ATH_CHECK( muRcvRawChannelContainer->push_back(muRcvRawChannel) );
791  if (msgLvl(MSG::DEBUG)){
792  ATH_MSG_DEBUG( "++ Channel " << m_tileHWID->to_string(adc_id,-1)
793  << " Digitized pulse [ADC] "<< digitsBuffer[0]
794  << "/" << digitsBuffer[1]
795  << "/" << digitsBuffer[2]
796  << "/" << digitsBuffer[3]
797  << "/" << digitsBuffer[4]
798  << "/" << digitsBuffer[5]
799  << "/" << digitsBuffer[6] );
800  ATH_MSG_DEBUG( "++ Raw channel reconstruction Ch: "<< m_tileHWID->to_string(adc_id,-1)
801  <<" E [ADC]: "<< muRcvRawChannel->amplitude()
802  <<" Time [ns]: "<< muRcvRawChannel->time()
803  <<" Qf: "<< muRcvRawChannel->quality() );
804  }
805  }
806  } // END loop over all HIT collections in container
807  if (msgLvl(MSG::VERBOSE)) muRcvDigitsContainer->print();
808 
810  // (a.4) Register the digits container in the TES
811  //
812 
813  ATH_MSG_VERBOSE ( "(A.05) Send to event store all collected objects " );
814 
816  ATH_CHECK( muRcvDigitsCnt.record(std::move(muRcvDigitsContainer)) );
817 
819  ATH_CHECK( muRcvRawChannelCnt.record(std::move(muRcvRawChannelContainer)) );
820 
821  ATH_MSG_VERBOSE( "TilePulseForTileMuonReceiver execution completed" );
822 
823  return StatusCode::SUCCESS;
824 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode TilePulseForTileMuonReceiver::finalize ( )
overridevirtual

finalize method

Definition at line 828 of file TilePulseForTileMuonReceiver.cxx.

828  {
829  ATH_MSG_VERBOSE("Finalizing TilePulseForTileMuonReceiver");
830 
831  ATH_MSG_INFO("TilePulseForTileMuonReceiver finalized successfully");
832  return StatusCode::SUCCESS;
833 }

◆ initialize()

StatusCode TilePulseForTileMuonReceiver::initialize ( )
overridevirtual

initialize method

Definition at line 101 of file TilePulseForTileMuonReceiver.cxx.

101  {
102 
103  // Check cabling RUN>=RUN2 OK
104  //
105  ATH_CHECK( m_cablingSvc.retrieve() );
106  m_cablingService = m_cablingSvc->cablingService();
108 
109  // Handles must always be initialised
117 
118  if ( m_runPeriod == 0) {
119  ATH_MSG_INFO("TilePulseForTileMuonReceiver should not be used for RUN1 simulations");
120  return StatusCode::SUCCESS;
121  } else {
122  ATH_MSG_INFO("Initializing TilePulseForTileMuonReceiver");
123  }
124 
125  //=== retrieve TileID helper and TileInfo from det store
129 
130  ATH_CHECK(m_MuRcvBuildTool.retrieve());
131 
132  m_nSamples = m_tileInfo->NdigitSamples(); // number of time slices for each chan
133  m_iTrig = m_tileInfo->ItrigSample(); // index of the triggering time slice
134  m_adcMax = m_tileInfo->ADCmax(); // adc saturation value
136 
137  ATH_MSG_VERBOSE("Cabling Services: " << m_cablingService
138  << " Number of Samples: " << m_nSamples
139  << " Triggering tile slice: " << m_iTrig
140  << " ADC saturation value: " << m_adcMax
141  << " TileCal Threshold LOW GAIN: " << m_tileThresh);
142 
143  ATH_CHECK(m_rndmSvc.retrieve());
144 
148  m_timeStep = 25.0 / m_nBinsPerX;
149 
150  ATH_MSG_VERBOSE( "Pulse info : "
151  << "shape " << m_nShape
152  <<" nbins " << m_nBinsPerX
153  <<" time " << m_binTime0
154  <<" time step " << m_timeStep
155  <<" Triggering tile sample " << m_iTrig);
156 
157  // decrease by 1, now it is the position of lastest element in a vector
158  //
159  --m_nShape;
160 
162  if (m_useCoolPulseShapes) {
163  ATH_MSG_INFO( "Using pulse from database.");
164  } else {
165  ATH_MSG_INFO( "Using pulse from TileInfo.");
166 
168  m_shapeMuonReceiver.push_back(0.0);
169  }
170 
172 
173  ATH_MSG_INFO( "Integer digits: \t" << ((m_integerDigits)?"true":"false"));
174  ATH_MSG_INFO( "Tile Pedestal: \t" << ((m_tilePedestal)?"true":"false"));
175  ATH_MSG_INFO( "Tile Noise: \t" << ((m_tileNoise)?"true":"false"));
176  ATH_MSG_INFO( "Event Overlay: \t" << ((m_rndmEvtOverlay)?"true":"false"));
177  ATH_MSG_INFO( "Masking Channels: \t" << ((m_maskBadChannels)?"true":"false"));
178  ATH_MSG_INFO( "Pulse shapes from COOL: \t" << ((m_useCoolPulseShapes)?"true":"false"));
179 
181 
182  if (m_rndmEvtOverlay) {
183  ATH_MSG_INFO( "Pileup and/or noise added by overlaying digits of random events");
184  // locate the PileUpMergeSvc and initialize our local ptr
186  ATH_CHECK( service("PileUpMergeSvc", m_mergeSvc) );
187  ATH_MSG_INFO( "PileUpMergeSvc successfully initialized");
188  }
189  }
190 
191  ATH_MSG_VERBOSE("TilePulseForTileMuonReceiver initialization completed");
192  return StatusCode::SUCCESS;
193 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::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.

◆ isClonable()

virtual bool TilePulseForTileMuonReceiver::isClonable ( ) const
inlinefinaloverridevirtual

Definition at line 88 of file TilePulseForTileMuonReceiver.h.

88 { return true; }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::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< Algorithm >::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< Algorithm > >::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< Algorithm > >::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< Algorithm > >::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  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::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  }

Member Data Documentation

◆ m_adcMax

int TilePulseForTileMuonReceiver::m_adcMax
private

ADC saturation value.

Definition at line 163 of file TilePulseForTileMuonReceiver.h.

◆ m_badChannelsKey

SG::ReadCondHandleKey<TileBadChannels> TilePulseForTileMuonReceiver::m_badChannelsKey
private
Initial value:
{this,
"TileBadChannels", "TileBadChannels", "Input Tile bad channel status"}

Name of TileBadChannels in condition store.

Definition at line 141 of file TilePulseForTileMuonReceiver.h.

◆ m_binTime0

int TilePulseForTileMuonReceiver::m_binTime0
private

Index of time=0 bin for pulse shape.

Definition at line 170 of file TilePulseForTileMuonReceiver.h.

◆ m_cablingService

const TileCablingService* TilePulseForTileMuonReceiver::m_cablingService
private

TileCabling instance.

Definition at line 159 of file TilePulseForTileMuonReceiver.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TilePulseForTileMuonReceiver::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Name of Tile cabling service.

Definition at line 113 of file TilePulseForTileMuonReceiver.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emScaleKey

SG::ReadCondHandleKey<TileEMScale> TilePulseForTileMuonReceiver::m_emScaleKey
private
Initial value:
{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}

Name of TileEMScale in condition store.

Definition at line 129 of file TilePulseForTileMuonReceiver.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_hitContainerKey

SG::ReadHandleKey<TileHitContainer> TilePulseForTileMuonReceiver::m_hitContainerKey
private
Initial value:
{this,
"TileHitContainer","TileHitCnt", "Input Tile hit container key"}

Definition at line 95 of file TilePulseForTileMuonReceiver.h.

◆ m_infoName

Gaudi::Property<std::string> TilePulseForTileMuonReceiver::m_infoName {this, "TileInfoName", "TileInfo", "TileInfo object name"}
private

Definition at line 147 of file TilePulseForTileMuonReceiver.h.

◆ m_inputDigitContainerKey

SG::ReadHandleKey<TileDigitsContainer> TilePulseForTileMuonReceiver::m_inputDigitContainerKey {this, "InputTileDigitContainer","",""}
private

Definition at line 92 of file TilePulseForTileMuonReceiver.h.

◆ m_inputDigitContainerName

std::string TilePulseForTileMuonReceiver::m_inputDigitContainerName {""}
private

Definition at line 93 of file TilePulseForTileMuonReceiver.h.

◆ m_integerDigits

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_integerDigits {this, "IntegerDigits", false, "Round digits (default=false)"}
private

Definition at line 148 of file TilePulseForTileMuonReceiver.h.

◆ m_iTrig

int TilePulseForTileMuonReceiver::m_iTrig
private

Index of the triggering time slice.

Definition at line 162 of file TilePulseForTileMuonReceiver.h.

◆ m_maskBadChannels

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_maskBadChannels {this, "MaskBadChannels", false, "Remove channels tagged bad (default=false)"}
private

Definition at line 149 of file TilePulseForTileMuonReceiver.h.

◆ m_mergeSvc

PileUpMergeSvc* TilePulseForTileMuonReceiver::m_mergeSvc
private

Pointer to PileUpMergeService.

Definition at line 173 of file TilePulseForTileMuonReceiver.h.

◆ m_MuRcvBuildTool

ToolHandle<TileRawChannelBuilderMF> TilePulseForTileMuonReceiver::m_MuRcvBuildTool
private
Initial value:
{this,
"TileRawChannelBuilderMF", "TileRawChannelBuilderMF", "Reconstruction tool, default: the Matched Filter"}

Definition at line 144 of file TilePulseForTileMuonReceiver.h.

◆ m_muRcvDigitsContainerKey

SG::WriteHandleKey<TileDigitsContainer> TilePulseForTileMuonReceiver::m_muRcvDigitsContainerKey
private
Initial value:
{this,
"MuonReceiverDigitsContainer", "MuRcvDigitsCnt", "Output Tile muon receiver digits container key"}

Definition at line 98 of file TilePulseForTileMuonReceiver.h.

◆ m_muRcvRawChannelContainerKey

SG::WriteHandleKey<TileRawChannelContainer> TilePulseForTileMuonReceiver::m_muRcvRawChannelContainerKey
private
Initial value:
{this,
"MuonReceiverRawChannelContainer", "MuRcvRawChCnt", "Output Tile muon receiver raw channel container key"}

Definition at line 101 of file TilePulseForTileMuonReceiver.h.

◆ m_nBinsPerX

int TilePulseForTileMuonReceiver::m_nBinsPerX
private

Number of bins per bunch crossing in pulse shape.

Definition at line 169 of file TilePulseForTileMuonReceiver.h.

◆ m_nSamples

int TilePulseForTileMuonReceiver::m_nSamples
private

Number of time slices for each channel.

Definition at line 161 of file TilePulseForTileMuonReceiver.h.

◆ m_nShape

int TilePulseForTileMuonReceiver::m_nShape
private

Number of bins in pulse shape.

Definition at line 168 of file TilePulseForTileMuonReceiver.h.

◆ m_onlyUseContainerName

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."}
private

Definition at line 154 of file TilePulseForTileMuonReceiver.h.

◆ m_pulseShapeKey

SG::ReadCondHandleKey<TilePulse> TilePulseForTileMuonReceiver::m_pulseShapeKey
private
Initial value:
{this,
"TilePulseShape", "TileMuRcvPulseShape", "Input Tile Muon Receiver pulse shape"}

Name of TilePulseShape in condition store.

Definition at line 135 of file TilePulseForTileMuonReceiver.h.

◆ m_randomStreamName

Gaudi::Property<std::string> TilePulseForTileMuonReceiver::m_randomStreamName {this, "RandomStreamName", "Tile_PulseForTileMuonReceiver", ""}
private

Random Stream Name.

Definition at line 118 of file TilePulseForTileMuonReceiver.h.

◆ m_rndmEvtOverlay

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_rndmEvtOverlay {this, "RndmEvtOverlay", false, "Pileup and/or noise added by overlaying random events (default=false)"}
private

Definition at line 153 of file TilePulseForTileMuonReceiver.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> TilePulseForTileMuonReceiver::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Random number service to use.

Definition at line 116 of file TilePulseForTileMuonReceiver.h.

◆ m_runPeriod

int TilePulseForTileMuonReceiver::m_runPeriod
private

Definition at line 178 of file TilePulseForTileMuonReceiver.h.

◆ m_sampleNoiseKey

SG::ReadCondHandleKey<TileSampleNoise> TilePulseForTileMuonReceiver::m_sampleNoiseKey
private
Initial value:
{this,
"TileSampleNoise", "TileSampleNoise", "Input Tile sample noise"}

Name of TileSampleNoise in condition store.

Definition at line 123 of file TilePulseForTileMuonReceiver.h.

◆ m_samplingFractionKey

SG::ReadCondHandleKey<TileSamplingFraction> TilePulseForTileMuonReceiver::m_samplingFractionKey
private
Initial value:
{this,
"TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"}

Name of TileSamplingFraction in condition store.

Definition at line 107 of file TilePulseForTileMuonReceiver.h.

◆ m_shapeMuonReceiver

std::vector<double> TilePulseForTileMuonReceiver::m_shapeMuonReceiver
private

Muon receiver pulse shape.

Definition at line 176 of file TilePulseForTileMuonReceiver.h.

◆ m_tileHWID

const TileHWID* TilePulseForTileMuonReceiver::m_tileHWID
private

Definition at line 157 of file TilePulseForTileMuonReceiver.h.

◆ m_tileID

const TileID* TilePulseForTileMuonReceiver::m_tileID
private

Definition at line 156 of file TilePulseForTileMuonReceiver.h.

◆ m_tileInfo

const TileInfo* TilePulseForTileMuonReceiver::m_tileInfo
private

Definition at line 158 of file TilePulseForTileMuonReceiver.h.

◆ m_tileNoise

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_tileNoise {this, "UseCoolNoise", false, "Noise from database (default=false)"}
private

Definition at line 151 of file TilePulseForTileMuonReceiver.h.

◆ m_tilePedestal

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_tilePedestal {this, "UseCoolPedestal", false, "Pedestal from database (default=false)"}
private

Definition at line 152 of file TilePulseForTileMuonReceiver.h.

◆ m_tileThresh

double TilePulseForTileMuonReceiver::m_tileThresh
private

Actual threshold value.

Definition at line 164 of file TilePulseForTileMuonReceiver.h.

◆ m_timeStep

double TilePulseForTileMuonReceiver::m_timeStep
private

Time step in pulse shape: 25.0 / nBinsPerX.

Definition at line 171 of file TilePulseForTileMuonReceiver.h.

◆ m_useCoolPulseShapes

Gaudi::Property<bool> TilePulseForTileMuonReceiver::m_useCoolPulseShapes {this, "UseCoolPulseShapes", false, "Pulse shapes from database (default=false)"}
private

Definition at line 150 of file TilePulseForTileMuonReceiver.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TilePulseForTileMuonReceiver::m_badChannelsKey
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
Definition: TilePulseForTileMuonReceiver.h:141
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
TilePulseForTileMuonReceiver::m_runPeriod
int m_runPeriod
Definition: TilePulseForTileMuonReceiver.h:178
ReadOfcFromCool.phase
phase
Definition: ReadOfcFromCool.py:127
TilePulseForTileMuonReceiver::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TilePulseForTileMuonReceiver.h:113
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TileSampleNoise::getHfn2
float getHfn2(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:71
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TilePulseForTileMuonReceiver::m_maskBadChannels
Gaudi::Property< bool > m_maskBadChannels
Definition: TilePulseForTileMuonReceiver.h:149
TileInfo::NdigitSamples
int NdigitSamples() const
Returns the number of sammples (digits) per event.
Definition: TileInfo.h:75
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
TileSampleNoise
Condition object to keep and provide Tile sample noise.
Definition: TileSampleNoise.h:18
TilePulseForTileMuonReceiver::m_muRcvRawChannelContainerKey
SG::WriteHandleKey< TileRawChannelContainer > m_muRcvRawChannelContainerKey
Definition: TilePulseForTileMuonReceiver.h:101
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
Tile_Base_ID::pmt
int pmt(const Identifier &id) const
Definition: Tile_Base_ID.cxx:180
TileInfo::MuRcvFullShape
const std::vector< double > & MuRcvFullShape() const
Return full Muon Receiver shape vector.
Definition: TileInfo.h:213
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
Tile_Base_ID::SAMP_BC
@ SAMP_BC
Definition: Tile_Base_ID.h:54
TileBchStatus
Class holding bad channel problems.
Definition: TileBchStatus.h:20
Tile_Base_ID::side
int side(const Identifier &id) const
Definition: Tile_Base_ID.cxx:153
Tile_Base_ID::sample
int sample(const Identifier &id) const
Definition: Tile_Base_ID.cxx:171
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TilePulseForTileMuonReceiver::m_adcMax
int m_adcMax
ADC saturation value.
Definition: TilePulseForTileMuonReceiver.h:163
AthCommonMsg< Algorithm >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
TilePulseForTileMuonReceiver::m_muRcvDigitsContainerKey
SG::WriteHandleKey< TileDigitsContainer > m_muRcvDigitsContainerKey
Definition: TilePulseForTileMuonReceiver.h:98
TileSampleNoise::getHfn
float getHfn(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:51
Tile_Base_ID::tower
int tower(const Identifier &id) const
Definition: Tile_Base_ID.cxx:165
TileHWID::drawer_context
IdContext drawer_context(void) const
idContext for drawers
Definition: TileHWID.cxx:470
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TilePulseForTileMuonReceiver::m_binTime0
int m_binTime0
Index of time=0 bin for pulse shape.
Definition: TilePulseForTileMuonReceiver.h:170
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
TileFragHash::Digitizer
@ Digitizer
Definition: TileFragHash.h:33
TilePulseForTileMuonReceiver::m_samplingFractionKey
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
Definition: TilePulseForTileMuonReceiver.h:107
TileHitCollection
Definition: TileHitCollection.h:12
TileRawChannelUnit::PicoCoulombs
@ PicoCoulombs
Definition: TileRawChannelUnit.h:18
HWIdentifier
Definition: HWIdentifier.h:13
TileInfo::MuRcvCalib
double MuRcvCalib(const Identifier &) const
Returns the factor which converts amplitude in pCb to ADC counts in Muon Receiver.
Definition: TileInfo.h:114
TileRawChannel::time
float time(int ind=0) const
Definition: TileRawChannel.h:103
TilePulseForTileMuonReceiver::m_iTrig
int m_iTrig
Index of the triggering time slice.
Definition: TilePulseForTileMuonReceiver.h:162
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TilePulseForTileMuonReceiver::m_nSamples
int m_nSamples
Number of time slices for each channel.
Definition: TilePulseForTileMuonReceiver.h:161
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
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
PileUpMergeSvc::TimedList::type
std::list< value_t > type
type of the collection of timed data object
Definition: PileUpMergeSvc.h:75
TilePulseForTileMuonReceiver::m_inputDigitContainerName
std::string m_inputDigitContainerName
Definition: TilePulseForTileMuonReceiver.h:93
TileRawChannel::quality
float quality(int ind=0) const
Definition: TileRawChannel.h:105
TilePulseForTileMuonReceiver::m_pulseShapeKey
SG::ReadCondHandleKey< TilePulse > m_pulseShapeKey
Name of TilePulseShape in condition store.
Definition: TilePulseForTileMuonReceiver.h:135
TileInfo::ItrigSample
int ItrigSample() const
The sample at which the pulse should ideally peak.
Definition: TileInfo.h:77
TilePulseForTileMuonReceiver::m_mergeSvc
PileUpMergeSvc * m_mergeSvc
Pointer to PileUpMergeService.
Definition: TilePulseForTileMuonReceiver.h:173
TilePulseForTileMuonReceiver::m_sampleNoiseKey
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
Definition: TilePulseForTileMuonReceiver.h:123
TilePulseForTileMuonReceiver::m_randomStreamName
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Definition: TilePulseForTileMuonReceiver.h:118
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TileInfo::MuRcvTime0Bin
int MuRcvTime0Bin() const
Return index of in-time bin in Muon Receiver shape.
Definition: TileInfo.h:227
TileRawChannel::amplitude
float amplitude(int ind=0) const
Definition: TileRawChannel.h:101
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
TilePulseForTileMuonReceiver::m_hitContainerKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
Definition: TilePulseForTileMuonReceiver.h:95
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FullCPAlgorithmsTest_eljob.sample
sample
Definition: FullCPAlgorithmsTest_eljob.py:100
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TilePulseForTileMuonReceiver::m_tileID
const TileID * m_tileID
Definition: TilePulseForTileMuonReceiver.h:156
TileSampleNoise::getHfn1
float getHfn1(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:63
TileHWID::get_hash
virtual IdentifierHash get_hash(const HWIdentifier &id) const
create hash id from compact ADC id without error checking
Definition: TileHWID.cxx:543
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
nEBchan
#define nEBchan
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TileInfo::MuRcvMax
double MuRcvMax(const Identifier &) const
Returns max possible value (in ADC counts) for Muon Receiver adcs.
Definition: TileInfo.h:150
TileRawChannelUnit::MegaElectronVolts
@ MegaElectronVolts
Definition: TileRawChannelUnit.h:20
TileInfo::MuRcvBinsPerX
int MuRcvBinsPerX() const
Return number of Muon Receiver bins per bunch-crossing.
Definition: TileInfo.h:234
TileRawChannel
Definition: TileRawChannel.h:35
TileHWID::EXTBAR_NEG
@ EXTBAR_NEG
Definition: TileHWID.h:71
TileInfo::MuRcvNoiseSigma
double MuRcvNoiseSigma(const Identifier &) const
Returns the sigma (in ADC counts) of Noise in Muon Receiver adcs.
Definition: TileInfo.h:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Tile_Base_ID::LOWGAIN
@ LOWGAIN
Definition: Tile_Base_ID.h:57
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
TileSampleNoise::getHfnNorm
float getHfnNorm(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:78
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
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
maskDeadModules.ros
ros
Definition: maskDeadModules.py:35
TilePulseForTileMuonReceiver::m_MuRcvBuildTool
ToolHandle< TileRawChannelBuilderMF > m_MuRcvBuildTool
Definition: TilePulseForTileMuonReceiver.h:144
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
TileDigitsCollection
Definition: TileDigitsCollection.h:18
TilePulseForTileMuonReceiver::m_timeStep
double m_timeStep
Time step in pulse shape: 25.0 / nBinsPerX.
Definition: TilePulseForTileMuonReceiver.h:171
TileHWID::drawer_id
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
Definition: TileHWID.cxx:186
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
TileBadChannels
Condition object to keep Tile channel and ADC status.
Definition: TileBadChannels.h:24
TileFragHash::MF
@ MF
Definition: TileFragHash.h:35
TileHWID::EXTBAR_POS
@ EXTBAR_POS
Definition: TileHWID.h:70
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TileHit
Definition: TileSimEvent/TileSimEvent/TileHit.h:30
TileInfo::MuRcvPed
double MuRcvPed(const Identifier &) const
Returns the pedestal (in ADC counts) for Muon Receiver adcs.
Definition: TileInfo.h:141
TilePulseForTileMuonReceiver::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Definition: TilePulseForTileMuonReceiver.h:129
TilePulseForTileMuonReceiver::m_nShape
int m_nShape
Number of bins in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:168
TileBadChannels::getAdcStatus
const TileBchStatus & getAdcStatus(const HWIdentifier adc_id) const
Return Tile ADC status.
Definition: TileBadChannels.cxx:24
TileInfo::MuRcvNBins
int MuRcvNBins() const
Return number of bins in Muon Receiver shape.
Definition: TileInfo.h:220
TilePulseForTileMuonReceiver::m_inputDigitContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_inputDigitContainerKey
Definition: TilePulseForTileMuonReceiver.h:92
TileHWID::adc_id
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
Definition: TileHWID.cxx:228
TilePulseForTileMuonReceiver::m_tileNoise
Gaudi::Property< bool > m_tileNoise
Definition: TilePulseForTileMuonReceiver.h:151
makeTRTBarrelCans.dy
tuple dy
Definition: makeTRTBarrelCans.py:21
Tile_Base_ID::SAMP_D
@ SAMP_D
Definition: Tile_Base_ID.h:55
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
TileInfo::ThresholdDigits
double ThresholdDigits(int) const
Return the threshold value for good TileDigits (cut applied to in-time digit only)
Definition: TileInfo.h:102
TilePulseForTileMuonReceiver::m_tileInfo
const TileInfo * m_tileInfo
Definition: TilePulseForTileMuonReceiver.h:158
nLBchan
#define nLBchan
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
TilePulseForTileMuonReceiver::m_tilePedestal
Gaudi::Property< bool > m_tilePedestal
Definition: TilePulseForTileMuonReceiver.h:152
Tile_Base_ID::to_string
std::string to_string(const Identifier &id, int level=0) const
Definition: Tile_Base_ID.cxx:52
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TileCablingService::connected
bool connected(int ros, int drawer) const
Definition: TileCablingService.h:275
TilePulseForTileMuonReceiver::m_shapeMuonReceiver
std::vector< double > m_shapeMuonReceiver
Muon receiver pulse shape.
Definition: TilePulseForTileMuonReceiver.h:176
TilePulseForTileMuonReceiver::m_nBinsPerX
int m_nBinsPerX
Number of bins per bunch crossing in pulse shape.
Definition: TilePulseForTileMuonReceiver.h:169
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TilePulseForTileMuonReceiver::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service to use.
Definition: TilePulseForTileMuonReceiver.h:116
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
TilePulseForTileMuonReceiver::m_onlyUseContainerName
Gaudi::Property< bool > m_onlyUseContainerName
Definition: TilePulseForTileMuonReceiver.h:154
TilePulse::getPulseShapeYDY
bool getPulseShapeYDY(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float time, float &y, float &dy) const
Definition: TilePulse.h:35
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
TilePulse
Condition object to keep and provide Tile pulse shape.
Definition: TilePulse.h:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
merge.status
status
Definition: merge.py:17
TilePulseForTileMuonReceiver::m_tileHWID
const TileHWID * m_tileHWID
Definition: TilePulseForTileMuonReceiver.h:157
TileCalibUtils::getDrawerIdx
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Definition: TileCalibUtils.cxx:60
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
TileHWID::to_string
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Definition: TileHWID.cxx:49
TilePulseForTileMuonReceiver::m_tileThresh
double m_tileThresh
Actual threshold value.
Definition: TilePulseForTileMuonReceiver.h:164
TilePulseForTileMuonReceiver::m_integerDigits
Gaudi::Property< bool > m_integerDigits
Definition: TilePulseForTileMuonReceiver.h:148
IdentifierHash
Definition: IdentifierHash.h:38
TilePulseForTileMuonReceiver::m_infoName
Gaudi::Property< std::string > m_infoName
Definition: TilePulseForTileMuonReceiver.h:147
TileSampleNoise::getPed
float getPed(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:46
TileCablingService::runPeriod
int runPeriod() const
Definition: TileCablingService.h:280
IdContext
class IdContext
Definition: IdContext.h:34
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TileInfo::ADCmax
int ADCmax() const
Returns the maximum ADC output (10 bits --> 1023)
Definition: TileInfo.h:71
TilePulseForTileMuonReceiver::m_rndmEvtOverlay
Gaudi::Property< bool > m_rndmEvtOverlay
Definition: TilePulseForTileMuonReceiver.h:153
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition: TileRawChannelUnit.h:17
fitman.k
k
Definition: fitman.py:528
TileCablingService::s2h_channel_id
HWIdentifier s2h_channel_id(const Identifier &id) const
Definition: TileCablingService.cxx:1076
TilePulseForTileMuonReceiver::m_useCoolPulseShapes
Gaudi::Property< bool > m_useCoolPulseShapes
Definition: TilePulseForTileMuonReceiver.h:150
TilePulseForTileMuonReceiver::m_cablingService
const TileCablingService * m_cablingService
TileCabling instance.
Definition: TilePulseForTileMuonReceiver.h:159
PileUpMergeSvc::retrieveSubEvtsData
StatusCode retrieveSubEvtsData(const KEY &dataKey, TIMEDDATA &timedData)
retrieve keyed DATA objs for all sub-events and attach a time to them
ServiceHandle< ICondSvc >