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

#include <TBCellNoiseCorrection.h>

Inheritance diagram for TBCellNoiseCorrection:
Collaboration diagram for TBCellNoiseCorrection:

Public Member Functions

 TBCellNoiseCorrection (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~TBCellNoiseCorrection ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
void MakeCorrection (CaloCell *theCell, const EventContext &ctx) const override
 
virtual void handle (const Incident &) override
 
virtual StatusCode execute (CaloCellContainer *cellCollection, const EventContext &ctx) const
 
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 sysInitialize () override
 Perform system initialization for an algorithm. 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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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...
 

Static Protected Member Functions

static void setenergy (CaloCell *lar_cell, float energy)
 
static void addenergy (CaloCell *lar_cell, float energy)
 
static void scaleenergy (CaloCell *lar_cell, float scale)
 

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

bool m_noise_correction
 
std::vector< std::string > m_noise_file
 
ServiceHandle< IAthRNGSvcm_rndmSvc { this, "RndmSvc", "AthRNGSvc", "" }
 
ATHRNG::RNGWrapperm_engine
 
TChain * m_tree
 
float m_xcryo
 
float m_ytable
 
float m_energy
 
std::vector< unsigned int > * m_cell_id
 
std::vector< float > * m_cell_energy
 
unsigned int m_entries
 
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 26 of file TBCellNoiseCorrection.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TBCellNoiseCorrection()

TBCellNoiseCorrection::TBCellNoiseCorrection ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 22 of file TBCellNoiseCorrection.cxx.

27  m_engine(0),
28  m_tree(0), m_xcryo(0.), m_ytable(0.), m_energy(-1.), m_cell_id(0), m_cell_energy(0),m_entries(0)
29  //m_myevtnum(-1)
30 {
31  declareInterface<CaloCellCorrection>(this);
32  declareProperty("NoiseFile", m_noise_file);
34  declareProperty("NoiseX", m_xcryo);
35  declareProperty("NoiseY", m_ytable);
36  declareProperty("NoiseE", m_energy);
37 }

◆ ~TBCellNoiseCorrection()

TBCellNoiseCorrection::~TBCellNoiseCorrection ( )
virtual

Definition at line 41 of file TBCellNoiseCorrection.cxx.

42 { }

Member Function Documentation

◆ addenergy()

void CaloCellCorrection::addenergy ( CaloCell lar_cell,
float  energy 
)
staticprotectedinherited

Definition at line 94 of file CaloCellCorrection.cxx.

95 {
96  theCell->addEnergy( energy );
97 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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 CaloCellCorrection::execute ( CaloCellContainer cellCollection,
const EventContext &  ctx 
) const
virtualinherited

Definition at line 58 of file CaloCellCorrection.cxx.

60 {
61 
62  ATH_MSG_DEBUG("Executing CaloCellCorrection");
63 
64  if (!cellCollection) {
65  ATH_MSG_ERROR( "Cell Correction tool receives invalid cell Collection" );
66  return StatusCode::FAILURE;
67  }
68 
69  // Loop over all the CaloCell Objects and call Make Correction.
70  // Note that this is the base class of all the concrete correction
71  // classes which implement a Make Correction method.
72 
73  for (CaloCell* cell : *cellCollection) {
74  MakeCorrection ( cell, ctx );
75  }
76 
77  // Done, Return success
78 
79  return StatusCode::SUCCESS;
80 
81 }

◆ extraDeps_update_handler()

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

◆ finalize()

StatusCode TBCellNoiseCorrection::finalize ( )
overridevirtual

Definition at line 129 of file TBCellNoiseCorrection.cxx.

130 {
131 // m_root->Close();
132 // m_root = NULL;
133  if(m_tree) m_tree->Delete() ;
134 // m_cell_id = NULL;
135 // m_cell_energy = NULL;
136 
137  return StatusCode::SUCCESS;
138 }

◆ handle()

void TBCellNoiseCorrection::handle ( const Incident &  inc)
overridevirtual

Definition at line 169 of file TBCellNoiseCorrection.cxx.

169  {
170  ATH_MSG_DEBUG( " Handle BeginEvent " );
171 
172  if ( inc.type() == "BeginEvent") {
173  m_engine->setSeed ("TBCellNoseCorrection", inc.context());
174  unsigned int random = int(RandFlat::shoot(m_engine->getEngine (inc.context()), 0., m_entries-1.));
175  ATH_MSG_DEBUG( "Reading noise event: "<<random );
176  m_tree->GetEntry(random);
177  unsigned int size = m_cell_id->size();
178  unsigned int sizee = m_cell_energy->size();
179  if(size != sizee) {
180  ATH_MSG_ERROR( "Not equal size of noise vectors !!!! Something wrong !!!" );
181  }
182  }
183 }

◆ initialize()

StatusCode TBCellNoiseCorrection::initialize ( )
overridevirtual

Incident Service

Definition at line 45 of file TBCellNoiseCorrection.cxx.

46 {
47  ATH_MSG_DEBUG( " TBCellNoiseCorrection initialization " );
48 
49  // RandomNumbers
50  ATH_CHECK( m_rndmSvc.retrieve() );
51  m_engine = m_rndmSvc->getEngine(this, "TB_NOISE");
52 
53  if(m_energy > 0.) { // Do we have run parameters (x,y,energy) ?
54  ATH_MSG_DEBUG( " Trying to patch the noise file name " );
55  std::string fname = PathResolver::find_file ("xcryo_ytable.txt", "DATAPATH");
56  std::ifstream xfile;
57  xfile.open(fname.c_str());
58  if(!xfile.good()){
59  ATH_MSG_FATAL( "Could not open file xcryo_ytable.txt" );
60  return StatusCode::FAILURE;
61  }
62  int runnumber;
63  float x,y,en=-1;
64  std::string line;
65  while (getline(xfile, line, '\n')) {
66  std::istringstream buf(line);
67  buf >> runnumber >> x >> y >> en;
68  if(en < 0. || !(x == m_xcryo && y == m_ytable && en == m_energy)) continue;
69  break;
70  }
71  if(en < 0.) {
72  ATH_MSG_FATAL( " Do not have X: "<<m_xcryo<<" Y: "<<m_ytable<< " E: "<<m_energy<<" in xcryo_ytable.txt" );
73  return StatusCode::FAILURE;
74  }
75  // we have run number - let's change the file name (and take only one):
76  ATH_MSG_DEBUG( "Found run number: "<<runnumber );
77  unsigned pos = m_noise_file[0].find_last_of("0123456789");
78  std::ostringstream buf;
79  buf<<runnumber;
80  m_noise_file[0].replace(pos-3,4,buf.str());
81  ATH_MSG_DEBUG( "patched name: "<<m_noise_file[0].c_str() );
82  }
83 
84  // Open file and get Tree
85  /*
86  m_root = new TFile(m_noise_file.c_str(),"READ");
87  if(!m_root->IsOpen()){
88  ATH_MSG_FATAL( "Could not open root file: "<<m_noise_file );
89  return StatusCode::FAILURE;
90  }
91  m_tree = (TTree*) m_root->Get("NoiseTree");
92  if(!m_tree) {
93  ATH_MSG_FATAL( "No NoiseTree in root file: "<<m_noise_file );
94  return StatusCode::FAILURE;
95  }
96  */
97  // Make a chain
98  m_tree = new TChain("NoiseTree");
99  for(unsigned int l=0; l<m_noise_file.size(); ++l) {
100  m_tree->AddFile(m_noise_file[l].c_str());
101  }
102  m_entries = m_tree->GetEntries();
103  if(m_entries < 100) {
104  ATH_MSG_FATAL( "Noise chain has less then 100 events !!!!" );
105  return StatusCode::FAILURE;
106  }
107  m_tree->SetBranchAddress("cell_id", &m_cell_id);
108  m_tree->SetBranchAddress("cell_ener", &m_cell_energy);
109  ATH_MSG_DEBUG(" Got NoiseTree with "<<m_entries<<" entries" );
110 
112  IIncidentSvc* pIncSvc(0);
113 
114  // set up the incident service:
115  if (!(service("IncidentSvc", pIncSvc, true)).isSuccess()) {
116  ATH_MSG_ERROR( "Could not locate IncidentSvc " );
117  return StatusCode::FAILURE;
118  }
119 
120  //start listening to "BeginEvent"
121  static const int PRIORITY = 100;
122  pIncSvc->addListener(this, "BeginEvent", PRIORITY);
123 
124  ATH_MSG_DEBUG( " TBCellNoiseCorrection initialization finished" );
125 
126  return StatusCode::SUCCESS;
127 }

◆ inputHandles()

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

◆ interfaceID()

static const InterfaceID& CaloCellCorrection::interfaceID ( )
inlinestaticinherited

Definition at line 54 of file CaloCellCorrection.h.

54 { return IID_CaloCellCorrection;}

◆ MakeCorrection()

void TBCellNoiseCorrection::MakeCorrection ( CaloCell theCell,
const EventContext &  ctx 
) const
overridevirtual

Implements CaloCellCorrection.

Definition at line 141 of file TBCellNoiseCorrection.cxx.

143 {
144 
145 // const CaloDetDescrElement* elt = theCell->caloDDE();
146 
147  if (m_noise_correction) {
148  unsigned int cid = theCell->ID().get_identifier32().get_compact();
149  double e = theCell->energy();
150  unsigned int size = m_cell_id->size();
151  unsigned int i;
152  // removing this, should use the BadChannel now
153  // if(cid == 810049536) e = 0.; // Not working cell in data
154  for(i = 0; i < size; ++i) {
155  if(std::as_const(m_cell_id)->at(i) == cid) {
156  e += std::as_const(m_cell_energy)->at(i);
157  break;
158  }
159  }
160  if(i == size) {
161  ATH_MSG_ERROR( "Could not find a noise value for cell: "<<std::hex<<cid<<std::dec );
162  }
163 
164  theCell->setEnergy(e);
165  }
166 
167 }

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

◆ scaleenergy()

void CaloCellCorrection::scaleenergy ( CaloCell lar_cell,
float  scale 
)
staticprotectedinherited

Definition at line 99 of file CaloCellCorrection.cxx.

100 {
101  theCell->scaleEnergy( scale );
102 }

◆ setenergy()

void CaloCellCorrection::setenergy ( CaloCell lar_cell,
float  energy 
)
staticprotectedinherited

Definition at line 89 of file CaloCellCorrection.cxx.

90 {
91  theCell->setEnergy( energy );
92 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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_cell_energy

std::vector<float>* TBCellNoiseCorrection::m_cell_energy
private

Definition at line 59 of file TBCellNoiseCorrection.h.

◆ m_cell_id

std::vector<unsigned int>* TBCellNoiseCorrection::m_cell_id
private

Definition at line 58 of file TBCellNoiseCorrection.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_energy

float TBCellNoiseCorrection::m_energy
private

Definition at line 56 of file TBCellNoiseCorrection.h.

◆ m_engine

ATHRNG::RNGWrapper* TBCellNoiseCorrection::m_engine
private

Definition at line 51 of file TBCellNoiseCorrection.h.

◆ m_entries

unsigned int TBCellNoiseCorrection::m_entries
private

Definition at line 60 of file TBCellNoiseCorrection.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_noise_correction

bool TBCellNoiseCorrection::m_noise_correction
private

Definition at line 45 of file TBCellNoiseCorrection.h.

◆ m_noise_file

std::vector<std::string> TBCellNoiseCorrection::m_noise_file
private

Definition at line 46 of file TBCellNoiseCorrection.h.

◆ m_rndmSvc

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

Definition at line 49 of file TBCellNoiseCorrection.h.

◆ m_tree

TChain* TBCellNoiseCorrection::m_tree
private

Definition at line 53 of file TBCellNoiseCorrection.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xcryo

float TBCellNoiseCorrection::m_xcryo
private

Definition at line 54 of file TBCellNoiseCorrection.h.

◆ m_ytable

float TBCellNoiseCorrection::m_ytable
private

Definition at line 55 of file TBCellNoiseCorrection.h.


The documentation for this class was generated from the following files:
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
TBCellNoiseCorrection::m_noise_file
std::vector< std::string > m_noise_file
Definition: TBCellNoiseCorrection.h:46
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
checkFileSG.line
line
Definition: checkFileSG.py:75
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PathResolver::find_file
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
Definition: PathResolver.cxx:251
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TBCellNoiseCorrection::m_ytable
float m_ytable
Definition: TBCellNoiseCorrection.h:55
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
TBCellNoiseCorrection::m_cell_id
std::vector< unsigned int > * m_cell_id
Definition: TBCellNoiseCorrection.h:58
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
TBCellNoiseCorrection::m_entries
unsigned int m_entries
Definition: TBCellNoiseCorrection.h:60
TBCellNoiseCorrection::m_engine
ATHRNG::RNGWrapper * m_engine
Definition: TBCellNoiseCorrection.h:51
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloCell::setEnergy
virtual void setEnergy(float energy)
set energy
Definition: CaloCell.cxx:136
yodamerge_tmp.scale
scale
Definition: yodamerge_tmp.py:138
x
#define x
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:311
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CaloCellCorrection::MakeCorrection
virtual void MakeCorrection(CaloCell *cellCollection, const EventContext &ctx) const =0
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
TBCellNoiseCorrection::m_tree
TChain * m_tree
Definition: TBCellNoiseCorrection.h:53
lumiFormat.i
int i
Definition: lumiFormat.py:92
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TBCellNoiseCorrection::m_energy
float m_energy
Definition: TBCellNoiseCorrection.h:56
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloCellCorrection::CaloCellCorrection
CaloCellCorrection(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CaloCellCorrection.cxx:43
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DeMoScan.runnumber
runnumber
Definition: DeMoScan.py:266
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
TBCellNoiseCorrection::m_xcryo
float m_xcryo
Definition: TBCellNoiseCorrection.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
TBCellNoiseCorrection::m_noise_correction
bool m_noise_correction
Definition: TBCellNoiseCorrection.h:45
TBCellNoiseCorrection::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: TBCellNoiseCorrection.h:50
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.AthDsoLogger.fname
string fname
Definition: AthDsoLogger.py:67
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
TBCellNoiseCorrection::m_cell_energy
std::vector< float > * m_cell_energy
Definition: TBCellNoiseCorrection.h:59
fitman.k
k
Definition: fitman.py:528