ATLAS Offline Software
Loading...
Searching...
No Matches
PFOAttributePlots.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6namespace PFO {
7
8 PFOAttributePlots::PFOAttributePlots(PlotBase* pParent, const std::string & sDir, const std::string & sFEContainerName) : PlotBase(pParent, sDir),
9 m_sFEContainerName(sFEContainerName) {
10
11}
12
14 if(!m_sFEContainerName.empty()){
15 m_FE_LAYER_ENERGY_Tile0 = Book1D("_LAYER_ENEGRY_HEC",m_sFEContainerName+"_LAYER_ENERGY_HEC",60,-1,5);
16 m_FE_TIMING = Book1D("_TIMING",m_sFEContainerName+"_TIMING",10,-50,50);
17 }
18 }
19
20
22 float timing=-50;
23 static const SG::AuxElement::ConstAccessor<float>acc_FE_Timing("TIMING");
24 if(acc_FE_Timing.isAvailable(FE)){
25 timing=acc_FE_Timing(FE);
26 m_FE_TIMING->Fill(timing,eventInfo.beamSpotWeight());
27 }
28 else{
29 m_FE_TIMING->Fill(timing,eventInfo.beamSpotWeight());
30 }
31
32 float E_tile0 = -50;
33 static const SG::AuxElement::ConstAccessor<float>acc_FE_LAYER_ENERGY_Tile0("LAYERENERGY_TILE0");
34 if(acc_FE_LAYER_ENERGY_Tile0.isAvailable(FE)){
35 E_tile0 =acc_FE_LAYER_ENERGY_Tile0(FE);
36 m_FE_LAYER_ENERGY_Tile0->Fill(E_tile0 ,eventInfo.beamSpotWeight());
37 }
38 else{
39 m_FE_LAYER_ENERGY_Tile0->Fill(E_tile0 ,eventInfo.beamSpotWeight());
40 }
41
42 } // end of FE fill function
43} // end of PFO namespace
PFOAttributePlots(PlotBase *pParent, const std::string &sDir, const std::string &sFEContainerName)
void fill(const xAOD::FlowElement &FE, const xAOD::EventInfo &eventInfo)
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
Definition PlotBase.cxx:94
PlotBase(PlotBase *parent, const std::string &sDir)
Definition PlotBase.cxx:29
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
float beamSpotWeight() const
Weight for beam spot size reweighting.
EventInfo_v1 EventInfo
Definition of the latest event info version.
FlowElement_v1 FlowElement
Definition of the current "pfo version".
Definition FlowElement.h:16