ATLAS Offline Software
TBCellNoiseCorrection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TBREC_TBCELLNOISECORRECTION_H
6 #define TBREC_TBCELLNOISECORRECTION_H
7 /********************************************************************
8 NAME: TBCellNoiseCorrection.cxx
9 PACKAGE: offline/TestBeam/TBRec
10 
11 PURPOSE: Read the weighted noise events and add them
12 
13 ********************************************************************/
16 
17 #include "CLHEP/Random/RandomEngine.h"
18 #include "GaudiKernel/ServiceHandle.h"
19 #include "GaudiKernel/IIncidentListener.h"
20 
21 class LArCell;
22 class MsgStream;
23 class TFile;
24 class TChain;
25 
26 class TBCellNoiseCorrection : public CaloCellCorrection, virtual public IIncidentListener
27 {
28 
29  public:
30 
31  TBCellNoiseCorrection (const std::string& type, const std::string& name,
32  const IInterface* parent);
33 
34  virtual ~TBCellNoiseCorrection();
35  virtual StatusCode initialize() override;
36  virtual StatusCode finalize() override;
37 
38  void MakeCorrection (CaloCell* theCell,
39  const EventContext& ctx) const override;
40  virtual void handle(const Incident&) override;
41 
42  private:
43 
44  // Properties:
46  std::vector<std::string> m_noise_file;
47 
48  // Data members:
50  { this, "RndmSvc", "AthRNGSvc", "" };
52  //TFile *m_root; // File with noise tree
53  TChain *m_tree;
54  float m_xcryo; // if given, try to find run number from xcryo_ytable.txt file
55  float m_ytable; // then a run number in file name is changed to this one
56  float m_energy;
57  // Cell parameters
58  std::vector<unsigned int>* m_cell_id;
59  std::vector<float>* m_cell_energy;
60  unsigned int m_entries;
61  // should check the event number
62  //int m_myevtnum;
63 };
64 
65 #endif
66 
67 
68 
69 
TBCellNoiseCorrection::m_noise_file
std::vector< std::string > m_noise_file
Definition: TBCellNoiseCorrection.h:46
TBCellNoiseCorrection::finalize
virtual StatusCode finalize() override
Definition: TBCellNoiseCorrection.cxx:124
TBCellNoiseCorrection::MakeCorrection
void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
Definition: TBCellNoiseCorrection.cxx:136
TBCellNoiseCorrection::m_ytable
float m_ytable
Definition: TBCellNoiseCorrection.h:55
TBCellNoiseCorrection::initialize
virtual StatusCode initialize() override
Definition: TBCellNoiseCorrection.cxx:45
CaloCellCorrection
Definition: CaloCellCorrection.h:51
TBCellNoiseCorrection::m_cell_id
std::vector< unsigned int > * m_cell_id
Definition: TBCellNoiseCorrection.h:58
TBCellNoiseCorrection::m_entries
unsigned int m_entries
Definition: TBCellNoiseCorrection.h:60
TBCellNoiseCorrection::m_engine
ATHRNG::RNGWrapper * m_engine
Definition: TBCellNoiseCorrection.h:51
CaloCellCorrection.h
TBCellNoiseCorrection::m_tree
TChain * m_tree
Definition: TBCellNoiseCorrection.h:53
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TBCellNoiseCorrection::handle
virtual void handle(const Incident &) override
Definition: TBCellNoiseCorrection.cxx:164
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TBCellNoiseCorrection
Definition: TBCellNoiseCorrection.h:27
TBCellNoiseCorrection::m_energy
float m_energy
Definition: TBCellNoiseCorrection.h:56
TBCellNoiseCorrection::~TBCellNoiseCorrection
virtual ~TBCellNoiseCorrection()
Definition: TBCellNoiseCorrection.cxx:41
TBCellNoiseCorrection::TBCellNoiseCorrection
TBCellNoiseCorrection(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TBCellNoiseCorrection.cxx:22
TBCellNoiseCorrection::m_xcryo
float m_xcryo
Definition: TBCellNoiseCorrection.h:54
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
LArCell
Data object for LAr calorimeter readout cell.
Definition: LArCell.h:53
TBCellNoiseCorrection::m_noise_correction
bool m_noise_correction
Definition: TBCellNoiseCorrection.h:45
TBCellNoiseCorrection::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: TBCellNoiseCorrection.h:50
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TBCellNoiseCorrection::m_cell_energy
std::vector< float > * m_cell_energy
Definition: TBCellNoiseCorrection.h:59
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >