ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id$ */

/// \ingroup macros
/// \file MUONplotefficiency.C
/// \brief Macro to compare/plot the Ntuple stored in MUONefficiency.root
///
/// Comparison is done between the generated and reconstructed resonance.
/// Default is Upsilon but Jpsi can be studied if the ResType argument is changed.
/// This allows to determine several important quantities: 
/// - reconstruction efficiency (vs pt,y), invariant mass peak variations (vs pt,y)
/// - reconstructed tracks and trigger tracks  matching efficiency
///
/// \author Christophe Suire, IPN Orsay

#if !defined(__CINT__) || defined(__MAKECINT__)
// ROOT includes
#include "TStyle.h"
#include "TNtuple.h"
#include "TF1.h"
#include "TH1.h"
#include "TH2.h"
#include "TLatex.h"
#include "TFile.h"
#include "TLegend.h"
#include "TCanvas.h"
#include "TGraphErrors.h"
#include <Riostream.h>
#include "TMath.h"

#endif



Double_t fitlandau_a(Double_t *x, Double_t *par)
{
  Float_t val = -(x[0] - TMath::Abs(par[1])) / TMath::Abs(par[2]);
  Double_t result = 0.399 *TMath::Abs(par[0]) * exp( -0.5* (val + exp(-val)) );
  return result;
}

Double_t fitlandau(Double_t *x, Double_t *par)
{
  Float_t val = -x[0] + 2*par[1]; // - TMath::Abs(par[1]) / TMath::Abs(par[2]);
  Double_t result = par[0] * TMath::Landau(val,par[1],par[2]);
  return result;
}
Double_t fitlandaugauss(Double_t *x,Double_t *par)
{
  //cout << "x[0] : " << x[0] << endl ;

   Float_t min=par[4];  Float_t max=par[5]; 

  Int_t NStep;
  Float_t Step=.1;
  NStep=(Int_t)((max-min)/Step)+1;
  Float_t tx;
  Double_t result=0;
  for(Int_t iStep=0;iStep<NStep;iStep++){
    tx=min+iStep*Step;
    result+=par[0]*TMath::Landau(-tx+2*par[1],par[1],par[2])
      *TMath::Gaus(x[0]-tx,0.,par[3])
      *Step;
    //cout <<"x[0]-tx/2 : " << x[0] - tx << endl ;
  }
  return result;
}


Int_t MUONplotefficiency(Int_t ResType = 553, Int_t fittype = 1){
 
  Int_t SAVE=1;
  Int_t WRITE=1;
  
  //Double_t MUON_MASS = 0.105658369;
  Double_t UPSILON_MASS = 9.4603 ;
  Double_t JPSI_MASS = 3.096916;
  //Double_t PI = 3.14159265358979312; 
  Double_t RESONANCE_MASS = 0.; 

  if (ResType==553)  
     RESONANCE_MASS = UPSILON_MASS;
  if (ResType==443)  
     RESONANCE_MASS = JPSI_MASS ;
    
  // 553 is the pdg code for Upsilon 
  // 443 is the pdg code for Jpsi 

  Int_t fitfunc = fittype;
  // 0 gaussian fit +/- 450 MeV/c2
  // 1 gaussian fit +/- 250 MeV/c2
  // 2 approximated landau fit reverted 
  // 3 landau fit reverted convoluated with a gaussian 
  // 4 reverted landau fitlan

  
  Float_t gaussianFitWidth = 0.450 ; // in GeV/c2
  if (fitfunc==1) gaussianFitWidth = 0.250 ; 
  
  // fit range : very important for LandauGauss Fit
  Float_t FitRange = 0.9 ; //GeV/c2
  Float_t FitLow = 0.0  ;  Float_t FitHigh = 100. ;
  FitLow  = RESONANCE_MASS-FitRange ;
  FitHigh = RESONANCE_MASS+FitRange ;

  
  //gStyle->Reset();
  // two ways to set the stat box for all histos
  gStyle->SetOptStat(1110);
  
  // place the stat box
  gStyle->SetStatX(0.5);
  gStyle->SetStatY(0.550);
  //gStyle->SetStatW(0.2);
  gStyle->SetStatH(0.2);
  
  // choose histos with stat
  // gStyle->SetOptStat(1111);
  //hist->SetStats(kTRUE); or hist->SetStats(kFALSE);
  
  //gStyle->SetOptFit(1111);
  gStyle->SetOptFit(1);
  //gStyle->SetOptFit(0);

  gStyle->SetOptTitle(0);
  gStyle->SetPalette(1,0);
  //gStyle->SetOptLogy(1);
  //gStyle->SetOptLogx(0);
  
  gStyle->SetFrameFillColor(10);
  gStyle->SetFillColor(10);
  gStyle->SetCanvasColor(10);


  TFile *effFile = new TFile("MUONefficiency.root","READ");
  TNtuple *Ktuple = (TNtuple*)effFile->Get("Ktuple");
  //("Ktuple","Kinematics NTuple","ev:npart:id:idmo:idgdmo:p:pt:y:theta:pseudorap:vx:vy:vz");
  TNtuple *ESDtuple = (TNtuple*)effFile->Get("ESDtuple");
  //("ESDtuple","Reconstructed Mu+Mu- pairs","ev:pt:y:theta:minv:pt1:y1:theta1:q1:pt2:y2:theta2:q2");
  TNtuple *ESDtupleBck = (TNtuple*)effFile->Get("ESDtupleBck");
  //("ESDtuple","Reconstructed Mu+Mu- pairs","ev:pt:y:theta:minv:pt1:y1:theta1:q1:pt2:y2:theta2:q2");


  /*********************************/
  // Histograms limits and binning
  Float_t ptmin = 0.0;      Float_t ptmax =  20.0;     Int_t ptbins = 10; 
  Float_t ymin = -4.5;       Float_t ymax =  -2.;       Int_t ybins = 10;
  // Float_t thetamin = 165.;  Float_t thetamax = 180.;   Int_t thetabins = 100;  
  
  // Float_t etacutmin = -4.04813 ;
  // Float_t etacutmax = -2.54209 ;

  Float_t invMassMin = .0 ;   Float_t invMassMax = 15.0 ;   Int_t   invMassBins = 100 ;

  if (ResType==443){
    invMassMin = 1.0 ;  invMassMax = 4.5 ;  
    ptmin = 0.0;     ptmax =  10.0; 
  }
  if (ResType==553){
    invMassMin =  7.0 ;  invMassMax = 11.0 ;  
    ptmin = 0.0;   ptmax =  20.0; 
  }
  
  /*********************************/
  // Values used to define the acceptance
  //
  // Float_t thetacutmin = 171.0;  
  // Float_t thetacutmax = 178.;
  
  Float_t ptcutmin = 0.;
  Float_t ptcutmax = 20.;

  if (ResType==443){
    ptcutmin = 0.; ptcutmax = 10.;
  }

  if (ResType==553){
    ptcutmin = 0.; ptcutmax = 20.;
  }
  

  Float_t masssigma  = 0.1; // 100 MeV/c2 is a correct estimation 
  Float_t masscutmin = 0; Float_t masscutmax = 0 ;    
  if (masssigma){
    masscutmin = RESONANCE_MASS - 3.0*masssigma ; 
    masscutmax = RESONANCE_MASS + 3.0*masssigma ;
  }
  else {
    masscutmin = RESONANCE_MASS - 1.0 ; 
    masscutmax = RESONANCE_MASS + 1.0 ;
  }


  // here no cut on theta is necesary since during the simulation 
  // gener->SetChildThetaRange(171.0,178.0);
  // thus the resonance are generated in 4 PI but only the ones for which the decay muons 
  // are in the dimuon arm acceptance
  // the pt cut is also "critical", in the generation part, resonance are generated within  the range 
  // (ptcutmin,ptcutmax). During the reconstruction, the resonance could have a pt greater than ptcutmax !!
  // Should these resonances be cut or not ?
  // probably not but they will be for now (~ 1/2000)

  // Another acceptance cut to add is a range for the  recontructed  invariant mass, it is 
  // obvious that an upsilon reconstructed with a mass  of 5 GeV/c2 is not correct. Thus
  Char_t ResonanceAccCutMC[200];  
  sprintf(ResonanceAccCutMC,"pt>= %.2f && pt<= %.2f",ptcutmin,ptcutmax);

  Char_t ResonanceAccCutESD[200];
  sprintf(ResonanceAccCutESD,"pt >=  %.2f && pt<= %.2f && minv>=  %.2f && minv<= %.2f",ptcutmin,ptcutmax,masscutmin,masscutmax);



  /*********************************/
  // Cut conditions (Id,Background...)

  Char_t IdcutResonanceMC[100];      
  Char_t IdcutMuminusMC[100];   
  Char_t IdcutMuplusMC[100];      
 
  if (ResType==553){
    sprintf(IdcutResonanceMC,"id==553");
    sprintf(IdcutMuminusMC,"id==13 && idmo==553");
    sprintf(IdcutMuplusMC,"id==-13 && idmo==553");  
  }
  if (ResType==443){
    sprintf(IdcutResonanceMC,"id==443");
    sprintf(IdcutMuminusMC,"id==13 && idmo==443");
    sprintf(IdcutMuplusMC,"id==-13 && idmo==443");  
  }
  
  //means no cuts since we don't have the trackid propagated yet pt>0
  // now we have it 10/05/2005 but it's still not being used
  
  
  // Background is calculated in the MUONefficiency.C macro 
  // Background calculation is meaningful only when Resonance have been generated with realistic background
  // when it's a pure Resonance file, the background lies artificially at the Resonance mass 
  
  //no realistic background
  Int_t REALISTIC_BACKGROUND = 0 ; 

  // to take background into account, i.e. substraction, if necessary
  // this is not ready yet
  Char_t BckgdCutResonanceESD[100];      
  sprintf(BckgdCutResonanceESD,"pt>0 && minv>%f && minv<%f && pt1>0 && pt2>0",masscutmin,masscutmax); 
  
  // if realistic background 
  // same cut + substract the background from hInvMassBg
  


  /*******************************************************************************************************************/
  Char_t txt[50];
  TLatex *tex;
  TLegend *leg;
  
  /*******************************/
  /*      Monte Carlo Part       */
  /*******************************/

  //----------------------------
  // Pt-rapidity distributions from Kinematics
  //----------------------------
  TH2F *hptyResonanceMC = new TH2F("hptyResonanceMC", " Monte Carlo Resonance",ptbins,ptmin,ptmax,ybins,ymin,ymax);
  hptyResonanceMC->SetLineColor(1);
  hptyResonanceMC->SetLineStyle(1);
  hptyResonanceMC->SetLineWidth(2);
  Ktuple->Project("hptyResonanceMC","y:pt",IdcutResonanceMC);
  hptyResonanceMC->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptyResonanceMC->GetYaxis()->SetTitle("Rapidity");
 
  cout << "  " << endl;
  cout << "********************" << endl;
  cout << " Monte Carlo Tracks  "<< endl;
  cout << " " << hptyResonanceMC->GetEntries() << " Resonance in simulation " << endl;
  

  //******** Add acceptance cuts  - Theta and Pt
  TH2F *hptyResonanceMCAcc = new TH2F("hptyResonanceMCAcc", " Monte Carlo Resonance in acceptance",ptbins,ptmin,ptmax,ybins,ymin,ymax);
  hptyResonanceMCAcc->SetLineColor(1);
  hptyResonanceMCAcc->SetLineStyle(1);
  hptyResonanceMCAcc->SetLineWidth(2);

  TString m1MC(IdcutResonanceMC);
  TString m2MC(ResonanceAccCutMC);
  TString m3MC = m1MC + " && " + m2MC ;

  Ktuple->Project("hptyResonanceMCAcc","y:pt",m3MC.Data());
  hptyResonanceMCAcc->GetYaxis()->SetTitle("Rapidity");
  hptyResonanceMCAcc->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptyResonanceMCAcc->SetStats(1);
  hptyResonanceMCAcc->Sumw2();
  
  TCanvas *c1 = new TCanvas("c1", "Resonance  Monte Carlo:  Pt vs Y",30,30,700,500);
  c1->Range(-1.69394,-0.648855,15.3928,2.77143);
  c1->SetBorderSize(2);
  c1->SetRightMargin(0.0229885);
  c1->SetTopMargin(0.0275424);
  c1->SetFrameFillColor(0);
  c1->cd();

  hptyResonanceMCAcc->SetStats(0);
  hptyResonanceMCAcc->Draw("LEGO2ZFB"); 
  //TLatex *tex = new TLatex(2,6,"#mu^{-}");
  //tex->SetTextSize(0.06);
  //tex->SetLineWidth(2);  
  //tex->Draw();
 
  sprintf(txt,"Resonance : %d entries",(Int_t)hptyResonanceMCAcc->GetEntries());
  tex = new TLatex(-0.854829,0.794436,txt);
  tex->SetLineWidth(2);
  tex->Draw();

  c1->Update();
  if (SAVE){
    c1->SaveAs("ptyResonanceMCAcc.gif");
    c1->SaveAs("ptyResonanceMCAcc.eps");
  }


  TH1F *hptResonanceMCAcc = new TH1F("hptResonanceMCAcc", " Monte Carlo Resonance in acceptance",ptbins,ptmin,ptmax);
  hptResonanceMCAcc->SetLineColor(1);
  hptResonanceMCAcc->SetLineStyle(1);
  hptResonanceMCAcc->SetLineWidth(2);
  Ktuple->Project("hptResonanceMCAcc","pt",m3MC.Data());
  hptResonanceMCAcc->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptResonanceMCAcc->SetStats(1);
  hptResonanceMCAcc->Sumw2();
  
  TH1F *hyResonanceMCAcc = new TH1F("hyResonanceMCAcc", " Monte Carlo Resonance in acceptance",ybins,ymin,ymax);
  hyResonanceMCAcc->SetLineColor(1);
  hyResonanceMCAcc->SetLineStyle(1);
  hyResonanceMCAcc->SetLineWidth(2);
  Ktuple->Project("hyResonanceMCAcc","y",m3MC.Data());
  hyResonanceMCAcc->GetXaxis()->SetTitle("Rapidity");
  hyResonanceMCAcc->SetStats(1);
  hyResonanceMCAcc->Sumw2();
  
  
  //   TH2F *hKAccptyCutsMuplus = new TH2F("hKAccptyCutsMuplus", "Monte Carlo #mu^{+} ",ptbins,ptmin,ptmax,ybins,ymin,ymax);
  //   hKAccptyCutsMuplus->SetLineColor(1);
  //   hKAccptyCutsMuplus->SetLineStyle(1);
  //   hKAccptyCutsMuplus->SetLineWidth(2);
  
  //   TString p1MC(IdcutMuplusMC);
  //   TString p2MC(AccCutMC);
  //   TString p3MC = p1MC + " && " + p2MC ;
  
  //   Ktuple->Project("hKAccptyCutsMuplus","y:pt",p3MC.Data());
  //   hKAccptyCutsMuplus->GetYaxis()->SetTitle("Rapidity");
  //   hKAccptyCutsMuplus->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  //   hKAccptyCutsMuplus->SetStats(1);
  //   hKAccptyCutsMuplus->Sumw2();
  
  
  cout << "  " << endl;
  cout << "********************" << endl;
  cout << " Monte Carlo Tracks  "<< endl;
  cout << " " << hptyResonanceMCAcc->GetEntries() << " Resonance in acceptance cuts " << endl;
  

  /*******************************************************************************************************************/

  /*******************************/
  /*  Reconstructed Tracks Study */
  /*******************************/

  //----------------------------
  // Pt-rapidity distributions from ESD : reconstructed tracks/particle
  //----------------------------
  TH2F *hptyResonanceESD = new TH2F("hptyResonanceESD", " Reconstucted Resonances",ptbins,ptmin,ptmax,ybins,ymin,ymax);
  hptyResonanceESD->SetLineColor(1);
  hptyResonanceESD->SetLineStyle(1);
  hptyResonanceESD->SetLineWidth(2);
  ESDtuple->Project("hptyResonanceESD","y:pt",BckgdCutResonanceESD);
  hptyResonanceESD->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptyResonanceESD->GetYaxis()->SetTitle("Rapidity");

  cout << "  " << endl;
  cout << "********************" << endl;
  cout << " Reconstructed Tracks" << endl ;
  cout << " " << hptyResonanceESD->GetEntries() << " Resonance reconstructed " << endl;

  if (REALISTIC_BACKGROUND){
    TH2F *hptyResonanceESDBck = new TH2F("hptyResonanceESDBck", "Background",ptbins,ptmin,ptmax,ybins,ymin,ymax);
    hptyResonanceESDBck->SetLineColor(1);
    hptyResonanceESDBck->SetLineStyle(1);
    hptyResonanceESDBck->SetLineWidth(2);
    ESDtupleBck->Project("hptyResonanceESDBck","y:pt",BckgdCutResonanceESD);
    hptyResonanceESDBck->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
    hptyResonanceESDBck->GetYaxis()->SetTitle("Rapidity");
    cout << " with " << hptyResonanceESDBck->GetEntries() << " Resonances from Background (random mixing) " << endl;
  }

  // if something is wrong 
  if ( hptyResonanceESD->GetEntries()==0) {cout << " No entries in hptyResonanceESD " << endl ; return 0 ;}

  //with Acc cuts - Theta and Pt
  TH2F *hptyResonanceESDAcc = new TH2F("hptyResonanceESDAcc", "Reconstructed Resonances",ptbins,ptmin,ptmax,ybins,ymin,ymax);
  hptyResonanceESDAcc->SetLineColor(1);
  hptyResonanceESDAcc->SetLineStyle(1);
  hptyResonanceESDAcc->SetLineWidth(2);
  
  TString m1Rec(BckgdCutResonanceESD);
  TString m2Rec(ResonanceAccCutESD);
  TString m3Rec = m1Rec + " && " + m2Rec ;

  ESDtuple->Project("hptyResonanceESDAcc","y:pt",m3Rec.Data());
  hptyResonanceESDAcc->GetYaxis()->SetTitle("Rapidity");
  hptyResonanceESDAcc->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptyResonanceESDAcc->SetStats(1);
  hptyResonanceESDAcc->Sumw2();

  cout << "  " << endl;
  cout << "********************" << endl;
  cout << " Reconstructed Tracks" << endl ;
  cout << " " << hptyResonanceESDAcc->GetEntries() << " Resonance in acceptance cuts " << endl;


  TH2F *hptyResonanceESDBckAcc;
  if (REALISTIC_BACKGROUND){
    //with Acc cuts - Theta and Pt
    hptyResonanceESDBckAcc = new TH2F("hptyResonanceESDBckAcc", "Reconstructed Resonances",ptbins,ptmin,ptmax,ybins,ymin,ymax);
    hptyResonanceESDBckAcc->SetLineColor(1);
    hptyResonanceESDBckAcc->SetLineStyle(1);
    hptyResonanceESDBckAcc->SetLineWidth(2);
    
    TString m1Rec(BckgdCutResonanceESD);
    TString m2Rec(ResonanceAccCutESD);
    TString m3Rec = m1Rec + " && " + m2Rec ;
    
    ESDtupleBck->Project("hptyResonanceESDBckAcc","y:pt",m3Rec.Data());
    hptyResonanceESDBckAcc->GetYaxis()->SetTitle("Rapidity");
    hptyResonanceESDBckAcc->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
    hptyResonanceESDBckAcc->SetStats(1);
    hptyResonanceESDBckAcc->Sumw2();
    cout << " with " << hptyResonanceESDBckAcc->GetEntries() << " Resonances from Background (random mixing) " << endl;
  }


  TCanvas *c100 = new TCanvas("c100", "Resonance Reconstructed in Acceptance: Pt vs Y",210,30,700,500);
  c100->Range(-1.69394,-0.648855,15.3928,2.77143);
  c100->SetBorderSize(2);
  c100->SetRightMargin(0.0229885);
  c100->SetTopMargin(0.0275424);
  c100->SetFrameFillColor(0);
  
  c100->cd();
  hptyResonanceESDAcc->SetStats(0);
  hptyResonanceESDAcc->Draw("LEGO2ZFB"); 
  sprintf(txt,"Resonance : %d entries",(Int_t)hptyResonanceESDAcc->GetEntries());
  tex = new TLatex(-0.854829,0.794436,txt);
  tex->SetLineWidth(2);
  tex->Draw();

  c100->Update();
  if (SAVE){
    c100->SaveAs("ptyResonanceESDAcc.gif");
    c100->SaveAs("ptyResonanceESDAcc.eps");
  }

  if (REALISTIC_BACKGROUND){
    TCanvas *c110 = new TCanvas("c110", "Resonance Background Reconstructed in Acceptance: Pt vs Y",215,35,700,500);
    c110->Range(-1.69394,-0.648855,15.3928,2.77143);
    c110->SetBorderSize(2);
    c110->SetRightMargin(0.0229885);
    c110->SetTopMargin(0.0275424);
    c110->SetFrameFillColor(0);
    
    c110->cd();
    hptyResonanceESDBckAcc->SetStats(0);
    hptyResonanceESDBckAcc->Draw("LEGO2ZFB"); 
    sprintf(txt,"Resonance backround : %d entries",(Int_t)hptyResonanceESDBckAcc->GetEntries());
    tex = new TLatex(-0.854829,0.794436,txt);
    tex->SetLineWidth(2);
    tex->Draw();
    
    
    c110->Update();
    if (SAVE){
      c110->SaveAs("ptyResonanceESDBckAcc.gif");
      c110->SaveAs("ptyResonanceESDBckAcc.eps");
    }
  }
  
  TH1F *hptResonanceESDAcc = new TH1F("hptResonanceESDAcc", " Monte Carlo Resonance in acceptance",ptbins,ptmin,ptmax);
  hptResonanceESDAcc->SetLineColor(1);
  hptResonanceESDAcc->SetLineStyle(1);
  hptResonanceESDAcc->SetLineWidth(2);
  ESDtuple->Project("hptResonanceESDAcc","pt",m3Rec.Data());
  hptResonanceESDAcc->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hptResonanceESDAcc->SetStats(1);
  hptResonanceESDAcc->Sumw2();
  
  TH1F *hyResonanceESDAcc = new TH1F("hyResonanceESDAcc", " Monte Carlo Resonance in acceptance",ybins,ymin,ymax);
  hyResonanceESDAcc->SetLineColor(1);
  hyResonanceESDAcc->SetLineStyle(1);
  hyResonanceESDAcc->SetLineWidth(2);
  ESDtuple->Project("hyResonanceESDAcc","y",m3Rec.Data());
  hyResonanceESDAcc->GetXaxis()->SetTitle("Rapidity");
  hyResonanceESDAcc->SetStats(1);
  hyResonanceESDAcc->Sumw2();
  

  /*******************************************************************************************************************/

  /*******************************/
  /* Efficiencies calculations   */
  /*******************************/
  

  cout << "  " << endl;
  cout << "***********************" << endl;
  cout << " Integrated efficiency" << endl ;
  
  if (REALISTIC_BACKGROUND)
    cout << " ResonanceESDAcc/ResonanceMCAcc = " << (hptyResonanceESDAcc->GetEntries()-hptyResonanceESDBckAcc->GetEntries())/hptyResonanceMCAcc->GetEntries()  << endl;
  else 
    cout << " ResonanceESDAcc/ResonanceMCAcc = " << hptyResonanceESDAcc->GetEntries()/hptyResonanceMCAcc->GetEntries()  << endl;

  TH2F *hEffptyResonance = new TH2F("hEffptyResonance", " Resonance Efficiency",ptbins,ptmin,ptmax,ybins,ymin,ymax);

  if (REALISTIC_BACKGROUND){
    TH2F *hptyResonanceESDAccBckSubstracted = new TH2F("hptyResonanceESDAccBckSubstracted","hptyResonanceESDAccBckSubstracted",ptbins,ptmin,ptmax,ybins,ymin,ymax);
    hptyResonanceESDAccBckSubstracted->Add(hptyResonanceESDAcc,hptyResonanceESDBckAcc,1,-1);
    hEffptyResonance->Divide(hptyResonanceESDAccBckSubstracted,hptyResonanceMCAcc,1,1);
  }
  else 
  hEffptyResonance->Divide(hptyResonanceESDAcc,hptyResonanceMCAcc,1,1);

  TCanvas *c1000 = new TCanvas("c1000", "Resonance efficiency : Pt vs Y",390,30,700,500);
  c1000->Range(-1.69394,-0.648855,15.3928,2.77143);
  c1000->SetBorderSize(2);
  c1000->SetRightMargin(0.0229885);
  c1000->SetTopMargin(0.0275424);
  c1000->SetFrameFillColor(0);

  c1000->cd();
  hEffptyResonance->SetStats(0);
  hEffptyResonance->Draw("LEGO2fz");



  TH1F *hEffptResonance = new TH1F("hEffptResonance", "Resonance Efficiency vs pt",ptbins,ptmin,ptmax);
  hEffptResonance->Divide(hptResonanceESDAcc,hptResonanceMCAcc,1,1);
  hEffptResonance->SetLineWidth(2);
  hEffptResonance->SetMinimum(0);
  hEffptResonance->SetStats(1);


  TCanvas *c1100 = new TCanvas("c1100", "Resonance efficiency : Pt",410,50,700,500);
  c1100->Range(-1.69394,-0.648855,15.3928,2.77143);
  c1100->SetBorderSize(2);
  c1100->SetRightMargin(0.0229885);
  c1100->SetTopMargin(0.0275424);
  c1100->SetFrameFillColor(0);

  c1100->cd();
  hEffptResonance->SetStats(0);
  hEffptResonance->GetXaxis()->SetTitle("P_{#perp}  [GeV/c]");
  hEffptResonance->GetYaxis()->SetTitle("Efficiency ");
  hEffptResonance->Draw("E");
   
  
  
  TH1F *hEffyResonance = new TH1F("hEffyResonance", "Resonance Efficiency vs y",ybins,ymin,ymax);
  hEffyResonance->Divide(hyResonanceESDAcc,hyResonanceMCAcc,1,1);
  hEffyResonance->SetLineWidth(2);
  hEffyResonance->SetStats(1);
  
  TCanvas *c1200 = new TCanvas("c1200", "Resonance efficiency : Y",430,70,700,500);
  c1200->Range(-1.69394,-0.648855,15.3928,2.77143);
  c1200->SetBorderSize(2);
  c1200->SetRightMargin(0.0229885);
  c1200->SetTopMargin(0.0275424);
  c1200->SetFrameFillColor(0);

  c1200->cd();
  hEffyResonance->SetStats(0);
  hEffyResonance->GetXaxis()->SetTitle("Rapidity");
  hEffyResonance->GetYaxis()->SetTitle("Efficiency ");
  hEffyResonance->Draw("E");

  c1000->Update();
  c1100->Update();
  c1200->Update();
  if (SAVE){
    c1000->SaveAs("EffptyResonance.gif");
    c1000->SaveAs("EffptyResonance.eps");
    c1100->SaveAs("EffptResonance.gif");
    c1100->SaveAs("EffptResonance.eps");
    c1200->SaveAs("EffyResonance.gif");
    c1200->SaveAs("EffyResonance.eps");
  }

 /*******************************************************************************************************************/

  /*******************************************/
  /* Trigger matching                        */
  /* trigger word is defined in :            */
  /* /STEER/createTriggerDescriptor_MUON.C   */
  /*******************************************/


  // Float_t triggerChi2Min = 0.; 
  // Float_t triggerChi2Max = 7.5;

  //TString m1Rec(BckgdCutResonanceESD);
  //TString m2Rec(ResonanceAccCutESD);
  TString  m1TG = m1Rec + " && " + m2Rec ;
  //cout << m1TG.Data() << endl;
  
  TH1F *hInvMassNoTriggerCut= new TH1F("hInvMassNoTriggerCut","hInvMassNoTriggerCut",invMassBins,invMassMin,invMassMax);
  hInvMassNoTriggerCut->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hInvMassNoTriggerCut->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hInvMassNoTriggerCut","minv",m1TG.Data());

  //Add trigger UnlikeHighPt or UnlikeLowPt
  TString  m2TG = m1TG + " && ((tw & 0x10) == 16 || (tw & 0x32) == 32)" ;
  TH1F *hInvMassResonanceTrigger= new TH1F("hInvMassResonanceTrigger","hInvMassResonanceTrigger",invMassBins,invMassMin,invMassMax);
  hInvMassResonanceTrigger->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hInvMassResonanceTrigger->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hInvMassResonanceTrigger","minv",m2TG.Data());


  cout << "  " << endl;
  cout << "********************" << endl;
  cout << " TriggerMatching" << endl ;
  cout << " " << hInvMassResonanceTrigger->GetEntries() << " Resonance with trigger UnlikePairAllPt " << endl;

  TString  m2TGNo = m1TG + " && (tw & 0x800) != 2048" ;
  TH1F *hResonanceTriggerNo= new TH1F("hResonanceTriggerNo","hResonanceTriggerNo",32769,0,32768);
  hResonanceTriggerNo->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hResonanceTriggerNo->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hResonanceTriggerNo","tw",m2TGNo.Data());

  


  //Add matching rec/trig for 2 tracks 
  TString m3TG = m2TG + " && trig1 > 0 && trig2 > 0" ;  
  TH1F *hInvMassResonanceTriggerTwoMatch = new TH1F("hInvMassResonanceTriggerTwoMatch","hInvMassResonanceTrigger with 2 matching tracks",invMassBins,invMassMin,invMassMax);
  hInvMassResonanceTriggerTwoMatch->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hInvMassResonanceTriggerTwoMatch->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hInvMassResonanceTriggerTwoMatch","minv",m3TG.Data());


  //Add matching rec/trig for 1  tracks 
  TString m4TG = m2TG + " && (trig1 > 0 || trig2 > 0)" ;  
  TH1F *hInvMassResonanceTriggerOneMatch= new TH1F("hInvMassResonanceTriggerOneMatch","hInvMassResonanceTrigger with 1 matching tracks",invMassBins,invMassMin,invMassMax);
  hInvMassResonanceTriggerOneMatch->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hInvMassResonanceTriggerOneMatch->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hInvMassResonanceTriggerOneMatch","minv",m4TG.Data());

  TString m5TG = m2TG + " && (trig1 == 0 && trig2 == 0)" ;  
  TH1F *hInvMassResonanceTriggerNoMatch= new TH1F("hInvMassResonanceTriggerNoMatch","hInvMassResonanceTrigger with no matching tracks",invMassBins,invMassMin,invMassMax);
  hInvMassResonanceTriggerNoMatch->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
  hInvMassResonanceTriggerNoMatch->GetYaxis()->SetTitle("Counts");
  ESDtuple->Project("hInvMassResonanceTriggerNoMatch","minv",m5TG.Data());

  TCanvas *c2 = new TCanvas("c2", "Resonance Trigger efficiency",30,90,700,500);
  c2->Range(-1.69394,-0.648855,15.3928,2.77143);
  c2->SetBorderSize(2);
  c2->SetRightMargin(0.0229885);
  c2->SetTopMargin(0.0275424);
  c2->SetFrameFillColor(0);
  c2->SetLogy(1);

  c2->cd();
  hInvMassNoTriggerCut->SetStats(0);
  hInvMassNoTriggerCut->SetLineWidth(2);
  hInvMassNoTriggerCut->SetLineStyle(3);
  hInvMassNoTriggerCut->SetLineColor(1);
  hInvMassNoTriggerCut->GetYaxis()->SetTitleOffset(1.2);
  hInvMassNoTriggerCut->Draw();
  hInvMassResonanceTrigger->SetLineWidth(2);
  hInvMassResonanceTrigger->SetLineStyle(0);
  hInvMassResonanceTrigger->SetLineColor(2);
  hInvMassResonanceTrigger->Draw("same");
  hInvMassResonanceTriggerTwoMatch->SetLineWidth(2);
  hInvMassResonanceTriggerTwoMatch->SetLineStyle(1);
  hInvMassResonanceTriggerTwoMatch->SetLineColor(4);
  hInvMassResonanceTriggerTwoMatch->Draw("same");
  hInvMassResonanceTriggerOneMatch->SetLineWidth(2);
  hInvMassResonanceTriggerOneMatch->SetLineStyle(2);
  hInvMassResonanceTriggerOneMatch->SetLineColor(51);
  hInvMassResonanceTriggerOneMatch->Draw("same");
  hInvMassResonanceTriggerNoMatch->SetLineWidth(2);
  hInvMassResonanceTriggerNoMatch->SetLineStyle(2);
  hInvMassResonanceTriggerNoMatch->SetLineColor(46);
  hInvMassResonanceTriggerNoMatch->Draw("same");

  leg = new TLegend(0.12,0.6,0.50,0.89);
  leg->SetHeader("Reconstructed Resonance Invariant Mass");

  leg->AddEntry(hInvMassNoTriggerCut,Form("All  (%.0f cnts)",hInvMassNoTriggerCut->GetEntries()),"l");
  leg->AddEntry(hInvMassResonanceTrigger,Form("UnlikePairAllPt Trigger (%.0f cnts)",hInvMassResonanceTrigger->GetEntries()),"l");
  leg->AddEntry(hInvMassResonanceTriggerTwoMatch,Form("UPAllPt Trig. and 2 tracks matches (%.0f cnts)",hInvMassResonanceTriggerTwoMatch->GetEntries()),"l");  
  leg->AddEntry(hInvMassResonanceTriggerOneMatch,Form("UPAllPt Trig. and 1 track match (%.0f cnts)",hInvMassResonanceTriggerOneMatch->GetEntries()),"l");  
  leg->AddEntry(hInvMassResonanceTriggerNoMatch,Form("UPAllPt Trig. and no matching track (%.0f cnts)",hInvMassResonanceTriggerNoMatch->GetEntries()),"l");  
  leg->Draw();

  c2->Update();
  if(SAVE){
    c2->SaveAs("TriggerMatching.gif");
    c2->SaveAs("TriggerMatching.eps");
  }
  
 /*******************************************************************************************************************/

  /*******************************/
  /* Mass resolution             */
  /*******************************/
  
  const Int_t nofMassHistograms = ptbins ; 
  // cs invMassMin = 7.0 ;
  // cs invMassMax = 11.0 ;
  // cs invMassBins = 100 ;
  
  //Float_t ptmin = 0.0;      
  //Float_t ptmax =  16.0;  Int_t ptbins = 8;    
  Float_t ptbinssize = ptmax/ptbins; 
  

  Float_t ptbinslimits[nofMassHistograms+1];
  Float_t ptbinscenters[nofMassHistograms];
  
  for(Int_t as = 0 ; as < nofMassHistograms+1 ; as++){
    ptbinslimits[as] = as*ptbinssize ;
    //cout << "ptbinslimits["<<as<<"] = " << ptbinslimits[as] << endl ;
  }
  for(Int_t as = 0 ; as < nofMassHistograms ; as++) {
    ptbinscenters[as] = ptbinslimits[as] + (ptbinslimits[as+1] - ptbinslimits[as])/2 ;
    //cout << "ptbinscenters[as] = " << ptbinscenters[as] << endl ;
  }
  

  TH1F **hInvMassInPtBins = new TH1F* [nofMassHistograms] ;
  TString histExt;
  Char_t  theExt[20];
  TString histCut;
  Char_t  theCut[100];
  
  
  TF1 *fitFunc = 0;  
  TString FitFuncName;

  if (fitfunc==0 || fitfunc==1){
    fitFunc = new TF1("gaussian","gaus(0)",FitLow,FitHigh);
    if (!fitFunc)
      fitFunc = new TF1("gaussian","[0]*TMath::Exp(-0.5*(x-[1])*(x-[1])/[2]/[2])",FitLow,FitHigh);
    fitFunc->SetParNames("Constant","Mean value","Width");
    fitFunc->SetLineColor(2);
    fitFunc->SetLineWidth(2);
    fitFunc->SetLineStyle(2);
    
    Float_t  *tParams = new Float_t[3] ;
    tParams[0] = 500;
    tParams[1] = RESONANCE_MASS;
    tParams[2] = 0.1;

    fitFunc->SetParameters(tParams[0],tParams[1],tParams[2]);
    
    FitFuncName = "gaussian";  
  }
  
  if (fitfunc==2){
    fitFunc = new TF1("fitlandau_a",fitlandau_a,FitLow,FitHigh,3);
    fitFunc->SetParNames("Constant","Mean value","Width");
    fitFunc->SetLineColor(2);
    fitFunc->SetLineWidth(2);
    fitFunc->SetLineStyle(2);
    
    Float_t  *tParams = new Float_t[3] ;
    tParams[0] = 1000;
    tParams[1] = RESONANCE_MASS;
    tParams[2] = 0.05;
    fitFunc->SetParameters(tParams[0],tParams[1],tParams[2]);
    
    TString FitFuncName = "fitlandau_a";  
  }
  
  if (fitfunc==3){
    fitFunc = new TF1("fitlandaugauss",fitlandaugauss,FitLow,FitHigh,6);
    fitFunc->SetParNames("Constant","Mean value","Width","SigmaGauss","LowFitVal","HighFitVal");
    fitFunc->SetLineColor(2);
    fitFunc->SetLineWidth(2);
    fitFunc->SetLineStyle(2);
    
    Float_t  *tParams = new Float_t[6] ;
    tParams[0] = 5000;
    tParams[1] = RESONANCE_MASS;   
    tParams[2] = 0.05;   //0.5
    tParams[3] = 0.05;   // 1.
    
    tParams[4] = FitLow;
    tParams[5] = FitHigh;

    fitFunc->SetParameters(tParams[0],tParams[1],tParams[2],tParams[3],tParams[4],tParams[5]);
    fitFunc->FixParameter(4,FitLow);
    fitFunc->FixParameter(5,FitHigh);
    
    fitFunc->SetParLimits(1, 9.1 ,9.7);
    fitFunc->SetParLimits(2, 0.001 ,0.1);
    fitFunc->SetParLimits(3, 0.001 ,0.5);

    // for special case one may use 
    //fitFunc->SetParameter(1,9.35);

    TString FitFuncName = "fitlandaugauss"; 
  }
  
  if (fitfunc==4){
    fitFunc = new TF1("fitlandau",fitlandau,FitLow,FitHigh,3);
    fitFunc->SetParNames("Constant","Mean value","Width");
    fitFunc->SetLineColor(2);
    fitFunc->SetLineWidth(2);
    fitFunc->SetLineStyle(2);
    
    Float_t  *tParams = new Float_t[3] ;
    tParams[0] = 1000;
    tParams[1] = RESONANCE_MASS;
    tParams[2] = 0.05;
    fitFunc->SetParameters(tParams[0],tParams[1],tParams[2]);
    
    TString FitFuncName = "fitlandau";  
  }


  Float_t fitResultsWidth[nofMassHistograms];
  Float_t fitResultsWidthErr[nofMassHistograms];
  
  Float_t fitResultsMean[nofMassHistograms];
  Float_t fitResultsMeanErr[nofMassHistograms];
  
  Float_t errx[nofMassHistograms];



  TCanvas *call = new TCanvas("call", "Resonance : invariant mass spectra",30,330,700,500);
  call->Range(-1.69394,-0.648855,15.3928,2.77143);
  call->SetBorderSize(2);
  //call->SetRightMargin(0.2229885);
  call->SetRightMargin(0.0229885);
  call->SetTopMargin(0.0275424);
  call->SetFrameFillColor(0);
  call->cd();

  TH1F* hInvMass = new TH1F("hInvMass","Inv. Mass Pt,Y integrated",30,0,3+RESONANCE_MASS);
  ESDtuple->Project("hInvMass","minv");
  hInvMass->SetLineWidth(2);
  hInvMass->Draw("HE");

  if(REALISTIC_BACKGROUND){  
    TH1F* hInvMassBck = new TH1F("hInvMassBck","Background Pt,Y integrated",30,0,3+RESONANCE_MASS);
    ESDtupleBck->Project("hInvMassBck","minv");
    hInvMassBck->SetLineWidth(2);
    hInvMassBck->SetLineStyle(2);
    hInvMassBck->SetLineColor(2);    
    hInvMassBck->Draw("same");
  }
  call->Modified();
  call->Update();


  TCanvas *cfit = new TCanvas("cfit", "Resonance : invariant mass fit",30,330,700,500);
  cfit->Range(-1.69394,-0.648855,15.3928,2.77143);
  cfit->SetBorderSize(2);
  //cfit->SetRightMargin(0.2229885);
  cfit->SetRightMargin(0.0229885);
  cfit->SetTopMargin(0.0275424);
  cfit->SetFrameFillColor(0);
  
  //TH1F *hInvMassAllClone = (TH1F*) gROOT->FindObject("hInvMassAll");
  
  TH1F* hInvMassAll = new TH1F("hInvMassAll","Inv. Mass Pt,Y integrated",invMassBins,invMassMin,invMassMax);
  sprintf(theCut,"pt> %.2f && pt<= %.2f",ptbinslimits[0],ptbinslimits[nofMassHistograms]);
  //cout << "theCut" << theCut << endl ;
  ESDtuple->Project("hInvMassAll","minv",theCut);
  hInvMassAll->Draw();
  
  cfit->Update();
  if (SAVE){
    cfit->SaveAs("ResonanceMass.gif");
    cfit->SaveAs("ResonanceMass.eps");
  }

  if(REALISTIC_BACKGROUND){  
    TH1F* hInvMassAllBck = new TH1F("hInvMassAllBck","Background Pt,Y integrated",invMassBins,invMassMin,invMassMax);
    ESDtupleBck->Project("hInvMassAllBck","minv",theCut);
    hInvMassAllBck->SetLineWidth(2);
    hInvMassAllBck->SetLineStyle(2);
    hInvMassAllBck->SetLineColor(2);    
    hInvMassAllBck->Draw("same");
  }
  cfit->Modified();
  cfit->Update();
  
  //Fit also the pt-integrated mass histogram 
  cfit->cd();
  hInvMassAll->Fit(FitFuncName.Data(),"rv");
  if (FitFuncName == "gaussian")
    fitFunc->SetRange(fitFunc->GetParameter(1)-gaussianFitWidth,fitFunc->GetParameter(1)+gaussianFitWidth);
  hInvMassAll->Fit(FitFuncName.Data(),"rv");
  cfit->Modified();
  cfit->Update();
  
  cout << " " << endl;
  cout << "********************************************" << endl;
  cout << " Fit ("<<FitFuncName.Data()<<" results of the pt-integrated mass peak " << endl ;
   cout << "   Mean value : " << fitFunc->GetParameter(1) << " +/- " << fitFunc->GetParError(1) << endl ;
   cout << "   Width value : " << fitFunc->GetParameter(2) << " +/- " << fitFunc->GetParError(2) << endl ;
   cout << "   ChiSquare of the fit : " << fitFunc->GetChisquare()<< " / " << fitFunc->GetNDF() << endl ;
   cout << "********************************************" << endl;
   cout << " " << endl;
   
   TCanvas *cptfits = new TCanvas("cptfits", "Resonance : invariant mass fit",30,330,700,500);
   cptfits->Range(-1.69394,-0.648855,15.3928,2.77143);
   cptfits->SetBorderSize(2);
   //cptfits->SetRightMargin(0.2229885);
   cptfits->SetRightMargin(0.0229885);
   cptfits->SetTopMargin(0.0275424);
   cptfits->SetFrameFillColor(0);

   Float_t chi2sum = 0.;
  
  for (Int_t qw = 0 ; qw < nofMassHistograms ; qw++){
    sprintf(theExt,"_%1f_%1f",ptbinslimits[qw],ptbinslimits[qw+1]);
    histExt= theExt;
    hInvMassInPtBins[qw] = new TH1F("hInvMassInPtBins"+histExt,"hInvMassInPtBins"+histExt,invMassBins,invMassMin,invMassMax);
    hInvMassInPtBins[qw]->GetXaxis()->SetTitle("Mass [GeV/c^{2}]");
    hInvMassInPtBins[qw]->GetYaxis()->SetTitle("Counts");
     
    sprintf(theCut,"pt> %.2f && pt<= %.2f",ptbinslimits[qw],ptbinslimits[qw+1]);
    histCut = theCut; 
    ESDtuple->Project("hInvMassInPtBins"+histExt,"minv",histCut.Data());
    
    if (hInvMassInPtBins[qw]->GetEntries() > 80){
      cptfits->cd();

      if (FitFuncName == "gaussian"){
	//prefit with a gaussian to get the maximum set a correct range
	hInvMassInPtBins[qw]->Fit(FitFuncName.Data(),"rv");
	fitFunc->SetRange(fitFunc->GetParameter(1)-gaussianFitWidth,fitFunc->GetParameter(1)+gaussianFitWidth);
      }
      
      hInvMassInPtBins[qw]->SetStats(1);
      hInvMassInPtBins[qw]->Draw("HE");
      hInvMassInPtBins[qw]->Fit(FitFuncName.Data(),"rv");

      
      cout << "==============" << endl;
      cout << "ChiSquare of the fit : " << fitFunc->GetChisquare()<< " / " << fitFunc->GetNDF() 
	   << " = " << fitFunc->GetChisquare()/fitFunc->GetNDF() <<endl;
      cout << "==============" << endl;
      chi2sum += fitFunc->GetChisquare()/fitFunc->GetNDF();
 
      cptfits->Modified();
      cptfits->Update();
      
      fitResultsWidth[qw] = TMath::Abs(fitFunc->GetParameter(2));
      fitResultsWidthErr[qw] =  fitFunc->GetParError(2);

      fitResultsMean[qw] = TMath::Abs(fitFunc->GetParameter(1));
      fitResultsMeanErr[qw] =  fitFunc->GetParError(1);
      
      if(FitFuncName == "fitlandaugauss"){	
	// width = gauss_width + width landau
	fitResultsWidth[qw] = TMath::Abs(fitFunc->GetParameter(2)) +  TMath::Abs(fitFunc->GetParameter(3)); 
	fitResultsWidthErr[qw] =  TMath::Abs(fitFunc->GetParError(2)) +  TMath::Abs(fitFunc->GetParError(3));
	
	// problem with the mean of the fit (parameter1)  which doesn't give the peak position 
	fitResultsMean[qw] = TMath::Abs(fitFunc->GetMaximumX());
	fitResultsMeanErr[qw] =  fitFunc->GetParError(1); 
	//this could work but it's not very nice....
      }

    }
    else {
      fitResultsWidth[qw] = 0.;
      fitResultsWidthErr[qw] = 0.;
      fitResultsMean[qw] = 0.;
      fitResultsMeanErr[qw] = 0.;
    }

    errx[qw] = 0.;
    
  }
  
  
  //From fit results extract a Mean value for the Mass and width
  cout << " " << endl;
  cout << "********************************************" << endl;
  cout << " Fit Function : " << FitFuncName  << " " ; 
  if (FitFuncName == "gaussian" ) cout << "+/- " << gaussianFitWidth << " MeV/c2" ;  
  cout <<  endl ;  
  cout << " Fit results :  mean values  " << endl ;
  Float_t meanMass = 0 ;
  Float_t meanMassError = 0 ;
  Float_t meanWidth = 0 ;
  Float_t meanWidthError = 0 ;
  Int_t cnt = 0 ;
  for (Int_t qw = 0 ; qw < nofMassHistograms ; qw++){
    if ( fitResultsMean[qw] > invMassMin &&   fitResultsMean[qw] < invMassMax &&  fitResultsWidth[qw] > 0 &&  fitResultsWidth[qw] < 1){
      meanWidth += fitResultsWidth[qw] ;
      meanWidthError += fitResultsWidthErr[qw];
      meanMass += fitResultsMean[qw] ;
      meanMassError += fitResultsMeanErr[qw];
      cnt++;
    }
  }
  if (cnt==0) {
    cout << "Fitting procedure didn't work" << endl;  
    return 0 ;
  }

  cout << " Mass : " << meanMass/cnt << " +/- " << meanMassError/cnt << endl ;
  cout << " Width : " << meanWidth/cnt << " +/- " << meanWidthError/cnt << endl ;
  cout << " Mean Chi2 of the fits : " << chi2sum/nofMassHistograms << endl ;
  cout << "********************************************" << endl;
  cout << " " << endl;
  

  cout << "  " << endl;
  cout << "***********************" << endl;
  cout << " Integrated efficiency (+/- "<< 3*masssigma << " GeV around Resonance mass cut)" << endl ;
  cout << " ResonanceESDAcc/ResonanceMCAcc = " << hptyResonanceESDAcc->GetEntries() << "/" << hptyResonanceMCAcc->GetEntries()  << " = "  << hptyResonanceESDAcc->GetEntries()/hptyResonanceMCAcc->GetEntries()  <<endl;
  cout << "***********************" << endl;
  cout << "  " << endl;


  cout << "  " << endl;
  cout << "***********************" << endl;
  cout << " Trigger  efficiency" << endl ;
  cout << " Two muons matching = " << hInvMassResonanceTriggerTwoMatch->GetEntries() << "/" << hInvMassResonanceTrigger->GetEntries() << " = " <<  hInvMassResonanceTriggerTwoMatch->GetEntries()/hInvMassResonanceTrigger->GetEntries() << endl;
  cout << " Single muon matching  = " << hInvMassResonanceTriggerOneMatch->GetEntries() << "/" << hInvMassResonanceTrigger->GetEntries() << " = " <<  hInvMassResonanceTriggerOneMatch->GetEntries()/hInvMassResonanceTrigger->GetEntries() << endl;
  cout << " No matching  = " << hInvMassResonanceTriggerNoMatch->GetEntries() << "/" << hInvMassResonanceTrigger->GetEntries() << " = " <<  hInvMassResonanceTriggerNoMatch->GetEntries()/hInvMassResonanceTrigger->GetEntries() <<endl;
  cout << "***********************" << endl;
  cout << "  " << endl;

  
  
  TCanvas *cA = new TCanvas("cA", "Resonance : Width from fit",30,330,700,500);
  cA->Range(-1.69394,-0.648855,15.3928,2.77143);
  cA->SetBorderSize(2);
  cA->SetRightMargin(0.0229885);
  cA->SetTopMargin(0.0275424);
  cA->SetFrameFillColor(0);
  cA->cd();
  
  //TH2F *hFrameA = new TH2F("hFrameA", "A hFrameA",ptbins,ptmin,ptmax,100,fitResultsWidth[1]-fitResultsWidth[1]*2,fitResultsWidth[1]+fitResultsWidth[1]*2);
  TH2F *hFrameA = new TH2F("hFrameA", "A hFrameA",ptbins,ptmin,ptmax,100,0.,2*fitResultsWidth[1]);
  hFrameA->GetYaxis()->SetTitle("Peak Width [GeV/c^{2}]");
  hFrameA->GetYaxis()->SetTitleOffset(1.2);
  hFrameA->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hFrameA->SetStats(0);
  hFrameA->Draw(); 
  
  
  TGraphErrors *grWidth = new TGraphErrors(nofMassHistograms,ptbinscenters,fitResultsWidth,errx,fitResultsWidthErr);
  grWidth->SetTitle("Resonance Mass Width");
  grWidth->SetMarkerColor(4);
  grWidth->SetMarkerStyle(21);
  grWidth->Draw("P");
  
  
  
  TCanvas *cB = new TCanvas("cB", "Resonance : Mean from fit",50,350,700,500);
  cB->Range(-1.69394,-0.648855,15.3928,2.77143);
  cB->SetBorderSize(2);
  cB->SetRightMargin(0.0229885);
  cB->SetTopMargin(0.0275424);
  cB->SetFrameFillColor(0);
  cB->cd();
  
  //TH2F *hFrameB = new TH2F("hFrameB", "A hFrameB",ptbins,ptmin,ptmax,100,fitResultsMean[1]-fitResultsMean[1]*2,fitResultsMean[1]+fitResultsMean[1]*2);
  TH2F *hFrameB = new TH2F("hFrameB", "A hFrameB",ptbins,ptmin,ptmax,100,invMassMin,invMassMax);
  hFrameB->GetYaxis()->SetTitle("Peak Position [GeV/c^{2}]");
  hFrameB->GetXaxis()->SetTitle("P_{#perp}   [GeV/c]");
  hFrameB->SetStats(0);
  hFrameB->Draw(); 
  
  
  
  
  //  TGaxis *Mean = new TGaxis(16,fitResultsWidth[1]-fitResultsWidth[1]*2,16,fitResultsWidth[1]+fitResultsWidth[1]*2,7,12,510,"+");
  //  Mean->SetLabelOffset(0.050);
  //   Mean->SetLabelSize(0.04);
  //   Mean->SetTickSize(0.03);
  //   Mean->SetGridLength(0);
  //   Mean->SetTitleOffset(0.1);
  //   Mean->SetTitleOffset(-1.1);
  //   Mean->SetTitleSize(0.05);
  //   Mean->SetTitle("Mean [Gev/c^2]");
  //   Mean->Draw();
  
  
  TGraphErrors *grMean = new TGraphErrors(nofMassHistograms,ptbinscenters,fitResultsMean,errx,fitResultsMeanErr);
  grMean->SetTitle("Resonance Mass Mean");
  grMean->SetMarkerColor(4);
  grMean->SetMarkerStyle(21);
  grMean->Draw("P");
  
  cA->Update();
  cB->Update();
  if (SAVE){
    cB->SaveAs("ResonanceMeanVsPt.gif");
    cB->SaveAs("ResonanceMeanVsPt.eps");
    cA->SaveAs("ResonanceWidthVsPt.gif");
    cA->SaveAs("ResonanceWidthVsPt.eps");
  }
  
  if (WRITE){
    TFile *myFile = new TFile("MUONplotefficiency.root", "RECREATE");
    hptyResonanceMCAcc->Write();
    hptyResonanceMC->Write();
    hptResonanceMCAcc ->Write();
    hyResonanceMCAcc->Write();

    hptyResonanceESDAcc->Write();
    hptyResonanceESD->Write();
    hptResonanceESDAcc ->Write();
    hyResonanceESDAcc->Write();

    hEffptyResonance->Write();
    hEffyResonance->Write();
    hEffptResonance->Write();

    hInvMass->Write();
    hInvMassResonanceTrigger->Write();
    hResonanceTriggerNo->Write();
    hInvMassResonanceTriggerOneMatch->Write();
    hInvMassResonanceTriggerTwoMatch->Write();
    hInvMassResonanceTriggerNoMatch->Write();

    for (Int_t qw = 0 ; qw < nofMassHistograms ; qw++) 
      hInvMassInPtBins[qw]->Write();
    
    hInvMassAll->Write();
    
    myFile->Close();
  }

  return 1;
  
} // macro ends


 MUONplotefficiency.C:1
 MUONplotefficiency.C:2
 MUONplotefficiency.C:3
 MUONplotefficiency.C:4
 MUONplotefficiency.C:5
 MUONplotefficiency.C:6
 MUONplotefficiency.C:7
 MUONplotefficiency.C:8
 MUONplotefficiency.C:9
 MUONplotefficiency.C:10
 MUONplotefficiency.C:11
 MUONplotefficiency.C:12
 MUONplotefficiency.C:13
 MUONplotefficiency.C:14
 MUONplotefficiency.C:15
 MUONplotefficiency.C:16
 MUONplotefficiency.C:17
 MUONplotefficiency.C:18
 MUONplotefficiency.C:19
 MUONplotefficiency.C:20
 MUONplotefficiency.C:21
 MUONplotefficiency.C:22
 MUONplotefficiency.C:23
 MUONplotefficiency.C:24
 MUONplotefficiency.C:25
 MUONplotefficiency.C:26
 MUONplotefficiency.C:27
 MUONplotefficiency.C:28
 MUONplotefficiency.C:29
 MUONplotefficiency.C:30
 MUONplotefficiency.C:31
 MUONplotefficiency.C:32
 MUONplotefficiency.C:33
 MUONplotefficiency.C:34
 MUONplotefficiency.C:35
 MUONplotefficiency.C:36
 MUONplotefficiency.C:37
 MUONplotefficiency.C:38
 MUONplotefficiency.C:39
 MUONplotefficiency.C:40
 MUONplotefficiency.C:41
 MUONplotefficiency.C:42
 MUONplotefficiency.C:43
 MUONplotefficiency.C:44
 MUONplotefficiency.C:45
 MUONplotefficiency.C:46
 MUONplotefficiency.C:47
 MUONplotefficiency.C:48
 MUONplotefficiency.C:49
 MUONplotefficiency.C:50
 MUONplotefficiency.C:51
 MUONplotefficiency.C:52
 MUONplotefficiency.C:53
 MUONplotefficiency.C:54
 MUONplotefficiency.C:55
 MUONplotefficiency.C:56
 MUONplotefficiency.C:57
 MUONplotefficiency.C:58
 MUONplotefficiency.C:59
 MUONplotefficiency.C:60
 MUONplotefficiency.C:61
 MUONplotefficiency.C:62
 MUONplotefficiency.C:63
 MUONplotefficiency.C:64
 MUONplotefficiency.C:65
 MUONplotefficiency.C:66
 MUONplotefficiency.C:67
 MUONplotefficiency.C:68
 MUONplotefficiency.C:69
 MUONplotefficiency.C:70
 MUONplotefficiency.C:71
 MUONplotefficiency.C:72
 MUONplotefficiency.C:73
 MUONplotefficiency.C:74
 MUONplotefficiency.C:75
 MUONplotefficiency.C:76
 MUONplotefficiency.C:77
 MUONplotefficiency.C:78
 MUONplotefficiency.C:79
 MUONplotefficiency.C:80
 MUONplotefficiency.C:81
 MUONplotefficiency.C:82
 MUONplotefficiency.C:83
 MUONplotefficiency.C:84
 MUONplotefficiency.C:85
 MUONplotefficiency.C:86
 MUONplotefficiency.C:87
 MUONplotefficiency.C:88
 MUONplotefficiency.C:89
 MUONplotefficiency.C:90
 MUONplotefficiency.C:91
 MUONplotefficiency.C:92
 MUONplotefficiency.C:93
 MUONplotefficiency.C:94
 MUONplotefficiency.C:95
 MUONplotefficiency.C:96
 MUONplotefficiency.C:97
 MUONplotefficiency.C:98
 MUONplotefficiency.C:99
 MUONplotefficiency.C:100
 MUONplotefficiency.C:101
 MUONplotefficiency.C:102
 MUONplotefficiency.C:103
 MUONplotefficiency.C:104
 MUONplotefficiency.C:105
 MUONplotefficiency.C:106
 MUONplotefficiency.C:107
 MUONplotefficiency.C:108
 MUONplotefficiency.C:109
 MUONplotefficiency.C:110
 MUONplotefficiency.C:111
 MUONplotefficiency.C:112
 MUONplotefficiency.C:113
 MUONplotefficiency.C:114
 MUONplotefficiency.C:115
 MUONplotefficiency.C:116
 MUONplotefficiency.C:117
 MUONplotefficiency.C:118
 MUONplotefficiency.C:119
 MUONplotefficiency.C:120
 MUONplotefficiency.C:121
 MUONplotefficiency.C:122
 MUONplotefficiency.C:123
 MUONplotefficiency.C:124
 MUONplotefficiency.C:125
 MUONplotefficiency.C:126
 MUONplotefficiency.C:127
 MUONplotefficiency.C:128
 MUONplotefficiency.C:129
 MUONplotefficiency.C:130
 MUONplotefficiency.C:131
 MUONplotefficiency.C:132
 MUONplotefficiency.C:133
 MUONplotefficiency.C:134
 MUONplotefficiency.C:135
 MUONplotefficiency.C:136
 MUONplotefficiency.C:137
 MUONplotefficiency.C:138
 MUONplotefficiency.C:139
 MUONplotefficiency.C:140
 MUONplotefficiency.C:141
 MUONplotefficiency.C:142
 MUONplotefficiency.C:143
 MUONplotefficiency.C:144
 MUONplotefficiency.C:145
 MUONplotefficiency.C:146
 MUONplotefficiency.C:147
 MUONplotefficiency.C:148
 MUONplotefficiency.C:149
 MUONplotefficiency.C:150
 MUONplotefficiency.C:151
 MUONplotefficiency.C:152
 MUONplotefficiency.C:153
 MUONplotefficiency.C:154
 MUONplotefficiency.C:155
 MUONplotefficiency.C:156
 MUONplotefficiency.C:157
 MUONplotefficiency.C:158
 MUONplotefficiency.C:159
 MUONplotefficiency.C:160
 MUONplotefficiency.C:161
 MUONplotefficiency.C:162
 MUONplotefficiency.C:163
 MUONplotefficiency.C:164
 MUONplotefficiency.C:165
 MUONplotefficiency.C:166
 MUONplotefficiency.C:167
 MUONplotefficiency.C:168
 MUONplotefficiency.C:169
 MUONplotefficiency.C:170
 MUONplotefficiency.C:171
 MUONplotefficiency.C:172
 MUONplotefficiency.C:173
 MUONplotefficiency.C:174
 MUONplotefficiency.C:175
 MUONplotefficiency.C:176
 MUONplotefficiency.C:177
 MUONplotefficiency.C:178
 MUONplotefficiency.C:179
 MUONplotefficiency.C:180
 MUONplotefficiency.C:181
 MUONplotefficiency.C:182
 MUONplotefficiency.C:183
 MUONplotefficiency.C:184
 MUONplotefficiency.C:185
 MUONplotefficiency.C:186
 MUONplotefficiency.C:187
 MUONplotefficiency.C:188
 MUONplotefficiency.C:189
 MUONplotefficiency.C:190
 MUONplotefficiency.C:191
 MUONplotefficiency.C:192
 MUONplotefficiency.C:193
 MUONplotefficiency.C:194
 MUONplotefficiency.C:195
 MUONplotefficiency.C:196
 MUONplotefficiency.C:197
 MUONplotefficiency.C:198
 MUONplotefficiency.C:199
 MUONplotefficiency.C:200
 MUONplotefficiency.C:201
 MUONplotefficiency.C:202
 MUONplotefficiency.C:203
 MUONplotefficiency.C:204
 MUONplotefficiency.C:205
 MUONplotefficiency.C:206
 MUONplotefficiency.C:207
 MUONplotefficiency.C:208
 MUONplotefficiency.C:209
 MUONplotefficiency.C:210
 MUONplotefficiency.C:211
 MUONplotefficiency.C:212
 MUONplotefficiency.C:213
 MUONplotefficiency.C:214
 MUONplotefficiency.C:215
 MUONplotefficiency.C:216
 MUONplotefficiency.C:217
 MUONplotefficiency.C:218
 MUONplotefficiency.C:219
 MUONplotefficiency.C:220
 MUONplotefficiency.C:221
 MUONplotefficiency.C:222
 MUONplotefficiency.C:223
 MUONplotefficiency.C:224
 MUONplotefficiency.C:225
 MUONplotefficiency.C:226
 MUONplotefficiency.C:227
 MUONplotefficiency.C:228
 MUONplotefficiency.C:229
 MUONplotefficiency.C:230
 MUONplotefficiency.C:231
 MUONplotefficiency.C:232
 MUONplotefficiency.C:233
 MUONplotefficiency.C:234
 MUONplotefficiency.C:235
 MUONplotefficiency.C:236
 MUONplotefficiency.C:237
 MUONplotefficiency.C:238
 MUONplotefficiency.C:239
 MUONplotefficiency.C:240
 MUONplotefficiency.C:241
 MUONplotefficiency.C:242
 MUONplotefficiency.C:243
 MUONplotefficiency.C:244
 MUONplotefficiency.C:245
 MUONplotefficiency.C:246
 MUONplotefficiency.C:247
 MUONplotefficiency.C:248
 MUONplotefficiency.C:249
 MUONplotefficiency.C:250
 MUONplotefficiency.C:251
 MUONplotefficiency.C:252
 MUONplotefficiency.C:253
 MUONplotefficiency.C:254
 MUONplotefficiency.C:255
 MUONplotefficiency.C:256
 MUONplotefficiency.C:257
 MUONplotefficiency.C:258
 MUONplotefficiency.C:259
 MUONplotefficiency.C:260
 MUONplotefficiency.C:261
 MUONplotefficiency.C:262
 MUONplotefficiency.C:263
 MUONplotefficiency.C:264
 MUONplotefficiency.C:265
 MUONplotefficiency.C:266
 MUONplotefficiency.C:267
 MUONplotefficiency.C:268
 MUONplotefficiency.C:269
 MUONplotefficiency.C:270
 MUONplotefficiency.C:271
 MUONplotefficiency.C:272
 MUONplotefficiency.C:273
 MUONplotefficiency.C:274
 MUONplotefficiency.C:275
 MUONplotefficiency.C:276
 MUONplotefficiency.C:277
 MUONplotefficiency.C:278
 MUONplotefficiency.C:279
 MUONplotefficiency.C:280
 MUONplotefficiency.C:281
 MUONplotefficiency.C:282
 MUONplotefficiency.C:283
 MUONplotefficiency.C:284
 MUONplotefficiency.C:285
 MUONplotefficiency.C:286
 MUONplotefficiency.C:287
 MUONplotefficiency.C:288
 MUONplotefficiency.C:289
 MUONplotefficiency.C:290
 MUONplotefficiency.C:291
 MUONplotefficiency.C:292
 MUONplotefficiency.C:293
 MUONplotefficiency.C:294
 MUONplotefficiency.C:295
 MUONplotefficiency.C:296
 MUONplotefficiency.C:297
 MUONplotefficiency.C:298
 MUONplotefficiency.C:299
 MUONplotefficiency.C:300
 MUONplotefficiency.C:301
 MUONplotefficiency.C:302
 MUONplotefficiency.C:303
 MUONplotefficiency.C:304
 MUONplotefficiency.C:305
 MUONplotefficiency.C:306
 MUONplotefficiency.C:307
 MUONplotefficiency.C:308
 MUONplotefficiency.C:309
 MUONplotefficiency.C:310
 MUONplotefficiency.C:311
 MUONplotefficiency.C:312
 MUONplotefficiency.C:313
 MUONplotefficiency.C:314
 MUONplotefficiency.C:315
 MUONplotefficiency.C:316
 MUONplotefficiency.C:317
 MUONplotefficiency.C:318
 MUONplotefficiency.C:319
 MUONplotefficiency.C:320
 MUONplotefficiency.C:321
 MUONplotefficiency.C:322
 MUONplotefficiency.C:323
 MUONplotefficiency.C:324
 MUONplotefficiency.C:325
 MUONplotefficiency.C:326
 MUONplotefficiency.C:327
 MUONplotefficiency.C:328
 MUONplotefficiency.C:329
 MUONplotefficiency.C:330
 MUONplotefficiency.C:331
 MUONplotefficiency.C:332
 MUONplotefficiency.C:333
 MUONplotefficiency.C:334
 MUONplotefficiency.C:335
 MUONplotefficiency.C:336
 MUONplotefficiency.C:337
 MUONplotefficiency.C:338
 MUONplotefficiency.C:339
 MUONplotefficiency.C:340
 MUONplotefficiency.C:341
 MUONplotefficiency.C:342
 MUONplotefficiency.C:343
 MUONplotefficiency.C:344
 MUONplotefficiency.C:345
 MUONplotefficiency.C:346
 MUONplotefficiency.C:347
 MUONplotefficiency.C:348
 MUONplotefficiency.C:349
 MUONplotefficiency.C:350
 MUONplotefficiency.C:351
 MUONplotefficiency.C:352
 MUONplotefficiency.C:353
 MUONplotefficiency.C:354
 MUONplotefficiency.C:355
 MUONplotefficiency.C:356
 MUONplotefficiency.C:357
 MUONplotefficiency.C:358
 MUONplotefficiency.C:359
 MUONplotefficiency.C:360
 MUONplotefficiency.C:361
 MUONplotefficiency.C:362
 MUONplotefficiency.C:363
 MUONplotefficiency.C:364
 MUONplotefficiency.C:365
 MUONplotefficiency.C:366
 MUONplotefficiency.C:367
 MUONplotefficiency.C:368
 MUONplotefficiency.C:369
 MUONplotefficiency.C:370
 MUONplotefficiency.C:371
 MUONplotefficiency.C:372
 MUONplotefficiency.C:373
 MUONplotefficiency.C:374
 MUONplotefficiency.C:375
 MUONplotefficiency.C:376
 MUONplotefficiency.C:377
 MUONplotefficiency.C:378
 MUONplotefficiency.C:379
 MUONplotefficiency.C:380
 MUONplotefficiency.C:381
 MUONplotefficiency.C:382
 MUONplotefficiency.C:383
 MUONplotefficiency.C:384
 MUONplotefficiency.C:385
 MUONplotefficiency.C:386
 MUONplotefficiency.C:387
 MUONplotefficiency.C:388
 MUONplotefficiency.C:389
 MUONplotefficiency.C:390
 MUONplotefficiency.C:391
 MUONplotefficiency.C:392
 MUONplotefficiency.C:393
 MUONplotefficiency.C:394
 MUONplotefficiency.C:395
 MUONplotefficiency.C:396
 MUONplotefficiency.C:397
 MUONplotefficiency.C:398
 MUONplotefficiency.C:399
 MUONplotefficiency.C:400
 MUONplotefficiency.C:401
 MUONplotefficiency.C:402
 MUONplotefficiency.C:403
 MUONplotefficiency.C:404
 MUONplotefficiency.C:405
 MUONplotefficiency.C:406
 MUONplotefficiency.C:407
 MUONplotefficiency.C:408
 MUONplotefficiency.C:409
 MUONplotefficiency.C:410
 MUONplotefficiency.C:411
 MUONplotefficiency.C:412
 MUONplotefficiency.C:413
 MUONplotefficiency.C:414
 MUONplotefficiency.C:415
 MUONplotefficiency.C:416
 MUONplotefficiency.C:417
 MUONplotefficiency.C:418
 MUONplotefficiency.C:419
 MUONplotefficiency.C:420
 MUONplotefficiency.C:421
 MUONplotefficiency.C:422
 MUONplotefficiency.C:423
 MUONplotefficiency.C:424
 MUONplotefficiency.C:425
 MUONplotefficiency.C:426
 MUONplotefficiency.C:427
 MUONplotefficiency.C:428
 MUONplotefficiency.C:429
 MUONplotefficiency.C:430
 MUONplotefficiency.C:431
 MUONplotefficiency.C:432
 MUONplotefficiency.C:433
 MUONplotefficiency.C:434
 MUONplotefficiency.C:435
 MUONplotefficiency.C:436
 MUONplotefficiency.C:437
 MUONplotefficiency.C:438
 MUONplotefficiency.C:439
 MUONplotefficiency.C:440
 MUONplotefficiency.C:441
 MUONplotefficiency.C:442
 MUONplotefficiency.C:443
 MUONplotefficiency.C:444
 MUONplotefficiency.C:445
 MUONplotefficiency.C:446
 MUONplotefficiency.C:447
 MUONplotefficiency.C:448
 MUONplotefficiency.C:449
 MUONplotefficiency.C:450
 MUONplotefficiency.C:451
 MUONplotefficiency.C:452
 MUONplotefficiency.C:453
 MUONplotefficiency.C:454
 MUONplotefficiency.C:455
 MUONplotefficiency.C:456
 MUONplotefficiency.C:457
 MUONplotefficiency.C:458
 MUONplotefficiency.C:459
 MUONplotefficiency.C:460
 MUONplotefficiency.C:461
 MUONplotefficiency.C:462
 MUONplotefficiency.C:463
 MUONplotefficiency.C:464
 MUONplotefficiency.C:465
 MUONplotefficiency.C:466
 MUONplotefficiency.C:467
 MUONplotefficiency.C:468
 MUONplotefficiency.C:469
 MUONplotefficiency.C:470
 MUONplotefficiency.C:471
 MUONplotefficiency.C:472
 MUONplotefficiency.C:473
 MUONplotefficiency.C:474
 MUONplotefficiency.C:475
 MUONplotefficiency.C:476
 MUONplotefficiency.C:477
 MUONplotefficiency.C:478
 MUONplotefficiency.C:479
 MUONplotefficiency.C:480
 MUONplotefficiency.C:481
 MUONplotefficiency.C:482
 MUONplotefficiency.C:483
 MUONplotefficiency.C:484
 MUONplotefficiency.C:485
 MUONplotefficiency.C:486
 MUONplotefficiency.C:487
 MUONplotefficiency.C:488
 MUONplotefficiency.C:489
 MUONplotefficiency.C:490
 MUONplotefficiency.C:491
 MUONplotefficiency.C:492
 MUONplotefficiency.C:493
 MUONplotefficiency.C:494
 MUONplotefficiency.C:495
 MUONplotefficiency.C:496
 MUONplotefficiency.C:497
 MUONplotefficiency.C:498
 MUONplotefficiency.C:499
 MUONplotefficiency.C:500
 MUONplotefficiency.C:501
 MUONplotefficiency.C:502
 MUONplotefficiency.C:503
 MUONplotefficiency.C:504
 MUONplotefficiency.C:505
 MUONplotefficiency.C:506
 MUONplotefficiency.C:507
 MUONplotefficiency.C:508
 MUONplotefficiency.C:509
 MUONplotefficiency.C:510
 MUONplotefficiency.C:511
 MUONplotefficiency.C:512
 MUONplotefficiency.C:513
 MUONplotefficiency.C:514
 MUONplotefficiency.C:515
 MUONplotefficiency.C:516
 MUONplotefficiency.C:517
 MUONplotefficiency.C:518
 MUONplotefficiency.C:519
 MUONplotefficiency.C:520
 MUONplotefficiency.C:521
 MUONplotefficiency.C:522
 MUONplotefficiency.C:523
 MUONplotefficiency.C:524
 MUONplotefficiency.C:525
 MUONplotefficiency.C:526
 MUONplotefficiency.C:527
 MUONplotefficiency.C:528
 MUONplotefficiency.C:529
 MUONplotefficiency.C:530
 MUONplotefficiency.C:531
 MUONplotefficiency.C:532
 MUONplotefficiency.C:533
 MUONplotefficiency.C:534
 MUONplotefficiency.C:535
 MUONplotefficiency.C:536
 MUONplotefficiency.C:537
 MUONplotefficiency.C:538
 MUONplotefficiency.C:539
 MUONplotefficiency.C:540
 MUONplotefficiency.C:541
 MUONplotefficiency.C:542
 MUONplotefficiency.C:543
 MUONplotefficiency.C:544
 MUONplotefficiency.C:545
 MUONplotefficiency.C:546
 MUONplotefficiency.C:547
 MUONplotefficiency.C:548
 MUONplotefficiency.C:549
 MUONplotefficiency.C:550
 MUONplotefficiency.C:551
 MUONplotefficiency.C:552
 MUONplotefficiency.C:553
 MUONplotefficiency.C:554
 MUONplotefficiency.C:555
 MUONplotefficiency.C:556
 MUONplotefficiency.C:557
 MUONplotefficiency.C:558
 MUONplotefficiency.C:559
 MUONplotefficiency.C:560
 MUONplotefficiency.C:561
 MUONplotefficiency.C:562
 MUONplotefficiency.C:563
 MUONplotefficiency.C:564
 MUONplotefficiency.C:565
 MUONplotefficiency.C:566
 MUONplotefficiency.C:567
 MUONplotefficiency.C:568
 MUONplotefficiency.C:569
 MUONplotefficiency.C:570
 MUONplotefficiency.C:571
 MUONplotefficiency.C:572
 MUONplotefficiency.C:573
 MUONplotefficiency.C:574
 MUONplotefficiency.C:575
 MUONplotefficiency.C:576
 MUONplotefficiency.C:577
 MUONplotefficiency.C:578
 MUONplotefficiency.C:579
 MUONplotefficiency.C:580
 MUONplotefficiency.C:581
 MUONplotefficiency.C:582
 MUONplotefficiency.C:583
 MUONplotefficiency.C:584
 MUONplotefficiency.C:585
 MUONplotefficiency.C:586
 MUONplotefficiency.C:587
 MUONplotefficiency.C:588
 MUONplotefficiency.C:589
 MUONplotefficiency.C:590
 MUONplotefficiency.C:591
 MUONplotefficiency.C:592
 MUONplotefficiency.C:593
 MUONplotefficiency.C:594
 MUONplotefficiency.C:595
 MUONplotefficiency.C:596
 MUONplotefficiency.C:597
 MUONplotefficiency.C:598
 MUONplotefficiency.C:599
 MUONplotefficiency.C:600
 MUONplotefficiency.C:601
 MUONplotefficiency.C:602
 MUONplotefficiency.C:603
 MUONplotefficiency.C:604
 MUONplotefficiency.C:605
 MUONplotefficiency.C:606
 MUONplotefficiency.C:607
 MUONplotefficiency.C:608
 MUONplotefficiency.C:609
 MUONplotefficiency.C:610
 MUONplotefficiency.C:611
 MUONplotefficiency.C:612
 MUONplotefficiency.C:613
 MUONplotefficiency.C:614
 MUONplotefficiency.C:615
 MUONplotefficiency.C:616
 MUONplotefficiency.C:617
 MUONplotefficiency.C:618
 MUONplotefficiency.C:619
 MUONplotefficiency.C:620
 MUONplotefficiency.C:621
 MUONplotefficiency.C:622
 MUONplotefficiency.C:623
 MUONplotefficiency.C:624
 MUONplotefficiency.C:625
 MUONplotefficiency.C:626
 MUONplotefficiency.C:627
 MUONplotefficiency.C:628
 MUONplotefficiency.C:629
 MUONplotefficiency.C:630
 MUONplotefficiency.C:631
 MUONplotefficiency.C:632
 MUONplotefficiency.C:633
 MUONplotefficiency.C:634
 MUONplotefficiency.C:635
 MUONplotefficiency.C:636
 MUONplotefficiency.C:637
 MUONplotefficiency.C:638
 MUONplotefficiency.C:639
 MUONplotefficiency.C:640
 MUONplotefficiency.C:641
 MUONplotefficiency.C:642
 MUONplotefficiency.C:643
 MUONplotefficiency.C:644
 MUONplotefficiency.C:645
 MUONplotefficiency.C:646
 MUONplotefficiency.C:647
 MUONplotefficiency.C:648
 MUONplotefficiency.C:649
 MUONplotefficiency.C:650
 MUONplotefficiency.C:651
 MUONplotefficiency.C:652
 MUONplotefficiency.C:653
 MUONplotefficiency.C:654
 MUONplotefficiency.C:655
 MUONplotefficiency.C:656
 MUONplotefficiency.C:657
 MUONplotefficiency.C:658
 MUONplotefficiency.C:659
 MUONplotefficiency.C:660
 MUONplotefficiency.C:661
 MUONplotefficiency.C:662
 MUONplotefficiency.C:663
 MUONplotefficiency.C:664
 MUONplotefficiency.C:665
 MUONplotefficiency.C:666
 MUONplotefficiency.C:667
 MUONplotefficiency.C:668
 MUONplotefficiency.C:669
 MUONplotefficiency.C:670
 MUONplotefficiency.C:671
 MUONplotefficiency.C:672
 MUONplotefficiency.C:673
 MUONplotefficiency.C:674
 MUONplotefficiency.C:675
 MUONplotefficiency.C:676
 MUONplotefficiency.C:677
 MUONplotefficiency.C:678
 MUONplotefficiency.C:679
 MUONplotefficiency.C:680
 MUONplotefficiency.C:681
 MUONplotefficiency.C:682
 MUONplotefficiency.C:683
 MUONplotefficiency.C:684
 MUONplotefficiency.C:685
 MUONplotefficiency.C:686
 MUONplotefficiency.C:687
 MUONplotefficiency.C:688
 MUONplotefficiency.C:689
 MUONplotefficiency.C:690
 MUONplotefficiency.C:691
 MUONplotefficiency.C:692
 MUONplotefficiency.C:693
 MUONplotefficiency.C:694
 MUONplotefficiency.C:695
 MUONplotefficiency.C:696
 MUONplotefficiency.C:697
 MUONplotefficiency.C:698
 MUONplotefficiency.C:699
 MUONplotefficiency.C:700
 MUONplotefficiency.C:701
 MUONplotefficiency.C:702
 MUONplotefficiency.C:703
 MUONplotefficiency.C:704
 MUONplotefficiency.C:705
 MUONplotefficiency.C:706
 MUONplotefficiency.C:707
 MUONplotefficiency.C:708
 MUONplotefficiency.C:709
 MUONplotefficiency.C:710
 MUONplotefficiency.C:711
 MUONplotefficiency.C:712
 MUONplotefficiency.C:713
 MUONplotefficiency.C:714
 MUONplotefficiency.C:715
 MUONplotefficiency.C:716
 MUONplotefficiency.C:717
 MUONplotefficiency.C:718
 MUONplotefficiency.C:719
 MUONplotefficiency.C:720
 MUONplotefficiency.C:721
 MUONplotefficiency.C:722
 MUONplotefficiency.C:723
 MUONplotefficiency.C:724
 MUONplotefficiency.C:725
 MUONplotefficiency.C:726
 MUONplotefficiency.C:727
 MUONplotefficiency.C:728
 MUONplotefficiency.C:729
 MUONplotefficiency.C:730
 MUONplotefficiency.C:731
 MUONplotefficiency.C:732
 MUONplotefficiency.C:733
 MUONplotefficiency.C:734
 MUONplotefficiency.C:735
 MUONplotefficiency.C:736
 MUONplotefficiency.C:737
 MUONplotefficiency.C:738
 MUONplotefficiency.C:739
 MUONplotefficiency.C:740
 MUONplotefficiency.C:741
 MUONplotefficiency.C:742
 MUONplotefficiency.C:743
 MUONplotefficiency.C:744
 MUONplotefficiency.C:745
 MUONplotefficiency.C:746
 MUONplotefficiency.C:747
 MUONplotefficiency.C:748
 MUONplotefficiency.C:749
 MUONplotefficiency.C:750
 MUONplotefficiency.C:751
 MUONplotefficiency.C:752
 MUONplotefficiency.C:753
 MUONplotefficiency.C:754
 MUONplotefficiency.C:755
 MUONplotefficiency.C:756
 MUONplotefficiency.C:757
 MUONplotefficiency.C:758
 MUONplotefficiency.C:759
 MUONplotefficiency.C:760
 MUONplotefficiency.C:761
 MUONplotefficiency.C:762
 MUONplotefficiency.C:763
 MUONplotefficiency.C:764
 MUONplotefficiency.C:765
 MUONplotefficiency.C:766
 MUONplotefficiency.C:767
 MUONplotefficiency.C:768
 MUONplotefficiency.C:769
 MUONplotefficiency.C:770
 MUONplotefficiency.C:771
 MUONplotefficiency.C:772
 MUONplotefficiency.C:773
 MUONplotefficiency.C:774
 MUONplotefficiency.C:775
 MUONplotefficiency.C:776
 MUONplotefficiency.C:777
 MUONplotefficiency.C:778
 MUONplotefficiency.C:779
 MUONplotefficiency.C:780
 MUONplotefficiency.C:781
 MUONplotefficiency.C:782
 MUONplotefficiency.C:783
 MUONplotefficiency.C:784
 MUONplotefficiency.C:785
 MUONplotefficiency.C:786
 MUONplotefficiency.C:787
 MUONplotefficiency.C:788
 MUONplotefficiency.C:789
 MUONplotefficiency.C:790
 MUONplotefficiency.C:791
 MUONplotefficiency.C:792
 MUONplotefficiency.C:793
 MUONplotefficiency.C:794
 MUONplotefficiency.C:795
 MUONplotefficiency.C:796
 MUONplotefficiency.C:797
 MUONplotefficiency.C:798
 MUONplotefficiency.C:799
 MUONplotefficiency.C:800
 MUONplotefficiency.C:801
 MUONplotefficiency.C:802
 MUONplotefficiency.C:803
 MUONplotefficiency.C:804
 MUONplotefficiency.C:805
 MUONplotefficiency.C:806
 MUONplotefficiency.C:807
 MUONplotefficiency.C:808
 MUONplotefficiency.C:809
 MUONplotefficiency.C:810
 MUONplotefficiency.C:811
 MUONplotefficiency.C:812
 MUONplotefficiency.C:813
 MUONplotefficiency.C:814
 MUONplotefficiency.C:815
 MUONplotefficiency.C:816
 MUONplotefficiency.C:817
 MUONplotefficiency.C:818
 MUONplotefficiency.C:819
 MUONplotefficiency.C:820
 MUONplotefficiency.C:821
 MUONplotefficiency.C:822
 MUONplotefficiency.C:823
 MUONplotefficiency.C:824
 MUONplotefficiency.C:825
 MUONplotefficiency.C:826
 MUONplotefficiency.C:827
 MUONplotefficiency.C:828
 MUONplotefficiency.C:829
 MUONplotefficiency.C:830
 MUONplotefficiency.C:831
 MUONplotefficiency.C:832
 MUONplotefficiency.C:833
 MUONplotefficiency.C:834
 MUONplotefficiency.C:835
 MUONplotefficiency.C:836
 MUONplotefficiency.C:837
 MUONplotefficiency.C:838
 MUONplotefficiency.C:839
 MUONplotefficiency.C:840
 MUONplotefficiency.C:841
 MUONplotefficiency.C:842
 MUONplotefficiency.C:843
 MUONplotefficiency.C:844
 MUONplotefficiency.C:845
 MUONplotefficiency.C:846
 MUONplotefficiency.C:847
 MUONplotefficiency.C:848
 MUONplotefficiency.C:849
 MUONplotefficiency.C:850
 MUONplotefficiency.C:851
 MUONplotefficiency.C:852
 MUONplotefficiency.C:853
 MUONplotefficiency.C:854
 MUONplotefficiency.C:855
 MUONplotefficiency.C:856
 MUONplotefficiency.C:857
 MUONplotefficiency.C:858
 MUONplotefficiency.C:859
 MUONplotefficiency.C:860
 MUONplotefficiency.C:861
 MUONplotefficiency.C:862
 MUONplotefficiency.C:863
 MUONplotefficiency.C:864
 MUONplotefficiency.C:865
 MUONplotefficiency.C:866
 MUONplotefficiency.C:867
 MUONplotefficiency.C:868
 MUONplotefficiency.C:869
 MUONplotefficiency.C:870
 MUONplotefficiency.C:871
 MUONplotefficiency.C:872
 MUONplotefficiency.C:873
 MUONplotefficiency.C:874
 MUONplotefficiency.C:875
 MUONplotefficiency.C:876
 MUONplotefficiency.C:877
 MUONplotefficiency.C:878
 MUONplotefficiency.C:879
 MUONplotefficiency.C:880
 MUONplotefficiency.C:881
 MUONplotefficiency.C:882
 MUONplotefficiency.C:883
 MUONplotefficiency.C:884
 MUONplotefficiency.C:885
 MUONplotefficiency.C:886
 MUONplotefficiency.C:887
 MUONplotefficiency.C:888
 MUONplotefficiency.C:889
 MUONplotefficiency.C:890
 MUONplotefficiency.C:891
 MUONplotefficiency.C:892
 MUONplotefficiency.C:893
 MUONplotefficiency.C:894
 MUONplotefficiency.C:895
 MUONplotefficiency.C:896
 MUONplotefficiency.C:897
 MUONplotefficiency.C:898
 MUONplotefficiency.C:899
 MUONplotefficiency.C:900
 MUONplotefficiency.C:901
 MUONplotefficiency.C:902
 MUONplotefficiency.C:903
 MUONplotefficiency.C:904
 MUONplotefficiency.C:905
 MUONplotefficiency.C:906
 MUONplotefficiency.C:907
 MUONplotefficiency.C:908
 MUONplotefficiency.C:909
 MUONplotefficiency.C:910
 MUONplotefficiency.C:911
 MUONplotefficiency.C:912
 MUONplotefficiency.C:913
 MUONplotefficiency.C:914
 MUONplotefficiency.C:915
 MUONplotefficiency.C:916
 MUONplotefficiency.C:917
 MUONplotefficiency.C:918
 MUONplotefficiency.C:919
 MUONplotefficiency.C:920
 MUONplotefficiency.C:921
 MUONplotefficiency.C:922
 MUONplotefficiency.C:923
 MUONplotefficiency.C:924
 MUONplotefficiency.C:925
 MUONplotefficiency.C:926
 MUONplotefficiency.C:927
 MUONplotefficiency.C:928
 MUONplotefficiency.C:929
 MUONplotefficiency.C:930
 MUONplotefficiency.C:931
 MUONplotefficiency.C:932
 MUONplotefficiency.C:933
 MUONplotefficiency.C:934
 MUONplotefficiency.C:935
 MUONplotefficiency.C:936
 MUONplotefficiency.C:937
 MUONplotefficiency.C:938
 MUONplotefficiency.C:939
 MUONplotefficiency.C:940
 MUONplotefficiency.C:941
 MUONplotefficiency.C:942
 MUONplotefficiency.C:943
 MUONplotefficiency.C:944
 MUONplotefficiency.C:945
 MUONplotefficiency.C:946
 MUONplotefficiency.C:947
 MUONplotefficiency.C:948
 MUONplotefficiency.C:949
 MUONplotefficiency.C:950
 MUONplotefficiency.C:951
 MUONplotefficiency.C:952
 MUONplotefficiency.C:953
 MUONplotefficiency.C:954
 MUONplotefficiency.C:955
 MUONplotefficiency.C:956
 MUONplotefficiency.C:957
 MUONplotefficiency.C:958
 MUONplotefficiency.C:959
 MUONplotefficiency.C:960
 MUONplotefficiency.C:961
 MUONplotefficiency.C:962
 MUONplotefficiency.C:963
 MUONplotefficiency.C:964
 MUONplotefficiency.C:965
 MUONplotefficiency.C:966
 MUONplotefficiency.C:967
 MUONplotefficiency.C:968
 MUONplotefficiency.C:969
 MUONplotefficiency.C:970
 MUONplotefficiency.C:971
 MUONplotefficiency.C:972
 MUONplotefficiency.C:973
 MUONplotefficiency.C:974
 MUONplotefficiency.C:975
 MUONplotefficiency.C:976
 MUONplotefficiency.C:977
 MUONplotefficiency.C:978
 MUONplotefficiency.C:979
 MUONplotefficiency.C:980
 MUONplotefficiency.C:981
 MUONplotefficiency.C:982
 MUONplotefficiency.C:983
 MUONplotefficiency.C:984
 MUONplotefficiency.C:985
 MUONplotefficiency.C:986
 MUONplotefficiency.C:987
 MUONplotefficiency.C:988
 MUONplotefficiency.C:989
 MUONplotefficiency.C:990
 MUONplotefficiency.C:991
 MUONplotefficiency.C:992
 MUONplotefficiency.C:993
 MUONplotefficiency.C:994
 MUONplotefficiency.C:995
 MUONplotefficiency.C:996
 MUONplotefficiency.C:997
 MUONplotefficiency.C:998
 MUONplotefficiency.C:999
 MUONplotefficiency.C:1000
 MUONplotefficiency.C:1001
 MUONplotefficiency.C:1002
 MUONplotefficiency.C:1003
 MUONplotefficiency.C:1004
 MUONplotefficiency.C:1005
 MUONplotefficiency.C:1006
 MUONplotefficiency.C:1007
 MUONplotefficiency.C:1008
 MUONplotefficiency.C:1009
 MUONplotefficiency.C:1010
 MUONplotefficiency.C:1011
 MUONplotefficiency.C:1012
 MUONplotefficiency.C:1013
 MUONplotefficiency.C:1014
 MUONplotefficiency.C:1015
 MUONplotefficiency.C:1016
 MUONplotefficiency.C:1017
 MUONplotefficiency.C:1018
 MUONplotefficiency.C:1019
 MUONplotefficiency.C:1020
 MUONplotefficiency.C:1021
 MUONplotefficiency.C:1022
 MUONplotefficiency.C:1023
 MUONplotefficiency.C:1024
 MUONplotefficiency.C:1025
 MUONplotefficiency.C:1026
 MUONplotefficiency.C:1027
 MUONplotefficiency.C:1028
 MUONplotefficiency.C:1029
 MUONplotefficiency.C:1030
 MUONplotefficiency.C:1031
 MUONplotefficiency.C:1032
 MUONplotefficiency.C:1033
 MUONplotefficiency.C:1034
 MUONplotefficiency.C:1035
 MUONplotefficiency.C:1036
 MUONplotefficiency.C:1037
 MUONplotefficiency.C:1038
 MUONplotefficiency.C:1039
 MUONplotefficiency.C:1040
 MUONplotefficiency.C:1041
 MUONplotefficiency.C:1042
 MUONplotefficiency.C:1043
 MUONplotefficiency.C:1044
 MUONplotefficiency.C:1045
 MUONplotefficiency.C:1046
 MUONplotefficiency.C:1047
 MUONplotefficiency.C:1048
 MUONplotefficiency.C:1049
 MUONplotefficiency.C:1050
 MUONplotefficiency.C:1051
 MUONplotefficiency.C:1052
 MUONplotefficiency.C:1053
 MUONplotefficiency.C:1054
 MUONplotefficiency.C:1055
 MUONplotefficiency.C:1056
 MUONplotefficiency.C:1057
 MUONplotefficiency.C:1058
 MUONplotefficiency.C:1059
 MUONplotefficiency.C:1060
 MUONplotefficiency.C:1061
 MUONplotefficiency.C:1062
 MUONplotefficiency.C:1063
 MUONplotefficiency.C:1064
 MUONplotefficiency.C:1065
 MUONplotefficiency.C:1066
 MUONplotefficiency.C:1067
 MUONplotefficiency.C:1068
 MUONplotefficiency.C:1069
 MUONplotefficiency.C:1070
 MUONplotefficiency.C:1071
 MUONplotefficiency.C:1072
 MUONplotefficiency.C:1073
 MUONplotefficiency.C:1074
 MUONplotefficiency.C:1075
 MUONplotefficiency.C:1076
 MUONplotefficiency.C:1077
 MUONplotefficiency.C:1078
 MUONplotefficiency.C:1079
 MUONplotefficiency.C:1080
 MUONplotefficiency.C:1081
 MUONplotefficiency.C:1082
 MUONplotefficiency.C:1083
 MUONplotefficiency.C:1084
 MUONplotefficiency.C:1085
 MUONplotefficiency.C:1086
 MUONplotefficiency.C:1087
 MUONplotefficiency.C:1088
 MUONplotefficiency.C:1089
 MUONplotefficiency.C:1090
 MUONplotefficiency.C:1091
 MUONplotefficiency.C:1092
 MUONplotefficiency.C:1093
 MUONplotefficiency.C:1094
 MUONplotefficiency.C:1095
 MUONplotefficiency.C:1096
 MUONplotefficiency.C:1097
 MUONplotefficiency.C:1098
 MUONplotefficiency.C:1099
 MUONplotefficiency.C:1100
 MUONplotefficiency.C:1101
 MUONplotefficiency.C:1102
 MUONplotefficiency.C:1103
 MUONplotefficiency.C:1104
 MUONplotefficiency.C:1105
 MUONplotefficiency.C:1106
 MUONplotefficiency.C:1107
 MUONplotefficiency.C:1108
 MUONplotefficiency.C:1109
 MUONplotefficiency.C:1110
 MUONplotefficiency.C:1111
 MUONplotefficiency.C:1112
 MUONplotefficiency.C:1113
 MUONplotefficiency.C:1114
 MUONplotefficiency.C:1115
 MUONplotefficiency.C:1116
 MUONplotefficiency.C:1117
 MUONplotefficiency.C:1118
 MUONplotefficiency.C:1119
 MUONplotefficiency.C:1120
 MUONplotefficiency.C:1121
 MUONplotefficiency.C:1122
 MUONplotefficiency.C:1123
 MUONplotefficiency.C:1124
 MUONplotefficiency.C:1125
 MUONplotefficiency.C:1126
 MUONplotefficiency.C:1127
 MUONplotefficiency.C:1128
 MUONplotefficiency.C:1129
 MUONplotefficiency.C:1130
 MUONplotefficiency.C:1131
 MUONplotefficiency.C:1132
 MUONplotefficiency.C:1133
 MUONplotefficiency.C:1134
 MUONplotefficiency.C:1135
 MUONplotefficiency.C:1136
 MUONplotefficiency.C:1137
 MUONplotefficiency.C:1138
 MUONplotefficiency.C:1139
 MUONplotefficiency.C:1140
 MUONplotefficiency.C:1141
 MUONplotefficiency.C:1142
 MUONplotefficiency.C:1143
 MUONplotefficiency.C:1144
 MUONplotefficiency.C:1145
 MUONplotefficiency.C:1146
 MUONplotefficiency.C:1147
 MUONplotefficiency.C:1148
 MUONplotefficiency.C:1149
 MUONplotefficiency.C:1150
 MUONplotefficiency.C:1151
 MUONplotefficiency.C:1152
 MUONplotefficiency.C:1153
 MUONplotefficiency.C:1154
 MUONplotefficiency.C:1155
 MUONplotefficiency.C:1156
 MUONplotefficiency.C:1157
 MUONplotefficiency.C:1158
 MUONplotefficiency.C:1159
 MUONplotefficiency.C:1160
 MUONplotefficiency.C:1161
 MUONplotefficiency.C:1162
 MUONplotefficiency.C:1163