Index: examples/CaloGrid.cpp
===================================================================
--- examples/CaloGrid.cpp	(revision b5e258352d17f7697a71a9a43b97dc5a8532b2de)
+++ examples/CaloGrid.cpp	(revision 341014c3f3bd3259d845de52bde54ba6c3b4ed08)
@@ -1,22 +1,22 @@
 //calorimeter grid
+#include <algorithm>
+#include <cassert>
+#include <iostream>
+#include <map>
 #include <set>
-#include <map>
+#include <sstream>
 #include <utility>
 #include <vector>
-#include <algorithm>
-#include <sstream>
-#include <iostream>
-#include <cassert>
 
+#include "ExRootAnalysis/ExRootConfReader.h"
+#include "classes/DelphesClasses.h"
 #include "display/Delphes3DGeometry.h"
-#include "classes/DelphesClasses.h"
-#include "ExRootAnalysis/ExRootConfReader.h"
 
 #include "TCanvas.h"
-#include "TStyle.h"
-#include "TString.h"
-#include "TText.h"
 #include "TH2F.h"
 #include "TLine.h"
+#include "TString.h"
+#include "TStyle.h"
+#include "TText.h"
 
 using namespace std;
@@ -28,10 +28,10 @@
 {
 
- if(argc !=3)
- {
-  cout << " Usage: ./CaloGrid [detector card] [calo name]"<<endl;
-  cout<< "Example: ./CaloGrid cards/delphes_card_CMS.tcl ECal" <<endl;
-  return 0;
- }
+  if(argc != 3)
+  {
+    cout << " Usage: ./CaloGrid [detector card] [calo name]" << endl;
+    cout << "Example: ./CaloGrid cards/delphes_card_CMS.tcl ECal" << endl;
+    return 0;
+  }
 
   TString card(argv[1]);
@@ -39,25 +39,25 @@
   ExRootConfReader *confReader = new ExRootConfReader;
   confReader->ReadFile(card);
-  
+
   std::vector<std::string> calorimeters_;
-  std::map<std::string, std::set< std::pair<Double_t, Int_t> > > caloBinning_;
-   
+  std::map<std::string, std::set<std::pair<Double_t, Int_t>>> caloBinning_;
+
   std::string s(argv[2]);
-  std::replace( s.begin(), s.end(), ',', ' ' );
-  std::istringstream stream( s );
+  std::replace(s.begin(), s.end(), ',', ' ');
+  std::istringstream stream(s);
   std::string word;
-  while (stream >> word) calorimeters_.push_back(word);
+  while(stream >> word) calorimeters_.push_back(word);
 
-  caloBinning_.clear();								// calo binning
+  caloBinning_.clear(); // calo binning
 
-  TCanvas c("","",1600,838);
-   
-  gPad->SetLeftMargin(0.16) ; 
-  gPad->SetTopMargin(0.16) ; 
-  gPad->SetBottomMargin(0.20) ; 
+  TCanvas c("", "", 1600, 838);
+
+  gPad->SetLeftMargin(0.16);
+  gPad->SetTopMargin(0.16);
+  gPad->SetBottomMargin(0.20);
   gStyle->SetOptStat(0000000);
-  
+
   gStyle->SetTextFont(132);
-   
+
   TH2F h2("h2", "", 1, -6, 6, 1, 0, 6.28);
 
@@ -71,87 +71,81 @@
   h2.GetYaxis()->SetLabelFont(132);
 
-  h2.GetXaxis()->SetTitleOffset(1.4) ;
-  h2.GetYaxis()->SetTitleOffset(1.1) ;
-  h2.GetXaxis()->SetLabelOffset(0.02) ;
-  h2.GetYaxis()->SetLabelOffset(0.02) ;
-  h2.GetXaxis()->SetTitleSize(0.06) ;
-  h2.GetYaxis()->SetTitleSize(0.06) ;
-  h2.GetXaxis()->SetLabelSize(0.06) ;
-  h2.GetYaxis()->SetLabelSize(0.06) ;
- 
-  h2.GetXaxis()->SetTickLength(0.0) ;
-  h2.GetYaxis()->SetTickLength(0.0) ;
+  h2.GetXaxis()->SetTitleOffset(1.4);
+  h2.GetYaxis()->SetTitleOffset(1.1);
+  h2.GetXaxis()->SetLabelOffset(0.02);
+  h2.GetYaxis()->SetLabelOffset(0.02);
+  h2.GetXaxis()->SetTitleSize(0.06);
+  h2.GetYaxis()->SetTitleSize(0.06);
+  h2.GetXaxis()->SetLabelSize(0.06);
+  h2.GetYaxis()->SetLabelSize(0.06);
 
-  
-  h2.Draw();  
-  
-   // fake loop just keeping it for convenience right now
-  for(std::vector<std::string>::const_iterator calo=calorimeters_.begin();calo!=calorimeters_.end(); ++calo) {
- 
+  h2.GetXaxis()->SetTickLength(0.0);
+  h2.GetYaxis()->SetTickLength(0.0);
+
+  h2.Draw();
+
+  // fake loop just keeping it for convenience right now
+  for(std::vector<std::string>::const_iterator calo = calorimeters_.begin(); calo != calorimeters_.end(); ++calo)
+  {
+
     //first entry is eta bin, second is number of phi bins
-    set< pair<Double_t, Int_t> > caloBinning;
+    set<pair<Double_t, Int_t>> caloBinning;
     ExRootConfParam paramEtaBins, paramPhiBins;
-    ExRootConfParam param = confReader->GetParam(Form("%s::EtaPhiBins",calo->c_str()));
+    ExRootConfParam param = confReader->GetParam(Form("%s::EtaPhiBins", calo->c_str()));
     Int_t size = param.GetSize();
-    
-    for(int i = 0; i < size/2; ++i) {
-      paramEtaBins = param[i*2];
-      paramPhiBins = param[i*2+1];
-      assert(paramEtaBins.GetSize()==1);
-     
-      caloBinning.insert(std::make_pair(paramEtaBins[0].GetDouble(),paramPhiBins.GetSize()-1));
+
+    for(int i = 0; i < size / 2; ++i)
+    {
+      paramEtaBins = param[i * 2];
+      paramPhiBins = param[i * 2 + 1];
+      assert(paramEtaBins.GetSize() == 1);
+
+      caloBinning.insert(std::make_pair(paramEtaBins[0].GetDouble(), paramPhiBins.GetSize() - 1));
     }
     caloBinning_[*calo] = caloBinning;
-  
-  TLine *liney;
-  TLine *linex;
-  
-  //loop over calo binning
-  std::set<std::pair<Double_t, Int_t> >::iterator it;
-  
-  Int_t n = -1;
-  for (it = caloBinning.begin(); it != caloBinning.end(); ++it)
-  {
-    n++;
-    
-    if(debug)cout<<"-----------------------"<<endl;
-    if(debug)cout<<it->first<<","<<it->second<<endl;
-    liney = new TLine(it->first,0,it->first,6.28);
-    liney->SetLineColor(kRed+3);
-    liney->Draw();
-    
-    set<std::pair<Double_t, Int_t> >::iterator it2 = it;
-    it2--; 
-            
-    for(int j = 0; j <= it->second; j++)
+
+    TLine *liney;
+    TLine *linex;
+
+    //loop over calo binning
+    std::set<std::pair<Double_t, Int_t>>::iterator it;
+
+    Int_t n = -1;
+    for(it = caloBinning.begin(); it != caloBinning.end(); ++it)
     {
-      
-      Double_t yval0 = 0 + 6.28 * j / it->second;
-      
-      if(debug) cout<<it2->first<<","<<yval0<<","<<it->first<<","<<yval0<<endl;
-      
-      linex = new TLine(it->first,yval0,it2->first,yval0);
-      linex->SetLineColor(kRed+3);
-      linex->Draw();
-         
-    } 
-    
-  
-  }
-  
-  
+      n++;
+
+      if(debug) cout << "-----------------------" << endl;
+      if(debug) cout << it->first << "," << it->second << endl;
+      liney = new TLine(it->first, 0, it->first, 6.28);
+      liney->SetLineColor(kRed + 3);
+      liney->Draw();
+
+      set<std::pair<Double_t, Int_t>>::iterator it2 = it;
+      it2--;
+
+      for(int j = 0; j <= it->second; j++)
+      {
+
+        Double_t yval0 = 0 + 6.28 * j / it->second;
+
+        if(debug) cout << it2->first << "," << yval0 << "," << it->first << "," << yval0 << endl;
+
+        linex = new TLine(it->first, yval0, it2->first, yval0);
+        linex->SetLineColor(kRed + 3);
+        linex->Draw();
+      }
+    }
   }
 
   TString text = TString(s);
-  TText *th1 = new TText(5.00,6.45,text);
-  th1->SetTextAlign(31); 
-  th1->SetTextFont(132); 
+  TText *th1 = new TText(5.00, 6.45, text);
+  th1->SetTextAlign(31);
+  th1->SetTextFont(132);
   th1->SetTextSize(0.075);
   th1->Draw();
 
-
   TString output = TString(s);
-  c.Print(output+".png","png");
-  c.Print(output+".pdf","pdf");
-  
+  c.Print(output + ".png", "png");
+  c.Print(output + ".pdf", "pdf");
 }
Index: examples/Example1.cpp
===================================================================
--- examples/Example1.cpp	(revision b5e258352d17f7697a71a9a43b97dc5a8532b2de)
+++ examples/Example1.cpp	(revision 341014c3f3bd3259d845de52bde54ba6c3b4ed08)
@@ -17,28 +17,27 @@
  */
 
-
 #include <iostream>
 #include <utility>
 #include <vector>
 
+#include "TApplication.h"
 #include "TROOT.h"
 #include "TSystem.h"
-#include "TApplication.h"
 
 #include "TString.h"
 
+#include "TClonesArray.h"
 #include "TH2.h"
 #include "THStack.h"
 #include "TLegend.h"
+#include "TLorentzVector.h"
 #include "TPaveText.h"
-#include "TClonesArray.h"
-#include "TLorentzVector.h"
 
 #include "classes/DelphesClasses.h"
 
+#include "ExRootAnalysis/ExRootResult.h"
+#include "ExRootAnalysis/ExRootTreeBranch.h"
 #include "ExRootAnalysis/ExRootTreeReader.h"
 #include "ExRootAnalysis/ExRootTreeWriter.h"
-#include "ExRootAnalysis/ExRootTreeBranch.h"
-#include "ExRootAnalysis/ExRootResult.h"
 #include "ExRootAnalysis/ExRootUtilities.h"
 
@@ -72,13 +71,10 @@
   TString inputFile(argv[1]);
 
-//------------------------------------------------------------------------------
+  //------------------------------------------------------------------------------
 
-// Here you call your macro's main function
+  // Here you call your macro's main function
 
   Example1(inputFile);
 
-//------------------------------------------------------------------------------
-
+  //------------------------------------------------------------------------------
 }
-
-
