ATLAS Offline Software
Loading...
Searching...
No Matches
InnerDetector
InDetDigitization
SCT_Digitization
src
SCT_RandomDisabledCellGenerator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
SCT_RandomDisabledCellGenerator.h
"
6
7
#include "
SiDigitization/SiChargedDiodeCollection.h
"
8
9
#include "
SiDigitization/SiHelper.h
"
10
11
#include "CLHEP/Random/RandomEngine.h"
12
#include "CLHEP/Random/RandFlat.h"
13
14
// constructor
15
SCT_RandomDisabledCellGenerator::SCT_RandomDisabledCellGenerator
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent)
16
: base_class(
type
, name, parent)
17
{
18
}
19
20
StatusCode
SCT_RandomDisabledCellGenerator::initialize
() {
21
ATH_MSG_DEBUG
(
"SCT_RandomDisabledCellGenerator::initialize()"
);
22
ATH_MSG_INFO
(
"\tCreating missing bond generator with "
<<
m_disableProbability
<<
" probability"
);
23
return
StatusCode::SUCCESS;
24
}
25
26
StatusCode
SCT_RandomDisabledCellGenerator::finalize
() {
27
ATH_MSG_INFO
(
"SCT_RandomDisabledCellGenerator::finalize()"
);
28
return
StatusCode::SUCCESS;
29
}
30
31
// process the collection
32
void
SCT_RandomDisabledCellGenerator::process
(
SiChargedDiodeCollection
& collection, CLHEP::HepRandomEngine * rndmEngine)
const
{
33
// disabling is applied to all cells even unconnected or below threshold ones to be able to use these cells as well
34
// loop on all charged diodes
35
for
(std::pair<const InDetDD::SiCellId, SiChargedDiode>& chargedDiode: collection) {
36
if
(CLHEP::RandFlat::shoot(rndmEngine)<
m_disableProbability
) {
37
SiHelper::disconnected
(chargedDiode.second,
true
,
false
);
38
}
39
}
40
}
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
SCT_RandomDisabledCellGenerator.h
SiChargedDiodeCollection.h
SiHelper.h
SCT_RandomDisabledCellGenerator::SCT_RandomDisabledCellGenerator
SCT_RandomDisabledCellGenerator(const std::string &type, const std::string &name, const IInterface *parent)
constructor
Definition
SCT_RandomDisabledCellGenerator.cxx:15
SCT_RandomDisabledCellGenerator::m_disableProbability
FloatProperty m_disableProbability
Definition
SCT_RandomDisabledCellGenerator.h:63
SCT_RandomDisabledCellGenerator::finalize
virtual StatusCode finalize() override
AlgTool finalize.
Definition
SCT_RandomDisabledCellGenerator.cxx:26
SCT_RandomDisabledCellGenerator::initialize
virtual StatusCode initialize() override
AlgTool initialize.
Definition
SCT_RandomDisabledCellGenerator.cxx:20
SCT_RandomDisabledCellGenerator::process
virtual void process(SiChargedDiodeCollection &collection, CLHEP::HepRandomEngine *rndmEngine) const override
Definition
SCT_RandomDisabledCellGenerator.cxx:32
SiChargedDiodeCollection
Definition
SiChargedDiodeCollection.h:109
SiHelper::disconnected
static void disconnected(SiChargedDiode &chDiode, bool flag, bool mask=false)
Definition
SiHelper.h:111
type
Generated on
for ATLAS Offline Software by
1.14.0