Loading [MathJax]/jax/input/TeX/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
6 namespace 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 
21  void PFOAttributePlots::fill(const xAOD::FlowElement& FE, const xAOD::EventInfo& eventInfo){
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
PFO::PFOAttributePlots::m_sFEContainerName
std::string m_sFEContainerName
Definition: PFOAttributePlots.h:30
PlotBase
Definition: PlotBase.h:34
python.copyTCTOutput.sDir
sDir
Definition: copyTCTOutput.py:60
PFOAttributePlots.h
PFO::PFOAttributePlots::m_FE_LAYER_ENERGY_Tile0
TH1 * m_FE_LAYER_ENERGY_Tile0
Definition: PFOAttributePlots.h:27
PFO::PFOAttributePlots::fill
void fill(const xAOD::FlowElement &FE, const xAOD::EventInfo &eventInfo)
Definition: PFOAttributePlots.cxx:21
SG::ConstAccessor
Helper class to provide constant type-safe access to aux data.
Definition: ConstAccessor.h:55
PFO::PFOAttributePlots::initializePlots
void initializePlots()
Definition: PFOAttributePlots.cxx:13
PlotBase::Book1D
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
trigDumpTimers.timing
def timing(hist)
Definition: trigDumpTimers.py:13
PFO
Definition: ClusterMomentPlots.h:15
PFO::PFOAttributePlots::PFOAttributePlots
PFOAttributePlots(PlotBase *pParent, const std::string &sDir, const std::string &sFEContainerName)
Definition: PFOAttributePlots.cxx:8
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
PFO::PFOAttributePlots::m_FE_TIMING
TH1 * m_FE_TIMING
Definition: PFOAttributePlots.h:26
xAOD::EventInfo_v1::beamSpotWeight
float beamSpotWeight() const
Weight for beam spot size reweighting.
Definition: EventInfo_v1.cxx:970
xAOD::FlowElement_v1
A detector object made of other lower level object(s)
Definition: FlowElement_v1.h:25