25 for (
int i = 0; i <
nLevels; i++) {
30 for (
int i = 0; i <
nLevels-1; i++) {
51 TH1::SetDefaultSumw2(kTRUE);
52 TProfile::SetDefaultSumw2(kTRUE);
54 for (
int i = 0; i <
nLevels; i++) {
60 for (
int i = 0; i <
nLevels-1; i++) {
68 h_e_response_vs_phi =
BookTProfile(
"EnergyResponseVsPhi",
"Energy response vs #varphi; #varphi; E^{reco}-E^{true}/E^{true}", 30, -TMath::Pi(), TMath::Pi());
73 h_dr_electron =
Book1D(
"DeltaRElectron",
"#DeltaR(truth particle, electron); #DeltaR; Events", 30, 0., 0.2);
74 h_dphi_electron =
Book1D(
"DeltaPhiElectron",
"#Delta #phi(truth particle, electron); #Delta #phi; Events", 20, -0.01, 0.01);
75 h_deta_electron =
Book1D(
"DeltaEtaElectron",
"#Delta #eta(truth particle, electron); #Delta #eta; Events", 20, -0.01, 0.01);
77 h_dr_photon =
Book1D(
"DeltaRPhoton",
"#DeltaR(truth particle, photon); #DeltaR; Events", 30, 0., 0.2);
97 h_dr_electron -> Fill( part -> p4().DeltaR(electron -> p4()));
113 if (hDenom->GetNbinsX() != hNom->GetNbinsX())
return;
115 for (
int bin_i = 1; bin_i <= hDenom -> GetNbinsX(); ++bin_i){
116 if(hDenom -> GetBinContent(bin_i) == 0)
continue;
117 double binContent = hNom -> GetBinContent(bin_i) / hDenom -> GetBinContent(bin_i);
118 double binCenter = hNom -> GetBinCenter(bin_i);
120 hEff -> Fill(binCenter, binContent);
128 for (
int i = 0; i <
nLevels-1; i++) {
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
TH1D * Book1D(const std::string &name, const std::string &labels, int nBins, float start, float end, bool prependDir=true)
Book a TH1D histogram.
PlotBase(PlotBase *parent, const std::string &sDir)
TProfile * BookTProfile(const std::string &name, const std::string &labels, int nBinsX, float startX, float endX, float startY=-1, float endY=-1, bool prependDir=true, bool useRMS=false)
Book a TProfile histogram.
std::string m_sParticleType
virtual void finalizePlots()
TH1 * h_electron_pt[nLevels]
virtual void initializePlots()
TProfile * h_e_response_vs_phi
TH1 * h_electron_phi[nLevels]
void fill(const xAOD::IParticle *part, int level)
TProfile * h_e_response_vs_e
void makeEfficiencyPlot(TH1 *hDenom, TH1 *hNom, TProfile *hEff)
TProfile * h_e_response_vs_eta
TProfile * h_electron_eff_eta[nLevels-1]
TProfile * h_e_cluster_response_vs_eta
TProfile * h_electron_eff_pt[nLevels-1]
TProfile * h_e_cluster_response_vs_phi
TrueElectronsPlots(PlotBase *pParent, const std::string &sDir, const std::string &sParticleType)
TProfile * h_e_cluster_response_vs_e
void fillResponseCluster(const xAOD::IParticle *part, const xAOD::CaloCluster *cluster)
void fillResponse(const xAOD::IParticle *part, const xAOD::Electron *electron)
static const std::string cLevelLabel[nLevels]
void fillinAcc(const xAOD::IParticle *part, int level)
TProfile * h_electron_eff_phi[nLevels-1]
TH1 * h_electron_eta[nLevels]
Class providing the definition of the 4-vector interface.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Electron_v1 Electron
Definition of the current "egamma version".