#include <TgcDigitJitterData.h>
Definition at line 24 of file TgcDigitJitterData.h.
◆ TgcDigitJitterData()
TgcDigitJitterData::TgcDigitJitterData |
( |
| ) |
|
◆ ~TgcDigitJitterData()
TgcDigitJitterData::~TgcDigitJitterData |
( |
| ) |
|
|
default |
◆ cacheAngleInterval()
void TgcDigitJitterData::cacheAngleInterval |
( |
const double |
minAngle, |
|
|
std::vector< double > && |
timeProbs |
|
) |
| |
◆ drawJitter()
double TgcDigitJitterData::drawJitter |
( |
const Amg::Vector3D & |
localDir, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| const |
Definition at line 14 of file TgcDigitJitterData.cxx.
16 const double injectionAngle = std::atan2(std::abs(localDir.z()), std::abs(localDir.x())) /
Gaudi::Units::deg;
21 <<
", bin i: "<<ithAngle<<
", bin j: "<<jthAngle);
24 double jitter{0.},
prob{1.}, probRef{0.};
25 const std::vector<double>& ith_probs{
m_bins[ithAngle].timeProbs};
26 const std::vector<double>& jth_probs{
m_bins[jthAngle].timeProbs};
27 unsigned int trials{0};
28 while (
prob > probRef) {
29 prob = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0);
30 jitter = CLHEP::RandFlat::shoot(rndmEngine, 0.0, 1.0) *
m_timeInterval;
31 size_t ithJitter =
static_cast<size_t>(jitter);
34 probRef = (1. - wAngle) * (ithJitter < ith_probs.size() ? ith_probs[ithJitter] : 0.) +
35 wAngle * (ithJitter < jth_probs.size() ? jth_probs[ithJitter] : 0.);
37 <<
", probRef: "<<probRef);
◆ initialize()
StatusCode TgcDigitJitterData::initialize |
( |
| ) |
|
Definition at line 44 of file TgcDigitJitterData.cxx.
47 return StatusCode::FAILURE;
50 for (
size_t b = 0 ;
b <
m_bins.size() - 1; ++
b) {
55 std::numeric_limits<double>::epsilon()) {
57 <<
" to "<<
m_bins[
b].maxAngle<<
" is outside of the fixed interval "
59 return StatusCode::FAILURE;
61 if (
m_bins[
b].timeProbs.empty()) {
62 ATH_MSG_FATAL(
"The angular bin "<<
b<<
" has no probabilities associated.");
63 return StatusCode::FAILURE;
67 return StatusCode::SUCCESS;
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_angleInterval
double TgcDigitJitterData::m_angleInterval {-1.} |
|
private |
◆ m_bins
std::vector<JitterBin> TgcDigitJitterData::m_bins {} |
|
private |
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_timeInterval
double TgcDigitJitterData::m_timeInterval {-1.} |
|
private |
The documentation for this class was generated from the following files:
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.