5#ifndef ZMUMUVALIDATIONEXAMPLE_h
6#define ZMUMUVALIDATIONEXAMPLE_h
18#include "TProfile2D.h"
19#include "TLorentzVector.h"
243 void correctMomentum(TH1* h_corrections, TLorentzVector* muon_pos, TLorentzVector* muon_neg,
int use_lambda);
245 void fillEtaPhiHistogram(TH3* hist, TLorentzVector* v_pos, TLorentzVector* v_neg,
int use_lambda);
246 void fillEtaHistogram(TH2* hist, TLorentzVector* v_pos, TLorentzVector* v_neg,
int use_lambda,
int charge=0);
247 void fillHistogram(TH1* hist, TLorentzVector* v_pos, TLorentzVector* v_neg,
int fill_lambda,
int charge=0);
249 void fillZd0EtaPhiHistogram(TH3* hist, TLorentzVector* v_pos, TLorentzVector* v_neg,
double z0_muon_p,
double z0_muon_n);
250 void fillZd0Histogram(TH1* hist,
double z0_muon_p,
double z0_muon_n,
int pn);
251 void correctZd0( TH1* h_corrections, TLorentzVector* muon_pos, TLorentzVector* muon_neg,
double& zd0_muon_p,
double& zd0_muon_n);
256 int IterativeGaussFit(TH1* hist,
double &mu,
double &mu_err,
double &sigma,
double &sigma_err);
266 ,
string s_treeName =
"DefaultParams"
267 , std::string
const & s_outFileName =
"ZmumuValidationExampleOutput.root"
272 void loop(
unsigned maxEvents = 0 );
double charge(const T &p)
void SymmetrizeHisto(TH2 *hist)
void loop(unsigned maxEvents=0)
TCanvas * TempCanvasIterGaussFit
TH3 * pcorrected_mass_vs_etaphi
void correctZd0(TH1 *h_corrections, TLorentzVector *muon_pos, TLorentzVector *muon_neg, double &zd0_muon_p, double &zd0_muon_n)
TProfile2D * prof_pt_vs_etaphi
void SetPhiBins(int newbins=20)
TH2 * lambdacorrections_vs_etaphi_truth_err
TH1 * truth_mom_biascorrections_vs_eta
void profileZwithIterativeGaussFit(TH3 *hist, TH2 *mu_graph, TH2 *sigma_graph, int num_bins, TH2 *mu_err_graph=0, TH2 *sigma_err_graph=0)
TH2 * deltacorrections_vs_etaphi_err
void fillQoverPtHistograms(TLorentzVector *v_pos, TLorentzVector *v_neg)
void correctMomentum(TH1 *h_corrections, TLorentzVector *muon_pos, TLorentzVector *muon_neg, int use_lambda)
void writeToFile(int iteration)
int IterativeGaussFit(TH1 *hist, double &mu, double &mu_err, double &sigma, double &sigma_err)
void fillHistogram(TH1 *hist, TLorentzVector *v_pos, TLorentzVector *v_neg, int fill_lambda, int charge=0)
void fillEtaHistogram(TH2 *hist, TLorentzVector *v_pos, TLorentzVector *v_neg, int use_lambda, int charge=0)
TH2 * truth_mass_bias_vs_eta
TH1 * lambdacorrections_vs_eta
const std::list< std::string > m_fileNames
TH1 * truth_mass_biascorrections_vs_eta
TH2 * d0deltacorrections_vs_etaphi
TH2 * truth_mom_bias_vs_eta
TH2 * lambdacorrections_vs_etaphi_truth
std::string m_outfilename
ZmumuValidationExample(std::list< std::string > const &s_fileNames, string s_treeName="DefaultParams", std::string const &s_outFileName="ZmumuValidationExampleOutput.root", bool isMC=false)
TH2 * d0deltacorrections_vs_etaphi_err
TH2 * lambdacorrections_vs_etaphi_err
void SetEtaBins(int newbins=20)
void setBranchAddresses()
TProfile2D * delta_M2_vs_etaphi_neg
TH2 * lambdacorrections_vs_etaphi
TH3 * lambdacorrected_mass_vs_etaphi
TH3 * lambda_vs_etaphi_truth
void loopThroughEvents(unsigned int maxItr)
TH2 * z0deltacorrections_vs_etaphi
TH1 * lambdacorrected_mass
void HistogramConditioning(TH1 *hist)
TH2 * deltacorrections_vs_etaphi_truth_err
~ZmumuValidationExample()
TProfile2D * delta_M2_vs_etaphi_pos
TH2 * lambda_vs_eta_truth
TH3 * delta_vs_etaphi_truth
TH2 * z0deltacorrections_vs_etaphi_err
TH2 * lambdacorrections_vs_etaphi_RMS
TH2 * delta_M2_vs_zpt_truth
void profileYwithIterativeGaussFit(TH2 *hist, TH1 *mu_graph=0, TH1 *sigma_graph=0, int num_bins=1)
void SetPrintLevel(int newprintlevel=0)
TH1 * lambdacorrections_vs_eta_truth
TH2 * deltacorrections_vs_etaphi_truth
TH2 * deltacorrections_vs_etaphi
void fillZd0EtaPhiHistogram(TH3 *hist, TLorentzVector *v_pos, TLorentzVector *v_neg, double z0_muon_p, double z0_muon_n)
void fillEtaPhiHistogram(TH3 *hist, TLorentzVector *v_pos, TLorentzVector *v_neg, int use_lambda)
void fillZd0Histogram(TH1 *hist, double z0_muon_p, double z0_muon_n, int pn)