Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    rdd5e213 rbba3653  
    14561456  TLegend *leg_trkpi_eff_eta = (TLegend*)leg_trkpi_res_eta->Clone();
    14571457
    1458   TGraphErrors *gr_trkpi_res_pt  = new TGraphErrors[n_etabins];
    1459   TGraphErrors *gr_trkpi_eff_pt  = new TGraphErrors[n_etabins];
    1460   TGraphErrors *gr_trkpi_res_eta = new TGraphErrors[n_ptbins];
    1461   TGraphErrors *gr_trkpi_eff_eta = new TGraphErrors[n_ptbins];
     1458
     1459  TGraphErrors gr_trkpi_res_pt[n_etabins], gr_trkpi_eff_pt[n_etabins], gr_trkpi_res_eta[n_ptbins], gr_trkpi_eff_eta[n_ptbins];
    14621460  TH1D* h_trkpi_eff_pt, *h_trkpi_eff_eta;
    14631461
    1464   std::vector<resolPlot> *plots_trkpi_res_pt   = new std::vector<resolPlot>[n_etabins];
    1465   std::vector<resolPlot> *plots_trkpi_res_eta  = new std::vector<resolPlot>[n_ptbins];
     1462  std::vector<resolPlot> plots_trkpi_res_pt[n_etabins], plots_trkpi_res_eta[n_ptbins];
    14661463
    14671464  // loop over eta bins
     
    15621559  TLegend *leg_trkele_eff_eta = (TLegend*)leg_trkele_res_eta->Clone();
    15631560
    1564   TGraphErrors *gr_trkele_res_pt  = new TGraphErrors[n_etabins];
    1565   TGraphErrors *gr_trkele_eff_pt  = new TGraphErrors[n_etabins];
    1566   TGraphErrors *gr_trkele_res_eta = new TGraphErrors[n_ptbins];
    1567   TGraphErrors *gr_trkele_eff_eta = new TGraphErrors[n_ptbins];
    1568 
     1561  TGraphErrors gr_trkele_res_pt[n_etabins], gr_trkele_eff_pt[n_etabins], gr_trkele_res_eta[n_ptbins], gr_trkele_eff_eta[n_ptbins];
    15691562  TH1D* h_trkele_eff_pt, *h_trkele_eff_eta;
    15701563
    1571   std::vector<resolPlot> *plots_trkele_res_pt   = new std::vector<resolPlot>[n_etabins];
    1572   std::vector<resolPlot> *plots_trkele_res_eta  = new std::vector<resolPlot>[n_ptbins];
     1564  std::vector<resolPlot> plots_trkele_res_pt[n_etabins], plots_trkele_res_eta[n_ptbins];
    15731565
    15741566  // loop over eta bins
     
    16711663
    16721664
    1673   TGraphErrors *gr_trkmu_res_pt  = new TGraphErrors[n_etabins];
    1674   TGraphErrors *gr_trkmu_eff_pt  = new TGraphErrors[n_etabins];
    1675   TGraphErrors *gr_trkmu_res_eta = new TGraphErrors[n_ptbins];
    1676   TGraphErrors *gr_trkmu_eff_eta = new TGraphErrors[n_ptbins];
    1677 
     1665  TGraphErrors gr_trkmu_res_pt[n_etabins], gr_trkmu_eff_pt[n_etabins], gr_trkmu_res_eta[n_ptbins], gr_trkmu_eff_eta[n_ptbins];
    16781666  TH1D* h_trkmu_eff_pt, *h_trkmu_eff_eta;
    16791667
    1680   std::vector<resolPlot> *plots_trkmu_res_pt   = new std::vector<resolPlot>[n_etabins];
    1681   std::vector<resolPlot> *plots_trkmu_res_eta  = new std::vector<resolPlot>[n_ptbins];
     1668  std::vector<resolPlot> plots_trkmu_res_pt[n_etabins], plots_trkmu_res_eta[n_ptbins];
    16821669
    16831670  // loop over eta bins
     
    17771764  TLegend *leg_ecal_res_eta = new TLegend(0.60,0.59,0.95,0.90);
    17781765
    1779   TGraphErrors *gr_ecal_res_e    = new TGraphErrors[n_etabins];
    1780   TGraphErrors *gr_ecal_res_eta  = new TGraphErrors[n_ptbins];
    1781 
    1782   std::vector<resolPlot> *plots_ecal_res_e   = new std::vector<resolPlot>[n_etabins];
    1783   std::vector<resolPlot> *plots_ecal_res_eta = new std::vector<resolPlot>[n_ptbins];
     1766  TGraphErrors gr_ecal_res_e[n_etabins], gr_ecal_res_eta[n_ptbins];
     1767
     1768  std::vector<resolPlot> plots_ecal_res_e[n_etabins], plots_ecal_res_eta[n_ptbins];
    17841769
    17851770  // loop over eta bins
     
    18481833  TLegend *leg_hcal_res_eta = new TLegend(0.60,0.59,0.95,0.90);
    18491834
    1850   TGraphErrors *gr_hcal_res_e   = new TGraphErrors[n_etabins];
    1851   TGraphErrors *gr_hcal_res_eta = new TGraphErrors[n_ptbins];
    1852 
    1853   std::vector<resolPlot> *plots_hcal_res_e   = new std::vector<resolPlot>[n_etabins];
    1854   std::vector<resolPlot> *plots_hcal_res_eta = new std::vector<resolPlot>[n_ptbins];
     1835  TGraphErrors gr_hcal_res_e[n_etabins], gr_hcal_res_eta[n_ptbins];
     1836
     1837  std::vector<resolPlot> plots_hcal_res_e[n_etabins], plots_hcal_res_eta[n_ptbins];
    18551838
    18561839  // loop over eta bins
     
    19201903  TLegend *leg_pfele_res_eta[n_ptbins];
    19211904
    1922   TGraphErrors *gr_pfele_res_e = new TGraphErrors[n_etabins];
    1923   TGraphErrors *gr_pfele_res_eta = new TGraphErrors[n_ptbins];
    1924   TGraphErrors *gr_trkele_res_e = new TGraphErrors[n_etabins];
    1925   TGraphErrors *gr_trkele_res_eeta = new TGraphErrors[n_ptbins];
    1926 
    1927   std::vector<resolPlot> *plots_pfele_res_e     = new std::vector<resolPlot>[n_etabins];
    1928   std::vector<resolPlot> *plots_pfele_res_eta   = new std::vector<resolPlot>[n_ptbins];
    1929   std::vector<resolPlot> *plots_trkele_res_e    = new std::vector<resolPlot>[n_etabins];
    1930   std::vector<resolPlot> *plots_trkele_res_eeta = new std::vector<resolPlot>[n_ptbins];
     1905  TGraphErrors gr_pfele_res_e[n_etabins];
     1906  TGraphErrors gr_pfele_res_eta[n_ptbins];
     1907
     1908  TGraphErrors gr_trkele_res_e[n_etabins];
     1909  TGraphErrors gr_trkele_res_eeta[n_ptbins];
     1910
     1911  std::vector<resolPlot> plots_pfele_res_e[n_etabins], plots_pfele_res_eta[n_ptbins];
     1912  std::vector<resolPlot> plots_trkele_res_e[n_etabins], plots_trkele_res_eeta[n_ptbins];
    19311913
    19321914  TCanvas *c_pfele_res_e[n_etabins];
     
    20282010  TLegend *leg_pfpi_res_eta[n_ptbins];
    20292011
    2030   TGraphErrors *gr_pfpi_res_e     = new TGraphErrors[n_etabins];
    2031   TGraphErrors *gr_pfpi_res_eta   = new TGraphErrors[n_ptbins];
    2032 
    2033   TGraphErrors *gr_trkpi_res_e    = new TGraphErrors[n_etabins];
    2034   TGraphErrors *gr_trkpi_res_eeta = new TGraphErrors[n_ptbins];
    2035 
    2036   std::vector<resolPlot> *plots_pfpi_res_e     = new std::vector<resolPlot>[n_etabins];
    2037   std::vector<resolPlot> *plots_pfpi_res_eta   = new std::vector<resolPlot>[n_ptbins];
    2038   std::vector<resolPlot> *plots_trkpi_res_e    = new std::vector<resolPlot>[n_etabins];
    2039   std::vector<resolPlot> *plots_trkpi_res_eeta = new std::vector<resolPlot>[n_ptbins];
     2012  TGraphErrors gr_pfpi_res_e[n_etabins];
     2013  TGraphErrors gr_pfpi_res_eta[n_ptbins];
     2014
     2015  TGraphErrors gr_trkpi_res_e[n_etabins];
     2016  TGraphErrors gr_trkpi_res_eeta[n_ptbins];
     2017
     2018  std::vector<resolPlot> plots_pfpi_res_e[n_etabins], plots_pfpi_res_eta[n_ptbins];
     2019  std::vector<resolPlot> plots_trkpi_res_e[n_etabins], plots_trkpi_res_eeta[n_ptbins];
    20402020
    20412021  TCanvas *c_pfpi_res_e[n_etabins];
     
    21392119  TLegend *leg_pfjet_res_eta[n_ptbins];
    21402120
    2141   TGraphErrors *gr_pfjet_res_e   = new TGraphErrors[n_etabins];
    2142   TGraphErrors *gr_pfjet_res_eta = new TGraphErrors[n_ptbins];
    2143 
    2144   TGraphErrors *gr_cajet_res_e   = new TGraphErrors[n_etabins];
    2145   TGraphErrors *gr_cajet_res_eta = new TGraphErrors[n_ptbins];
    2146 
    2147   std::vector<resolPlot> *plots_pfjet_res_e   = new std::vector<resolPlot>[n_etabins];
    2148   std::vector<resolPlot> *plots_pfjet_res_eta = new std::vector<resolPlot>[n_ptbins];
    2149   std::vector<resolPlot> *plots_cajet_res_e   = new std::vector<resolPlot>[n_etabins];
    2150   std::vector<resolPlot> *plots_cajet_res_eta = new std::vector<resolPlot>[n_ptbins];
     2121  TGraphErrors gr_pfjet_res_e[n_etabins];
     2122  TGraphErrors gr_pfjet_res_eta[n_ptbins];
     2123
     2124  TGraphErrors gr_cajet_res_e[n_etabins];
     2125  TGraphErrors gr_cajet_res_eta[n_ptbins];
     2126
     2127  std::vector<resolPlot> plots_pfjet_res_e[n_etabins], plots_pfjet_res_eta[n_ptbins];
     2128  std::vector<resolPlot> plots_cajet_res_e[n_etabins], plots_cajet_res_eta[n_ptbins];
    21512129
    21522130  TCanvas *c_pfjet_res_e[n_etabins];
     
    22822260    TLegend *leg_recele_eff_eta = new TLegend(0.55,0.22,0.90,0.48);
    22832261
    2284     TGraphErrors *gr_recele_eff_pt  = new TGraphErrors[n_etabins];
    2285     TGraphErrors *gr_recele_eff_eta = new TGraphErrors[n_ptbins];
     2262    TGraphErrors gr_recele_eff_pt[n_etabins], gr_recele_eff_eta[n_ptbins];
    22862263    TH1D* h_recele_eff_pt, *h_recele_eff_eta;
    22872264
     
    23482325    TLegend *leg_recmu_eff_eta = new TLegend(0.55,0.22,0.90,0.48);
    23492326
    2350     TGraphErrors *gr_recmu_eff_pt  = new TGraphErrors[n_etabins];
    2351     TGraphErrors *gr_recmu_eff_eta = new TGraphErrors[n_ptbins];
     2327    TGraphErrors gr_recmu_eff_pt[n_etabins], gr_recmu_eff_eta[n_ptbins];
    23522328    TH1D* h_recmu_eff_pt, *h_recmu_eff_eta;
    23532329
     
    24142390    TLegend *leg_recpho_eff_eta = new TLegend(0.55,0.22,0.90,0.48);
    24152391
    2416     TGraphErrors *gr_recpho_eff_pt  = new TGraphErrors[n_etabins];
    2417     TGraphErrors *gr_recpho_eff_eta = new TGraphErrors[n_ptbins];
     2392    TGraphErrors gr_recpho_eff_pt[n_etabins], gr_recpho_eff_eta[n_ptbins];
    24182393    TH1D* h_recpho_eff_pt, *h_recpho_eff_eta;
    24192394
     
    24802455    TLegend *leg_recbjet_eff_eta = new TLegend(0.50,0.22,0.90,0.48);
    24812456
    2482     TGraphErrors *gr_recbjet_eff_pt  = new TGraphErrors[n_etabins];
    2483     TGraphErrors *gr_recbjet_eff_eta = new TGraphErrors[n_ptbins];
     2457    TGraphErrors gr_recbjet_eff_pt[n_etabins], gr_recbjet_eff_eta[n_ptbins];
    24842458    TH1D* h_recbjet_eff_pt, *h_recbjet_eff_eta;
    24852459
     
    25432517    TLegend *leg_recbjet_cmis_eta = new TLegend(0.50,0.64,0.90,0.90);
    25442518
    2545     TGraphErrors *gr_recbjet_cmis_pt  = new TGraphErrors[n_etabins];
    2546     TGraphErrors *gr_recbjet_cmis_eta = new TGraphErrors[n_ptbins];
     2519    TGraphErrors gr_recbjet_cmis_pt[n_etabins], gr_recbjet_cmis_eta[n_ptbins];
    25472520    TH1D* h_recbjet_cmis_pt, *h_recbjet_cmis_eta;
    25482521
     
    26062579    TLegend *leg_recbjet_lmis_eta = new TLegend(0.50,0.64,0.90,0.90);
    26072580
    2608     TGraphErrors *gr_recbjet_lmis_pt  = new TGraphErrors[n_etabins];
    2609     TGraphErrors *gr_recbjet_lmis_eta = new TGraphErrors[n_ptbins];
     2581    TGraphErrors gr_recbjet_lmis_pt[n_etabins], gr_recbjet_lmis_eta[n_ptbins];
    26102582    TH1D* h_recbjet_lmis_pt, *h_recbjet_lmis_eta;
    26112583
     
    26722644    TLegend *leg_rectaujet_eff_eta = new TLegend(0.50,0.22,0.90,0.48);
    26732645
    2674     TGraphErrors *gr_rectaujet_eff_pt  = new TGraphErrors[n_etabins];
    2675     TGraphErrors *gr_rectaujet_eff_eta = new TGraphErrors[n_ptbins];
     2646    TGraphErrors gr_rectaujet_eff_pt[n_etabins], gr_rectaujet_eff_eta[n_ptbins];
    26762647    TH1D* h_rectaujet_eff_pt, *h_rectaujet_eff_eta;
    26772648
     
    27372708    TLegend *leg_rectaujet_mis_eta = new TLegend(0.50,0.64,0.90,0.90);
    27382709
    2739     TGraphErrors *gr_rectaujet_mis_pt  = new TGraphErrors[n_etabins];
    2740     TGraphErrors *gr_rectaujet_mis_eta = new TGraphErrors[n_ptbins];
     2710    TGraphErrors gr_rectaujet_mis_pt[n_etabins], gr_rectaujet_mis_eta[n_ptbins];
    27412711    TH1D* h_rectaujet_mis_pt, *h_rectaujet_mis_eta;
    27422712
Note: See TracChangeset for help on using the changeset viewer.