ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | List of all members
egammaMonitoring::RecoClusterHistograms Class Reference

#include <RecoClusterHistograms.h>

Collaboration diagram for egammaMonitoring::RecoClusterHistograms:

Public Member Functions

 RecoClusterHistograms (std::string name, std::string title, std::string folder, ITHistSvc *&rootHistSvc)
 
StatusCode initializePlots ()
 
void fill (const xAOD::Egamma &egamma)
 

Public Attributes

std::map< std::string, TH3D * > m_histo3DMap
 

Protected Attributes

std::string m_name
 
std::string m_title
 
std::string m_folder
 
ITHistSvc * m_rootHistSvc = nullptr
 

Detailed Description

Definition at line 17 of file RecoClusterHistograms.h.

Constructor & Destructor Documentation

◆ RecoClusterHistograms()

egammaMonitoring::RecoClusterHistograms::RecoClusterHistograms ( std::string  name,
std::string  title,
std::string  folder,
ITHistSvc *&  rootHistSvc 
)
inline

Definition at line 21 of file RecoClusterHistograms.h.

24  :
25  m_name(std::move(name)),
26  m_title(std::move(title)),
27  m_folder(std::move(folder)),
28  m_rootHistSvc(rootHistSvc) {}

Member Function Documentation

◆ fill()

void RecoClusterHistograms::fill ( const xAOD::Egamma egamma)

Definition at line 38 of file RecoClusterHistograms.cxx.

38  {
39 
40  const xAOD::CaloCluster *cluster = egamma.caloCluster();
41  // This should be a real error...
42  if (!cluster) {
43  return;
44  }
45 
46  const CaloClusterCellLink* cellLinks = cluster->getCellLinks();
47  if (!cellLinks) {
48  return;
49  }
50 
51  double et = egamma.pt()*1e-3;
52  double aeta = std::abs(egamma.eta());
53 
54  std::map<int, int > cells_per_layer;
55  for (const CaloCell* cell : *cellLinks) {
56  if (cell) {
57  int layer = cell->caloDDE()->getLayer();
58  cells_per_layer[layer]++;
59  }
60  }
61 
62  auto associatedTopoCluster = xAOD::EgammaHelpers::getAssociatedTopoClusters(cluster);
63  m_histo3DMap["hNToposvseteta"]->Fill(et,aeta,associatedTopoCluster.size());
64 
65  for (int il = 0; il < 4; il++) {
66  int nc = cells_per_layer.find(il) != cells_per_layer.end() ? cells_per_layer[il] : 0;
67  m_histo3DMap[Form("hNcellsvseteta_Lr%i",il)]->Fill(et,aeta,nc);
68  m_histo3DMap[Form("hEvseteta_Lr%i",il)]->Fill(et,aeta,cluster->energyBE(il)*1e-3);
69  }
70 
71 }

◆ initializePlots()

StatusCode RecoClusterHistograms::initializePlots ( )

Definition at line 18 of file RecoClusterHistograms.cxx.

18  {
19 
20  const char* fN = m_name.c_str();
21 
22  for (int il = 0; il < 4; il++) {
23  TString hN = Form("hNcellsvseteta_Lr%i",il);
24  m_histo3DMap[hN.Data()] = new TH3D(Form("%s_%s",fN,hN.Data()),"",20,0,200,25,0,2.5,60,0,60);
25  ATH_CHECK(m_rootHistSvc->regHist(m_folder+hN.Data(), m_histo3DMap[hN.Data()]));
26  hN = Form("hEvseteta_Lr%i",il);
27  m_histo3DMap[hN.Data()] = new TH3D(Form("%s_%s",fN,hN.Data()),"",20,0,200,25,0,2.5,50,0,200);
28  ATH_CHECK(m_rootHistSvc->regHist(m_folder+hN.Data(), m_histo3DMap[hN.Data()]));
29  }
30  TString hN = "hNToposvseteta";
31  m_histo3DMap[hN.Data()] = new TH3D(Form("%s_%s",fN,hN.Data()),"",20,0,200,25,0,2.5,10,0,10);
32  ATH_CHECK(m_rootHistSvc->regHist(m_folder+hN.Data(), m_histo3DMap[hN.Data()]));
33 
34  return StatusCode::SUCCESS;
35 
36 } // initializePlots

Member Data Documentation

◆ m_folder

std::string egammaMonitoring::RecoClusterHistograms::m_folder
protected

Definition at line 38 of file RecoClusterHistograms.h.

◆ m_histo3DMap

std::map<std::string, TH3D*> egammaMonitoring::RecoClusterHistograms::m_histo3DMap

Definition at line 30 of file RecoClusterHistograms.h.

◆ m_name

std::string egammaMonitoring::RecoClusterHistograms::m_name
protected

Definition at line 36 of file RecoClusterHistograms.h.

◆ m_rootHistSvc

ITHistSvc* egammaMonitoring::RecoClusterHistograms::m_rootHistSvc = nullptr
protected

Definition at line 39 of file RecoClusterHistograms.h.

◆ m_title

std::string egammaMonitoring::RecoClusterHistograms::m_title
protected

Definition at line 37 of file RecoClusterHistograms.h.


The documentation for this class was generated from the following files:
PlotCalibFromCool.il
il
Definition: PlotCalibFromCool.py:381
egammaMonitoring::RecoClusterHistograms::m_histo3DMap
std::map< std::string, TH3D * > m_histo3DMap
Definition: RecoClusterHistograms.h:30
et
Extra patterns decribing particle interation process.
xAOD::EgammaHelpers::getAssociatedTopoClusters
std::vector< const xAOD::CaloCluster * > getAssociatedTopoClusters(const xAOD::CaloCluster *cluster)
Return a vector of all the topo clusters associated with the egamma cluster.
Definition: EgammaxAODHelpers.cxx:65
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
egammaMonitoring::RecoClusterHistograms::m_title
std::string m_title
Definition: RecoClusterHistograms.h:37
ParticleImpl::pt
virtual double pt() const
transverse momentum
Definition: ParticleImpl.h:554
TH3D
Definition: rootspy.cxx:505
egamma
Definition: egamma.h:58
egammaMonitoring::RecoClusterHistograms::m_rootHistSvc
ITHistSvc * m_rootHistSvc
Definition: RecoClusterHistograms.h:39
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
covarianceTool.title
title
Definition: covarianceTool.py:542
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ParticleImpl::eta
virtual double eta() const
pseudo rapidity
Definition: ParticleImpl.h:514
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
egammaMonitoring::RecoClusterHistograms::m_name
std::string m_name
Definition: RecoClusterHistograms.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
egammaMonitoring::RecoClusterHistograms::m_folder
std::string m_folder
Definition: RecoClusterHistograms.h:38
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
xAOD::CaloCluster_v1::energyBE
float energyBE(const unsigned layer) const
Get the energy in one layer of the EM Calo.
Definition: CaloCluster_v1.cxx:630
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83