ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCellNoiseAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// TheCaloCellNoiseAlg.h
6//
7
8#ifndef CALOCONDPHYSALGS_CALOCELLNOISEALG_H
9#define CALOCONDPHYSALGS_CALOCELLNOISEALG_H
10
11#include <string>
12
13// Gaudi includes
14
16#include "GaudiKernel/ToolHandle.h"
20#include "CaloGeoHelpers/CaloSampling.h"
26
27#include "GaudiKernel/ITHistSvc.h"
28#include "TTree.h"
29
32
33
35 public:
36 //Gaudi style constructor and execution methods
38 CaloCellNoiseAlg(const std::string& name, ISvcLocator* pSvcLocator);
40 virtual ~CaloCellNoiseAlg();
41
43 virtual StatusCode initialize() override;
45 virtual StatusCode execute() override;
47 virtual StatusCode finalize() override;
49 virtual StatusCode stop() override;
50
51 private:
52
53 StatusCode fillNtuple();
54 StatusCode fitNoise();
55 static StatusCode readNtuple();
56 float getLuminosity();
57
58 //---------------------------------------------------
59 // Member variables
60 //---------------------------------------------------
61 ServiceHandle<ITHistSvc> m_thistSvc{this,"THistSvc","THistSvc"};
62
64 , "CaloDetDescrManager"
65 , "CaloDetDescrManager"
66 , "SG Key for CaloDetDescrManager in the Condition Store" };
67
68 const CaloCell_ID* m_calo_id{nullptr};
69 SG::ReadCondHandleKey<ILArNoise> m_noiseKey{this,"NoiseKey","LArNoiseSym","SG Key of ILArNoise object"};
70 SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"};
72 { this, "ADC2MeVKey", "LArADC2MeV", "SG Key of the LArADC2MeV CDO" };
74 { this, "TotalNoiseKey", "totalNoise", "SG conditions key for total noise" };
76 { this, "ElecNoiseKey", "electronicNoise", "SG conditions key for electronic noise" };
77
78 // list of cell energies
79 struct CellInfo {
80 int nevt;
82 double average;
83 double rms;
86 float eta;
87 float phi;
88 float reference;
89 };
90 std::vector<CellInfo> m_CellList;
92
93 unsigned int m_lumiblock;
94 unsigned int m_lumiblockOld;
95 bool m_first;
96
97 // Split this out into a separate, dynamically-allocated block.
98 // Otherwise, the CaloCellNoiseAlg is so large that it violates
99 // the ubsan sanity checks.
100 struct TreeData {
101 float m_luminosity {0};
102 int m_ncell {0};
103 int m_nevt[200000] {0};
104 int m_nevt_good[200000] {0};
105 int m_layer[200000] {0};
106 int m_identifier[200000] {0};
107 float m_eta[200000] {0};
108 float m_phi[200000] {0};
109 float m_average[200000] {0};
110 float m_rms[200000] {0};
111 float m_reference[200000] {0};
112 };
113 std::unique_ptr<TreeData> m_treeData;
114 TTree* m_tree;
115
116 bool m_doMC;
121 ToolHandle<Trig::TrigDecisionTool> m_trigDecTool;
123 FloatArrayProperty m_cuts;
124 SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
125 std::string m_lumiFolderName;
128
129 };
130#endif
Definition of CaloDetDescrManager.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
SG::ReadCondHandleKey< ILArNoise > m_noiseKey
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
std::string m_lumiFolderName
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::vector< CellInfo > m_CellList
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
CaloCellNoiseAlg(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
FloatArrayProperty m_cuts
std::string m_triggerChainProp
virtual StatusCode execute() override
standard Athena-Algorithm method
unsigned int m_lumiblock
virtual StatusCode stop() override
standard Athena-Algorithm method
virtual ~CaloCellNoiseAlg()
Default Destructor.
const CaloCell_ID * m_calo_id
SG::ReadCondHandleKey< CaloNoise > m_totalNoiseKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual StatusCode finalize() override
standard Athena-Algorithm method
virtual StatusCode initialize() override
standard Athena-Algorithm method
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
TDT handle.
ServiceHandle< ITHistSvc > m_thistSvc
unsigned int m_lumiblockOld
static StatusCode readNtuple()
std::unique_ptr< TreeData > m_treeData
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34