Index: modules/PdgCodeFilter.cc
===================================================================
--- modules/PdgCodeFilter.cc	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/PdgCodeFilter.cc	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -19,5 +19,5 @@
 /** \class PdgCodeFilter
  *
- *  Removes particles with specific pdg codes 
+ *  Removes particles with specific PDG codes
  *
  *  \author M. Selvaggi
@@ -40,5 +40,5 @@
 #include "TRandom3.h"
 #include "TObjArray.h"
-//#include "TDatabasePDG.h"
+#include "TDatabasePDG.h"
 #include "TLorentzVector.h"
 
@@ -67,8 +67,8 @@
 void PdgCodeFilter::Init()
 {
-  
+
   ExRootConfParam param;
   Size_t i, size;
-  
+
   // PT threshold
   fPTMin = GetDouble("PTMin", 0.0);
@@ -77,10 +77,10 @@
   fInputArray = ImportArray(GetString("InputArray", "Delphes/allParticles"));
   fItInputArray = fInputArray->MakeIterator();
- 
+
   param = GetParam("PdgCode");
   size = param.GetSize();
 
   // read PdgCodes to be filtered out from the data card
- 
+
   fPdgCodes.clear();
   for(i = 0; i < size; ++i)
@@ -88,5 +88,5 @@
     fPdgCodes.push_back(param[i].GetInt());
   }
-  
+
   // create output array
   fOutputArray = ExportArray(GetString("OutputArray", "filteredParticles"));
@@ -115,11 +115,11 @@
     const TLorentzVector &candidateMomentum = candidate->Momentum;
     pt = candidateMomentum.Pt();
-    
+
     pass = kTRUE;
 
-    if( pt < fPTMin ) pass = kFALSE;
-    if( find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end() ) pass = kFALSE;
+    if(pt < fPTMin) pass = kFALSE;
+    if(find(fPdgCodes.begin(), fPdgCodes.end(), pdgCode) != fPdgCodes.end()) pass = kFALSE;
 
-    if (pass) fOutputArray->Add(candidate);
+    if(pass) fOutputArray->Add(candidate);
   }
 }
Index: modules/PdgCodeFilter.h
===================================================================
--- modules/PdgCodeFilter.h	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/PdgCodeFilter.h	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -24,5 +24,5 @@
 /** \class Efficiency
  *
- *  Removes particles with specific pdg codes 
+ *  Removes particles with specific pdg codes
   *
  *  \author M. Selvaggi
@@ -50,6 +50,6 @@
 
   Double_t fPTMin; //!
-  
-  std::vector<Int_t> fPdgCodes; 
+
+  std::vector<Int_t> fPdgCodes;
 
   TIterator *fItInputArray; //!
Index: modules/PileUpJetID.cc
===================================================================
--- modules/PileUpJetID.cc	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/PileUpJetID.cc	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -16,4 +16,5 @@
  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 
 /** \class PileUpJetID
@@ -53,5 +54,5 @@
 
 PileUpJetID::PileUpJetID() :
-  fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0) 
+  fItJetInputArray(0),fTrackInputArray(0),fNeutralInputArray(0),fItVertexInputArray(0)
 {
 
@@ -85,13 +86,13 @@
   fNeutralInputArray = ImportArray(GetString("NeutralInputArray", "Calorimeter/eflowTowers"));
   fItNeutralInputArray = fNeutralInputArray->MakeIterator();
-  
+
   fVertexInputArray = ImportArray(GetString("VertexInputArray", "PileUpMerger/vertices"));
   fItVertexInputArray = fVertexInputArray->MakeIterator();
-  
+
   fZVertexResolution  = GetDouble("ZVertexResolution", 0.005)*1.0E3;
-// create output array(s)
+
+  // create output array(s)
 
   fOutputArray = ExportArray(GetString("OutputArray", "jets"));
-
 }
 
@@ -100,10 +101,8 @@
 void PileUpJetID::Finish()
 {
-
   if(fItJetInputArray) delete fItJetInputArray;
   if(fItTrackInputArray) delete fItTrackInputArray;
   if(fItNeutralInputArray) delete fItNeutralInputArray;
   if(fItVertexInputArray) delete fItVertexInputArray;
-
 }
 
@@ -114,10 +113,13 @@
   Candidate *candidate, *constituent;
   TLorentzVector momentum, area;
-  Double_t zvtx=0;
-
-  Candidate *trk;
-
- // find z position of primary vertex
-   
+  Int_t i, nc, nn;
+  Double_t sumpt, sumptch, sumptchpv, sumptchpu, sumdrsqptsq, sumptsq;
+  Double_t dr, pt, pt_ann[5];
+  Double_t zvtx = 0.0;
+
+  Candidate *track;
+
+  // find z position of primary vertex
+
   fItVertexInputArray->Reset();
   while((candidate = static_cast<Candidate*>(fItVertexInputArray->Next())))
@@ -125,6 +127,6 @@
     if(!candidate->IsPU)
     {
-    zvtx = candidate->Position.Z();
-    break;
+      zvtx = candidate->Position.Z();
+      break;
     }
   }
@@ -137,110 +139,145 @@
     area = candidate->Area;
 
-    float sumpt = 0.;
-    float sumptch = 0.;
-    float sumptchpv = 0.;
-    float sumptchpu = 0.;
-    float sumdrsqptsq = 0.;
-    float sumptsq = 0.;
-    int nc = 0;
-    int nn = 0;
-    float pt_ann[5];
-
-    for (int i = 0 ; i < 5 ; i++) {
-      pt_ann[i] = 0.;
-    }
-
-    if (fUseConstituents) {
+    sumpt = 0.0;
+    sumptch = 0.0;
+    sumptchpv = 0.0;
+    sumptchpu = 0.0;
+    sumdrsqptsq = 0.0;
+    sumptsq = 0.0;
+    nc = 0;
+    nn = 0;
+
+    for(i = 0; i < 5; ++i)
+    {
+      pt_ann[i] = 0.0;
+    }
+
+    if(fUseConstituents)
+    {
       TIter itConstituents(candidate->GetCandidates());
-      while((constituent = static_cast<Candidate*>(itConstituents.Next()))) {
-        float pt = constituent->Momentum.Pt();
-        float dr = candidate->Momentum.DeltaR(constituent->Momentum);
+      while((constituent = static_cast<Candidate*>(itConstituents.Next())))
+      {
+        pt = constituent->Momentum.Pt();
+        dr = candidate->Momentum.DeltaR(constituent->Momentum);
         sumpt += pt;
         sumdrsqptsq += dr*dr*pt*pt;
         sumptsq += pt*pt;
-        if (constituent->Charge == 0) {
-	  // neutrals
-	  nn++;
-	} else {
-	  // charged
-	  if (constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution) {
-	    sumptchpu += pt;
-	  } else {
-	    sumptchpv += pt;
-	  }
-	  sumptch += pt;
-	  nc++;
-	}
-	for (int i = 0 ; i < 5 ; i++) {
-	  if (dr > 0.1*i && dr < 0.1*(i+1)) {
-	    pt_ann[i] += pt;
-	  }
-	}
-      }
-    } else {
+        if(constituent->Charge == 0)
+        {
+          // neutrals
+          ++nn;
+        }
+        else
+        {
+          // charged
+          if(constituent->IsPU && TMath::Abs(constituent->Position.Z()-zvtx) > fZVertexResolution)
+          {
+            sumptchpu += pt;
+          }
+          else
+          {
+            sumptchpv += pt;
+          }
+          sumptch += pt;
+          ++nc;
+        }
+        for(i = 0; i < 5; ++i)
+        {
+          if(dr > 0.1*i && dr < 0.1*(i + 1))
+          {
+            pt_ann[i] += pt;
+          }
+        }
+      }
+    }
+    else
+    {
       // Not using constituents, using dr
       fItTrackInputArray->Reset();
-       while ((trk = static_cast<Candidate*>(fItTrackInputArray->Next()))) {
-	if (trk->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
-	  float pt = trk->Momentum.Pt();
-	  sumpt += pt;
-	  sumptch += pt;
-	  if (trk->IsPU && TMath::Abs(trk->Position.Z()-zvtx) > fZVertexResolution) {
-	    sumptchpu += pt;
-	  } else {
-	    sumptchpv += pt;
-	  }
-	  float dr = candidate->Momentum.DeltaR(trk->Momentum);
-	  sumdrsqptsq += dr*dr*pt*pt;
-	  sumptsq += pt*pt;
-	  nc++;
-	  for (int i = 0 ; i < 5 ; i++) {
-	    if (dr > 0.1*i && dr < 0.1*(i+1)) {
+      while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
+      {
+        if(track->Momentum.DeltaR(candidate->Momentum) < fParameterR)
+        {
+          pt = track->Momentum.Pt();
+          sumpt += pt;
+          sumptch += pt;
+          if(track->IsPU && TMath::Abs(track->Position.Z()-zvtx) > fZVertexResolution)
+          {
+            sumptchpu += pt;
+          }
+          else
+          {
+            sumptchpv += pt;
+          }
+          dr = candidate->Momentum.DeltaR(track->Momentum);
+          sumdrsqptsq += dr*dr*pt*pt;
+          sumptsq += pt*pt;
+          nc++;
+          for(i = 0; i < 5; ++i)
+          {
+            if(dr > 0.1*i && dr < 0.1*(i + 1))
+            {
               pt_ann[i] += pt;
-	    }
-	  }
-	}
-      }
+            }
+          }
+        }
+      }
+
       fItNeutralInputArray->Reset();
-      while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next()))) {
-	if (constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR) {
-	  float pt = constituent->Momentum.Pt();
-	  sumpt += pt;
-	  float dr = candidate->Momentum.DeltaR(constituent->Momentum);
-	  sumdrsqptsq += dr*dr*pt*pt;
-	  sumptsq += pt*pt;
-	  nn++;
-	  for (int i = 0 ; i < 5 ; i++) {
-	    if (dr > 0.1*i && dr < 0.1*(i+1)) {
-	      pt_ann[i] += pt;
-	    }
-	  }
-	}
-      }
-    }
-          
-    if (sumptch > 0.) {
+      while ((constituent = static_cast<Candidate*>(fItNeutralInputArray->Next())))
+      {
+        if(constituent->Momentum.DeltaR(candidate->Momentum) < fParameterR)
+        {
+          pt = constituent->Momentum.Pt();
+          sumpt += pt;
+          dr = candidate->Momentum.DeltaR(constituent->Momentum);
+          sumdrsqptsq += dr*dr*pt*pt;
+          sumptsq += pt*pt;
+          nn++;
+          for(i = 0; i < 5; ++i)
+          {
+            if(dr > 0.1*i && dr < 0.1*(i + 1))
+            {
+              pt_ann[i] += pt;
+            }
+          }
+        }
+      }
+    }
+
+    if(sumptch > 0.0)
+    {
       candidate->Beta = sumptchpu/sumptch;
       candidate->BetaStar = sumptchpv/sumptch;
-    } else {
-      candidate->Beta = -999.;
-      candidate->BetaStar = -999.;
-    }
-    if (sumptsq > 0.) {
+    }
+    else
+    {
+      candidate->Beta = -999.0;
+      candidate->BetaStar = -999.0;
+    }
+    if(sumptsq > 0.0)
+    {
       candidate->MeanSqDeltaR = sumdrsqptsq/sumptsq;
-    } else {
-      candidate->MeanSqDeltaR = -999.;
+    }
+    else
+    {
+      candidate->MeanSqDeltaR = -999.0;
     }
     candidate->NCharged = nc;
     candidate->NNeutrals = nn;
-    if (sumpt > 0.) {
+    if(sumpt > 0.0)
+    {
       candidate->PTD = TMath::Sqrt(sumptsq) / sumpt;
-      for (int i = 0 ; i < 5 ; i++) {
+      for(i = 0; i < 5; ++i)
+      {
         candidate->FracPt[i] = pt_ann[i]/sumpt;
       }
-    } else {
-      candidate->PTD = -999.;
-      for (int i = 0 ; i < 5 ; i++) {
-        candidate->FracPt[i] = -999.;
+    }
+    else
+    {
+      candidate->PTD = -999.0;
+      for(i = 0; i < 5; ++i)
+      {
+        candidate->FracPt[i] = -999.0;
       }
     }
Index: modules/PileUpJetID.h
===================================================================
--- modules/PileUpJetID.h	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/PileUpJetID.h	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -54,5 +54,5 @@
   // If set to false, uses everything within dR < fParameterR even if in other jets &c.
   // Results should be very similar for PF
-  Int_t fUseConstituents; 
+  Int_t fUseConstituents;
 
   Bool_t fAverageEachTower;
@@ -62,12 +62,12 @@
   const TObjArray *fJetInputArray; //!
 
-  const TObjArray *fTrackInputArray; // SCZ
-  const TObjArray *fNeutralInputArray; 
+  const TObjArray *fTrackInputArray; //!
+  const TObjArray *fNeutralInputArray; //!
 
-  TIterator *fItTrackInputArray; // SCZ
-  TIterator *fItNeutralInputArray; // SCZ
+  TIterator *fItTrackInputArray; //!
+  TIterator *fItNeutralInputArray; //!
 
   TObjArray *fOutputArray; //!
-  
+
   TIterator *fItVertexInputArray; //!
   const TObjArray *fVertexInputArray; //!
Index: modules/TimeSmearing.cc
===================================================================
--- modules/TimeSmearing.cc	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/TimeSmearing.cc	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -44,5 +44,5 @@
 #include "TLorentzVector.h"
 
-#include <algorithm> 
+#include <algorithm>
 #include <stdexcept>
 #include <iostream>
@@ -95,5 +95,5 @@
   Double_t t;
   const Double_t c_light = 2.99792458E8;
-  
+
   fItInputArray->Reset();
   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
@@ -101,14 +101,14 @@
     const TLorentzVector &candidatePosition = candidate->Position;
     t = candidatePosition.T()*1.0E-3/c_light;
-    
+
     // apply smearing formula
     t = gRandom->Gaus(t, fTimeResolution);
-   
+
     mother = candidate;
     candidate = static_cast<Candidate*>(candidate->Clone());
     candidate->Position.SetT(t*1.0E3*c_light);
-    
+
     candidate->AddCandidate(mother);
-        
+
     fOutputArray->Add(candidate);
   }
Index: modules/TimeSmearing.h
===================================================================
--- modules/TimeSmearing.h	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/TimeSmearing.h	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -47,9 +47,9 @@
 
   Double_t fTimeResolution;
- 
+
   TIterator *fItInputArray; //!
 
   const TObjArray *fInputArray; //!
-  
+
   TObjArray *fOutputArray; //!
 
Index: modules/TrackCountingBTagging.cc
===================================================================
--- modules/TrackCountingBTagging.cc	(revision 406b698c06fe4f407ae1b22d74541e35189553af)
+++ modules/TrackCountingBTagging.cc	(revision 6cdc54470274fdee284ecc79aaf78770417fd72c)
@@ -65,10 +65,10 @@
   fBitNumber = GetInt("BitNumber", 0);
 
-  fPtMin     = GetDouble("TrackPtMin", 1.0);
-  fDeltaR    = GetDouble("DeltaR", 0.3);
-  fIPmax     = GetDouble("TrackIPMax", 2.0);
+  fPtMin = GetDouble("TrackPtMin", 1.0);
+  fDeltaR = GetDouble("DeltaR", 0.3);
+  fIPmax = GetDouble("TrackIPMax", 2.0);
 
-  fSigMin    = GetDouble("SigMin", 6.5);
-  fNtracks   = GetInt("Ntracks", 3);
+  fSigMin = GetDouble("SigMin", 6.5);
+  fNtracks = GetInt("Ntracks", 3);
 
   // import input array(s)
@@ -124,16 +124,16 @@
       tpy = trkMomentum.Py();
 
-      xd   = track->Xd;
-      yd   = track->Yd;
-      dxy  = TMath::Abs(track->Dxy);
+      xd = track->Xd;
+      yd = track->Yd;
+      dxy = TMath::Abs(track->Dxy);
       ddxy = track->SDxy;
 
       if(tpt < fPtMin) continue;
-      if(dr  > fDeltaR) continue;
+      if(dr > fDeltaR) continue;
       if(dxy > fIPmax) continue;
 
-      sign  = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
+      sign = (jpx*xd + jpy*yd > 0.0) ? 1 : -1;
 
-      ip  = sign*dxy;
+      ip = sign*dxy;
       sip = ip / TMath::Abs(ddxy);
 
