ATLAS Offline Software
Functions
Luminosity Functions

A group of functions which all deal with calculating luminosity. More...

Functions

virtual float AthMonitorAlgorithm::lbAverageInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average mu, i.e. More...
 
virtual float AthMonitorAlgorithm::lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate instantaneous number of interactions, i.e. More...
 
virtual float AthMonitorAlgorithm::lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1). More...
 
virtual float AthMonitorAlgorithm::lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the instantaneous luminosity per bunch crossing. More...
 
virtual double AthMonitorAlgorithm::lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the duration of the luminosity block (in seconds) More...
 
virtual float AthMonitorAlgorithm::lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average luminosity livefraction. More...
 
virtual float AthMonitorAlgorithm::livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the live fraction per bunch crossing ID. More...
 
virtual double AthMonitorAlgorithm::lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average integrated luminosity multiplied by the live fraction. More...
 

Detailed Description

A group of functions which all deal with calculating luminosity.

Function Documentation

◆ lbAverageInteractionsPerCrossing()

float AthMonitorAlgorithm::lbAverageInteractionsPerCrossing ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the average mu, i.e.

<mu>.

Definition at line 222 of file AthMonitorAlgorithm.cxx.

223 {
224  if (!m_lumiDataKey.empty()) {
226  return lumi->lbAverageInteractionsPerCrossing();
227  } else {
228  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbAverageInteractionsPerCrossing() - luminosity tools are not retrieved.");
229  return -1.0;
230  }
231 }

◆ lbAverageLivefraction()

float AthMonitorAlgorithm::lbAverageLivefraction ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the average luminosity livefraction.

Definition at line 274 of file AthMonitorAlgorithm.cxx.

275 {
278  return 1.0;
279  }
280 
283  return live->lbAverageLiveFraction();
284  } else {
285  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbAverageLivefraction() - luminosity not available.");
286  return -1.0;
287  }
288 }

◆ lbAverageLuminosity()

float AthMonitorAlgorithm::lbAverageLuminosity ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).

Definition at line 250 of file AthMonitorAlgorithm.cxx.

251 {
252  if (!m_lumiDataKey.empty()) {
254  return lumi->lbAverageLuminosity();
255  } else {
256  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbAverageLuminosity() - luminosity tools are not retrieved.");
257  return -1.0;
258  }
259 }

◆ lbDuration()

double AthMonitorAlgorithm::lbDuration ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the duration of the luminosity block (in seconds)

Definition at line 319 of file AthMonitorAlgorithm.cxx.

320 {
323  return m_defaultLBDuration;
324  }
325 
326  if (!m_lbDurationDataKey.empty()) {
328  return dur->lbDuration();
329  } else {
330  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbDuration() - luminosity tools are not retrieved.");
331  return m_defaultLBDuration;
332  }
333 }

◆ lbInteractionsPerCrossing()

float AthMonitorAlgorithm::lbInteractionsPerCrossing ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate instantaneous number of interactions, i.e.

mu.

Definition at line 234 of file AthMonitorAlgorithm.cxx.

235 {
236  if (!m_lumiDataKey.empty()) {
238  float muToLumi = lumi->muToLumi();
239  if (muToLumi > 0) {
240  return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id()) / muToLumi;
241  }
242  return 0;
243  } else {
244  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbInteractionsPerCrossing() - luminosity tools are not retrieved.");
245  return -1.0;
246  }
247 }

◆ lbLuminosityPerBCID()

float AthMonitorAlgorithm::lbLuminosityPerBCID ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the instantaneous luminosity per bunch crossing.

Definition at line 262 of file AthMonitorAlgorithm.cxx.

263 {
264  if (!m_lumiDataKey.empty()) {
266  return lumi->lbLuminosityPerBCIDVector().at (ctx.eventID().bunch_crossing_id());
267  } else {
268  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbLuminosityPerBCID() - luminosity tools are not retrieved.");
269  return -1.0;
270  }
271 }

◆ lbLumiWeight()

double AthMonitorAlgorithm::lbLumiWeight ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the average integrated luminosity multiplied by the live fraction.

Definition at line 308 of file AthMonitorAlgorithm.cxx.

309 {
310  if (!m_lumiDataKey.empty()) {
311  return (lbAverageLuminosity(ctx)*lbDuration(ctx))*lbAverageLivefraction(ctx);
312  } else {
313  ATH_MSG_DEBUG("AthMonitorAlgorithm::lbLumiWeight() - luminosity tools are not retrieved.");
314  return -1.0;
315  }
316 }

◆ livefractionPerBCID()

float AthMonitorAlgorithm::livefractionPerBCID ( const EventContext &  ctx = Gaudi::Hive::currentContext()) const
virtual

Calculate the live fraction per bunch crossing ID.

Definition at line 291 of file AthMonitorAlgorithm.cxx.

292 {
295  return 1.0;
296  }
297 
300  return live->l1LiveFractionVector().at (ctx.eventID().bunch_crossing_id());
301  } else {
302  ATH_MSG_DEBUG("AthMonitorAlgorithm::livefractionPerBCID() - luminosity not available.");
303  return -1.0;
304  }
305 }
AthMonitorAlgorithm::lbAverageLuminosity
virtual float lbAverageLuminosity(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
Definition: AthMonitorAlgorithm.cxx:250
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
AthMonitorAlgorithm::m_environment
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Definition: AthMonitorAlgorithm.h:350
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthMonitorAlgorithm::m_defaultLBDuration
Gaudi::Property< float > m_defaultLBDuration
Default duration of one lumi block.
Definition: AthMonitorAlgorithm.h:360
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
AthMonitorAlgorithm::Environment_t::online
@ online
AthMonitorAlgorithm::lbAverageLivefraction
virtual float lbAverageLivefraction(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the average luminosity livefraction.
Definition: AthMonitorAlgorithm.cxx:274
AthMonitorAlgorithm::m_lumiDataKey
SG::ReadCondHandleKey< LuminosityCondData > m_lumiDataKey
Definition: AthMonitorAlgorithm.h:344
lumiFormat.lumi
lumi
Definition: lumiFormat.py:106
AthMonitorAlgorithm::m_trigLiveFractionDataKey
SG::ReadCondHandleKey< TrigLiveFractionCondData > m_trigLiveFractionDataKey
Definition: AthMonitorAlgorithm.h:348
AthMonitorAlgorithm::lbDuration
virtual double lbDuration(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Calculate the duration of the luminosity block (in seconds)
Definition: AthMonitorAlgorithm.cxx:319
AthMonitorAlgorithm::m_lbDurationDataKey
SG::ReadCondHandleKey< LBDurationCondData > m_lbDurationDataKey
Definition: AthMonitorAlgorithm.h:346
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo