ATLAS Offline Software
Loading...
Searching...
No Matches
DiObjectHistograms.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
6#include "GaudiKernel/ITHistSvc.h"
8#include "TH1D.h"
9#include "TH2D.h"
10
11namespace egammaMonitoring {
12
14
15 const char* fN = m_name.c_str();
16
17 histoMap["mass"] = new TH1D(Form("%s_mass",fN),";m [GeV]; Events",300,50,200);
18 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"mass", histoMap["mass"]));
19
20 histoMap["massvsmu"] = new TH2D(Form("%s_massvsmu",fN),";#mu;m [GeV]",100,0,100,150,50,200);
21 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"massvsmu", histoMap["massvsmu"]));
22
23 histoMap["massvspT"] = new TH2D(Form("%s_massvspT",fN),";p_{T} [GeV];m [GeV]",20,0,100,150,50,200);
24 ATH_CHECK(m_rootHistSvc->regHist(m_folder+"massvspT", histoMap["massvspT"]));
25 return StatusCode::SUCCESS;
26 }
27
29 fill(eg1,eg2,0.);
30 }
31
32 void DiObjectHistograms::fill(const xAOD::IParticle& eg1, const xAOD::IParticle& eg2, float mu) {
33
34 xAOD::IParticle::FourMom_t di = eg1.p4()+eg2.p4();
35 double m = di.M()*1e-3;
36 histoMap["mass"]->Fill(m);
37 histoMap["massvsmu"]->Fill(mu,m);
38 histoMap["massvspT"]->Fill(di.Pt()*1e-3,m);
39
40 }
41
42}
#define ATH_CHECK
Evaluate an expression and check for errors.
void fill(const xAOD::IParticle &eg1, const xAOD::IParticle &eg2)
std::map< std::string, TH1 * > histoMap
Class providing the definition of the 4-vector interface.
virtual FourMom_t p4() const =0
The full 4-momentum of the particle.
TLorentzVector FourMom_t
Definition of the 4-momentum type.