Fork me on GitHub

Changeset b4ec6ac in git


Ignore:
Timestamp:
Sep 29, 2016, 6:53:23 PM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
e0a1a44
Parents:
0b3c137
Message:

fixed style in validation plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/Validation.cpp

    r0b3c137 rb4ec6ac  
    13281328  TClonesArray *branchTrackElectron = treeReaderElectron->UseBranch("Track");
    13291329  TClonesArray *branchElectron = treeReaderElectron->UseBranch("Electron");
     1330  TClonesArray *branchElectronPF = treeReaderElectron->UseBranch("ElectronPF");
    13301331
    13311332  TClonesArray *branchParticleMuon = treeReaderMuon->UseBranch("Particle");
     
    19151916
    19161917     HistogramsCollection(&plots_pfele_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "pfele");
    1917      GetEres<Electron>(&plots_pfele_res_e[k], branchElectron, branchParticleElectron, 11, etaVals.at(k), etaVals.at(k+1), treeReaderElectron);
     1918     GetEres<Electron>(&plots_pfele_res_e[k], branchElectronPF, branchParticleElectron, 11, etaVals.at(k), etaVals.at(k+1), treeReaderElectron);
    19181919     gr_pfele_res_e[k] = EresGraph(&plots_pfele_res_e[k]);
    19191920
     
    19251926     leg_pfele_res_e[k]->SetHeader(s_eta);
    19261927
    1927      addResoGraph(mg_pfele_res_e[k], &gr_ecal_res_e[k], leg_pfele_res_e[k], markerStyles.at(0), colors.at(0), "ecal");
    1928      addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_pt[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), "track");
    1929      addResoGraph(mg_pfele_res_e[k], &gr_pfele_res_e[k], leg_pfele_res_e[k], markerStyles.at(2), colors.at(2), "p-flow");
     1928     addResoGraph(mg_pfele_res_e[k], &gr_ecal_res_e[k], leg_pfele_res_e[k], markerStyles.at(0), colors.at(0), "ECAL");
     1929     addResoGraph(mg_pfele_res_e[k], &gr_trkele_res_pt[k], leg_pfele_res_e[k], markerStyles.at(1), colors.at(1), "Track");
     1930     addResoGraph(mg_pfele_res_e[k], &gr_pfele_res_e[k], leg_pfele_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow");
    19301931
    19311932     c_pfele_res_e[k] = new TCanvas("","", 800, 600);
     
    19541955
    19551956     HistogramsCollectionVsEta(&plots_pfele_res_eta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "pfele", 0.0, 2.0);
    1956      GetEresVsEta<Electron>(&plots_pfele_res_eta[k], branchElectron, branchParticleElectron, 11, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderElectron);
     1957     GetEresVsEta<Electron>(&plots_pfele_res_eta[k], branchElectronPF, branchParticleElectron, 11, 0.5*ptVals.at(k), 2.0*ptVals.at(k), treeReaderElectron);
    19571958     gr_pfele_res_eta[k] = EresGraphVsEta(&plots_pfele_res_eta[k]);
    19581959
     
    19641965     leg_pfele_res_eta[k]->SetHeader(s_e);
    19651966
    1966      addResoGraph(mg_pfele_res_eta[k], &gr_ecal_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(0), colors.at(0), "ecal");
    1967      addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), "track");
    1968      addResoGraph(mg_pfele_res_eta[k], &gr_pfele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(2), colors.at(2), "p-flow");
     1967     addResoGraph(mg_pfele_res_eta[k], &gr_ecal_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(0), colors.at(0), "ECAL");
     1968     addResoGraph(mg_pfele_res_eta[k], &gr_trkele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(1), colors.at(1), "Track");
     1969     addResoGraph(mg_pfele_res_eta[k], &gr_pfele_res_eta[k], leg_pfele_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow");
    19691970
    19701971     c_pfele_res_eta[k] = new TCanvas("","", 800, 600);
     
    20202021     leg_pfpi_res_e[k]->SetHeader(s_eta);
    20212022
    2022      addResoGraph(mg_pfpi_res_e[k], &gr_hcal_res_e[k], leg_pfpi_res_e[k], markerStyles.at(0), colors.at(0), "hcal");
    2023      addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_pt[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), "track");
    2024      addResoGraph(mg_pfpi_res_e[k], &gr_pfpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(2), colors.at(2), "p-flow");
     2023     addResoGraph(mg_pfpi_res_e[k], &gr_hcal_res_e[k], leg_pfpi_res_e[k], markerStyles.at(0), colors.at(0), "HCAL");
     2024     addResoGraph(mg_pfpi_res_e[k], &gr_trkpi_res_pt[k], leg_pfpi_res_e[k], markerStyles.at(1), colors.at(1), "Track");
     2025     addResoGraph(mg_pfpi_res_e[k], &gr_pfpi_res_e[k], leg_pfpi_res_e[k], markerStyles.at(2), colors.at(2), "Particle-flow");
    20252026
    20262027     c_pfpi_res_e[k] = new TCanvas("","", 800, 600);
     
    20582059     leg_pfpi_res_eta[k]->SetHeader(s_e);
    20592060
    2060      addResoGraph(mg_pfpi_res_eta[k], &gr_hcal_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(0), colors.at(0), "hcal");
    2061      addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), "track");
    2062      addResoGraph(mg_pfpi_res_eta[k], &gr_pfpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(2), colors.at(2), "p-flow");
     2061     addResoGraph(mg_pfpi_res_eta[k], &gr_hcal_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(0), colors.at(0), "HCAL");
     2062     addResoGraph(mg_pfpi_res_eta[k], &gr_trkpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(1), colors.at(1), "Track");
     2063     addResoGraph(mg_pfpi_res_eta[k], &gr_pfpi_res_eta[k], leg_pfpi_res_eta[k], markerStyles.at(2), colors.at(2), "Particle-flow");
    20632064
    20642065     c_pfpi_res_eta[k] = new TCanvas("","", 800, 600);
     
    21072108
    21082109     mg_pfjet_res_e[k] = new TMultiGraph("","");
    2109      leg_pfjet_res_e[k] = new TLegend(0.60,0.60,0.90,0.90);
     2110     leg_pfjet_res_e[k] = new TLegend(0.40,0.70,0.90,0.90);
    21102111
    21112112     HistogramsCollection(&plots_pfjet_res_e[k], TMath::Log10(ptMin), TMath::Log10(ptMax), "pfjet");
     
    21202121     s_etaMin = Form("%.1f",etaVals.at(k));
    21212122     s_etaMax = Form("%.1f",etaVals.at(k+1));
    2122      s_eta    = "jets, "+ s_etaMin + " < | #eta | < " + s_etaMax;
     2123     s_eta    = "anti-k_{T},  R = 0.4, "+ s_etaMin + " < | #eta | < " + s_etaMax;
    21232124
    21242125     leg_pfjet_res_e[k]->SetTextFont(132);
    21252126     leg_pfjet_res_e[k]->SetHeader(s_eta);
    21262127
    2127      addResoGraph(mg_pfjet_res_e[k], &gr_cajet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(0), colors.at(0), "calo");
    2128      addResoGraph(mg_pfjet_res_e[k], &gr_pfjet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(1), colors.at(1), "p-flow");
     2128     addResoGraph(mg_pfjet_res_e[k], &gr_cajet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(0), colors.at(0), "Calorimeter Jets");
     2129     addResoGraph(mg_pfjet_res_e[k], &gr_pfjet_res_e[k], leg_pfjet_res_e[k], markerStyles.at(1), colors.at(1), "Particle-flow Jets");
    21292130
    21302131     c_pfjet_res_e[k] = new TCanvas("","", 800, 600);
     
    21502151
    21512152     mg_pfjet_res_eta[k] = new TMultiGraph("","");
    2152      leg_pfjet_res_eta[k] = new TLegend(0.40,0.60,0.75,0.90);
     2153     leg_pfjet_res_eta[k] = new TLegend(0.30,0.70,0.85,0.90);
    21532154
    21542155     HistogramsCollectionVsEta(&plots_pfjet_res_eta[k], etaMin, etaMax, 0.5*ptVals.at(k), 2.0*ptVals.at(k), "pfjet", 0.0, 2.0);
     
    21612162     gr_cajet_res_eta[k] = EresGraphVsEta(&plots_cajet_res_eta[k]);
    21622163
    2163      s_e = Form("jets, E = %.0f GeV",ptVals.at(k));
    2164      if(ptVals.at(k) >= 1000.) s_e = Form("jets, E = %.0f TeV",ptVals.at(k)/1000.);
     2164     s_e = Form("anti-k_{T},  R = 0.4,  jets, E = %.0f GeV",ptVals.at(k));
     2165     if(ptVals.at(k) >= 1000.) s_e = Form("anti-k_{T},  R = 0.4, E = %.0f TeV",ptVals.at(k)/1000.);
    21652166
    21662167     leg_pfjet_res_eta[k]->SetTextFont(132);
    21672168     leg_pfjet_res_eta[k]->SetHeader(s_e);
    21682169
    2169      addResoGraph(mg_pfjet_res_eta[k], &gr_cajet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(0), colors.at(0), "calo");
    2170      addResoGraph(mg_pfjet_res_eta[k], &gr_pfjet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(1), colors.at(1), "p-flow");
     2170     addResoGraph(mg_pfjet_res_eta[k], &gr_cajet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(0), colors.at(0), "Calorimeter Jets");
     2171     addResoGraph(mg_pfjet_res_eta[k], &gr_pfjet_res_eta[k], leg_pfjet_res_eta[k], markerStyles.at(1), colors.at(1), "Particle-flow Jets");
    21712172
    21722173     c_pfjet_res_eta[k] = new TCanvas("","", 800, 600);
     
    22052206    TGraphErrors gr_camet_res_ht = MetResGraph(&plots_camet, true);
    22062207
    2207     addResoGraph(mg_met_res_ht, &gr_camet_res_ht, leg_met_res_ht, markerStyles.at(0), colors.at(0), "calo");
    2208     addResoGraph(mg_met_res_ht, &gr_pfmet_res_ht, leg_met_res_ht, markerStyles.at(1), colors.at(1), "p-flow");
     2208    addResoGraph(mg_met_res_ht, &gr_camet_res_ht, leg_met_res_ht, markerStyles.at(0), colors.at(0), "Calorimeter E_{T}^{miss}");
     2209    addResoGraph(mg_met_res_ht, &gr_pfmet_res_ht, leg_met_res_ht, markerStyles.at(1), colors.at(1), "Particle-flow E_{T}^{miss}");
    22092210
    22102211    TCanvas *c_met_res_ht = new TCanvas("","", 800, 600);
    22112212
    22122213    mg_met_res_ht->Draw("APE");
    2213     DrawAxis(mg_met_res_ht, leg_met_res_ht, 10, 10000, 0.1, 1000, " #sum p_{T} [GeV]", "resolution in E_{x,y} [GeV]", true, true);
     2214    DrawAxis(mg_met_res_ht, leg_met_res_ht, 10, 10000, 0.1, 1000, " #sum p_{T} [GeV]", "resolution in E_{x,y}^{miss} [GeV]", true, true);
    22142215
    22152216    leg_met_res_ht->Draw();
Note: See TracChangeset for help on using the changeset viewer.