#include <TBCellNoiseCorrection.h>
Definition at line 26 of file TBCellNoiseCorrection.h.
◆ StoreGateSvc_t
◆ TBCellNoiseCorrection()
| TBCellNoiseCorrection::TBCellNoiseCorrection |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
Definition at line 22 of file TBCellNoiseCorrection.cxx.
25 : CaloCellCorrection(type, name, parent),
29
30{
31 declareInterface<CaloCellCorrection>(this);
37}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< std::string > m_noise_file
ATHRNG::RNGWrapper * m_engine
std::vector< float > * m_cell_energy
std::vector< unsigned int > * m_cell_id
◆ ~TBCellNoiseCorrection()
| TBCellNoiseCorrection::~TBCellNoiseCorrection |
( |
| ) |
|
|
virtual |
◆ addenergy()
| void CaloCellCorrection::addenergy |
( |
CaloCell * | lar_cell, |
|
|
float | energy ) |
|
staticprotectedinherited |
◆ AthAlgTool()
| AthAlgTool::AthAlgTool |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
|
inherited |
Constructor with parameters:
Definition at line 31 of file AthAlgTool.cxx.
18 :
20{
21}
AthCommonDataStore(const std::string &name, T... args)
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ execute()
| StatusCode CaloCellCorrection::execute |
( |
CaloCellContainer * | cellCollection, |
|
|
const EventContext & | ctx ) const |
|
virtualinherited |
Definition at line 50 of file CaloCellCorrection.cxx.
52{
53
55
56 if (!cellCollection) {
57 ATH_MSG_ERROR(
"Cell Correction tool receives invalid cell Collection" );
58 return StatusCode::FAILURE;
59 }
60
61
62
63
64
65 for (CaloCell* cell : *cellCollection) {
67 }
68
69
70
71 return StatusCode::SUCCESS;
72
73}
virtual void MakeCorrection(CaloCell *cellCollection, const EventContext &ctx) const =0
◆ extraDeps_update_handler()
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 TBCellNoiseCorrection::finalize |
( |
| ) |
|
|
overridevirtual |
◆ handle()
| void TBCellNoiseCorrection::handle |
( |
const Incident & | inc | ) |
|
|
overridevirtual |
Definition at line 164 of file TBCellNoiseCorrection.cxx.
164 {
166
167 if ( inc.type() == "BeginEvent") {
168 m_engine->setSeed (
"TBCellNoseCorrection", inc.context());
169 unsigned int random =
int(RandFlat::shoot(
m_engine->getEngine (inc.context()), 0.,
m_entries-1.));
174 if(size != sizee) {
175 ATH_MSG_ERROR(
"Not equal size of noise vectors !!!! Something wrong !!!" );
176 }
177 }
178}
◆ initialize()
| StatusCode TBCellNoiseCorrection::initialize |
( |
| ) |
|
|
overridevirtual |
Incident Service
Definition at line 45 of file TBCellNoiseCorrection.cxx.
46{
48
49
52
56 std::ifstream xfile;
57 xfile.open(
fname.c_str());
58 if(!xfile.good()){
60 return StatusCode::FAILURE;
61 }
65 while (getline(xfile, line, '\n')) {
66 std::istringstream
buf(line);
69 break;
70 }
71 if(en < 0.) {
73 return StatusCode::FAILURE;
74 }
75
78 std::ostringstream
buf;
82 }
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98 m_tree =
new TChain(
"NoiseTree");
101 }
104 ATH_MSG_FATAL(
"Noise chain has less then 100 events !!!!" );
105 return StatusCode::FAILURE;
106 }
110
112 ServiceHandle<IIncidentSvc> pIncSvc(
"IncidentSvc",
name());
114
115
116 const int PRIORITY = 100;
117 pIncSvc->addListener(this, "BeginEvent", PRIORITY);
118
119 ATH_MSG_DEBUG(
" TBCellNoiseCorrection initialization finished" );
120
121 return StatusCode::SUCCESS;
122}
#define ATH_CHECK
Evaluate an expression and check for errors.
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
ServiceHandle< IAthRNGSvc > m_rndmSvc
static std::vector< uint32_t > runnumber
l
Printing final latex table to .tex output file.
◆ inputHandles()
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()
| const InterfaceID & CaloCellCorrection::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 51 of file CaloCellCorrection.h.
static const InterfaceID IID_CaloCellCorrection("CaloCellCorrection", 1, 0)
◆ MakeCorrection()
| void TBCellNoiseCorrection::MakeCorrection |
( |
CaloCell * | theCell, |
|
|
const EventContext & | ctx ) const |
|
overridevirtual |
Implements CaloCellCorrection.
Definition at line 136 of file TBCellNoiseCorrection.cxx.
138{
139
140
141
147
148
149 for(i = 0;
i < size; ++
i) {
150 if(std::as_const(
m_cell_id)->at(i) == cid) {
152 break;
153 }
154 }
155 if(i == size) {
156 ATH_MSG_ERROR(
"Could not find a noise value for cell: "<<std::hex<<cid<<std::dec );
157 }
158
160 }
161
162}
double energy() const
get energy (data member)
virtual void setEnergy(float energy)
set energy
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
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()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
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)
◆ renounceArray()
◆ scaleenergy()
| void CaloCellCorrection::scaleenergy |
( |
CaloCell * | lar_cell, |
|
|
float | scale ) |
|
staticprotectedinherited |
◆ setenergy()
| void CaloCellCorrection::setenergy |
( |
CaloCell * | lar_cell, |
|
|
float | energy ) |
|
staticprotectedinherited |
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_cell_energy
| std::vector<float>* TBCellNoiseCorrection::m_cell_energy |
|
private |
◆ m_cell_id
| std::vector<unsigned int>* TBCellNoiseCorrection::m_cell_id |
|
private |
◆ m_detStore
◆ m_energy
| float TBCellNoiseCorrection::m_energy |
|
private |
◆ m_engine
◆ m_entries
| unsigned int TBCellNoiseCorrection::m_entries |
|
private |
◆ m_evtStore
◆ m_noise_correction
| bool TBCellNoiseCorrection::m_noise_correction |
|
private |
◆ m_noise_file
| std::vector<std::string> TBCellNoiseCorrection::m_noise_file |
|
private |
◆ m_rndmSvc
◆ m_tree
| TChain* TBCellNoiseCorrection::m_tree |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_xcryo
| float TBCellNoiseCorrection::m_xcryo |
|
private |
◆ m_ytable
| float TBCellNoiseCorrection::m_ytable |
|
private |
The documentation for this class was generated from the following files: