|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "CaloDetDescr/CaloDetDescrElement.h"
13 #include "CLHEP/Random/RandFlat.h"
19 using CLHEP::RandFlat;
23 const std::string&
name,
26 m_noise_correction(false),m_noise_file(),
28 m_tree(0), m_xcryo(0.), m_ytable(0.), m_energy(-1.), m_cell_id(0), m_cell_energy(0),m_entries(0)
31 declareInterface<CaloCellCorrection>(
this);
57 xfile.open(
fname.c_str());
60 return StatusCode::FAILURE;
65 while (getline(xfile,
line,
'\n')) {
66 std::istringstream buf(
line);
73 return StatusCode::FAILURE;
78 std::ostringstream buf;
98 m_tree =
new TChain(
"NoiseTree");
104 ATH_MSG_FATAL(
"Noise chain has less then 100 events !!!!" );
105 return StatusCode::FAILURE;
116 const int PRIORITY = 100;
117 pIncSvc->addListener(
this,
"BeginEvent", PRIORITY);
119 ATH_MSG_DEBUG(
" TBCellNoiseCorrection initialization finished" );
121 return StatusCode::SUCCESS;
132 return StatusCode::SUCCESS;
137 const EventContext& )
const
156 ATH_MSG_ERROR(
"Could not find a noise value for cell: "<<std::hex<<cid<<std::dec );
167 if ( inc.type() ==
"BeginEvent") {
175 ATH_MSG_ERROR(
"Not equal size of noise vectors !!!! Something wrong !!!" );
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
std::vector< std::string > m_noise_file
virtual StatusCode finalize() override
void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
static std::string find_file(const std::string &logical_file_name, const std::string &search_path, SearchType search_type=LocalSearch)
virtual StatusCode initialize() override
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
std::vector< unsigned int > * m_cell_id
ATHRNG::RNGWrapper * m_engine
virtual void setEnergy(float energy)
set energy
value_type get_compact() const
Get the compact id.
double energy() const
get energy (data member)
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual void handle(const Incident &) override
virtual ~TBCellNoiseCorrection()
TBCellNoiseCorrection(const std::string &type, const std::string &name, const IInterface *parent)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
ServiceHandle< IAthRNGSvc > m_rndmSvc
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Data object for each calorimeter readout cell.
std::vector< float > * m_cell_energy