ATLAS Offline Software
Loading...
Searching...
No Matches
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/********************************************************************
8NAME: TBCellNoiseCorrection.cxx
9PACKAGE: offline/TestBeam/TBRec
10
11PURPOSE: 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
21class LArCell;
22class MsgStream;
23class TFile;
24class TChain;
25
26class 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:
49 ServiceHandle <IAthRNGSvc> m_rndmSvc
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
A wrapper class for event-slot-local random engines.
Definition RNGWrapper.h:56
Data object for each calorimeter readout cell.
Definition CaloCell.h:57
Data object for LAr calorimeter readout cell.
Definition LArCell.h:53
std::vector< std::string > m_noise_file
ATHRNG::RNGWrapper * m_engine
void MakeCorrection(CaloCell *theCell, const EventContext &ctx) const override
TBCellNoiseCorrection(const std::string &type, const std::string &name, const IInterface *parent)
ServiceHandle< IAthRNGSvc > m_rndmSvc
std::vector< float > * m_cell_energy
virtual StatusCode finalize() override
std::vector< unsigned int > * m_cell_id
virtual void handle(const Incident &) override
virtual StatusCode initialize() override