Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:37

0001 #include "TFile.h"
0002 #include "TH1D.h"
0003 #include "TH2F.h"
0004 #include "TCanvas.h"
0005 #include "TPad.h"
0006 #include "TLatex.h"
0007 #include "TLegend.h"
0008 #include "TLine.h"
0009 
0010 #include <sstream>
0011 #include <string>
0012 #include <iostream>
0013 
0014 using std::string;
0015 using std::cout;
0016 using std::endl;
0017 using std::stringstream;
0018 
0019 void create_plot(
0020   TH1D * hw,
0021   TH1D * emu,
0022   int runNo,
0023   const char * dataset,
0024   const char * xLabel,
0025   const char * exportPath,
0026   int rebin = 1,
0027   int energy = 13,
0028   long rangeLow = 0,
0029   long rangeHigh = 0
0030   ) {
0031 
0032   // define latex container to hold the title
0033   TLatex n;
0034   n.SetNDC();
0035   n.SetTextFont(52);
0036   n.SetTextSize(0.05);
0037 
0038   // create canvas that will hold each plot
0039   TCanvas* canv = new TCanvas("canv","canvas");
0040 
0041   // top pad (comparison)
0042   TPad* pad1 = new TPad("mainPad","mainPad",0,0.3,1,1);
0043   // bottom (resuduals) pad
0044   TPad* pad2 = new TPad("ratioPad","ratioPad",0,0.05,1,0.3);
0045 
0046   // pad to contain trendline for hw-emu ratio of 1
0047   TPad* overlayPad = new TPad("pInv","pInv", 0,0.05,1,0.3);
0048   overlayPad->SetFillStyle(0);
0049 
0050   // create legend that will describe appearance of data points
0051   TLegend * leg = new TLegend(0.65,0.85,0.91,1);
0052   leg->SetFillColor(0);
0053   leg->SetNColumns(2);
0054   leg->AddEntry(hw,"Hardware", "p");//"l");
0055   leg->AddEntry(emu,"Emulator", "l");
0056   leg->SetBorderSize(0);
0057   leg->SetFillStyle(0);
0058 
0059   // optionally reduce segmentation in x to improve visibility of some plots
0060   hw->Rebin(rebin);
0061   emu->Rebin(rebin);
0062 
0063   hw->SetMarkerStyle(21);
0064   hw->SetMarkerColor(1);
0065   hw->SetMarkerSize(0.5);
0066   emu->SetLineColor(kRed);
0067   hw->GetYaxis()->SetTitle("Number of candidates");
0068   hw->GetYaxis()->SetTitleSize(0.062);
0069   hw->GetYaxis()->SetTitleOffset(0.80);
0070   hw->GetYaxis()->SetLabelSize(0.045);
0071   hw->GetYaxis()->SetTickSize(0.01);
0072 
0073   hw->GetXaxis()->SetLabelSize(0);
0074 
0075   emu->GetXaxis()->SetLabelSize(0);
0076 
0077   pad1->SetBottomMargin(0.02);
0078   pad1->SetGridx();
0079   //pad1->SetLogy();
0080 
0081   pad1->Draw();
0082   pad1->cd();
0083 
0084   hw->SetStats(0);
0085   emu->SetStats(0);
0086 
0087   if (emu->GetMaximum() > hw->GetMaximum()) {
0088     hw->SetMaximum(1.1*emu->GetMaximum());
0089   }
0090 
0091   if (rangeLow != 0 || rangeHigh != 0) {
0092     emu->GetXaxis()->SetRangeUser(rangeLow, rangeHigh);
0093     hw->GetXaxis()->SetRangeUser(rangeLow, rangeHigh);
0094   }
0095   hw->DrawCopy("p");
0096   emu->Draw("same");
0097 
0098   if (rangeLow != 0 || rangeHigh != 0) {
0099     emu->GetXaxis()->SetRangeUser(rangeLow, rangeHigh);
0100     hw->GetXaxis()->SetRangeUser(rangeLow, rangeHigh);
0101   }
0102 
0103   leg->Draw();
0104   stringstream caption;
0105   caption << "#bf{CMS Preliminary}: " << dataset;
0106   /*
0107     caption << "#bf{CMS Preliminary, 2016 Data}:" << ", #sqrt{s} = " << energy
0108     << " TeV ";
0109   */
0110   n.DrawLatex(0.1, 0.915, caption.str().c_str());
0111 
0112   canv->cd();
0113   pad2->SetTopMargin(0);
0114   pad2->SetBottomMargin(0.39);
0115   pad2->Draw();
0116   pad2->cd();
0117   pad2->SetGridy();
0118   pad2->SetGridx();
0119   hw->Divide(emu);
0120   hw->GetYaxis()->SetTitle("HW/EM");
0121   hw->GetYaxis()->CenterTitle();
0122 
0123   stringstream labelText;
0124   labelText << "Level-1 Trigger " << xLabel;
0125   hw->GetYaxis()->CenterTitle();
0126   hw->GetXaxis()->SetTitle(labelText.str().c_str());
0127 
0128   hw->GetYaxis()->SetTitleSize(0.15);
0129   hw->GetYaxis()->SetTitleOffset(0.3);
0130   hw->GetYaxis()->SetLabelSize(0.12);
0131 
0132   hw->GetYaxis()->SetLabelOffset(0.006);
0133   hw->GetYaxis()->SetNdivisions(40407);
0134 
0135   hw->GetXaxis()->SetTitleSize(0.15);
0136   hw->GetXaxis()->SetTitleOffset(1.1);
0137   hw->GetXaxis()->SetLabelOffset(0.04);
0138   hw->GetXaxis()->SetLabelSize(0.12);
0139 
0140   hw->SetMinimum(0.76);
0141   hw->SetMaximum(1.24);
0142   hw->Draw("p");
0143   canv->cd();
0144   overlayPad->Draw();
0145   overlayPad->cd();
0146 
0147   if (rangeLow != 0 || rangeHigh != 0) {
0148     hw->GetXaxis()->SetRangeUser(rangeLow, rangeHigh);
0149   }
0150   
0151   TLine* unity = new TLine(0.1,0.695,0.9,0.695);
0152   unity->SetLineColor(kBlue);
0153   unity->Draw();
0154 
0155   stringstream pathStream;
0156   pathStream << "compHwEmu/" << exportPath;
0157   canv->SaveAs(pathStream.str().c_str());
0158 
0159   delete canv;
0160 }
0161 
0162 
0163 void compHwEmu (
0164   int runNo, const char * dataset, bool useEventDisplay = false, bool presentationMode = false
0165   ) {
0166 
0167   const unsigned int evtToDisplay = 18;
0168   
0169   stringstream filename;
0170   stringstream title;
0171 
0172   const char * rootFilename = "l1tCalo_2016_simHistos.root";
0173 
0174   TFile* inFileHw = new TFile(rootFilename);
0175   TFile* inFileEm = new TFile(rootFilename);
0176 
0177   if (!inFileHw->IsOpen() || !inFileEm->IsOpen()) {
0178     cout << "Failed to open " << rootFilename << " file." << endl;
0179     exit(0);
0180   } 
0181 
0182   // Jets
0183 
0184   // Jet Et
0185   TH1D* hwMPJetEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpjet/et");
0186   TH1D* emMPJetEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpjet/et");
0187   TH1D* hwMPJetEtSat = (TH1D*) new TH1D(*hwMPJetEt);
0188   TH1D* emMPJetEtSat = (TH1D*) new TH1D(*emMPJetEt);
0189   TH1D* hwJetEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/jet/et");
0190   TH1D* emJetEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/jet/et");
0191 
0192   // jet eta
0193   TH1D* hwMPJetEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpjet/eta");
0194   TH1D* emMPJetEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpjet/eta");
0195   TH1D* hwJetEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/jet/eta");
0196   TH1D* emJetEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/jet/eta");
0197 
0198   // jet phi
0199   TH1D* hwMPJetPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpjet/phi");
0200   TH1D* emMPJetPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpjet/phi");
0201   TH1D* hwJetPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/jet/phi");
0202   TH1D* emJetPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/jet/phi");
0203 
0204   // MP sums
0205 
0206   // ETT 
0207   TH1D* hwMPSumEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumet/et");
0208   TH1D* emMPSumEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumet/et");
0209 
0210   TH1D* hwMPSumEtSat = (TH1D*) new TH1D(*hwMPSumEt);
0211   TH1D* emMPSumEtSat = (TH1D*) new TH1D(*emMPSumEt);
0212 
0213   // ETTHF
0214   TH1D* hwMPSumEtHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumethf/et");
0215   TH1D* emMPSumEtHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumethf/et");
0216 
0217   TH1D* hwMPSumEtHFSat = (TH1D*) new TH1D(*hwMPSumEtHF);
0218   TH1D* emMPSumEtHFSat = (TH1D*) new TH1D(*emMPSumEtHF);
0219 
0220  
0221   // ETTEM
0222   TH1D* hwMPSumEtEM = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumetem/et");
0223   TH1D* emMPSumEtEM = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumetem/et");
0224   
0225    // ETTEM
0226   TH1D* hwMPSumEtEMSat = (TH1D*) new TH1D(*hwMPSumEtEM);
0227   TH1D* emMPSumEtEMSat = (TH1D*) new TH1D(*emMPSumEtEM);
0228  
0229   // ETx
0230   TH1D* hwMPSumEtx = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummetx/et");
0231   TH1D* emMPSumEtx = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummetx/et");
0232 
0233   // ETx Sat
0234   TH1D* hwMPSumEtxSat = (TH1D*) new TH1D(*hwMPSumEtx);
0235   TH1D* emMPSumEtxSat = (TH1D*) new TH1D(*emMPSumEtx);
0236 
0237   // ETxHF
0238   TH1D* hwMPSumEtxHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummetxhf/et");
0239   TH1D* emMPSumEtxHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummetxhf/et");
0240 
0241   // ETx Sat
0242   TH1D* hwMPSumEtxHFSat = (TH1D*) new TH1D(*hwMPSumEtxHF);
0243   TH1D* emMPSumEtxHFSat = (TH1D*) new TH1D(*emMPSumEtxHF);
0244   
0245 
0246   // ETy
0247   TH1D* hwMPSumEty = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummety/et");
0248   TH1D* emMPSumEty = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummety/et");
0249 
0250   // ETy Sat
0251   TH1D* hwMPSumEtySat = (TH1D*) new TH1D(*hwMPSumEty);
0252   TH1D* emMPSumEtySat = (TH1D*) new TH1D(*emMPSumEty);
0253 
0254   // ETyHF
0255   TH1D* hwMPSumEtyHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummetyhf/et");
0256   TH1D* emMPSumEtyHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummetyhf/et");
0257 
0258   // ETy Sat
0259   TH1D* hwMPSumEtyHFSat = (TH1D*) new TH1D(*hwMPSumEtyHF);
0260   TH1D* emMPSumEtyHFSat = (TH1D*) new TH1D(*emMPSumEtyHF);
0261 
0262   // HTT
0263   TH1D* hwMPSumHt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumht/et");
0264   TH1D* emMPSumHt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumht/et");
0265 
0266   // HTT
0267   TH1D* hwMPSumHtSat = (TH1D*) new TH1D(*hwMPSumHt);
0268   TH1D* emMPSumHtSat = (TH1D*) new TH1D(*emMPSumHt);
0269 
0270   // HTTHF
0271   TH1D* hwMPSumHtHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumhthf/et");
0272   TH1D* emMPSumHtHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumhthf/et");
0273 
0274   // HTT
0275   TH1D* hwMPSumHtHFSat = (TH1D*) new TH1D(*hwMPSumHtHF);
0276   TH1D* emMPSumHtHFSat = (TH1D*) new TH1D(*emMPSumHtHF);
0277 
0278   // HTx
0279   TH1D* hwMPSumHtx = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummhtx/et");
0280   TH1D* emMPSumHtx = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummhtx/et");
0281 
0282   // HTx Sat
0283   TH1D* hwMPSumHtxSat = (TH1D*) new TH1D(*hwMPSumHtx);
0284   TH1D* emMPSumHtxSat = (TH1D*) new TH1D(*emMPSumHtx);
0285 
0286   // HTxHF
0287   TH1D* hwMPSumHtxHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummhtxhf/et");
0288   TH1D* emMPSumHtxHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummhtxhf/et");
0289 
0290   // HTxHF Sat
0291   TH1D* hwMPSumHtxHFSat = (TH1D*) new TH1D(*hwMPSumHtxHF);
0292   TH1D* emMPSumHtxHFSat = (TH1D*) new TH1D(*emMPSumHtxHF);
0293 
0294 
0295   // HTy
0296   TH1D* hwMPSumHty = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummhty/et");
0297   TH1D* emMPSumHty = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummhty/et");
0298 
0299   // HTy Sat
0300   TH1D* hwMPSumHtySat = (TH1D*) new TH1D(*hwMPSumHty);
0301   TH1D* emMPSumHtySat = (TH1D*) new TH1D(*emMPSumHty);
0302 
0303   // HTyHF
0304   TH1D* hwMPSumHtyHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsummhtyhf/et");
0305   TH1D* emMPSumHtyHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsummhtyhf/et");
0306 
0307   // HTyHF Sat
0308   TH1D* hwMPSumHtyHFSat = (TH1D*) new TH1D(*hwMPSumHtyHF);
0309   TH1D* emMPSumHtyHFSat = (TH1D*) new TH1D(*emMPSumHtyHF);
0310 
0311   
0312   // HITowerCount
0313   TH1D* hwMPSumHITowerCount = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpsumhitowercount/et");
0314   TH1D* emMPSumHITowerCount = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpsumhitowercount/et");
0315 
0316   // Demux sums
0317 
0318   // ETT
0319   TH1D* hwSumEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumet/et");
0320   TH1D* emSumEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumet/et");
0321 
0322   /*
0323   // ETT
0324   TH1D* hwSumEtHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumet/et");
0325   TH1D* emSumEtHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumet/et");
0326   */
0327 
0328   // ETTEM
0329   TH1D* hwSumEtEM = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumetem/et");
0330   TH1D* emSumEtEM = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumetem/et");
0331 
0332   // MET
0333   TH1D* hwSumMet = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summet/et");
0334   TH1D* emSumMet = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summet/et");
0335 
0336   // METHF
0337   TH1D* hwSumMetHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summethf/et");
0338   TH1D* emSumMetHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summethf/et");
0339 
0340   // HTT
0341   TH1D* hwSumHt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumht/et");
0342   TH1D* emSumHt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumht/et");
0343 
0344 
0345   // MHT
0346   TH1D* hwSumMht = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summht/et");
0347   TH1D* emSumMht = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summht/et");
0348 
0349   // MHTHF
0350   TH1D* hwSumMhtHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summhthf/et");
0351   TH1D* emSumMhtHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summhthf/et");
0352 
0353   // MET phi
0354   TH1D* hwMetPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summet/phi");
0355   TH1D* emMetPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summet/phi");
0356 
0357   // METHF phi
0358   TH1D* hwMetHFPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summethf/phi");
0359   TH1D* emMetHFPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summethf/phi");
0360 
0361   // MHT phi
0362   TH1D* hwMhtPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summht/phi");
0363   TH1D* emMhtPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summht/phi");
0364 
0365   // MHTHF phi
0366   TH1D* hwMhtHFPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/summhthf/phi");
0367   TH1D* emMhtHFPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/summhthf/phi");
0368 
0369    // HI Tower count
0370   TH1D* hwHITowerCount = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumhitowercount/et");
0371   TH1D* emHITowerCount = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumhitowercount/et");
0372   
0373   // HI centrality
0374   TH1D* hwHICentrality = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumcentrality/et");
0375   TH1D* emHICentrality = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumcentrality/et");
0376 
0377   // ET Asym
0378   TH1D* hwEtAsymSum = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumasymet/et");
0379   TH1D* emEtAsymSum = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumasymet/et");
0380 
0381   // HT Asym
0382   TH1D* hwHtAsymSum = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumasymht/et");
0383   TH1D* emHtAsymSum = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumasymht/et");
0384 
0385   // ET HF Asym
0386   TH1D* hwEtAsymSumHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumasymethf/et");
0387   TH1D* emEtAsymSumHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumasymethf/et");
0388 
0389   // HT HF Asym
0390   TH1D* hwHtAsymSumHF = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sumasymhthf/et");
0391   TH1D* emHtAsymSumHF = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sumasymhthf/et");
0392 
0393 
0394   // Sorts
0395   TH1D* hwSortMP = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sortMP");
0396   TH1D* emSortMP = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sortMP");
0397   TH1D* hwSort = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/sort");
0398   TH1D* emSort = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/sort");
0399 
0400   // EG Et
0401   TH1D* hwMPEgEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpeg/et");
0402   TH1D* emMPEgEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpeg/et");
0403   TH1D* hwEgEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/eg/et");
0404   TH1D* emEgEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/eg/et");
0405 
0406   // EG eta
0407   TH1D* hwMPEgEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpeg/eta");
0408   TH1D* emMPEgEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpeg/eta");
0409   TH1D* hwEgEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/eg/eta");
0410   TH1D* emEgEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/eg/eta");
0411 
0412   // EG phi
0413   TH1D* hwMPEgPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpeg/phi");
0414   TH1D* emMPEgPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpeg/phi");
0415   TH1D* hwEgPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/eg/phi");
0416   TH1D* emEgPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/eg/phi");
0417 
0418   // EG iso
0419   TH1D* hwMPEgIso = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpeg/iso");
0420   TH1D* emMPEgIso = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mpeg/iso");
0421   TH1D* hwEgIso = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/eg/iso");
0422   TH1D* emEgIso = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/eg/iso");
0423   
0424 
0425   // Tau Et
0426   TH1D* hwMPTauEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mptau/et");
0427   TH1D* emMPTauEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mptau/et");
0428   TH1D* hwTauEt = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/tau/et");
0429   TH1D* emTauEt = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/tau/et");
0430 
0431   // Tau eta
0432   TH1D* hwMPTauEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mptau/eta");
0433   TH1D* emMPTauEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mptau/eta");
0434   TH1D* hwTauEta = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/tau/eta");
0435   TH1D* emTauEta = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/tau/eta");
0436 
0437   // Tau phi
0438   TH1D* hwMPTauPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mptau/phi");
0439   TH1D* emMPTauPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/mptau/phi");
0440   TH1D* hwTauPhi = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/tau/phi");
0441   TH1D* emTauPhi = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/tau/phi");
0442 
0443   // HF feature bits Demux
0444   TH1D* hwMinBiasHFp0 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/minbiashfp0/et");
0445   TH1D* emMinBiasHFp0 = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/minbiashfp0/et");
0446   TH1D* hwMinBiasHFm0 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/minbiashfm0/et");
0447   TH1D* emMinBiasHFm0 = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/minbiashfm0/et");
0448 
0449   TH1D* hwMinBiasHFp1 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/minbiashfp1/et");
0450   TH1D* emMinBiasHFp1 = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/minbiashfp1/et");
0451   TH1D* hwMinBiasHFm1 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/minbiashfm1/et");
0452   TH1D* emMinBiasHFm1 = (TH1D*)inFileEm->Get("l1tStage2CaloAnalyzer/minbiashfm1/et");
0453 
0454   // HF feature bits MP
0455   TH1D* hwMPMinBiasHFp0 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpminbiashfp0/et");
0456   TH1D* emMPMinBiasHFp0 = (TH1D*)inFileHw->Get("l1tStage2CaloAnalyzer/mpminbiashfp0/et");
0457   TH1D* hwMPMinBiasHFm0 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpminbiashfm0/et");
0458   TH1D* emMPMinBiasHFm0 = (TH1D*)inFileHw->Get("l1tStage2CaloAnalyzer/mpminbiashfm0/et");
0459 
0460   TH1D* hwMPMinBiasHFp1 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpminbiashfp1/et");
0461   TH1D* emMPMinBiasHFp1 = (TH1D*)inFileHw->Get("l1tStage2CaloAnalyzer/mpminbiashfp1/et");
0462   TH1D* hwMPMinBiasHFm1 = (TH1D*)inFileHw->Get("l1tCaloStage2HwHistos/mpminbiashfm1/et");
0463   TH1D* emMPMinBiasHFm1 = (TH1D*)inFileHw->Get("l1tStage2CaloAnalyzer/mpminbiashfm1/et");
0464 
0465   // HF feature bits MP
0466   create_plot(
0467     hwMPMinBiasHFp0, emMPMinBiasHFp0, runNo, dataset,
0468     "HF tower HCAL flags (p0)", "MPSums/HFSumP0.pdf"
0469     );
0470 
0471   create_plot(
0472     hwMPMinBiasHFm0, emMPMinBiasHFm0, runNo, dataset,
0473     "HF tower HCAL flags (m0)", "MPSums/HFSumM0.pdf"
0474     );
0475 
0476   create_plot(
0477     hwMPMinBiasHFp1, emMPMinBiasHFp1, runNo, dataset,
0478     "HF tower HCAL flags (p1)", "MPSums/HFSumP1.pdf"
0479     );
0480 
0481   create_plot(
0482     hwMPMinBiasHFm1, emMPMinBiasHFm1, runNo, dataset,
0483     "HF tower HCAL flags (m1)", "MPSums/HFSumM1.pdf"
0484     );
0485 
0486   // HF feature bits Demux
0487   create_plot(
0488     hwMinBiasHFp0, emMinBiasHFp0, runNo, dataset,
0489     "HF tower HCAL flags (p0)", "DemuxSums/HFSumP0.pdf"
0490     );
0491 
0492   create_plot(
0493     hwMinBiasHFm0, emMinBiasHFm0, runNo, dataset,
0494     "HF tower HCAL flags (m0)", "DemuxSums/HFSumM0.pdf"
0495     );
0496 
0497   create_plot(
0498     hwMinBiasHFp1, emMinBiasHFp1, runNo, dataset,
0499     "HF tower HCAL flags (p1)", "DemuxSums/HFSumP1.pdf"
0500     );
0501 
0502   create_plot(
0503     hwMinBiasHFm1, emMinBiasHFm1, runNo, dataset,
0504     "HF tower HCAL flags (m1)", "DemuxSums/HFSumM1.pdf"
0505     );
0506 
0507 // ========================== jets start ========================
0508   if (presentationMode) {
0509     // plot MP jet Et
0510     create_plot(
0511       hwMPJetEt, emMPJetEt, runNo, dataset,
0512       "Jet iE_{T}", "Jets/JetEt.pdf", 2, 13, 0, 200
0513       );
0514 
0515     // plot MP jet eta
0516     create_plot(
0517       hwMPJetEta, emMPJetEta, runNo, dataset,
0518       "Jet i#eta", "Jets/JetEta.pdf", 2
0519       );
0520 
0521     // plot MP jet phi
0522     create_plot(
0523       hwMPJetPhi, emMPJetPhi, runNo, dataset,
0524       "Jet i#phi", "Jets/JetPhi.pdf", 2
0525       );
0526 
0527     // plot demux jet Et
0528     create_plot(
0529       hwJetEt, emJetEt, runNo, dataset,
0530       "Jet iE_{T}", "DemuxJets/JetEt.pdf", 2, 13, 0, 200
0531       );
0532 
0533     // plot demux jet eta
0534     create_plot(
0535       hwJetEta, emJetEta, runNo, dataset,
0536       "Jet i#eta", "DemuxJets/JetEta.pdf", 2
0537       );
0538 
0539     // plot demux jet phi
0540     create_plot(
0541       hwJetPhi, emJetPhi, runNo, dataset,
0542       "Jet i#phi", "DemuxJets/JetPhi.pdf", 4
0543       );
0544   } else {
0545     // plot MP jet Et
0546     create_plot(
0547       hwMPJetEt, emMPJetEt, runNo, dataset,
0548       "Jet iE_{T}", "Jets/JetEt.pdf",  1, 13, 0, 1500
0549       );
0550 
0551      create_plot(
0552       hwMPJetEtSat, emMPJetEtSat, runNo, dataset,
0553       "Jet iE_{T} Full", "Jets/JetEtSat.pdf"
0554       );
0555 
0556     // plot MP jet eta
0557     create_plot(
0558       hwMPJetEta, emMPJetEta, runNo, dataset,
0559       "Jet i#eta", "Jets/JetEta.pdf"
0560       );
0561 
0562     // plot MP jet phi
0563     create_plot(
0564       hwMPJetPhi, emMPJetPhi, runNo, dataset,
0565       "Jet i#phi", "Jets/JetPhi.pdf"
0566       );
0567 
0568     // plot demux jet Et
0569     create_plot(
0570       hwJetEt, emJetEt, runNo, dataset,
0571       "Jet iE_{T}", "DemuxJets/JetEt.pdf",  1, 13, 0, 2500
0572       );
0573 
0574     // plot demux jet eta
0575     create_plot(
0576       hwJetEta, emJetEta, runNo, dataset,
0577       "Jet i#eta", "DemuxJets/JetEta.pdf"
0578       );
0579 
0580     // plot demux jet phi
0581     create_plot(
0582       hwJetPhi, emJetPhi, runNo, dataset,
0583       "Jet i#phi", "DemuxJets/JetPhi.pdf"
0584       );
0585   }
0586 // =========================== jets end =========================
0587 // ======================== MP sums start ========================
0588   if (presentationMode) {
0589     // plot MP sum Et
0590     create_plot(
0591       hwMPSumEt, emMPSumEt, runNo, dataset,
0592       "Sum iE_{T}", "MPSums/MPSumEt.pdf", 2, 13, 0, 600
0593       );
0594 
0595     // plot MP sum Et with HF
0596     create_plot(
0597       hwMPSumEtHF, emMPSumEtHF, runNo, dataset,
0598       "Sum iE_{T}", "MPSums/MPSumEtHF.pdf", 2, 13, 0, 600
0599       );
0600   } else {
0601     // plot MP sum Et
0602     create_plot(
0603       hwMPSumEt, emMPSumEt, runNo, dataset,
0604       "Sum iE_{T}", "MPSums/MPSumEt.pdf", 1, 13, 0, 10000
0605       );
0606 
0607      // plot MP sum Et
0608     create_plot(
0609       hwMPSumEtSat, emMPSumEtSat, runNo, dataset,
0610       "Sum iE_{T}", "MPSums/MPSumEtSat.pdf", 1, 13, 0, 100000
0611       );
0612     
0613 
0614     // plot MP sum Et with HF
0615     create_plot(
0616       hwMPSumEtHF, emMPSumEtHF, runNo, dataset,
0617       "Sum iE_{T}", "MPSums/MPSumEtHF.pdf",  1, 13, 0, 10000
0618       );
0619 
0620     // plot MP sum Et with HF
0621     create_plot(
0622       hwMPSumEtHFSat, emMPSumEtHFSat, runNo, dataset,
0623       "Sum iE_{T}", "MPSums/MPSumEtHFSat.pdf", 1, 13, 0, 100000
0624       );
0625 
0626     
0627 
0628     
0629     // plot MP sum ETEm
0630     create_plot(
0631       hwMPSumEtEM, emMPSumEtEM, runNo, dataset,
0632       "Sum iE_{T}", "MPSums/MPSumEtEM.pdf", 1, 13, 0, 5000
0633       );
0634     
0635      
0636   
0637 
0638   // plot MP sum ETTEM
0639     create_plot(
0640       hwMPSumEtEMSat, emMPSumEtEMSat, runNo, dataset,
0641       "Sum iE_{T}", "MPSums/MPSumEtEMSat.pdf", 1, 13, 0, 100000
0642       );
0643     
0644  
0645 
0646   // plot MP sum Etx
0647   create_plot(
0648     hwMPSumEtx, emMPSumEtx, runNo, dataset,
0649     "Sum iE_{T,x}", "MPSums/MPSumEtx.pdf", 1, 13, -200000, 200000
0650     );
0651 
0652   create_plot(
0653     hwMPSumEtxSat, emMPSumEtxSat, runNo, dataset,
0654     "Sum iE_{T,x}", "MPSums/MPSumEtxSat.pdf", 1000, 13, -2200000000, 2200000000
0655     );
0656 
0657   // plot MP sum Etx with HF
0658   create_plot(
0659     hwMPSumEtxHF, emMPSumEtxHF, runNo, dataset,
0660     "Sum iE_{T,x}", "MPSums/MPSumEtxHF.pdf", 1, 13, -200000, 200000 
0661     );
0662 
0663     // plot MP sum Etx with HF sat
0664   create_plot(
0665     hwMPSumEtxHFSat, emMPSumEtxHFSat, runNo, dataset,
0666     "Sum iE_{T,x}", "MPSums/MPSumEtxHFSat.pdf", 1000, 13, -2200000000, 2200000000
0667     );
0668 
0669 
0670   // plot MP sum Ety
0671   create_plot(
0672     hwMPSumEty, emMPSumEty, runNo, dataset, 
0673     "Sum iE_{T,y}", "MPSums/MPSumEty.pdf", 1, 13, -200000, 200000
0674     );
0675 
0676    create_plot(
0677     hwMPSumEtySat, emMPSumEtySat, runNo, dataset,
0678     "Sum iE_{T,y}", "MPSums/MPSumEtySat.pdf", 1000, 13, -2200000000, 2200000000
0679     );
0680 
0681   // plot MP sum Ety with HF
0682   create_plot(
0683     hwMPSumEtyHF, emMPSumEtyHF, runNo, dataset,
0684     "Sum iE_{T,y}", "MPSums/MPSumEtyHF.pdf", 1, 13, -200000, 200000
0685     );
0686 
0687   // plot MP sum Ety with HF
0688   create_plot(
0689     hwMPSumEtyHFSat, emMPSumEtyHFSat, runNo, dataset,
0690     "Sum iE_{T,y}", "MPSums/MPSumEtyHFSat.pdf",  1000, 13, -2200000000, 2200000000 
0691     );
0692   }
0693 
0694   if (presentationMode) {
0695     // plot MP sum Ht
0696     create_plot(
0697       hwMPSumHt, emMPSumHt, runNo, dataset,
0698       "Sum iH_{T}", "MPSums/MPSumHt.pdf", 1, 13, 0, 1000
0699       );
0700 
0701     // plot MP sum Ht (with HF)
0702     create_plot(
0703       hwMPSumHtHF, emMPSumHtHF, runNo, dataset,
0704       "Sum iH_{T}", "MPSums/MPSumHtHF.pdf", 1, 13, 0, 1000
0705       );
0706 
0707     // plot MP sum Htx
0708     create_plot(
0709       hwMPSumHtx, emMPSumHtx, runNo, dataset,
0710       "Sum iH_{T,x}", "MPSums/MPSumHtx.pdf", 1, 13, -20000, 20000
0711       );
0712 
0713     // plot MP sum Htx (with HF)
0714     create_plot(
0715       hwMPSumHtxHF, emMPSumHtxHF, runNo, dataset,
0716       "Sum iH_{T,x}", "MPSums/MPSumHtxHF.pdf", 1, 13, -20000, 20000
0717       );
0718 
0719     // plot MP sum Hty
0720     create_plot(
0721       hwMPSumHty, emMPSumHty, runNo, dataset,
0722       "Sum iH_{T,y}", "MPSums/MPSumHty.pdf", 1, 13, -20000, 20000
0723       );
0724 
0725     // plot MP sum Hty (with HF)
0726     create_plot(
0727       hwMPSumHtyHF, emMPSumHtyHF, runNo, dataset,
0728       "Sum iH_{T,y}", "MPSums/MPSumHtyHF.pdf", 1, 13, -20000, 20000
0729       );
0730 
0731       // plot HI tower count
0732     create_plot(
0733       hwMPSumHITowerCount, emMPSumHITowerCount, runNo, dataset,
0734       "# Towers", "MPSums/MPSumHITowerCount.pdf", 1, 13, 0, 5904
0735       );
0736   } else {
0737 
0738     // plot MP sum Ht
0739     create_plot(
0740       hwMPSumHt, emMPSumHt, runNo, dataset,
0741       "Sum iH_{T}", "MPSums/MPSumHt.pdf", 1, 13, 0, 10000
0742       );
0743 
0744     // plot MP sum Ht (with HF)
0745     create_plot(
0746       hwMPSumHtHF, emMPSumHtHF, runNo, dataset,
0747       "Sum iH_{T}", "MPSums/MPSumHtHF.pdf", 1, 13, 0, 10000
0748       );
0749 
0750 
0751       // plot MP sum Ht
0752     create_plot(
0753       hwMPSumHtSat, emMPSumHtSat, runNo, dataset,
0754       "Sum iH_{T}", "MPSums/MPSumHtSat.pdf", 1, 13, 0, 100000
0755       );
0756 
0757     // plot MP sum Ht (with HF)
0758     create_plot(
0759       hwMPSumHtHFSat, emMPSumHtHFSat, runNo, dataset,
0760       "Sum iH_{T}", "MPSums/MPSumHtHFSat.pdf", 1, 13, 0, 100000
0761       );
0762 
0763 
0764 
0765     // plot MP sum Htx
0766     create_plot(
0767       hwMPSumHtx, emMPSumHtx, runNo, dataset,
0768       "Sum iH_{T,x}", "MPSums/MPSumHtx.pdf", 1, 13, -200000, 200000
0769       );
0770 
0771     // plot MP sum Htx (with HF)
0772     create_plot(
0773       hwMPSumHtxHF, emMPSumHtxHF, runNo, dataset,
0774       "Sum iH_{T,x}", "MPSums/MPSumHtxHF.pdf", 1, 13, -200000, 200000
0775       );
0776 
0777 
0778       // plot MP sum Htx (with HF) sat
0779     create_plot(
0780       hwMPSumHtxSat, emMPSumHtxSat, runNo, dataset,
0781       "Sum iH_{T,x}", "MPSums/MPSumHtxSat.pdf", 1000, 13, -2200000000, 2200000000
0782       );
0783 
0784     // plot MP sum Htx (with HF) sat
0785     create_plot(
0786       hwMPSumHtxHFSat, emMPSumHtxHFSat, runNo, dataset,
0787       "Sum iH_{T,x}", "MPSums/MPSumHtxHFSat.pdf", 1000, 13, -2200000000, 2200000000
0788       );
0789 
0790     // plot MP sum Hty
0791     create_plot(
0792       hwMPSumHty, emMPSumHty, runNo, dataset,
0793       "Sum iH_{T,y}", "MPSums/MPSumHty.pdf", 1, 13, -200000, 200000
0794       );
0795 
0796     // plot MP sum Hty (with HF)
0797     create_plot(
0798       hwMPSumHtyHF, emMPSumHtyHF, runNo, dataset,
0799       "Sum iH_{T,y}", "MPSums/MPSumHtyHF.pdf", 1, 13, -200000, 200000
0800       );
0801 
0802        // plot MP sum Hty sat
0803     create_plot(
0804       hwMPSumHtySat, emMPSumHtySat, runNo, dataset,
0805       "Sum iH_{T,y}", "MPSums/MPSumHtySat.pdf", 1000, 13, -2200000000, 2200000000
0806       );
0807 
0808     // plot MP sum Hty (with HF) sat
0809     create_plot(
0810       hwMPSumHtyHFSat, emMPSumHtyHFSat, runNo, dataset,
0811       "Sum iH_{T,y}", "MPSums/MPSumHtyHFSat.pdf", 1000, 13, -2200000000, 2200000000
0812       );
0813   
0814 
0815     // plot HI tower count
0816     create_plot(
0817       hwMPSumHITowerCount, emMPSumHITowerCount, runNo, dataset,
0818       "# Towers", "MPSums/MPSumHITowerCount.pdf"
0819       );
0820 
0821   }
0822 // ========================= MP sums end ========================
0823 // ======================== demux sums start ========================
0824 
0825   if (presentationMode) {
0826     // plot demux sum Et
0827     create_plot(
0828       hwSumEt,
0829       emSumEt,
0830       runNo, dataset, "iE_{T}", "DemuxSums/DemSumEt.pdf", 10, 13, 0, 800
0831       );
0832 
0833     // plot demux sum EtEM
0834     create_plot(
0835       hwSumEtEM,
0836       emSumEtEM,
0837       runNo, dataset, "iE_{T}", "DemuxSums/DemSumEtEM.pdf", 10, 13, 0, 800
0838       );
0839 
0840     /*
0841     // plot demux sum Et with HF
0842     create_plot(
0843     hwSumEtHF,
0844     emSumEtHF,
0845     runNo, dataset, "iE_{T}", "DemuxSums/DemSumEtHF.pdf", 10, 13, 0, 800
0846     );
0847     */
0848 
0849     // plot demux sum Met
0850     create_plot(
0851       hwSumMet,
0852       emSumMet,
0853       runNo, dataset, "iMET", "DemuxSums/DemSumMet.pdf", 5, 13, 0, 5000
0854       );
0855 
0856     // plot demux sum Met with HF
0857     create_plot(
0858       hwSumMetHF,
0859       emSumMetHF,
0860       runNo, dataset, "iMET", "DemuxSums/DemSumMetHF.pdf", 5, 13, 0, 5000
0861       );
0862 
0863     // plot demux sum Met phi
0864     create_plot(
0865       hwMetPhi,
0866       emMetPhi,
0867       runNo, dataset, "MET i#phi", "DemuxSums/DemMetPhi.pdf", 1, 13, 0, 143
0868       );
0869 
0870     // plot demux sum Met phi (with HF)
0871     create_plot(
0872       hwMetHFPhi,
0873       emMetHFPhi,
0874       runNo, dataset, "MET i#phi", "DemuxSums/DemMetHFPhi.pdf", 1, 13, 0, 143
0875       );
0876 
0877     // plot demux sum Ht
0878     create_plot(
0879       hwSumHt,
0880       emSumHt,
0881       runNo, dataset, "iH_{T}", "DemuxSums/DemSumHt.pdf", 10, 13, 0, 800
0882       );
0883 
0884       // plot demux hi tower count
0885     create_plot(
0886       hwHITowerCount,
0887       emHITowerCount,
0888       runNo, dataset, "# Towers", "DemuxSums/DemHITowCount.pdf", 1, 13, 0, 5904
0889       );
0890 
0891     // plot demux sum Mht
0892     create_plot(
0893       hwSumMht,
0894       emSumMht,
0895       runNo, dataset, "iMHT", "DemuxSums/DemSumMht.pdf", 5, 13, 0, 200
0896       );
0897 
0898     // plot demux sum Mht (with HF)
0899     create_plot(
0900       hwSumMhtHF,
0901       emSumMhtHF,
0902       runNo, dataset, "iMHT", "DemuxSums/DemSumMhtHF.pdf", 5, 13, 0, 200
0903       );
0904 
0905     // plot demux sum Mht phi
0906     create_plot(
0907       hwMhtPhi,
0908       emMhtPhi,
0909       runNo, dataset, "MHT i#phi", "DemuxSums/DemMhtPhi.pdf", 1, 13, 0, 143
0910       );
0911 
0912     // plot demux sum Mht phi (with HF)
0913     create_plot(
0914       hwMhtHFPhi,
0915       emMhtHFPhi,
0916       runNo, dataset, "MHT i#phi", "DemuxSums/DemMhtHFPhi.pdf", 1, 13, 0, 143
0917       );
0918   } else {
0919     // plot demux sum Et
0920     create_plot(
0921       hwSumEt,
0922       emSumEt,
0923       runNo, dataset, "iE_{T}", "DemuxSums/DemSumEt.pdf", 1, 13, 0, 5000
0924       );
0925 
0926     // plot demux sum EtEM
0927     create_plot(
0928       hwSumEtEM,
0929       emSumEtEM,
0930       runNo, dataset, "iE_{T}", "DemuxSums/DemSumEtEM.pdf", 1, 13, 0, 5000
0931       );
0932 
0933     /*
0934     // plot demux sum Et with HF
0935     create_plot(
0936     hwSumEtHF,
0937     emSumEtHF,
0938     runNo, dataset, "iE_{T}", "DemuxSums/DemSumEtHF.pdf"
0939     );
0940     */
0941 
0942     // plot demux sum Met with HF
0943     create_plot(
0944       hwSumMetHF,
0945       emSumMetHF,
0946       runNo, dataset, "iMET", "DemuxSums/DemSumMetHF.pdf", 1, 13, 0, 5000
0947       );
0948 
0949     // plot demux sum Met
0950     create_plot(
0951       hwSumMet,
0952       emSumMet,
0953       runNo, dataset, "iMET", "DemuxSums/DemSumMet.pdf", 1, 13, 0, 5000
0954       );
0955 
0956     // plot demux sum Met phi
0957     create_plot(
0958       hwMetPhi,
0959       emMetPhi,
0960       runNo, dataset, "MET i#phi", "DemuxSums/DemMetPhi.pdf", 1, 13, 0, 143
0961       );
0962 
0963     // plot demux sum Met phi (with HF)
0964     create_plot(
0965       hwMetHFPhi,
0966       emMetHFPhi,
0967       runNo, dataset, "MET i#phi", "DemuxSums/DemMetHFPhi.pdf", 1, 13, 0, 143
0968       );
0969 
0970     // plot demux sum Ht
0971     create_plot(
0972       hwSumHt,
0973       emSumHt,
0974       runNo, dataset, "iH_{T}", "DemuxSums/DemSumHt.pdf", 1, 13, 0, 5000
0975       );
0976 
0977       // plot demux hi tower count
0978     create_plot(
0979       hwHITowerCount,
0980       emHITowerCount,
0981       runNo, dataset, "# Towers", "DemuxSums/DemHITowCount.pdf", 1, 13, 0, 5904
0982       );
0983 
0984     // plot demux sum Mht
0985     create_plot(
0986       hwSumMht,
0987       emSumMht,
0988       runNo, dataset, "iMHT", "DemuxSums/DemSumMht.pdf", 1, 13, 1, 5000
0989       );
0990 
0991     // plot demux sum Mht (with HF)
0992     create_plot(
0993       hwSumMhtHF,
0994       emSumMhtHF,
0995       runNo, dataset, "iMHT", "DemuxSums/DemSumMhtHF.pdf", 1, 13, 1, 5000
0996       );
0997 
0998     // plot demux sum Mht phi
0999     create_plot(
1000       hwMhtPhi,
1001       emMhtPhi,
1002       runNo, dataset, "MHT i#phi", "DemuxSums/DemMhtPhi.pdf", 1, 13, 0, 143
1003       );
1004     
1005     // plot demux sum Mht phi (with HF)
1006     create_plot(
1007       hwMhtHFPhi,
1008       emMhtHFPhi,
1009       runNo, dataset, "MHT i#phi", "DemuxSums/DemMhtHFPhi.pdf", 1, 13, 0, 143
1010       );
1011 
1012     // plot demux sum Centrality
1013     create_plot(
1014       hwHICentrality,
1015       emHICentrality,
1016       runNo, dataset, "Centrality", "DemuxSums/DemSumCentrality.pdf", 1, 13, 0, 300
1017       );
1018 
1019     // plot demux sum Et Asym
1020     create_plot(
1021       hwEtAsymSum,
1022       emEtAsymSum,
1023       runNo, dataset, "iE_{T} Asym", "DemuxSums/DemSumEtAsym.pdf", 1, 13, 0, 300
1024       );
1025 
1026     // plot demux sum Ht Asym
1027     create_plot(
1028       hwHtAsymSum,
1029       emHtAsymSum,
1030       runNo, dataset, "iH_{T} Asym", "DemuxSums/DemSumHtAsym.pdf", 1, 13, 0, 300
1031       );
1032 
1033     // plot demux sum Et Asym HF
1034     create_plot(
1035       hwEtAsymSumHF,
1036       emEtAsymSumHF,
1037       runNo, dataset, "iE_{T} Asym", "DemuxSums/DemSumEtAsymHF.pdf", 1, 13, 0, 300
1038       );
1039 
1040     // plot demux sum Ht Asym HF
1041     create_plot(
1042       hwHtAsymSumHF,
1043       emHtAsymSumHF,
1044       runNo, dataset, "iH_{T} Asym", "DemuxSums/DemSumHtAsymHF.pdf", 1, 13, 0, 300
1045       );
1046 
1047     
1048 
1049 
1050 
1051   }
1052 // ========================= demux sums end ========================
1053 
1054 // ======================== e/gamma start ======================
1055 
1056 // plot MP e/g Et
1057   create_plot(
1058     hwMPEgEt,
1059     emMPEgEt,
1060     runNo, dataset, "e/#gamma iE_{T}", "Egs/EgEt.pdf", 1, 13, 0, 1000
1061     );
1062 
1063 // plot MP e/g eta
1064   create_plot(
1065     hwMPEgEta,
1066     emMPEgEta,
1067     runNo, dataset, "e/#gamma i#eta", "Egs/EgEta.pdf"
1068     );
1069   
1070 // plot MP e/g phi
1071   create_plot(
1072     hwMPEgPhi,
1073     emMPEgPhi,
1074     runNo, dataset, "e/#gamma i#phi", "Egs/EgPhi.pdf"
1075     );
1076 
1077 
1078   // plot MP e/g iso
1079   create_plot(
1080     hwMPEgIso,
1081     emMPEgIso,
1082     runNo, dataset, "e/#gamma i#iso", "Egs/EgIso.pdf"
1083     );
1084 
1085 
1086 
1087 // plot demux e/g Et
1088   create_plot(
1089     hwEgEt,
1090     emEgEt,
1091     runNo, dataset, "e/#gamma iE_{T}", "DemuxEgs/EgEt.pdf", 1, 13, 0, 1000
1092     );
1093 
1094 // plot demux e/g eta
1095   create_plot(
1096     hwEgEta,
1097     emEgEta,
1098     runNo, dataset, "e/#gamma i#eta", "DemuxEgs/EgEta.pdf"
1099     );
1100 
1101 // plot demux e/g phi
1102   create_plot(
1103     hwEgPhi,
1104     emEgPhi,
1105     runNo, dataset, "e/#gamma i#phi", "DemuxEgs/EgPhi.pdf"
1106     );
1107 
1108   // plot demux e/g iso
1109   create_plot(
1110     hwEgIso,
1111     emEgIso,
1112     runNo, dataset, "e/#gamma i#iso", "DemuxEgs/EgIso.pdf"
1113     );
1114 
1115 
1116 // ======================== e/gamma end ========================
1117 
1118 // ========================= tau start =========================
1119 
1120 // plot MP tau Et
1121   create_plot(
1122     hwMPTauEt,
1123     emMPTauEt,
1124     runNo, dataset, "#tau iE_{T}", "Taus/TauEt.pdf", 1, 13, 0, 1500
1125     );
1126 
1127 // plot MP tau eta
1128   create_plot(
1129     hwMPTauEta,
1130     emMPTauEta,
1131     runNo, dataset, "#tau i#eta", "Taus/TauEta.pdf"
1132     );
1133 
1134 // plot MP tau phi
1135   create_plot(
1136     hwMPTauPhi,
1137     emMPTauPhi,
1138     runNo, dataset, "#tau i#phi", "Taus/TauPhi.pdf"
1139     );
1140   
1141 // plot demux tau Et
1142   create_plot(
1143     hwTauEt,
1144     emTauEt,
1145     runNo, dataset, "#tau iE_{T}", "DemuxTaus/TauEt.pdf", 1, 13, 0, 1500
1146     );
1147 
1148 // plot demux tau eta
1149   create_plot(
1150     hwTauEta,
1151     emTauEta,
1152     runNo, dataset, "#tau i#eta", "DemuxTaus/TauEta.pdf"
1153     );
1154   
1155 // plot demux tau phi
1156   create_plot(
1157     hwTauPhi,
1158     emTauPhi,
1159     runNo, dataset, "#tau i#phi", "DemuxTaus/TauPhi.pdf"
1160     );
1161 // ========================== tau end ==========================--------------
1162 
1163 };