ATLAS Offline Software
Loading...
Searching...
No Matches
TBNoiseWrite.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_TBNOISEWRITE_H
6#define TBREC_TBNOISEWRITE_H
7
8//
9// class TBNoiseWrite
10// Write ROOT Tree with noise in randomly triggered events
11//
13
14class TFile;
15class TTree;
16class CaloCell_ID;
17class IToolSvc;
19
21 public:
22
23 TBNoiseWrite(const std::string& name, ISvcLocator* pSvcLocator);
24 virtual ~TBNoiseWrite();
25 virtual StatusCode initialize() override;
26 virtual StatusCode execute() override;
27 virtual StatusCode finalize() override;
28
29 private:
30 void clear();
32 StatusCode getXcryoYtable(float &x, float &y, float &eBeam);
33
34 int m_nEvent; // counter
35 int m_nEventRandomTrigger; // counter
36 bool m_first; // First event flag
37
38 // Run header
40 int m_nRun;
41 float m_beamMom;
42 float m_xCryo;
43 float m_yTable;
44 };
46
47 // Variables to be in the TTree
48 //--------------------------
49 // Cell parameters
50 std::vector<unsigned int>* m_cell_id;
51 std::vector<float>* m_cell_energy;
52
53 // Names and pointers
55 std::string m_caloCellContainerName; // Cell container name
56 std::string m_headerTreeName; // Header Tree name
57 std::string m_noiseTreeName; // Noise Tree name
58 std::string m_rootfile_name; // name of the ROOT file with TBTree
59 TFile* m_rootfile; // and its pointer
60 TTree* m_header_tree; // Header Tree pointer
61 TTree* m_tree; // Noise Tree pointer
62
64 std::string m_txtFileWithXY;
65};
66
67#endif
#define y
#define x
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Container class for LArDigit.
virtual StatusCode execute() override
std::string m_txtFileWithXY
Text file containing xCryo and yTable.
TFile * m_rootfile
std::string m_digitContainerName
std::string m_noiseTreeName
std::vector< unsigned int > * m_cell_id
virtual StatusCode finalize() override
std::string m_caloCellContainerName
std::string m_headerTreeName
virtual StatusCode initialize() override
TBNoiseWrite(const std::string &name, ISvcLocator *pSvcLocator)
int m_nEventRandomTrigger
TTree * m_tree
std::string m_rootfile_name
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
Get Xcryo and Ytable from a text file.
virtual ~TBNoiseWrite()
NoiseHeader m_header
std::vector< float > * m_cell_energy
TTree * m_header_tree
float m_beamMom
Run number.
float m_xCryo
Beam momentum.