diff --git a/examples/compclustedep.C b/examples/compclustedep.C
index c251ae614d23f1440cbde67db14b2fb3e9192027..cacb8cb80561e70848c905b1613a181718adc7f3 100644
--- a/examples/compclustedep.C
+++ b/examples/compclustedep.C
@@ -15,7 +15,7 @@ void compclustedep(Int_t run)
     h1 = h414;   //edep
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Edep", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Edep", 1000, 667);
 
   gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void compclustedep(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Edep differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Edep differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void compclustedep(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/compclustepr.C b/examples/compclustepr.C
index 97bc64a8c0a3eb80930398aaa5d8904b206b031e..aaebd8d9729656bda1fc6ae020d04396068be23b 100644
--- a/examples/compclustepr.C
+++ b/examples/compclustepr.C
@@ -15,7 +15,7 @@ void compclustepr(Int_t run)
     h1 = h415;   //edep
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Eprsh", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Eprsh", 1000, 667);
 
   gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void compclustepr(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Eprsh differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Eprsh differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void compclustepr(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/compclustsize.C b/examples/compclustsize.C
index 4707a0d3a2d17a11a1b71a184628f541d35187e0..d04e1502c802fd2d2d72a727e7e109576cb98059 100644
--- a/examples/compclustsize.C
+++ b/examples/compclustsize.C
@@ -15,7 +15,7 @@ void compclustsize(Int_t run)
     h1 = h413;   //mult
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster size", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster size", 1000, 667);
 
   gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void compclustsize(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Size differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Size differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void compclustsize(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/compclustx.C b/examples/compclustx.C
index 1fe40d6aaf11421876cbb3b812ac10afe26638ad..217fdf608f29ec2e5dc9bb5c11113ba81e795b00 100644
--- a/examples/compclustx.C
+++ b/examples/compclustx.C
@@ -15,7 +15,7 @@ void compclustx(Int_t run)
     h1 = h416;   //X
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667);
 
   gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void compclustx(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "X differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "X differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void compclustx(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/compedeps.C b/examples/compedeps.C
index 737957aacb3ddd8614746d9a7995f9fd5c3d2857..e6869c25545949f48dfbb3b92b0f162d2132072c 100644
--- a/examples/compedeps.C
+++ b/examples/compedeps.C
@@ -26,7 +26,7 @@ void compedeps(Int_t run)
     h1[3] = h635;   //D
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower raw Edeps", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower raw Edeps", 1000, 667);
   c1->Divide(2, 2);
 
   for (int j = 0; j < 4; j++){
@@ -48,7 +48,7 @@ void compedeps(Int_t run)
   // Difference between the histograms.
   //
 
-  TCanvas *c2 = new TCanvas("c2", "Edep histogram differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Edep histogram differences", 1000, 667);
   c2->Divide(2, 2);
 
   TH1F* d[4] = {h[0]->Clone(),h[0]->Clone(),h[0]->Clone(),h[0]->Clone()};
@@ -67,4 +67,4 @@ void compedeps(Int_t run)
     //    gPad->SetLogy();
   }
 
-} 
+}
diff --git a/examples/compgoldenenorm.C b/examples/compgoldenenorm.C
index 5cc16b6b2cb1eac970988a4be65f6ddaa628bc54..f427d155fdc62c0518c48e79acb30363f1c404dc 100644
--- a/examples/compgoldenenorm.C
+++ b/examples/compgoldenenorm.C
@@ -47,7 +47,7 @@ void compgoldenenorm(Int_t run=52949)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
   c1->cd(2);
@@ -62,4 +62,4 @@ void compgoldenenorm(Int_t run=52949)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comphh.C b/examples/comphh.C
index f8a2ba7ea2f006488abed6f8e6727955df7f9ecd..3068a55899ad3e8e83ebfd590b065035bfa03bd6 100644
--- a/examples/comphh.C
+++ b/examples/comphh.C
@@ -3,7 +3,7 @@ void comphh(Int_t run, TH1F* h1, TH1F* h2)
   TFile* f = new TFile(Form("hodtest_%d.root",run));
   cout << "hcana root file " << Form("hodtest_%d.root",run) << endl;
 
-  TCanvas *c1 = new TCanvas("c1", "h1 vs h2", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "h1 vs h2", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -27,10 +27,10 @@ void comphh(Int_t run, TH1F* h1, TH1F* h2)
   l.DrawLatex(xt,0.65*maxy,"h1");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"h2");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Epr differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Epr differences", 1000, 667);
 
   TH1F* dif = h2->Clone();
 
@@ -42,4 +42,4 @@ void comphh(Int_t run, TH1F* h1, TH1F* h2)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/compnclusts.C b/examples/compnclusts.C
index 2f16142e2e3bf1d91cc3f007933a70a104bebe60..57acfb2fc71c5697f07970ff4238800b5afb5ed2 100644
--- a/examples/compnclusts.C
+++ b/examples/compnclusts.C
@@ -15,7 +15,7 @@ void compnclusts(Int_t run)
     h1 = h412;   //hnclusters
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Cluster Map", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Cluster Map", 1000, 667);
 
   gPad->SetLogy();
 
@@ -40,10 +40,10 @@ void compnclusts(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Cluster differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Cluster differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -56,4 +56,4 @@ void compnclusts(Int_t run)
   dif->SetFillStyle(1111);
   dif->Draw();
 
-} 
+}
diff --git a/examples/compnhits.C b/examples/compnhits.C
index b30f829f4da4d6d4e7a68b1914e5463e0f755543..4068a29d639d8eb646951c472774288970a68414 100644
--- a/examples/compnhits.C
+++ b/examples/compnhits.C
@@ -15,7 +15,7 @@ void compnhits(Int_t run)
     h1 = h411;   //hnhits
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Sparsified Hit Map", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Sparsified Hit Map", 1000, 667);
 
   gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void compnhits(Int_t run)
   l.DrawLatex(xt,0.095*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Hit differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Hit differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void compnhits(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comprawhits.C b/examples/comprawhits.C
index a88b4b16513a877539e082f2eac15befdc921fc1..eb06510ad47ae6856d42d379803fe5cac0bd6a9e 100644
--- a/examples/comprawhits.C
+++ b/examples/comprawhits.C
@@ -31,7 +31,7 @@ void comprawhits(Int_t run)
     h1[5] = h216;   //D+
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Hit Maps", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Hit Maps", 1000, 667);
   c1->Divide(2, 3);
 
   for (int j = 0; j < 6; j++){
@@ -39,7 +39,7 @@ void comprawhits(Int_t run)
     h[j]->SetFillColor(kGreen);
     h[j]->SetFillStyle(3345);
     h[j]->Draw();
-    
+
     h1[j]->SetFillColor(kBlue);
     h1[j]->SetFillStyle(3354);
     h1[j]->Draw("same");
@@ -65,4 +65,4 @@ void comprawhits(Int_t run)
     dif->Draw();
   }
 
-} 
+}
diff --git a/examples/comptrackedep.C b/examples/comptrackedep.C
index d9ae5997b7b19eaa913a6db16c11997dba74331e..0a9c66c89fe021717d040339242c795c25a08d23 100644
--- a/examples/comptrackedep.C
+++ b/examples/comptrackedep.C
@@ -15,7 +15,7 @@ void comptrackedep(Int_t run)
     h1 = h420;   //edep
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower 1 track cluster Edep", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower 1 track cluster Edep", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void comptrackedep(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Edep differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Edep differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void comptrackedep(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comptrackedepcor.C b/examples/comptrackedepcor.C
index fbed4f46857d78ca64dadf18c96dc0b8d9e179a2..4cefbb7edfa83a41570a74ac4d8e3ee8256378ae 100644
--- a/examples/comptrackedepcor.C
+++ b/examples/comptrackedepcor.C
@@ -43,7 +43,7 @@ void comptrackedepcor(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
   c1->cd(2);
@@ -58,4 +58,4 @@ void comptrackedepcor(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comptrackepr.C b/examples/comptrackepr.C
index a02a6e1d5cf88158e35d62694ab39e6bb76ae179..320a3492449cdb9b09bf941202731efa83d1d776 100644
--- a/examples/comptrackepr.C
+++ b/examples/comptrackepr.C
@@ -15,7 +15,7 @@ void comptrackepr(Int_t run)
     h1 = h421;   //epr
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Edep", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster Edep", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void comptrackepr(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Epr differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Epr differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void comptrackepr(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comptrackeprcor.C b/examples/comptrackeprcor.C
index 099541edbd33b793f2a17803625f0f80f3afd59a..e65cb040dd9f8b808805434736a7f9b0f917abea 100644
--- a/examples/comptrackeprcor.C
+++ b/examples/comptrackeprcor.C
@@ -15,7 +15,7 @@ void comptrackeprcor(Int_t run)
     h1 = h423;   //epr y corrected
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Track 1 Edep (Y-corr.)", 800, 1000); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Track 1 Edep (Y-corr.)", 800, 1000);
 
   c1->Divide(1,2);
 
@@ -43,7 +43,7 @@ void comptrackeprcor(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
   c1->cd(2);
@@ -58,4 +58,4 @@ void comptrackeprcor(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comptrackx.C b/examples/comptrackx.C
index c67aac2cae708bde04427bdc0a1537c2ab8858a3..637629b635c5183ca6f41e57d300cb16cf4610e9 100644
--- a/examples/comptrackx.C
+++ b/examples/comptrackx.C
@@ -15,7 +15,7 @@ void comptrackx(Int_t run)
     h1 = h417;   //X
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void comptrackx(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.75*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Track X differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Track X differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void comptrackx(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/comptrackxy.C b/examples/comptrackxy.C
index b0c4b910235d62c3c6494858bad0b5a4d4184607..a6cd58afc7dbb342bc197fe7f20596d373383a81 100644
--- a/examples/comptrackxy.C
+++ b/examples/comptrackxy.C
@@ -15,7 +15,7 @@ void comptrackxy(Int_t run)
     h1 = h419;   //Y vs Y
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower Largest cluster X", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -41,10 +41,10 @@ void comptrackxy(Int_t run)
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.045*maxy,"hcana");
   */
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "X differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "X differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -56,4 +56,4 @@ void comptrackxy(Int_t run)
   //  dif->SetLineWidth(1);
   //  dif->SetFillStyle(1111);
   dif->Draw("LEGO2");
-} 
+}
diff --git a/examples/comptracky.C b/examples/comptracky.C
index 554a518b2f99d7e1d915bd438e9e57eb98131ba3..2849c262c84b4ea96ed8864e3fa4d2e2a7ab9b72 100644
--- a/examples/comptracky.C
+++ b/examples/comptracky.C
@@ -15,7 +15,7 @@ void comptracky(Int_t run)
     h1 = h418;   //Y
   }
 
-  TCanvas *c1 = new TCanvas("c1", "Shower track Y", 1000, 667); 
+  TCanvas *c1 = new TCanvas("c1", "Shower track Y", 1000, 667);
 
   //  gPad->SetLogy();
 
@@ -39,10 +39,10 @@ void comptracky(Int_t run)
   l.DrawLatex(xt,0.65*maxy,"Engine");
   l.SetTextColor(kBlue);
   l.DrawLatex(xt,0.755*maxy,"hcana");
-    
+
   // Difference between the histograms.
 
-  TCanvas *c2 = new TCanvas("c2", "Hcal Y differences", 1000, 667); 
+  TCanvas *c2 = new TCanvas("c2", "Hcal Y differences", 1000, 667);
 
   TH1F* dif = h->Clone();
 
@@ -54,4 +54,4 @@ void comptracky(Int_t run)
   dif->SetLineWidth(1);
   dif->SetFillStyle(1111);
   dif->Draw();
-} 
+}
diff --git a/examples/dcdriftdist_hms.C b/examples/dcdriftdist_hms.C
index ca6023ec9fee30e60634411b5f0813e6098bb1a2..03c1fb552862f3d03bba5fc7ac3194865b234391 100644
--- a/examples/dcdriftdist_hms.C
+++ b/examples/dcdriftdist_hms.C
@@ -1,7 +1,7 @@
  {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Drift Distance", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Drift Distance", 800, 800);
   c1->Divide(2, 6);
 
   TH1F* h[12];
@@ -18,7 +18,7 @@
   h[9] = hdc2v1_dd;
   h[10] = hdc2y2_dd;
   h[11] = hdc2x2_dd;
-  
+
   for(Int_t ih=0;ih<12;ih++) {
     Int_t ipad = 2*(ih%6)+1 + ih/6;
     cout << ipad << endl;
diff --git a/examples/dcdriftdist_sos.C b/examples/dcdriftdist_sos.C
index 935be5a2a2b7a994a18f4ac98e37ca229b95c29b..2b698d9999b4a8da59ebaa811dedafee118c646e 100644
--- a/examples/dcdriftdist_sos.C
+++ b/examples/dcdriftdist_sos.C
@@ -1,7 +1,7 @@
  {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Drift Distance", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Drift Distance", 800, 800);
   c1->Divide(2, 6);
 
   TH1F* h[12];
@@ -18,7 +18,7 @@
   h[9] = sdc2x2_dd;
   h[10] = sdc2v1_dd;
   h[11] = sdc2v2_dd;
-  
+
   for(Int_t ih=0;ih<12;ih++) {
     Int_t ipad = 2*(ih%6)+1 + ih/6;
     cout << ipad << endl;
diff --git a/examples/dchitmaps_hms.C b/examples/dchitmaps_hms.C
index c3285011bf6757949179aeef7fe5b88a34aedaa2..aa4987ef1c6a6498ae5dd89e62b9b7b7c9f6101f 100644
--- a/examples/dchitmaps_hms.C
+++ b/examples/dchitmaps_hms.C
@@ -1,7 +1,7 @@
  {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Hit Maps", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Hit Maps", 800, 800);
   c1->Divide(2, 6);
 
   TH1F* h[12];
@@ -18,7 +18,7 @@
   h[9] = hdc2v1_wm;
   h[10] = hdc2y2_wm;
   h[11] = hdc2x2_wm;
-  
+
   for(Int_t ih=0;ih<12;ih++) {
     Int_t ipad = 2*(ih%6)+1 + ih/6;
     cout << ipad << endl;
diff --git a/examples/dchitmaps_sos.C b/examples/dchitmaps_sos.C
index ec7a1d0a8f42caef9bc2444767ca2a6de606f32a..324266c82f13e00c5c92f6cde84cfb4bab6bb07a 100644
--- a/examples/dchitmaps_sos.C
+++ b/examples/dchitmaps_sos.C
@@ -1,7 +1,7 @@
  {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Hit Maps", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Hit Maps", 800, 800);
   c1->Divide(2, 6);
 
   TH1F* h[12];
@@ -18,7 +18,7 @@
   h[9] = sdc2x2_wm;
   h[10] = sdc2v1_wm;
   h[11] = sdc2v2_wm;
-  
+
   for(Int_t ih=0;ih<12;ih++) {
     Int_t ipad = 2*(ih%6)+1 + ih/6;
     cout << ipad << endl;
diff --git a/examples/dcresiduals_hms.C b/examples/dcresiduals_hms.C
index ae860206ec6c0966c2429f67c1108094c0a2536b..0d313008af7c33bbc003137a93450c3f0411c33c 100644
--- a/examples/dcresiduals_hms.C
+++ b/examples/dcresiduals_hms.C
@@ -1,7 +1,7 @@
 {
   TFile* f = new TFile("hodtest.root");
   TTree *T=(TTree*)f->Get("T");
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Residuals", 800, 1000); 
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Residuals", 800, 1000);
   c1->Divide(2,6);
 
   TH1F* h=new TH1F("h", "Residual", 100, -1.0, 1.0);
diff --git a/examples/dcresiduals_sos.C b/examples/dcresiduals_sos.C
index cf2dd5afd2d4d93751bbfa4046c992a1d8b39ef1..6c8f04a1699c2176c6fc0a77101cdaa8b90acf90 100644
--- a/examples/dcresiduals_sos.C
+++ b/examples/dcresiduals_sos.C
@@ -1,7 +1,7 @@
 {
   TFile* f = new TFile("hodtest.root");
   TTree *T=(TTree*)f->Get("T");
-  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Residuals", 800, 1000); 
+  TCanvas *c1 = new TCanvas("c1", "Drift Chamber Residuals", 800, 1000);
   c1->Divide(2,6);
 
   TH1F* h=new TH1F("h", "Residual", 100, -1.0, 1.0);
diff --git a/examples/dctracking.C b/examples/dctracking.C
index 30f728e1caa5dcced54b2f52f92677c775f8d238..3c2b705792657255672ea14c4062915b0c9a43e7 100644
--- a/examples/dctracking.C
+++ b/examples/dctracking.C
@@ -1,7 +1,7 @@
 {
   TFile* f = new TFile("hodtest.root");
   TTree *T=(TTree*)f->Get("T");
-  TCanvas *c1 = new TCanvas("c1", "Drift Tracking", 800, 1000); 
+  TCanvas *c1 = new TCanvas("c1", "Drift Tracking", 800, 1000);
   c1->Divide(2,3);
 
   c1->cd(1);
diff --git a/examples/hhodrawhists.C b/examples/hhodrawhists.C
index 65977004e14fa79c7d066cec3840f36214fdf5e9..bd060b5a103910d3e21034a2c5d69748bb6a8770 100644
--- a/examples/hhodrawhists.C
+++ b/examples/hhodrawhists.C
@@ -43,7 +43,7 @@
 	TString ndata_name = "Ndata."+base_name+"pad";
 	TString padlist_name = base_name+"pad";
 	TString vallist_name = base_name+"val";
-	
+
 	// Set branch addresses
 
 	T->SetBranchAddress(ndata_name, &nhits[ip][iside][isignal]);
@@ -51,7 +51,7 @@
 	T->SetBranchAddress(vallist_name, &values[ip][iside][isignal][0]);
 
 	// Create histograms
-	// ADC and TDC histogram for each 
+	// ADC and TDC histogram for each
 	Int_t nbins,hmin,hmax;
 	if(signals[isignal]=="adc") {
 	  nbins = ADC_NBINS;
@@ -94,7 +94,7 @@
 	    Int_t ibar=TMath::Nint(paddles[ip][iside][isignal][ihit])-1;
 	    Double_t val = values[ip][iside][isignal][ihit];
 	    Int_t hindex = hindex_base + ibar;
-	    
+
 	    //	    cout << ip << " " << iside << " " << isignal << " " << ihit
 	    //		 << " " << ibar << " " << hindex << endl;
 	    h[hindex]->Fill(val);
diff --git a/examples/hitmaps_hms.C b/examples/hitmaps_hms.C
index a43aa5097a9d18e6c3faee9e402694e990b5a239..1293dcfe0a902c83c30855c9ca38efa066f3da2f 100644
--- a/examples/hitmaps_hms.C
+++ b/examples/hitmaps_hms.C
@@ -1,7 +1,7 @@
 {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "Scintillator Hit Maps", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "Scintillator Hit Maps", 800, 800);
   c1->Divide(2, 4);
 
   TH1F* h[16];
@@ -23,7 +23,7 @@
   h[11] = hnegadc3;
   h[14] = hposadc4;
   h[15] = hnegadc4;
-  
+
   for(Int_t ipad=1;ipad<=8;ipad++) {
     c1->cd(ipad);
     Int_t ihp = 2*(ipad-1);
diff --git a/examples/hitmaps_sos.C b/examples/hitmaps_sos.C
index 0e6a02bf44a09f78a8649053b5595f7f63dd935f..1febbe0cb3d6f14766c34997642fcbb466d48174 100644
--- a/examples/hitmaps_sos.C
+++ b/examples/hitmaps_sos.C
@@ -1,7 +1,7 @@
 {
   TFile* f = new TFile("hodtest.root");
- 
-  TCanvas *c1 = new TCanvas("c1", "SOS Scintillator Hit Maps", 800, 800); 
+
+  TCanvas *c1 = new TCanvas("c1", "SOS Scintillator Hit Maps", 800, 800);
   c1->Divide(2, 4);
 
   TH1F* h[16];
@@ -23,7 +23,7 @@
   h[11] = snegadc3;
   h[14] = sposadc4;
   h[15] = snegadc4;
-  
+
   for(Int_t ipad=1;ipad<=8;ipad++) {
     c1->cd(ipad);
     Int_t ihp = 2*(ipad-1);
diff --git a/examples/hodtest.C b/examples/hodtest.C
index a36b1c5776ab8372051eee98e892c5f52b87c60a..9c01c1680eb75f9490ccbd482de151c184a08de8 100644
--- a/examples/hodtest.C
+++ b/examples/hodtest.C
@@ -4,13 +4,13 @@
   //
   //  Steering script to test hodoscope decoding
   //
-  
+
   Int_t RunNumber=50017;
   char RunFileNamePattern[]="daq04_%d.log.0";
-  
+
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/test.database");
-  
+
   gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
 
   // g_ctp_parm_filename and g_decode_map_filename should now be defined
@@ -67,7 +67,7 @@
 
   gHaPhysics->Add(new THcHodoEff("hhodeff","HMS Hodoscope Efficiencies","H.hod"));
   gHaPhysics->Add(new THcHodoEff("shodeff","SOS Hodoscope Efficiencies","S.hod"));
-  
+
 
   // Set up the analyzer - we use the standard one,
   // but this could be an experiment-specific one as well.
@@ -75,13 +75,13 @@
   // tests/cuts, loops over Acpparatus's and PhysicsModules,
   // and executes the output routines.
   THcAnalyzer* analyzer = new THcAnalyzer;
-  
+
 
   // A simple event class to be output to the resulting tree.
   // Creating your own descendant of THaEvent is one way of
   // defining and controlling the output.
   THaEvent* event = new THaEvent;
-  
+
   // Define the run(s) that we want to analyze.
   // We just set up one, but this could be many.
   char RunFileName[100];
@@ -99,10 +99,10 @@
   analyzer->SetOdefFile("output.def");
   analyzer->SetCutFile("hodtest_cuts.def");        // optional
   analyzer->SetCountMode(2);// Counter event number same as gen_event_ID_number
-  
+
   // File to record cuts accounting information
   //  analyzer->SetSummaryFile("summary_example.log"); // optional
-  
+
   analyzer->Process(run);     // start the actual analysis
   analyzer->PrintReport("report.template","report.out");
 }
diff --git a/examples/hodtest_ccdb.C b/examples/hodtest_ccdb.C
index 9b36440178b339fdc07c8eaf434be406c14ebbd7..0eb13fd6fd23b78c386e92e92b7271faa635d830 100644
--- a/examples/hodtest_ccdb.C
+++ b/examples/hodtest_ccdb.C
@@ -4,10 +4,10 @@
   //
   //  Steering script to test hodoscope decoding
   //
-  
+
   Int_t RunNumber=50017;
   char* RunFileNamePattern="daq04_%d.log.0";
-  
+
   // Load parameters from CCDB
 
   gHcParms->OpenCCDB(RunNumber);
@@ -57,13 +57,13 @@
   // tests/cuts, loops over Acpparatus's and PhysicsModules,
   // and executes the output routines.
   THcAnalyzer* analyzer = new THcAnalyzer;
-  
+
 
   // A simple event class to be output to the resulting tree.
   // Creating your own descendant of THaEvent is one way of
   // defining and controlling the output.
   THaEvent* event = new THaEvent;
-  
+
   // Define the run(s) that we want to analyze.
   // We just set up one, but this could be many.
   char RunFileName[100];
@@ -81,10 +81,10 @@
   analyzer->SetOdefFile("output.def");
   analyzer->SetCutFile("hodtest_cuts.def");        // optional
   analyzer->SetCountMode(2);// Counter event number same as gen_event_ID_number
-  
+
   // File to record cuts accounting information
   //  analyzer->SetSummaryFile("summary_example.log"); // optional
-  
+
   analyzer->Process(run);     // start the actual analysis
   analyzer->PrintReport("report.template","report.out");
 }
diff --git a/examples/hodtest_daq07.C b/examples/hodtest_daq07.C
index 400e711e1515c83587f2e3211e21deaee00a1768..d352b6cbb0ff7890cc95708950c39d4d0f942e9b 100644
--- a/examples/hodtest_daq07.C
+++ b/examples/hodtest_daq07.C
@@ -4,13 +4,13 @@
   //
   //  Steering script to test hodoscope decoding
   //
-  
+
   Int_t RunNumber=65605;
   char RunFileNamePattern[]="daq07-coin_%d.log.0";
-  
+
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/test.database");
-  
+
   gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
 
   // g_ctp_parm_filename and g_decode_map_filename should now be defined
@@ -21,7 +21,7 @@
   // configurable
   gHcParms->Load("PARAM/hcana.param");
 
-  gHcParms->Load("PARAM/hdumptof.param");  
+  gHcParms->Load("PARAM/hdumptof.param");
 
   // Generate db_cratemap to correspond to map file contents
   char command[100];
@@ -66,7 +66,7 @@
 
   gHaPhysics->Add(new THcHodoEff("hhodeff","HMS Hodoscope Efficiencies","H.hod"));
   //  gHaPhysics->Add(new THcHodoEff("shodeff","SOS Hodoscope Efficiencies","S.hod"));
-  
+
 
   // Set up the analyzer - we use the standard one,
   // but this could be an experiment-specific one as well.
@@ -74,13 +74,13 @@
   // tests/cuts, loops over Acpparatus's and PhysicsModules,
   // and executes the output routines.
   THcAnalyzer* analyzer = new THcAnalyzer;
-  
+
 
   // A simple event class to be output to the resulting tree.
   // Creating your own descendant of THaEvent is one way of
   // defining and controlling the output.
   THaEvent* event = new THaEvent;
-  
+
   // Define the run(s) that we want to analyze.
   // We just set up one, but this could be many.
   char RunFileName[100];
@@ -98,10 +98,10 @@
   analyzer->SetOdefFile("output.def");
   analyzer->SetCutFile("hodtest_cuts.def");        // optional
   analyzer->SetCountMode(2);// Counter event number same as gen_event_ID_number
-  
+
   // File to record cuts accounting information
   //  analyzer->SetSummaryFile("summary_example.log"); // optional
-  
+
   analyzer->Process(run);     // start the actual analysis
   analyzer->PrintReport("report.template","report.out");
 }
diff --git a/examples/hodtest_mkj.C b/examples/hodtest_mkj.C
index 08b194d35ec1a43d2c0d6cc7dc4d633618da5c60..9cdd1c528d68f74b71928b975253bab2c8b600b1 100644
--- a/examples/hodtest_mkj.C
+++ b/examples/hodtest_mkj.C
@@ -4,7 +4,7 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000,
   //
   //  Steering script to test hodoscope decoding
   //
-  
+
   if (RunNumber == 50017) {
     char* RunFileNamePattern="daq04_%d.log.0";
   } else {
@@ -13,7 +13,7 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000,
   }
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/test.database");
-  
+
   gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
 
   // g_ctp_parm_filename and g_decode_map_filename should now be defined
@@ -55,13 +55,13 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000,
   // tests/cuts, loops over Acpparatus's and PhysicsModules,
   // and executes the output routines.
   THaAnalyzer* analyzer = new THcAnalyzer;
-  
+
 
   // A simple event class to be output to the resulting tree.
   // Creating your own descendant of THaEvent is one way of
   // defining and controlling the output.
   THaEvent* event = new THaEvent;
-  
+
   // Define the run(s) that we want to analyze.
   // We just set up one, but this could be many.
   char RunFileName[100];
@@ -79,9 +79,9 @@ void hodtest_mkj(Int_t RunNumber=50017, Int_t MaxEventToReplay=5000,
   analyzer->SetOutFile(Form("hodtest_%05d.root",RunNumber));
   analyzer->SetOdefFile(Form("output_%d.def",RunNumber));
   analyzer->SetCutFile("hodtest_cuts_mkj.def");        // optional
-  
+
   // File to record cuts accounting information
   //  analyzer->SetSummaryFile("summary_example.log"); // optional
-  
+
   analyzer->Process(run);     // start the actual analysis
 }
diff --git a/examples/raster_test.C b/examples/raster_test.C
index a28f4143692854df3c89ce19877887ad0285f3bd..09719d52f0ef7e4da23849d3f587461161003943 100644
--- a/examples/raster_test.C
+++ b/examples/raster_test.C
@@ -4,18 +4,18 @@
   //
   //  Steering script to test raster signal decoding
   //
-  
+
   Int_t RunNumber=52947;
   char* RunFileNamePattern="/cache/mss/hallc/daq04/raw/daq04_52947.log.0";
-    
- 
+
+
   // Open the database
   //
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/raster_test.database");
   gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
 
-  
+
   // Open and load parameter files
   //
   gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
@@ -23,10 +23,10 @@
   // parameters not found in usual engine parameter files
   gHcParms->Load("PARAM/hcana.param");
 
-  
+
   //  Generate db_cratemap to correspond to map file contents
-  //  make_cratemap.pl scripts reads a Hall C style MAP file and output a 
-  //  Hall A style crate map DB file 
+  //  make_cratemap.pl scripts reads a Hall C style MAP file and output a
+  //  Hall A style crate map DB file
   //
   char command[100];
   sprintf(command,"./make_cratemap.pl < %s > db_cratemap.dat",gHcParms->GetString("g_decode_map_filename"));
@@ -64,23 +64,23 @@
   // and executes the output routines.
   //
   THcAnalyzer* analyzer = new THcAnalyzer;
-  
+
 
   // A simple event class to be output to the resulting tree.
   // Creating your own descendant of THaEvent is one way of
   // defining and controlling the output.
   //
   THaEvent* event = new THaEvent;
-  
-  
+
+
   // Define the run(s) that we want to analyze.
   // We just set up one, but this could be many.
-  // 
+  //
   char RunFileName[100];
   sprintf(RunFileName,RunFileNamePattern,RunNumber);
   THaRun* run = new THaRun(RunFileName);
 
-  
+
   // Eventually need to learn to skip over, or properly analyze
   // the pedestal events
   //
@@ -94,12 +94,12 @@
   analyzer->SetOdefFile("output_bpw.def");
   analyzer->SetCutFile("hodtest_cuts.def");        // optional
   analyzer->SetCountMode(2);// Counter event number same as gen_event_ID_number
-  
+
   // File to record cuts accounting information
   //  analyzer->SetSummaryFile("summary_example.log"); // optional
-  
+
   // start the actual analysis
   //
-  analyzer->Process(run);     
+  analyzer->Process(run);
   analyzer->PrintReport("report.template","report.out");
 }
diff --git a/src/THcAerogel.cxx b/src/THcAerogel.cxx
index 4b2559c09c97219713b22f2b8e59655667d31b68..8883d020a74d153c062ce379b2fd6be27e9a14a9 100644
--- a/src/THcAerogel.cxx
+++ b/src/THcAerogel.cxx
@@ -135,7 +135,7 @@ void THcAerogel::DeleteArrays()
   delete [] fNegPed; fNegPed = NULL;
   delete [] fNegSig; fNegSig = NULL;
   delete [] fNegThresh; fNegThresh = NULL;
-}  
+}
 
 //_____________________________________________________________________________
 THaAnalysisObject::EStatus THcAerogel::Init( const TDatime& date )
@@ -228,20 +228,20 @@ Int_t THcAerogel::DefineVariables( EMode mode )
 
   if( mode == kDefine && fIsSetup ) return kOK;
   fIsSetup = ( mode == kDefine );
-  
+
   // Register variables in global list
 
   // Do we need to put the number of pos/neg TDC/ADC hits into the variables?
   // No.  They show up in tree as Ndata.H.aero.postdchits for example
 
   RVarDef vars[] = {
-    {"postdchits", "List of Positive TDC hits", 
+    {"postdchits", "List of Positive TDC hits",
      "fPosTDCHits.THcSignalHit.GetPaddleNumber()"},
-    {"negtdchits", "List of Negative TDC hits", 
+    {"negtdchits", "List of Negative TDC hits",
      "fNegTDCHits.THcSignalHit.GetPaddleNumber()"},
-    {"posadchits", "List of Positive ADC hits", 
+    {"posadchits", "List of Positive ADC hits",
      "fPosADCHits.THcSignalHit.GetPaddleNumber()"},
-    {"negadchits", "List of Negative ADC hits", 
+    {"negadchits", "List of Negative ADC hits",
      "fNegADCHits.THcSignalHit.GetPaddleNumber()"},
     {"apos",  "Raw Positive ADC Amplitudes",   "fA_Pos"},
     {"aneg",  "Raw Negative ADC Amplitudes",   "fA_Neg"},
@@ -263,7 +263,7 @@ Int_t THcAerogel::DefineVariables( EMode mode )
   return DefineVarsFromList( vars, mode );
 }
 //_____________________________________________________________________________
-inline 
+inline
 void THcAerogel::Clear(Option_t* opt)
 {
   // Clear the hit lists
@@ -273,15 +273,15 @@ void THcAerogel::Clear(Option_t* opt)
   fNegADCHits->Clear();
 
   // Clear Aerogel variables  from h_aero.f
-  
+
   fNhits = 0;	     // Don't really need to do this.  (Be sure this called before Decode)
 
   fPosNpeSum = 0.0;
   fNegNpeSum = 0.0;
   fNpeSum = 0.0;
- 
+
   fNGoodHits = 0;
-    
+
   fNADCPosHits = 0;
   fNADCNegHits = 0;
   fNTDCPosHits = 0;
@@ -315,9 +315,9 @@ Int_t THcAerogel::Decode( const THaEvData& evdata )
   }
 
   if(fAnalyzePedestals) {
-     
+
     CalculatePedestals();
-   
+
     fAnalyzePedestals = 0;	// Don't analyze pedestals next event
   }
 
@@ -355,7 +355,7 @@ Int_t THcAerogel::Decode( const THaEvData& evdata )
     }
 
     // ADC negative hit
-    if((adc_neg = hit->GetADCNeg()) > 0) {   
+    if((adc_neg = hit->GetADCNeg()) > 0) {
       THcSignalHit *sighit = (THcSignalHit*) fNegADCHits->ConstructedAt(nNegADCHits++);
       sighit->Set(hit->fCounter, adc_neg);
     }
@@ -417,7 +417,7 @@ Int_t THcAerogel::Decode( const THaEvData& evdata )
     }
     if(fT_Neg[npmt] > 0 && fT_Neg[npmt] < 8000) {
       fNTDCNegHits++;
-    }      
+    }
 
     ihit++;
   }
@@ -445,7 +445,7 @@ Int_t THcAerogel::Decode( const THaEvData& evdata )
   //         npmt=haero_pair_num(ihit)
   //
   //         haero_rawadc_pos(npmt)=haero_adc_pos(ihit)
-  //         aero_ep(npmt)=haero_rawadc_pos(ihit)        
+  //         aero_ep(npmt)=haero_rawadc_pos(ihit)
   //
   //         haero_rawadc_neg(npmt)=haero_adc_neg(ihit)
   //         aero_en(npmt)=haero_rawadc_neg(ihit)
@@ -471,7 +471,7 @@ Int_t THcAerogel::ApplyCorrections( void )
 //_____________________________________________________________________________
 Int_t THcAerogel::CoarseProcess( TClonesArray&  ) //tracks
 {
-  
+
   // All code previously here moved into decode
 
   ApplyCorrections();
@@ -565,7 +565,7 @@ void THcAerogel::CalculatePedestals( )
   // Later add check to see if pedestals have drifted ("Danger Will Robinson!")
   //  cout << "Plane: " << fPlaneNum << endl;
   for(Int_t i=0; i<fNelem;i++) {
-    
+
     // Positive tubes
     fPosPed[i] = ((Double_t) fPosPedSum[i]) / TMath::Max(1, fPosPedCount[i]);
     fPosThresh[i] = fPosPed[i] + 15;
@@ -590,7 +590,7 @@ void THcAerogel::CalculatePedestals( )
     }
   }
   //  cout << " " << endl;
-  
+
 }
 void THcAerogel::Print( const Option_t* opt) const {
   THaNonTrackingDetector::Print(opt);
@@ -608,4 +608,4 @@ void THcAerogel::Print( const Option_t* opt) const {
 
 ClassImp(THcAerogel)
 ////////////////////////////////////////////////////////////////////////////////
- 
+
diff --git a/src/THcAerogel.h b/src/THcAerogel.h
index 59c43c6d186f2e3febc475b536aa20aa53a9be95..4dfbf63377a41b59a1c64ce2ad8e7dcc5892f3f2 100644
--- a/src/THcAerogel.h
+++ b/src/THcAerogel.h
@@ -18,7 +18,7 @@ class THcAerogel : public THaNonTrackingDetector, public THcHitList {
   THcAerogel( const char* name, const char* description = "",
 		THaApparatus* a = NULL );
   virtual ~THcAerogel();
-  
+
   virtual void 	     Clear( Option_t* opt="" );
   virtual Int_t      Decode( const THaEvData& );
   void               InitArrays();
@@ -36,7 +36,7 @@ class THcAerogel : public THaNonTrackingDetector, public THcHitList {
 
   virtual void Print(const Option_t* opt) const;
 
-  THcAerogel();  // for ROOT I/O		
+  THcAerogel();  // for ROOT I/O
  protected:
   Int_t fAnalyzePedestals;
 
@@ -95,7 +95,7 @@ class THcAerogel : public THaNonTrackingDetector, public THcHitList {
   Double_t *fNegPedMean;	/* be overwritten from ped analysis */
 
   Int_t fTdcOffset; /* Global TDC offset */
-  
+
   void Setup(const char* name, const char* description);
   virtual void  InitializePedestals( );
 
diff --git a/src/THcAerogelHit.cxx b/src/THcAerogelHit.cxx
index b9128d7d2e184963b7f14eefec8541ef753358ce..c32361e43a81191bfd9c22e4ee4854ace54bff9a 100644
--- a/src/THcAerogelHit.cxx
+++ b/src/THcAerogelHit.cxx
@@ -4,9 +4,9 @@
 Raw Aerogel Hit Info
 Inherits from THcRawHodoHit
 
- Contains plane, counter and pos/neg adc                             
-                                                                     
-                                                             
+ Contains plane, counter and pos/neg adc
+
+
 
 
 
diff --git a/src/THcAerogelHit.h b/src/THcAerogelHit.h
index 18690cd7a518c6615f5c67883d405a793553a360..31f4f327c40fbd616bcd27cb124a0d19ed920d00 100644
--- a/src/THcAerogelHit.h
+++ b/src/THcAerogelHit.h
@@ -7,7 +7,7 @@ class THcAerogelHit : public THcRawHodoHit {
 
  public:
   friend class THcAerogel;
- 
+
  protected:
 
  private:
diff --git a/src/THcAnalyzer.cxx b/src/THcAnalyzer.cxx
index 63f18b7409821bcfc01562200c2e2d434d75a64c..84da42f0a239149e6068ceb7a14d6abd1ddd40bb 100644
--- a/src/THcAnalyzer.cxx
+++ b/src/THcAnalyzer.cxx
@@ -40,7 +40,7 @@ using namespace std;
 // Pointer to single instance of this object
 //THcAnalyzer* THcAnalyzer::fgAnalyzer = 0;
 
-//FIXME: 
+//FIXME:
 // do we need to "close" scalers/EPICS analysis if we reach the event limit?
 
 //_____________________________________________________________________________
@@ -52,7 +52,7 @@ THcAnalyzer::THcAnalyzer()
 //_____________________________________________________________________________
 THcAnalyzer::~THcAnalyzer()
 {
-  // Destructor. 
+  // Destructor.
 
 }
 
@@ -139,7 +139,7 @@ void THcAnalyzer::PrintReport(const char* templatefile, const char* ofile)
 //_____________________________________________________________________________
 void THcAnalyzer::LoadInfo()
 {
-  /// Create several THcParms variables in gHcParms containing 
+  /// Create several THcParms variables in gHcParms containing
   /// run information such as
   // run number, first event analyzed, number of events, etc.
   ///    `gen_run_number` - Current run
@@ -158,7 +158,7 @@ void THcAnalyzer::LoadInfo()
     gHcParms->Define("gen_run_number","Run Number", *runnum);
   }
   *runnum = fRun->GetNumber();
-  
+
   varptr = gHcParms->Find("gen_run_starting_event");
   if(varptr) {
     firstevent = (Int_t*) varptr->GetValuePointer(); // Assume correct type
@@ -168,7 +168,7 @@ void THcAnalyzer::LoadInfo()
   }
   // May not agree with engine event definintions
   *firstevent = fRun->GetFirstEvent();
-  
+
   varptr = gHcParms->Find("gen_event_id_number");
   if(varptr) {
     lastevent = (Int_t*)varptr->GetValuePointer(); // Assume correct type
@@ -178,7 +178,7 @@ void THcAnalyzer::LoadInfo()
   }
   // Not accurate
   *lastevent = fRun->GetFirstEvent()+fRun->GetNumAnalyzed();
-}  
+}
 
 //_____________________________________________________________________________
 
diff --git a/src/THcAnalyzer.h b/src/THcAnalyzer.h
index fcb2842a5017d91e233478c0901a5b67be965722..d5bd10bae17f11b4980e128a8d0745ae4c8f335b 100644
--- a/src/THcAnalyzer.h
+++ b/src/THcAnalyzer.h
@@ -4,7 +4,7 @@
 //////////////////////////////////////////////////////////////////////////
 //
 // THcAnalyzer
-// 
+//
 //////////////////////////////////////////////////////////////////////////
 
 #include "THaAnalyzer.h"
@@ -23,7 +23,7 @@ public:
 protected:
 
   Int_t fPedestalEvtype;
-    
+
 private:
   //  THcAnalyzer( const THcAnalyzer& );
   //  THcAnalyzer& operator=( const THcAnalyzer& );
diff --git a/src/THcCherenkov.cxx b/src/THcCherenkov.cxx
index 3b5fa5f2984f2905bec3c07a37bb26b09578ab7f..f5d5c951effb19fc93798a837f1ac5e3632d738b 100644
--- a/src/THcCherenkov.cxx
+++ b/src/THcCherenkov.cxx
@@ -1,7 +1,7 @@
 /** \class THcCherenkov
     \ingroup Detectors
 
-Class for an Cherenkov detector consisting of two PMT's                         
+Class for an Cherenkov detector consisting of two PMT's
 
 \author Zafar Ahmed
 
@@ -146,13 +146,13 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date )
   prefix[0]=tolower(GetApparatus()->GetName()[0]);
   prefix[1]='\0';
 
-  strcpy(parname,prefix);                              // This is taken from 
+  strcpy(parname,prefix);                              // This is taken from
   strcat(parname,"cer_tot_pmts");                      // THcScintillatorPlane
   fNelem = (Int_t)gHcParms->Find(parname)->GetValue(); // class.
 
-  //    fNelem = 2;      // Default if not defined  
+  //    fNelem = 2;      // Default if not defined
   fCerNRegions = 3;
-  
+
   fNPMT = new Int_t[fNelem];
   fADC = new Double_t[fNelem];
   fADC_P = new Double_t[fNelem];
@@ -162,7 +162,7 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date )
   fGain = new Double_t[fNelem];
   fPedLimit = new Int_t[fNelem];
   fPedMean = new Double_t[fNelem];
-  
+
   fNPMT = new Int_t[fNelem];
   fADC = new Double_t[fNelem];
   fADC_P = new Double_t[fNelem];
@@ -171,7 +171,7 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date )
   fGain = new Double_t[fNelem];
   fPedLimit = new Int_t[fNelem];
   fPedMean = new Double_t[fNelem];
-  
+
 
   fCerTrackCounter = new Int_t [fCerNRegions];
   fCerFiredCounter = new Int_t [fCerNRegions];
@@ -184,18 +184,18 @@ Int_t THcCherenkov::ReadDatabase( const TDatime& date )
   fCerRegionValue = new Double_t [fCerRegionsValueMax];
 
   DBRequest list[]={
-    {"cer_adc_to_npe", fGain,     kDouble, (UInt_t) fNelem},             
-    {"cer_ped_limit",  fPedLimit, kInt,    (UInt_t) fNelem},             
-    {"cer_width",      fCerWidth, kDouble, (UInt_t) fNelem},             
-    {"cer_chi2max",     &fCerChi2Max,        kDouble},                   
-    {"cer_beta_min",    &fCerBetaMin,        kDouble},                   
-    {"cer_beta_max",    &fCerBetaMax,        kDouble},                   
-    {"cer_et_min",      &fCerETMin,          kDouble},                   
-    {"cer_et_max",      &fCerETMax,          kDouble},                   
-    {"cer_mirror_zpos", &fCerMirrorZPos,     kDouble},                   
-    {"cer_region",      &fCerRegionValue[0], kDouble, (UInt_t) fCerRegionsValueMax}, 
-    {"cer_threshold",   &fCerThresh,         kDouble},                    
-    //    {"cer_regions",     &fCerNRegions,       kInt},                       
+    {"cer_adc_to_npe", fGain,     kDouble, (UInt_t) fNelem},
+    {"cer_ped_limit",  fPedLimit, kInt,    (UInt_t) fNelem},
+    {"cer_width",      fCerWidth, kDouble, (UInt_t) fNelem},
+    {"cer_chi2max",     &fCerChi2Max,        kDouble},
+    {"cer_beta_min",    &fCerBetaMin,        kDouble},
+    {"cer_beta_max",    &fCerBetaMax,        kDouble},
+    {"cer_et_min",      &fCerETMin,          kDouble},
+    {"cer_et_max",      &fCerETMax,          kDouble},
+    {"cer_mirror_zpos", &fCerMirrorZPos,     kDouble},
+    {"cer_region",      &fCerRegionValue[0], kDouble, (UInt_t) fCerRegionsValueMax},
+    {"cer_threshold",   &fCerThresh,         kDouble},
+    //    {"cer_regions",     &fCerNRegions,       kInt},
     {0}
   };
 
@@ -227,7 +227,7 @@ Int_t THcCherenkov::DefineVariables( EMode mode )
 
   if( mode == kDefine && fIsSetup ) return kOK;
   fIsSetup = ( mode == kDefine );
-  
+
   // Register variables in global list
 
   // Do we need to put the number of pos/neg TDC/ADC hits into the variables?
@@ -248,14 +248,14 @@ Int_t THcCherenkov::DefineVariables( EMode mode )
   return DefineVarsFromList( vars, mode );
 }
 //_____________________________________________________________________________
-inline 
+inline
 void THcCherenkov::Clear(Option_t* opt)
 {
   // Clear the hit lists
   fADCHits->Clear();
 
   // Clear Cherenkov variables  from h_trans_cer.f
-  
+
   fNhits = 0;	     // Don't really need to do this.  (Be sure this called before Decode)
   fNPEsum = 0.0;
   fNCherHit = 0;
@@ -291,7 +291,7 @@ Int_t THcCherenkov::Decode( const THaEvData& evdata )
   Int_t nADCHits=0;
   while(ihit < fNhits) {
     THcCherenkovHit* hit = (THcCherenkovHit *) fRawHitList->At(ihit);
-    
+
     // ADC hit
     if(hit->GetADCPos() >  0) {
       THcSignalHit *sighit = (THcSignalHit*) fADCHits->ConstructedAt(nADCHits++);
@@ -318,7 +318,7 @@ Int_t THcCherenkov::CoarseProcess( TClonesArray&  ) //tracks
     // Pedestal subtraction and gain adjustment
 
     // An ADC value of less than zero occurs when that particular
-    // channel has been sparsified away and has not been read. 
+    // channel has been sparsified away and has not been read.
     // The NPE for that tube will be assigned zero by this code.
     // An ADC value of greater than 8192 occurs when the ADC overflows on
     // an input that is too large. Tubes with this characteristic will
@@ -331,7 +331,7 @@ Int_t THcCherenkov::CoarseProcess( TClonesArray&  ) //tracks
     fNPMT[npmt] = hit->fCounter;
     fADC[npmt] = hit->GetADCPos();
     fADC_P[npmt] = hit->GetADCPos() - fPedMean[npmt];
-    
+
     if ( ( fADC_P[npmt] > fCerWidth[npmt] ) && ( hit->GetADCPos() < 8000 ) ) {
       fNPE[npmt] = fGain[npmt]*fADC_P[npmt];
       fNCherHit ++;
@@ -340,7 +340,7 @@ Int_t THcCherenkov::CoarseProcess( TClonesArray&  ) //tracks
     } else {
       fNPE[npmt] = 0.0;
     }
-    
+
     fNPEsum += fNPE[npmt];
 
   }
@@ -359,41 +359,41 @@ Int_t THcCherenkov::FineProcess( TClonesArray& tracks )
     THaTrack* theTrack = dynamic_cast<THaTrack*>( tracks.At(0) );
     if (!theTrack) return -1;
 
-    if ( ( ( tracks.GetLast() + 1 ) == 1 ) && 
-	 ( theTrack->GetChi2()/theTrack->GetNDoF() > 0. ) && 
-	 ( theTrack->GetChi2()/theTrack->GetNDoF() <  fCerChi2Max ) && 
+    if ( ( ( tracks.GetLast() + 1 ) == 1 ) &&
+	 ( theTrack->GetChi2()/theTrack->GetNDoF() > 0. ) &&
+	 ( theTrack->GetChi2()/theTrack->GetNDoF() <  fCerChi2Max ) &&
 	 ( theTrack->GetBeta() > fCerBetaMin ) &&
 	 ( theTrack->GetBeta() < fCerBetaMax ) &&
 	 ( ( theTrack->GetEnergy() / theTrack->GetP() ) > fCerETMin ) &&
-	 ( ( theTrack->GetEnergy() / theTrack->GetP() ) < fCerETMax ) 
+	 ( ( theTrack->GetEnergy() / theTrack->GetP() ) < fCerETMax )
 	 ) {
-      
+
       Double_t cerX = theTrack->GetX() + theTrack->GetTheta() * fCerMirrorZPos;
       Double_t cerY = theTrack->GetY() + theTrack->GetPhi()   * fCerMirrorZPos;
-      
+
       for ( Int_t ir = 0; ir < fCerNRegions; ir++ ) {
-	
-	//	*     hit must be inside the region in order to continue.   
 
-	if ( ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 0 )] - cerX ) < 
+	//	*     hit must be inside the region in order to continue.
+
+	if ( ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 0 )] - cerX ) <
 	       fCerRegionValue[GetCerIndex( ir, 4 )] ) &&
-	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 1 )] - cerY ) < 
+	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 1 )] - cerY ) <
 	       fCerRegionValue[GetCerIndex( ir, 5 )] ) &&
-	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 2 )] - theTrack->GetTheta() ) < 
+	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 2 )] - theTrack->GetTheta() ) <
 	       fCerRegionValue[GetCerIndex( ir, 6 )] ) &&
-	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 3 )] - theTrack->GetPhi() ) < 
-	       fCerRegionValue[GetCerIndex( ir, 7 )] ) 
+	     ( TMath::Abs( fCerRegionValue[GetCerIndex( ir, 3 )] - theTrack->GetPhi() ) <
+	       fCerRegionValue[GetCerIndex( ir, 7 )] )
 	     ) {
-	
-	  // *     increment the 'should have fired' counters 
-	  fCerTrackCounter[ir] ++;	  
-	  
+
+	  // *     increment the 'should have fired' counters
+	  fCerTrackCounter[ir] ++;
+
 	  // *     increment the 'did fire' counters
 	  if ( fNPEsum > fCerThresh ) {
 	    fCerFiredCounter[ir] ++;
 	  }
 	}
-      } // loop over regions 
+      } // loop over regions
     }
   }
 
@@ -456,7 +456,7 @@ void THcCherenkov::CalculatePedestals( )
   // Later add check to see if pedestals have drifted ("Danger Will Robinson!")
   //  cout << "Plane: " << fPlaneNum << endl;
   for(Int_t i=0; i<fNelem;i++) {
-    
+
     // PMT tubes
     fPed[i] = ((Double_t) fPedSum[i]) / TMath::Max(1, fPedCount[i]);
     fThresh[i] = fPed[i] + 15;
@@ -472,7 +472,7 @@ void THcCherenkov::CalculatePedestals( )
     }
   }
   //  cout << " " << endl;
-  
+
 }
 
 //_____________________________________________________________________________
@@ -502,10 +502,10 @@ void THcCherenkov::Print( const Option_t* opt) const {
 
 //_____________________________________________________________________________
 Double_t THcCherenkov::GetCerNPE() {
-  
+
   return fNPEsum;
 }
 
 ClassImp(THcCherenkov)
 ////////////////////////////////////////////////////////////////////////////////
- 
+
diff --git a/src/THcCherenkov.h b/src/THcCherenkov.h
index 9d6eee02693bde6c49ffedf1b5baa0f86c6bb76a..c05c43df4c2aee53e3a2a3a872bfad3ac510c7ea 100644
--- a/src/THcCherenkov.h
+++ b/src/THcCherenkov.h
@@ -18,7 +18,7 @@ class THcCherenkov : public THaNonTrackingDetector, public THcHitList {
   THcCherenkov( const char* name, const char* description = "",
 		THaApparatus* a = NULL );
   virtual ~THcCherenkov();
-  
+
   virtual void 	     Clear( Option_t* opt="" );
   virtual Int_t      Decode( const THaEvData& );
   virtual EStatus    Init( const TDatime& run_time );
@@ -41,7 +41,7 @@ class THcCherenkov : public THaNonTrackingDetector, public THcHitList {
   //  Double_t GetCerNPE() { return fNPEsum;}
   Double_t GetCerNPE();
 
-  THcCherenkov();  // for ROOT I/O		
+  THcCherenkov();  // for ROOT I/O
  protected:
   Int_t         fAnalyzePedestals;
 
@@ -79,12 +79,12 @@ class THcCherenkov : public THaNonTrackingDetector, public THcHitList {
   Int_t         fMinPeds;
   Int_t*        fPedSum;	  /* Accumulators for pedestals */
   Int_t*        fPedSum2;
-  Int_t*        fPedLimit; 
-  Double_t*     fPedMean; 	  /* Can be supplied in parameters and then */ 
-  Int_t*        fPedCount; 
+  Int_t*        fPedLimit;
+  Double_t*     fPedMean; 	  /* Can be supplied in parameters and then */
+  Int_t*        fPedCount;
   Double_t*     fPed;
   Double_t*     fThresh;
-  
+
   void Setup(const char* name, const char* description);
   virtual void  InitializePedestals( );
 
diff --git a/src/THcCherenkovHit.cxx b/src/THcCherenkovHit.cxx
index 7eb16224ae0e6e36a44e8fea59e6475fbd4de94e..21f23533b7610d1129fff1a486cc17f76e3ddb2b 100644
--- a/src/THcCherenkovHit.cxx
+++ b/src/THcCherenkovHit.cxx
@@ -1,14 +1,14 @@
-/** \class  THcCherenkovHit                                                     
+/** \class  THcCherenkovHit
     \ingroup DetSupport
 
-Class representing Cherenkov PMT hit     
+Class representing Cherenkov PMT hit
 Inherits from THcRawHodoHit
-                                                                     
- Contains plane, counter and pos/neg adc                             
-                                                                     
+
+ Contains plane, counter and pos/neg adc
+
 
 \author Zafar Ahmed
-                                                                      
+
 */
 
 
diff --git a/src/THcCherenkovHit.h b/src/THcCherenkovHit.h
index b7dac6db4b9d9aa83e63e20669e3c76887f279f8..bf969626ac4964299dc20ddde0d28d56ce796000 100644
--- a/src/THcCherenkovHit.h
+++ b/src/THcCherenkovHit.h
@@ -7,7 +7,7 @@ class THcCherenkovHit : public THcRawHodoHit {
 
  public:
   friend class THcCherenkov;
- 
+
  protected:
 
  private:
diff --git a/src/THcDC.cxx b/src/THcDC.cxx
index 1c686ca57067a214cb2b140b1b4c4d264c7820a5..256444d5ab06c16c457f2d5e600274c2aeeae4ac 100644
--- a/src/THcDC.cxx
+++ b/src/THcDC.cxx
@@ -403,7 +403,7 @@ void THcDC::DeleteArrays()
 }
 
 //_____________________________________________________________________________
-inline 
+inline
 void THcDC::ClearEvent()
 {
   // Reset per-event data.
@@ -419,7 +419,7 @@ void THcDC::ClearEvent()
   for(Int_t i=0;i<fNPlanes;i++) {
     fResiduals[i] = 1000.0;
   }
-  
+
   //  fTrackProj->Clear();
 }
 
@@ -441,7 +441,7 @@ Int_t THcDC::Decode( const THaEvData& evdata )
     for(Int_t ip=0;ip<fNPlanes;ip++) {
       nexthit = fPlanes[ip]->ProcessHits(fRawHitList, nexthit);
       fN_True_RawHits += fPlanes[ip]->GetNRawhits();
-      
+
     }
 
     // Let each chamber get its hits
@@ -453,7 +453,7 @@ Int_t THcDC::Decode( const THaEvData& evdata )
     Int_t counter=0;
     if (fdebugprintrawdc) {
       cout << " RAW_TOT_HITS = " <<  fNRawHits << endl;
-      cout << " Hit #  " << "Plane  " << " Wire " <<  " Raw TDC " << endl; 
+      cout << " Hit #  " << "Plane  " << " Wire " <<  " Raw TDC " << endl;
       for(UInt_t ihit = 0; ihit < fNRawHits ; ihit++) {
 	THcRawDCHit* hit = (THcRawDCHit *) fRawHitList->At(ihit);
 	for(UInt_t imhit = 0; imhit < hit->fNHits; imhit++) {
@@ -478,7 +478,7 @@ Int_t THcDC::ApplyCorrections( void )
 Int_t THcDC::CoarseTrack( TClonesArray& tracks )
 {
   // Calculation of coordinates of particle track cross point with scint
-  // plane in the detector coordinate system. For this, parameters of track 
+  // plane in the detector coordinate system. For this, parameters of track
   // reconstructed in THaVDC::CoarseTrack() are used.
   //
   // Apply corrections and reconstruct the complete hits.
@@ -551,7 +551,7 @@ Int_t THcDC::FineTrack( TClonesArray& tracks )
   // Units of measurements are meters.
 
   // Calculation of coordinates of particle track cross point with scint
-  // plane in the detector coordinate system. For this, parameters of track 
+  // plane in the detector coordinate system. For this, parameters of track
   // reconstructed in THaVDC::FineTrack() are used.
 
   return 0;
@@ -603,7 +603,7 @@ void THcDC::LinkStubs()
   //                  4) check if there is a track-criterion match
   //                       either add to existing track
   //                       or if there is another point in same chamber
-  //                          make a copy containing isp2 rather than 
+  //                          make a copy containing isp2 rather than
   //                            other point in same chamber
   //                  5) If hsingle_stub is set, make a track of all single
   //                     stubs.
@@ -667,7 +667,7 @@ void THcDC::LinkStubs()
 	    }
 	    Double_t dposxp = spstub1[2] - spstub2[2];
 	    Double_t dposyp = spstub1[3] - spstub2[3];
-	      
+
 	    // What is the point of saving these stubmin values.  They
 	    // Don't seem to be used anywhere except that they can be
 	    // printed out if hbypass_track_eff_files is zero.
@@ -675,7 +675,7 @@ void THcDC::LinkStubs()
 	    if(TMath::Abs(dposy)<TMath::Abs(stubminy)) stubminy = dposy;
 	    if(TMath::Abs(dposxp)<TMath::Abs(stubminxp)) stubminxp = dposxp;
 	    if(TMath::Abs(dposyp)<TMath::Abs(stubminyp)) stubminyp = dposyp;
-	      
+
 	    // if hbypass_track_eff_files == 0 then
 	    // Print out each stubminX that is less that its criterion
 
@@ -776,7 +776,7 @@ void THcDC::LinkStubs()
     }
   }
   ///
-  if (fdebuglinkstubs) { 
+  if (fdebuglinkstubs) {
      cout << " Number of tracks from link stubs = " << fNDCTracks << endl;
      printf("%s %s \n","Track","Plane Wire ");
      for (UInt_t itrack=0;itrack<fNDCTracks;itrack++) {
@@ -815,7 +815,7 @@ void THcDC::TrackFit()
   //    single_resolution[ip][itrack] = 1000.0;
   //  }
   // }
-  
+
   Double_t dummychi2 = 1.0E4;
 
   for(UInt_t itrack=0;itrack<fNDCTracks;itrack++) {
@@ -873,7 +873,7 @@ void THcDC::TrackFit()
 	  }
 	}
       }
-      
+
       // Solve 4x4 equations
       TVectorD dray(NUM_FPRAY);
       // Should check that it is invertable
@@ -1054,7 +1054,7 @@ Double_t THcDC::DpsiFun(Double_t ray[4], Int_t plane)
 
   Double_t infinity = 1.0E+20;
   Double_t cinfinity = 1/infinity;
-  Double_t DpsiFun = 
+  Double_t DpsiFun =
     ray[2]*ray[1]*fPlaneCoeffs[plane][0] +
     ray[3]*ray[0]*fPlaneCoeffs[plane][1] +
     ray[2]*fPlaneCoeffs[plane][2] +
@@ -1066,11 +1066,11 @@ Double_t THcDC::DpsiFun(Double_t ray[4], Int_t plane)
     + fPlaneCoeffs[plane][8];
   if(TMath::Abs(denom) < cinfinity) {
     DpsiFun = infinity;
-  } else { 
+  } else {
     DpsiFun = DpsiFun/denom;
   }
   return(DpsiFun);
-}	    
+}
 
 //_____________________________________________________________________________
 Int_t THcDC::End(THaRunBase* run)
@@ -1088,7 +1088,7 @@ void THcDC::EffInit()
 
   delete [] fNChamHits; fNChamHits = new Int_t [fNChambers];
   delete [] fPlaneEvents; fPlaneEvents = new Int_t [fNPlanes];
-  
+
   fTotEvents = 0;
   for(UInt_t i=0;i<fNChambers;i++) {
     fNChamHits[i] = 0;
diff --git a/src/THcDC.h b/src/THcDC.h
index d11f2333ce479486419f285fc014a2d062889c96..1237a3fd0411697b06ad8969ddcc255a778d63d8 100644
--- a/src/THcDC.h
+++ b/src/THcDC.h
@@ -31,11 +31,11 @@ public:
   virtual EStatus    Init( const TDatime& run_time );
   virtual Int_t      CoarseTrack( TClonesArray& tracks );
   virtual Int_t      FineTrack( TClonesArray& tracks );
-  
+
   virtual Int_t      ApplyCorrections( void );
 
   //  Int_t GetNHits() const { return fNhit; }
-  
+
   //  Int_t GetNTracks() const { return fNDCTracks; }
   //  const TClonesArray* GetTrackHits() const { return fTrackProj; }
 
@@ -129,7 +129,7 @@ protected:
 
   // Each of these will be dimensioned with the number of planes
   // A THcDCPlane class object will need to access the value for
-  // its plane number.  Should we have a Get method for each or 
+  // its plane number.  Should we have a Get method for each or
   Int_t* fTdcWinMin;
   Int_t* fTdcWinMax;
   Double_t* fCentralTime;
@@ -155,8 +155,8 @@ protected:
 
   // Useful derived quantities
   // double tan_angle, sin_angle, cos_angle;
-  
-  // Intermediate structure for building 
+
+  // Intermediate structure for building
   static const char MAXTRACKS = 10;
 
   std::vector<THcDriftChamberPlane*> fPlanes; // List of plane objects
diff --git a/src/THcDCHit.cxx b/src/THcDCHit.cxx
index a6c9605c08365b8b60a3f12be351a5003bfc0813..f2a5f389b3459c9cefbef46a40357690667b1127 100644
--- a/src/THcDCHit.cxx
+++ b/src/THcDCHit.cxx
@@ -37,23 +37,23 @@ Double_t THcDCHit::ConvertTimeToDist()
 {
   // Converts TDC time to drift distance
   // Takes the (estimated) slope of the track as an argument
-  
+
   THcDCTimeToDistConv* ttdConv = (fWire) ? fWire->GetTTDConv() : NULL;
-  
+
   if (ttdConv) {
-    // If a time to distance algorithm exists, use it to convert the TDC time 
+    // If a time to distance algorithm exists, use it to convert the TDC time
     // to the drift distance
     fDist = ttdConv->ConvertTimeToDist(fTime);
     return fDist;
   }
-  
+
   Error("ConvertTimeToDist()", "No Time to dist algorithm available");
   return 0.0;
 
 }
 
 //_____________________________________________________________________________
-Int_t THcDCHit::Compare( const TObject* obj ) const 
+Int_t THcDCHit::Compare( const TObject* obj ) const
 {
   // Used to sort hits
   // A hit is "less than" another hit if it occurred on a lower wire number.
@@ -67,7 +67,7 @@ Int_t THcDCHit::Compare( const TObject* obj ) const
     return -1;
 
   const THcDCHit* hit = static_cast<const THcDCHit*>( obj );
- 
+
   Int_t myWireNum = fWire->GetNum();
   Int_t hitWireNum = hit->GetWire()->GetNum();
   Int_t myPlaneNum = GetPlaneNum();
diff --git a/src/THcDCHit.h b/src/THcDCHit.h
index c5ca7a74d3e14038ab2fc037cfd7bc31be6adee5..c63e1386881f50113beaf2f5998f05d1433ab98c 100644
--- a/src/THcDCHit.h
+++ b/src/THcDCHit.h
@@ -17,7 +17,7 @@ class THcDCHit : public TObject {
 
 public:
   THcDCHit( THcDCWire* wire=NULL, Int_t rawtime=0, Double_t time=0.0,
-	    THcDriftChamberPlane* wp=0) : 
+	    THcDriftChamberPlane* wp=0) :
     fWire(wire), fRawTime(rawtime), fTime(time), fWirePlane(wp),
     fDist(0.0), ftrDist(kBig) {
     ConvertTimeToDist();
@@ -29,7 +29,7 @@ public:
   Int_t  Compare ( const TObject* obj ) const;
   Bool_t IsSortable () const { return kTRUE; }
   virtual void Print( Option_t* opt="" ) const;
-  
+
   // Get and Set Functions
   THcDCWire* GetWire() const { return fWire; }
   Int_t    GetWireNum() const { return fWire->GetNum(); }
@@ -42,7 +42,7 @@ public:
   Int_t    GetCorrectedStatus() const { return fCorrected; }
 
   THcDriftChamberPlane* GetWirePlane() const { return fWirePlane; }
-  
+
 
   void     SetWire(THcDCWire * wire) { fWire = wire; }
   void     SetRawTime(Int_t time)     { fRawTime = time; }
@@ -56,10 +56,10 @@ public:
   Int_t    GetPlaneIndex() const { return fWirePlane->GetPlaneIndex(); }
   Int_t    GetChamberNum() const { return fWirePlane->GetChamberNum(); }
   void     SetCorrectedStatus(Int_t c) { fCorrected = c; }
-  
+
 protected:
   static const Double_t kBig;  //!
-  
+
   THcDCWire*  fWire;     // Wire on which the hit occurred
   Int_t       fRawTime;  // TDC value (channels)
   Double_t    fTime;     // Time corrected for time offset of wire (s)
@@ -73,11 +73,11 @@ protected:
 
   THcDriftChamber* fChamber; //! Pointer to parent wire plane
 
-  
+
 private:
   THcDCHit( const THcDCHit& );
   THcDCHit& operator=( const THcDCHit& );
-  
+
   ClassDef(THcDCHit,2)             // Drift Chamber Hit
 };
 
diff --git a/src/THcDCLookupTTDConv.cxx b/src/THcDCLookupTTDConv.cxx
index dc32cc6e058dabbc32ba9ae44c07828112cdb83c..2c8ec2a6d8c0a2b629f6e9b0a491e43cc60b23c9 100644
--- a/src/THcDCLookupTTDConv.cxx
+++ b/src/THcDCLookupTTDConv.cxx
@@ -43,11 +43,11 @@ Double_t THcDCLookupTTDConv::ConvertTimeToDist(Double_t time)
   } else if (ib+1 >= fNumBins) {
     frac = 1.0;
   }
-  
+
   Double_t drift_distance = fMaxDriftDistance * frac;
 
 
   return(drift_distance);
-}  
+}
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/THcDCTimeToDistConv.cxx b/src/THcDCTimeToDistConv.cxx
index 468311ffcd1d05db8603d92b48545f787c3939d4..0ff710da74df49de44aba7ff6926dc4a0a492a59 100644
--- a/src/THcDCTimeToDistConv.cxx
+++ b/src/THcDCTimeToDistConv.cxx
@@ -13,7 +13,7 @@ ClassImp(THcDCTimeToDistConv)
 //______________________________________________________________________________
 THcDCTimeToDistConv::~THcDCTimeToDistConv()
 {
-  // Destructor. 
+  // Destructor.
 
 }
 
diff --git a/src/THcDCTrack.cxx b/src/THcDCTrack.cxx
index 7de01b9d77411221ac576aca4db7b21a33dbd6b2..9c38ba53f12dde2045bfb20df4c9e05003dcb000 100644
--- a/src/THcDCTrack.cxx
+++ b/src/THcDCTrack.cxx
@@ -1,7 +1,7 @@
 /** \class THcDCTrack
     \ingroup DetSupport
 
- Class representing a track found from linking DC Space points    
+ Class representing a track found from linking DC Space points
 
 */
 
@@ -14,7 +14,7 @@ THcDCTrack::THcDCTrack(Int_t nplanes) : fnSP(0), fNHits(0)
   fCoords.resize(nplanes);
   fResiduals.resize(nplanes);
   fDoubleResiduals.resize(nplanes);
-}  
+}
 
 void THcDCTrack::AddHit(THcDCHit * hit, Double_t dist, Int_t lr)
 {
diff --git a/src/THcDCTrack.h b/src/THcDCTrack.h
index cc97ff1c03c7e924bef06e537b78be51417e3c43..e55c33b62a000586a0a395e34ee5c1cb74833fde 100644
--- a/src/THcDCTrack.h
+++ b/src/THcDCTrack.h
@@ -77,9 +77,9 @@ protected:
   Double_t fX_fp, fY_fp, fZ_fp;
   Double_t fXp_fp, fYp_fp;
   Double_t fChi2_fp;
-  
+
   virtual void AddHit(THcDCHit * hit, Double_t dist, Int_t lr);
-  
+
 private:
   // Hide copy ctor and op=
   THcDCTrack( const THcDCTrack& );
diff --git a/src/THcDCWire.cxx b/src/THcDCWire.cxx
index f81d64641a705ad99f5eeb715ab3f141b46931ac..3655553b5e3c234991c3941cd3e8d394e083a290 100644
--- a/src/THcDCWire.cxx
+++ b/src/THcDCWire.cxx
@@ -1,8 +1,8 @@
 /** \class THcDCHit
     \ingroup DetSupport
 
- Class to represent a drift chamber wire        
-                           
+ Class to represent a drift chamber wire
+
 */
 
 #include "THcDCWire.h"
diff --git a/src/THcDCWire.h b/src/THcDCWire.h
index 53f6fcbe39e317c450dfb8440b59c72cfd14c027..5c89cd649427ab574e2388e1bac51f10b2d234dd 100644
--- a/src/THcDCWire.h
+++ b/src/THcDCWire.h
@@ -29,7 +29,7 @@ public:
   void SetNum  (Int_t num)  {fNum = num;}
   void SetFlag (Int_t flag) {fFlag = flag;}
   void SetPos  (Double_t pos)       { fPos = pos; }
-  void SetTOffset (Double_t tOffset){ fTOffset = tOffset; } 
+  void SetTOffset (Double_t tOffset){ fTOffset = tOffset; }
   void SetTTDConv (THcDCTimeToDistConv * ttdConv){ fTTDConv = ttdConv;}
 
 protected:
@@ -42,7 +42,7 @@ protected:
 private:
   THcDCWire( const THcDCWire& );
   THcDCWire& operator=( const THcDCWire& );
- 
+
   ClassDef(THcDCWire,0)             // Drift Chamber Wire class
 };
 
diff --git a/src/THcDetectorMap.h b/src/THcDetectorMap.h
index fc0d340a3b7246e6541216df904ad0311d916e4f..b222cf4173bbfa4de38ef1ac0a4eb9e4c409938e 100644
--- a/src/THcDetectorMap.h
+++ b/src/THcDetectorMap.h
@@ -16,7 +16,7 @@ class THcDetectorMap : public TObject {
  public:
   THcDetectorMap();
   virtual ~THcDetectorMap();
-  
+
   virtual void Load(const char *fname);
   virtual Int_t FillMap(THaDetMap* detmap, const char* detectorname);
 
@@ -49,7 +49,7 @@ class THcDetectorMap : public TObject {
     Int_t slot;
     Int_t model;
     std::list<ChaninMod> clist;
-      
+
   };
   std::list<ModChanList> mlist;
 
@@ -68,5 +68,5 @@ class THcDetectorMap : public TObject {
 };
 #endif
 
-  
-  
+
+
diff --git a/src/THcDriftChamber.cxx b/src/THcDriftChamber.cxx
index 1d8470b1de26bb63cad60f4e5ff695fc08940602..2368a219fe8e9e5cc2557fb33c5764fb05ff52b5 100644
--- a/src/THcDriftChamber.cxx
+++ b/src/THcDriftChamber.cxx
@@ -80,7 +80,7 @@ THaAnalysisObject::EStatus THcDriftChamber::Init( const TDatime& date )
   //  static const char* const here = "Init()";
 
   Setup(GetName(), GetTitle());
-  
+
   EStatus status;
   // This triggers call of ReadDatabase and DefineVariables
   if( (status = THaSubDetector::Init( date )) )
@@ -159,10 +159,10 @@ Int_t THcDriftChamber::ReadDatabase( const TDatime& date )
   fSpacePointCriterion = fParent->GetSpacePointCriterion(fChamberNum);
   fMaxDist = TMath::Sqrt(fSpacePointCriterion/2.0); // For easy space points
 
-   if (fhdebugflagpr) cout << " cham = " << fChamberNum << " Set yplane num " << YPlaneNum << " "<< YPlanePNum << endl; 
+   if (fhdebugflagpr) cout << " cham = " << fChamberNum << " Set yplane num " << YPlaneNum << " "<< YPlanePNum << endl;
   // Generate the HAA3INV matrix for all the acceptable combinations
-  // of hit planes.  Try to make it as generic as possible 
-  // pindex=0 -> Plane 1 missing, pindex5 -> plane 6 missing.  Won't 
+  // of hit planes.  Try to make it as generic as possible
+  // pindex=0 -> Plane 1 missing, pindex5 -> plane 6 missing.  Won't
   // replicate the exact values used in the ENGINE, because the engine
   // had one big list of matrices for both chambers, while here we will
   // have a list just for one chamber.  Also, call pindex, pmindex as
@@ -429,7 +429,7 @@ Int_t THcDriftChamber::FindHardSpacePoints()
     Double_t x, y;
   };
   Pair pairs[MAX_NUMBER_PAIRS];
-  //	
+  //
   Int_t ntest_points=0;
   for(Int_t ihit1=0;ihit1<fNhits-1;ihit1++) {
     THcDCHit* hit1=fHits[ihit1];
@@ -631,23 +631,23 @@ Int_t THcDriftChamber::DestroyPoorSpacePoints()
         for(Int_t ihit=0;ihit<spo->GetNHits();ihit++) {
             THcDCHit* hit = spo->GetHit(ihit);
            spi->AddHit(hit);
-	}         
+	}
     }
   }
   return nremoved;
 }
-    
+
 //_____________________________________________________________________________
 // HMS Specific?
   /*
-   Purpose and Methods :  This routine loops over space points and 
+   Purpose and Methods :  This routine loops over space points and
                           looks at all hits in the space
-                          point. If more than 1 hit is in the same 
+                          point. If more than 1 hit is in the same
                           plane then the space point is cloned with
-                          all combinations of 1 wire per plane.  The 
-                          requirements for cloning are:  1) at least 
-                          4 planes fire, and 2) no more than 6 planes 
-                          have multiple hits.      
+                          all combinations of 1 wire per plane.  The
+                          requirements for cloning are:  1) at least
+                          4 planes fire, and 2) no more than 6 planes
+                          have multiple hits.
   */
 Int_t THcDriftChamber::SpacePointMultiWire()
 {
@@ -659,14 +659,14 @@ Int_t THcDriftChamber::SpacePointMultiWire()
 
   Int_t nsp_tot=fNSpacePoints;
   Int_t nsp_totl=fNSpacePoints;
-  //if (fhdebugflagpr) cout << "Start  Multiwire # of sp pts = " << nsp_totl << endl; 
+  //if (fhdebugflagpr) cout << "Start  Multiwire # of sp pts = " << nsp_totl << endl;
 
   for(Int_t isp=0;isp<nsp_totl;isp++) {
     Int_t nplanes_hit = 0;	// Number of planes with hits
     Int_t nplanes_mult = 0;	// Number of planes with multiple hits
     Int_t nsp_new = 1;
     Int_t newsp_num=0;
-    //if (fhdebugflagpr) cout << "Looping thru space pts at # = " << isp << " total = " << fNSpacePoints << endl; 
+    //if (fhdebugflagpr) cout << "Looping thru space pts at # = " << isp << " total = " << fNSpacePoints << endl;
 
     for(Int_t ip=0;ip<fNPlanes;ip++) {
       nhitsperplane[ip] = 0;
@@ -689,7 +689,7 @@ Int_t THcDriftChamber::SpacePointMultiWire()
 	nplanes_hit++;
 	nsp_new *= nhitsperplane[ip];
 	if(nhitsperplane[ip] > 1) nplanes_mult++;
-        //if (fhdebugflagpr) cout << "Found plane with multi hits plane =" << ip+1 << " nplane_hit = "<< nplanes_hit << " nsp_new = " <<nsp_new << " nplane_mult = "<< nplanes_mult  << endl; 
+        //if (fhdebugflagpr) cout << "Found plane with multi hits plane =" << ip+1 << " nplane_hit = "<< nplanes_hit << " nsp_new = " <<nsp_new << " nplane_mult = "<< nplanes_mult  << endl;
       }
     }
     --nsp_new;
@@ -700,9 +700,9 @@ Int_t THcDriftChamber::SpacePointMultiWire()
     Int_t ntot = 0;
     if(nplanes_hit >= 4 && nplanes_mult < 4 && nplanes_mult >0
        && nsp_check < 20) {
-      //if (fhdebugflagpr) cout << " Cloning space point " << endl;      
+      //if (fhdebugflagpr) cout << " Cloning space point " << endl;
       // Order planes by decreasing # of hits
-      
+
       Int_t maxplane[fNPlanes];
       for(Int_t ip=0;ip<fNPlanes;ip++) {
 	maxplane[ip] = ip;
@@ -722,7 +722,7 @@ Int_t THcDriftChamber::SpacePointMultiWire()
 	for(Int_t n2=0;n2<nhitsperplane[maxplane[1]];n2++) {
 	  for(Int_t n3=0;n3<nhitsperplane[maxplane[2]];n3++) {
 	    ntot++;
-	    newsp_num = fNSpacePoints; // 
+	    newsp_num = fNSpacePoints; //
 	    //if (fhdebugflagpr) cout << " new space pt num = " << newsp_num  << " " << fNSpacePoints <<  endl;
 	    //THcSpacePoint* newsp;
 	    if(n1==0 && n2==0 && n3==0) {
@@ -741,13 +741,13 @@ Int_t THcDriftChamber::SpacePointMultiWire()
 	      newsp->AddHit(hits_plane[maxplane[3]][0]);
 	      if(nhitsperplane[maxplane[4]] == 1) {
 		newsp->AddHit(hits_plane[maxplane[4]][0]);
-		if(nhitsperplane[maxplane[5]] == 1) 
+		if(nhitsperplane[maxplane[5]] == 1)
 		  newsp->AddHit(hits_plane[maxplane[5]][0]);
 	      }
 	    } else {
 	      // if (fhdebugflagpr) cout << " setting other sp " << "# space pts now = " << fNSpacePoints << endl;
 	      THcSpacePoint* newsp = (THcSpacePoint*)fSpacePoints->ConstructedAt(newsp_num);
-              fNSpacePoints++; 
+              fNSpacePoints++;
 	      Int_t combos_save=sp->GetCombos();
 	      newsp->Clear();
 	      newsp->SetXY(sp->GetX(), sp->GetY());
@@ -758,7 +758,7 @@ Int_t THcDriftChamber::SpacePointMultiWire()
 	      newsp->AddHit(hits_plane[maxplane[3]][0]);
 	      if(nhitsperplane[maxplane[4]] == 1) {
 		newsp->AddHit(hits_plane[maxplane[4]][0]);
-		if(nhitsperplane[maxplane[5]] == 1) 
+		if(nhitsperplane[maxplane[5]] == 1)
 		  newsp->AddHit(hits_plane[maxplane[5]][0]);
 	      }
 	    }
@@ -779,8 +779,8 @@ Int_t THcDriftChamber::SpacePointMultiWire()
     nadded = nsp_tot - fNSpacePoints;
     // fNSpacePoints = nsp_tot;
   }
-  //if (fhdebugflagpr) cout << " Added space pts " << nadded << " total space pts = " << fNSpacePoints << endl;      
- 
+  //if (fhdebugflagpr) cout << " Added space pts " << nadded << " total space pts = " << fNSpacePoints << endl;
+
   // In Fortran, fill in zeros.
   return(nadded);
 }
@@ -796,7 +796,7 @@ void THcDriftChamber::ChooseSingleHit()
     THcSpacePoint* sp = (THcSpacePoint*)(*fSpacePoints)[isp];
     Int_t startnum = sp->GetNHits();
     Int_t goodhit[startnum];
-    
+
     for(Int_t ihit=0;ihit<startnum;ihit++) {
       goodhit[ihit] = 1;
     }
@@ -815,7 +815,7 @@ void THcDriftChamber::ChooseSingleHit()
 	  } else {
 	    goodhit[ihit2] = 0;
 	  }
-	  // if (fhdebugflagpr) cout << " Rejecting hit " << ihit1 << " " << tdrift1 << " " << ihit2 << " " << tdrift2 << endl; 
+	  // if (fhdebugflagpr) cout << " Rejecting hit " << ihit1 << " " << tdrift1 << " " << ihit2 << " " << tdrift2 << endl;
 	}
       }
     }
@@ -825,7 +825,7 @@ void THcDriftChamber::ChooseSingleHit()
       //THcDCHit* hit = sp->GetHit(ihit);
 	//	if (fhdebugflagpr) cout << " good hit = "<< ihit << " " << goodhit[ihit] << " time = " << hit->GetTime() << endl;
       if(goodhit[ihit] > 0) {	// Keep this hit
-	if (ihit > finalnum) {	// Move hit 
+	if (ihit > finalnum) {	// Move hit
 	  sp->ReplaceHit(finalnum++, sp->GetHit(ihit));
 	} else {
           finalnum++ ;
@@ -833,14 +833,14 @@ void THcDriftChamber::ChooseSingleHit()
       }
     }
     sp->SetNHits(finalnum);
-    // if (fhdebugflagpr) cout << " choose single hit start # of hits = " <<  startnum << " final # = " <<finalnum << endl; 
+    // if (fhdebugflagpr) cout << " choose single hit start # of hits = " <<  startnum << " final # = " <<finalnum << endl;
   }
 }
 //_____________________________________________________________________________
 // Generic
 void THcDriftChamber::SelectSpacePoints()
 //    This routine goes through the list of space_points and space_point_hits
-//    found by find_space_points and only accepts those with 
+//    found by find_space_points and only accepts those with
 //    number of hits > min_hits
 //    number of combinations > min_combos
 {
@@ -864,8 +864,8 @@ void THcDriftChamber::SelectSpacePoints()
         for(Int_t ihit=0;ihit<sp->GetNHits();ihit++) {
             THcDCHit* hit = sp->GetHit(ihit);
            sp1->AddHit(hit);
-	}         
-	}     
+	}
+	}
 	sp_count++;
       }
     }
@@ -908,7 +908,7 @@ void THcDriftChamber::CorrectHitTimes()
       Double_t time_corr = plane->GetReadoutX() ?
 	y*plane->GetReadoutCorr()/fWireVelocity :
 	x*plane->GetReadoutCorr()/fWireVelocity;
-      
+
       //     if (fhdebugflagpr) cout << "Correcting hit " << hit << " " << plane->GetPlaneNum() << " " << isp << "/" << ihit << "  " << x << "," << y << endl;
       // Fortran ENGINE does not do this check, so hits can get "corrected"
       // multiple times if they belong to multiple space points.
@@ -938,7 +938,7 @@ void THcDriftChamber::CorrectHitTimes()
       }
     }
   }
-}	   
+}
 UInt_t THcDriftChamber::Count1Bits(UInt_t x)
 // From http://graphics.stanford.edu/~seander/bithacks.html
 {
@@ -1048,7 +1048,7 @@ void THcDriftChamber::LeftRight()
 	if(plusminusknown[ihit]!=0) {
 	  plusminus[ihit] = plusminusknown[ihit];
 	} else {
-	  // Max hits per point has to be less than 32.  
+	  // Max hits per point has to be less than 32.
 	  if(pmloop & iswhit) {
 	    plusminus[ihit] = 1;
 	  } else {
@@ -1106,7 +1106,7 @@ void THcDriftChamber::LeftRight()
 	}
       } else if (nplaneshit >= fNPlanes-2 && fHMSStyleChambers) { // Two planes missing
 	Double_t chi2 = FindStub(nhits, sp,
-				     plane_list, bitpat, plusminus, stub); 
+				     plane_list, bitpat, plusminus, stub);
 	//if(debugging)
 	//if (fhdebugflagpr) cout << "pmloop=" << pmloop << " Chi2=" << chi2 << endl;
 	// Isn't this a bad idea, doing == with reals
@@ -1140,7 +1140,7 @@ void THcDriftChamber::LeftRight()
       for(Int_t i=0;i<4;i++) {
 	spstub[i] = tmp_stub[i];
       }
-      
+
     }
 
     // Calculate final coordinate based on plusminusbest
@@ -1183,7 +1183,7 @@ Double_t THcDriftChamber::FindStub(Int_t nhits, THcSpacePoint *sp,
 {
   // For a given combination of L/R, fit a stub to the space point
   // This method does a linear least squares fit of a line to the
-  // hits in an individual chamber.  It assumes that the y slope is 0 
+  // hits in an individual chamber.  It assumes that the y slope is 0
   // The wire coordinate is calculated by
   //          wire center + plusminus*(drift distance).
   // Method is called in a loop over all combinations of plusminus
@@ -1258,7 +1258,7 @@ void THcDriftChamber::DeleteArrays()
 }
 
 //_____________________________________________________________________________
-inline 
+inline
 void THcDriftChamber::Clear( const Option_t* )
 {
   // Reset per-event data.
diff --git a/src/THcDriftChamber.h b/src/THcDriftChamber.h
index f20daa4649d978830e2eef3426a96f9f4de777ed..a7fbc24aae0ffd2023d1424ca332884746953856 100644
--- a/src/THcDriftChamber.h
+++ b/src/THcDriftChamber.h
@@ -33,7 +33,7 @@ public:
 
   virtual Int_t Decode( const THaEvData& );
   virtual EStatus    Init( const TDatime& run_time );
-  
+
   virtual void       AddPlane(THcDriftChamberPlane *plane);
   virtual Int_t      ApplyCorrections( void );
   virtual void       ProcessHits( void );
@@ -81,7 +81,7 @@ protected:
   Int_t XPlaneNum;		// Absolute plane number of Xplane
   Int_t XPlanePNum;		// Absolute plane number of Xplanep
 
-  // Parameters 
+  // Parameters
   Int_t fMinHits; 		// Minimum hits required to do something
   Int_t fMaxHits; 		// Maximum required to do something
   Int_t fMinCombos;             // Minimum # pairs in a space point
@@ -133,7 +133,7 @@ protected:
   Int_t fNSpacePoints;
   Int_t fEasySpacePoint;	/* This event is an easy space point */
 
-  Double_t* stubcoef[4]; 
+  Double_t* stubcoef[4];
   std::map<int,TMatrixD*> fAA3Inv;
 
   ClassDef(THcDriftChamber,0)   // A single drift chamber
diff --git a/src/THcDriftChamberPlane.cxx b/src/THcDriftChamberPlane.cxx
index 02e3cbe05299ae2e49ed5c22861c1e4256ef07c7..61d1adb48da29b31380de51521826bcce474841b 100644
--- a/src/THcDriftChamberPlane.cxx
+++ b/src/THcDriftChamberPlane.cxx
@@ -29,7 +29,7 @@ using namespace std;
 ClassImp(THcDriftChamberPlane)
 
 //______________________________________________________________________________
-THcDriftChamberPlane::THcDriftChamberPlane( const char* name, 
+THcDriftChamberPlane::THcDriftChamberPlane( const char* name,
 					    const char* description,
 					    const Int_t planenum,
 					    THaDetectorBase* parent )
@@ -87,12 +87,12 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
 {
 
   // See what file it looks for
-  
+
   char prefix[2];
   UInt_t NumDriftMapBins;
   Double_t DriftMapFirstBin;
   Double_t DriftMapBinSize;
-  
+
   prefix[0]=tolower(GetParent()->GetPrefix()[0]);
   prefix[1]='\0';
   DBRequest list[]={
@@ -176,7 +176,7 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
 			       + pow(hxpsi*fPsi0+hxchi*hchi0,2)
 			       + pow(hypsi*fPsi0+hychi*hchi0,2) );
   if(z0 < 0.0) hphi0 = -hphi0;
-  
+
   Double_t denom2 = stubxpsi*stubychi - stubxchi*stubypsi;
 
   // Why are there 4, but only 3 used?
@@ -210,7 +210,7 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
   // For HMS, wire numbers start with one, but arrays start with zero.
   // So wire number is index+1
   for (int i=0; i<nWires; i++) {
-    Double_t pos = fPitch*( (fWireOrder==0?(i+1):fNWires-i) 
+    Double_t pos = fPitch*( (fWireOrder==0?(i+1):fNWires-i)
 			    - fCentralWire) - fCenter;
     new((*fWires)[i]) THcDCWire( i+1, pos , 0.0, fTTDConv);
     //if( something < 0 ) wire->SetFlag(1);
@@ -218,7 +218,7 @@ Int_t THcDriftChamberPlane::ReadDatabase( const TDatime& date )
 
   THaApparatus* app = GetApparatus();
   const char* nm = "hod";
-  if(  !app || 
+  if(  !app ||
       !(fglHod = dynamic_cast<THcHodoscope*>(app->GetDetector(nm))) ) {
     static const char* const here = "ReadDatabase()";
     Warning(Here(here),"Hodoscope \"%s\" not found. "
@@ -239,9 +239,9 @@ Int_t THcDriftChamberPlane::DefineVariables( EMode mode )
 
   // Register variables in global list
   RVarDef vars[] = {
-    {"wirenum", "List of TDC wire number", 
+    {"wirenum", "List of TDC wire number",
      "fHits.THcDCHit.GetWireNum()"},
-    {"rawtdc", "Raw TDC Values", 
+    {"rawtdc", "Raw TDC Values",
      "fHits.THcDCHit.GetRawTime()"},
     {"time","Drift times",
      "fHits.THcDCHit.GetTime()"},
@@ -273,7 +273,7 @@ Int_t THcDriftChamberPlane::Decode( const THaEvData& evdata )
 //_____________________________________________________________________________
 Int_t THcDriftChamberPlane::CoarseProcess( TClonesArray& tracks )
 {
- 
+
   //  HitCount();
 
  return 0;
@@ -319,11 +319,11 @@ Int_t THcDriftChamberPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
       if(rawtdc < fTdcWinMin) {
 	// Increment early counter  (Actually late because TDC is backward)
       } else if (rawtdc > fTdcWinMax) {
-	// Increment late count 
+	// Increment late count
       } else {
 	Double_t time = -StartTime   // (comes from h_trans_scin
 	  - rawtdc*fNSperChan + fPlaneTimeZero; // fNSperChan > 0 for 1877
-	// < 0 for Caen1190.  
+	// < 0 for Caen1190.
 	//	  - (rawtdc-reftime)*fNSperChan + fPlaneTimeZero;
 	// How do we get this start time from the hodoscope to here
 	// (or at least have it ready by coarse process)
@@ -336,6 +336,6 @@ Int_t THcDriftChamberPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
   return(ihit);
 }
 
-    
-  
-  
+
+
+
diff --git a/src/THcDriftChamberPlane.h b/src/THcDriftChamberPlane.h
index 95c793cd6be99252e97756fc68909d927f3696ac..ac753ac827bbc13feb19e436a7a28f784712d231 100644
--- a/src/THcDriftChamberPlane.h
+++ b/src/THcDriftChamberPlane.h
@@ -2,14 +2,14 @@
 #define ROOT_THcDriftChamberPlane
 
 //////////////////////////////////////////////////////////////////////////////
-//                         
+//
 // THcDriftChamberPlane
 //
 // A Hall C scintillator plane
 //
 // May want to later inherit from a THcPlane class if there are similarities
 // in what a plane is shared with other detector types (shower, etc.)
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 
 #include "THaSubDetector.h"
@@ -25,7 +25,7 @@ class THcHodoscope;
 /*class THaSignalHit;*/
 
 class THcDriftChamberPlane : public THaSubDetector {
-  
+
 public:
   THcDriftChamberPlane( const char* name, const char* description,
 			Int_t planenum, THaDetectorBase* parent = NULL);
diff --git a/src/THcFormula.cxx b/src/THcFormula.cxx
index ddf15474b6aaa4f7dc836e19cb8b020c1e29ed88..83a844992c9d81396f86424fa7772f71f607608d 100644
--- a/src/THcFormula.cxx
+++ b/src/THcFormula.cxx
@@ -8,7 +8,7 @@ THcFormula expressions have access hcana parameters (gHcParms).
 
 The number of times a cut has been try, as well as the number of times
 that the cut has been tested can be accessed with cutname.`scaler` (or
-.`npassed`) and cutname.`ncalled`.  
+.`npassed`) and cutname.`ncalled`.
 
 \author S. A. Wood
 
@@ -55,7 +55,7 @@ static inline Int_t NumberOfSetBits( ULong64_t v )
 }
 
 //_____________________________________________________________________________
-THcFormula::THcFormula(const char* name, const char* expression, 
+THcFormula::THcFormula(const char* name, const char* expression,
 		       const THcParmList* plst, const THaVarList* vlst,
 		       const THaCutList* clst ) :
   THaFormula()
@@ -101,7 +101,7 @@ THcFormula::~THcFormula()
 //_____________________________________________________________________________
 Int_t THcFormula::DefinedCut( TString& name )
 {
-  // Check if 'name' is a known cut. If so, enter it in the local list of 
+  // Check if 'name' is a known cut. If so, enter it in the local list of
   // variables used in this formula.
 
   EVariableType thistype;
@@ -147,9 +147,9 @@ Double_t THcFormula::DefinedValue( Int_t i )
   // If the i-th variable is a cut, return its last result
   // (calculated at the last evaluation).
   // If the variable is a string, return value of its character value
-  
+
   typedef vector<Double_t>::size_type vsiz_t;
-  
+
   assert( i>=0 && i<(Int_t)fVarDef.size() );
 
   if( IsInvalid() )
@@ -272,7 +272,7 @@ Double_t THcFormula::DefinedValue( Int_t i )
   }
   assert(false); // not reached
   return kBig;
-}  
+}
 
 
 //_____________________________________________________________________________
diff --git a/src/THcFormula.h b/src/THcFormula.h
index 20c962ac8c19d0ba28666f5ed2b8446f5271d4f2..a75a020aeb703acd442376b14e29991dcb604970 100644
--- a/src/THcFormula.h
+++ b/src/THcFormula.h
@@ -4,7 +4,7 @@
 //////////////////////////////////////////////////////////////////////////
 //
 // THcFormula
-// 
+//
 //////////////////////////////////////////////////////////////////////////
 
 #include "THcGlobals.h"
@@ -16,7 +16,7 @@ class THcFormula : public THaFormula {
 
 public:
 
-  THcFormula( const char* name, const char* formula, 
+  THcFormula( const char* name, const char* formula,
 	      const THcParmList*, const THaVarList*,
 	      const THaCutList* clst);
   THcFormula& operator=( const THcFormula& rhs );
diff --git a/src/THcHallCSpectrometer.cxx b/src/THcHallCSpectrometer.cxx
index cc766836377ad3390384187c9b85afff78b256be..b17b5df7e4fc0dafcc82a6f2bbf8b65ae4e58912 100644
--- a/src/THcHallCSpectrometer.cxx
+++ b/src/THcHallCSpectrometer.cxx
@@ -73,7 +73,7 @@ Int_t THcHallCSpectrometer::DefineVariables( EMode mode )
     { 0 }
   };
 
-  
+
   return DefineVarsFromList( vars, mode );
 }
 
@@ -93,7 +93,7 @@ Bool_t THcHallCSpectrometer::GetTrSorting() const
 {
   return ((fProperties & kSortTracks) != 0);
 }
- 
+
 //_____________________________________________________________________________
 void THcHallCSpectrometer::InitializeReconstruction()
 {
@@ -119,11 +119,11 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
 
   // --------------- To get energy from THcShower ----------------------
 
-  const char* detector_name = "hod";  
+  const char* detector_name = "hod";
   //THaApparatus* app = GetDetector();
   THaDetector* det = GetDetector("hod");
   // THaDetector* det = app->GetDetector( shower_detector_name );
-  
+
   if( dynamic_cast<THcHodoscope*>(det) ) {
     fHodo = static_cast<THcHodoscope*>(det);     // fHodo is a membervariable
   } else {
@@ -131,10 +131,10 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
     	  detector_name );
     fHodo = NULL;
   }
-  
+
 
   // fShower = static_cast<THcShower*>(det);     // fShower is a membervariable
-  
+
   // --------------- To get energy from THcShower ----------------------
 
 
@@ -195,22 +195,22 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
   gHcParms->LoadParmValues((DBRequest*)&list,prefix);
 
   EnforcePruneLimits();
-  
+
   cout <<  "\n\n\nhodo planes = " << fNPlanes << endl;
   cout <<  "sel using scin = "    << fSelUsingScin << endl;
-  cout <<  "fPruneXp = "          <<  fPruneXp << endl; 
-  cout <<  "fPruneYp = "          <<  fPruneYp << endl; 
-  cout <<  "fPruneYtar = "        <<  fPruneYtar << endl; 
-  cout <<  "fPruneDelta = "       <<  fPruneDelta << endl; 
-  cout <<  "fPruneBeta = "        <<  fPruneBeta << endl; 
-  cout <<  "fPruneDf = "          <<  fPruneDf << endl; 
-  cout <<  "fPruneChiBeta = "     <<  fPruneChiBeta << endl; 
-  cout <<  "fPruneFpTime = "      <<  fPruneFpTime << endl; 
-  cout <<  "fPruneNPMT = "        <<  fPruneNPMT << endl; 
+  cout <<  "fPruneXp = "          <<  fPruneXp << endl;
+  cout <<  "fPruneYp = "          <<  fPruneYp << endl;
+  cout <<  "fPruneYtar = "        <<  fPruneYtar << endl;
+  cout <<  "fPruneDelta = "       <<  fPruneDelta << endl;
+  cout <<  "fPruneBeta = "        <<  fPruneBeta << endl;
+  cout <<  "fPruneDf = "          <<  fPruneDf << endl;
+  cout <<  "fPruneChiBeta = "     <<  fPruneChiBeta << endl;
+  cout <<  "fPruneFpTime = "      <<  fPruneFpTime << endl;
+  cout <<  "fPruneNPMT = "        <<  fPruneNPMT << endl;
   cout <<  "sel using prune = "   <<  fSelUsingPrune << endl;
   cout <<  "fPartMass = "         <<  fPartMass << endl;
-  cout <<  "fPcentral = "         <<  fPcentral << " " <<fPCentralOffset << endl; 
-  cout <<  "fThate_lab = "        <<  fTheta_lab << " " <<fThetaCentralOffset << endl; 
+  cout <<  "fPcentral = "         <<  fPcentral << " " <<fPCentralOffset << endl;
+  cout <<  "fThate_lab = "        <<  fTheta_lab << " " <<fThetaCentralOffset << endl;
   fPcentral= fPcentral*(1.+fPCentralOffset/100.);
   // Check that these offsets are in radians
   fTheta_lab=fTheta_lab + fThetaCentralOffset*TMath::RadToDeg();
@@ -219,7 +219,7 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
   SetCentralAngles(fTheta_lab, ph, false);
   Double_t off_x = 0.0, off_y = 0.0, off_z = 0.0;
   fPointingOffset.SetXYZ( off_x, off_y, off_z );
-  
+
   //
   ifstream ifile;
   ifile.open(reconCoeffFilename.c_str());
@@ -228,7 +228,7 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
     //    return kInitError; // Is this the right return code?
     return kOK;
   }
-  
+
   string line="!";
   int good=1;
   while(good && line[0]=='!') {
@@ -266,7 +266,7 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
 	   ,&fReconTerms[fNReconTerms].Exp[3]
 	   ,&fReconTerms[fNReconTerms].Exp[4]);
     fNReconTerms++;
-    good = getline(ifile,line).good();    
+    good = getline(ifile,line).good();
   }
   cout << "Read " << fNReconTerms << " matrix element terms"  << endl;
   if(!good) {
@@ -280,15 +280,15 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date )
 void THcHallCSpectrometer::EnforcePruneLimits()
 {
   // Enforce minimum values for the prune cuts
-  
-  fPruneXp      = TMath::Max( 0.08, fPruneXp); 
-  fPruneYp      = TMath::Max( 0.04, fPruneYp); 
-  fPruneYtar    = TMath::Max( 4.0,  fPruneYtar); 
-  fPruneDelta   = TMath::Max( 13.0, fPruneDelta); 
-  fPruneBeta    = TMath::Max( 0.1,  fPruneBeta); 
-  fPruneDf      = TMath::Max( 1.0,  fPruneDf); 
-  fPruneChiBeta = TMath::Max( 2.0,  fPruneChiBeta); 
-  fPruneFpTime  = TMath::Max( 5.0,  fPruneFpTime); 
+
+  fPruneXp      = TMath::Max( 0.08, fPruneXp);
+  fPruneYp      = TMath::Max( 0.04, fPruneYp);
+  fPruneYtar    = TMath::Max( 4.0,  fPruneYtar);
+  fPruneDelta   = TMath::Max( 13.0, fPruneDelta);
+  fPruneBeta    = TMath::Max( 0.1,  fPruneBeta);
+  fPruneDf      = TMath::Max( 1.0,  fPruneDf);
+  fPruneChiBeta = TMath::Max( 2.0,  fPruneChiBeta);
+  fPruneFpTime  = TMath::Max( 5.0,  fPruneFpTime);
   fPruneNPMT    = TMath::Max( 6.0,  fPruneNPMT);
 }
 
@@ -308,7 +308,7 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks )
 
     Double_t hut[5];
     Double_t hut_rot[5];
-    
+
     hut[0] = track->GetX()/100.0 + fZTrueFocus*track->GetTheta() + fDetOffset_x;//m
     hut[1] = track->GetTheta() + fAngOffset_x;//radians
     hut[2] = track->GetY()/100.0 + fZTrueFocus*track->GetPhi() + fDetOffset_y;//m
@@ -345,7 +345,7 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks )
     }
     // Transfer results to track
     // No beam raster yet
-    //; In transport coordinates phi = hyptar = dy/dz and theta = hxptar = dx/dz 
+    //; In transport coordinates phi = hyptar = dy/dz and theta = hxptar = dx/dz
     //;    but for unknown reasons the yp offset is named  htheta_offset
     //;    and  the xp offset is named  hphi_offset
 
@@ -364,15 +364,15 @@ Int_t THcHallCSpectrometer::FindVertices( TClonesArray& tracks )
   // If enabled, sort the tracks by chi2/ndof
   if( GetTrSorting() )
     fTracks->Sort();
-  
-  // Find the "Golden Track". 
+
+  // Find the "Golden Track".
   if( GetNTracks() > 0 ) {
     // Select first track in the array. If there is more than one track
     // and track sorting is enabled, then this is the best fit track
     // (smallest chi2/ndof).  Otherwise, it is the track with the best
     // geometrical match (smallest residuals) between the U/V clusters
     // in the upper and lower VDCs (old behavior).
-    // 
+    //
     // Chi2/dof is a well-defined quantity, and the track selected in this
     // way is immediately physically meaningful. The geometrical match
     // criterion is mathematically less well defined and not usually used
@@ -409,11 +409,11 @@ Int_t THcHallCSpectrometer::TrackCalc()
 //_____________________________________________________________________________
 Int_t THcHallCSpectrometer::BestTrackSimple()
 {
-  
+
   if( GetTrSorting() )
     fTracks->Sort();
-  
-  // Find the "Golden Track". 
+
+  // Find the "Golden Track".
   //  if( GetNTracks() > 0 ) {
   if( fNtracks > 0 ) {
     // Select first track in the array. If there is more than one track
@@ -421,13 +421,13 @@ Int_t THcHallCSpectrometer::BestTrackSimple()
     // (smallest chi2/ndof).  Otherwise, it is the track with the best
     // geometrical match (smallest residuals) between the U/V clusters
     // in the upper and lower VDCs (old behavior).
-    // 
+    //
     // Chi2/dof is a well-defined quantity, and the track selected in this
     // way is immediately physically meaningful. The geometrical match
     // criterion is mathematically less well defined and not usually used
     // in track reconstruction. Hence, chi2 sortiing is preferable, albeit
     // obviously slower.
-      
+
     fGoldenTrack = static_cast<THaTrack*>( fTracks->At(0) );
     fTrkIfo      = *fGoldenTrack;
     fTrk         = fGoldenTrack;
@@ -450,13 +450,13 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin()
 
     Bool_t* x2Hits        = new Bool_t [fHodo->GetNPaddles(2)];
     Bool_t* y2Hits        = new Bool_t [fHodo->GetNPaddles(3)];
-    for (UInt_t j = 0; j < fHodo->GetNPaddles(2); j++ ){ 
+    for (UInt_t j = 0; j < fHodo->GetNPaddles(2); j++ ){
       x2Hits[j] = kFALSE;
     }
-    for (UInt_t j = 0; j < fHodo->GetNPaddles(3); j++ ){ 
+    for (UInt_t j = 0; j < fHodo->GetNPaddles(3); j++ ){
       y2Hits[j] = kFALSE;
     }
-      
+
     for (Int_t rawindex=0; rawindex<fHodo->GetTotHits(); rawindex++) {
       Int_t ip = fHodo->GetGoodRawPlane(rawindex);
       if(ip==2) {	// X2
@@ -471,21 +471,21 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin()
     for (Int_t itrack = 0; itrack < fNtracks; itrack++ ){
       Double_t chi2PerDeg;
 
-      THaTrack* aTrack = static_cast<THaTrack*>( fTracks->At(itrack) );      
-      if (!aTrack) return -1;	
+      THaTrack* aTrack = static_cast<THaTrack*>( fTracks->At(itrack) );
+      if (!aTrack) return -1;
 
       if ( aTrack->GetNDoF() > fSelNDegreesMin ){
 	chi2PerDeg =  aTrack->GetChi2() / aTrack->GetNDoF();
 
-	if( ( aTrack->GetDedx()    > fSeldEdX1Min )   && 
-	    ( aTrack->GetDedx()    < fSeldEdX1Max )   && 
+	if( ( aTrack->GetDedx()    > fSeldEdX1Min )   &&
+	    ( aTrack->GetDedx()    < fSeldEdX1Max )   &&
 	    ( aTrack->GetBeta()    > fSelBetaMin  )   &&
 	    ( aTrack->GetBeta()    < fSelBetaMax  )   &&
-	    ( aTrack->GetEnergy()  > fSelEtMin    )   && 
-	    ( aTrack->GetEnergy()  < fSelEtMax    ) )  	    	    
+	    ( aTrack->GetEnergy()  > fSelEtMin    )   &&
+	    ( aTrack->GetEnergy()  < fSelEtMax    ) )
 	  {
 	    Int_t x2D, y2D;
-	      	      
+
 	    if ( fNtracks > 1 ){
 	      Double_t hitpos3  = aTrack->GetX() + aTrack->GetTheta() * ( fScin2XZpos + 0.5 * fScin2XdZpos );
 	      Int_t icounter3  = TMath::Nint( ( hitpos3 - fHodo->GetPlaneCenter(2) ) / fHodo->GetPlaneSpacing(2) ) + 1;
@@ -512,7 +512,7 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin()
 	      // Plane 4
 	      mindiff = 1000;
 	      for (UInt_t i = 0; i < fHodo->GetNPaddles(3); i++ ){
-		if ( y2Hits[i] ) {		    
+		if ( y2Hits[i] ) {
 		  Int_t diff = TMath::Abs((Int_t)hitCnt4-(Int_t)i-1);
 		  if (diff < mindiff) mindiff = diff;
 		}
@@ -547,27 +547,27 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin()
 		  fGoldenTrack = static_cast<THaTrack*>( fTracks->At( fGoodTrack ) );
 		  fTrkIfo      = *fGoldenTrack;
 		  fTrk         = fGoldenTrack;
-		}		  
+		}
 	      } // condition x2D
 	    } // condition y2D
-	  } // conditions for dedx, beta and trac energy		  
+	  } // conditions for dedx, beta and trac energy
       } // confition for fNFreeFP greater than fSelNDegreesMin
-    } // loop over tracks      
+    } // loop over tracks
 
     // Fall back to using track with minimum chi2
     if ( fGoodTrack == -1 ){
-      
+
       chi2Min = 10000000000.0;
       for (Int_t iitrack = 0; iitrack < fNtracks; iitrack++ ){
 	Double_t chi2PerDeg;
 	THaTrack* aTrack = dynamic_cast<THaTrack*>( fTracks->At(iitrack) );
 	if (!aTrack) return -1;
-	  
+
 	if ( aTrack->GetNDoF() > fSelNDegreesMin ){
 	  chi2PerDeg =  aTrack->GetChi2() / aTrack->GetNDoF();
 
 	  if ( chi2PerDeg < chi2Min ){
-	      
+
 	    fGoodTrack = iitrack;
 	    chi2Min = chi2PerDeg;
 
@@ -579,25 +579,25 @@ Int_t THcHallCSpectrometer::BestTrackUsingScin()
 	}
       } // loop over trakcs
 
-    } 
+    }
 
   } else // Condition for fNtrack > 0
     fGoldenTrack = NULL;
 
   return(0);
 }
-    
+
 //_____________________________________________________________________________
 Int_t THcHallCSpectrometer::BestTrackUsingPrune()
-{  
+{
   Int_t nGood;
   Double_t chi2Min;
 
   if ( fNtracks > 0 ) {
     chi2Min   = 10000000000.0;
-    fGoodTrack = 0;    
-    Bool_t* keep      = new Bool_t [fNtracks];  
-    Int_t* reject    = new Int_t  [fNtracks];  
+    fGoodTrack = 0;
+    Bool_t* keep      = new Bool_t [fNtracks];
+    Int_t* reject    = new Int_t  [fNtracks];
 
     THaTrack *testTracks[fNtracks];
 
@@ -605,16 +605,16 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
     for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       keep[ptrack] = kTRUE;
       reject[ptrack] = 0;
-      testTracks[ptrack] = static_cast<THaTrack*>( fTracks->At(ptrack) );      
-      if (!testTracks[ptrack]) return -1;	
-    }      
-      
+      testTracks[ptrack] = static_cast<THaTrack*>( fTracks->At(ptrack) );
+      if (!testTracks[ptrack]) return -1;
+    }
+
     // ! Prune on xptar
     nGood = 0;
     for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
-      if ( ( TMath::Abs( testTracks[ptrack]->GetTTheta() ) < fPruneXp ) && ( keep[ptrack] ) ){	  
+      if ( ( TMath::Abs( testTracks[ptrack]->GetTTheta() ) < fPruneXp ) && ( keep[ptrack] ) ){
 	nGood ++;
-      }	
+      }
     }
     if ( nGood > 0 ) {
       for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
@@ -624,12 +624,12 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 	}
       }
     }
-      
+
     // ! Prune on yptar
     nGood = 0;
     for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( TMath::Abs( testTracks[ptrack]->GetTPhi() ) < fPruneYp ) && ( keep[ptrack] ) ){
-	nGood ++; 
+	nGood ++;
       }
     }
     if (nGood > 0 ) {
@@ -637,18 +637,18 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 	if ( TMath::Abs( testTracks[ptrack]->GetTPhi() ) >= fPruneYp ){
 	  keep[ptrack] = kFALSE;
 	  reject[ptrack] = reject[ptrack] + 2;
-  
-	}		
+
+	}
       }
     }
-      
+
     // !     Prune on ytar
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( TMath::Abs( testTracks[ptrack]->GetTY() ) < fPruneYtar ) && ( keep[ptrack] ) ){
-	nGood ++; 
-      }	
-    }      
+	nGood ++;
+      }
+    }
     if (nGood > 0 ) {
       for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( TMath::Abs( testTracks[ptrack]->GetTY() ) >= fPruneYtar ){
@@ -657,14 +657,14 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 	}
       }
     }
-  
+
     // !     Prune on delta
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( TMath::Abs( testTracks[ptrack]->GetDp() ) < fPruneDelta ) && ( keep[ptrack] ) ){
-	nGood ++; 
-      }	
-    }            
+	nGood ++;
+      }
+    }
     if (nGood > 0 ) {
       for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( TMath::Abs( testTracks[ptrack]->GetDp() ) >= fPruneDelta ){
@@ -672,38 +672,38 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 	  reject[ptrack] = reject[ptrack] + 20;
 	}
       }
-    }      
-            
+    }
+
     // !     Prune on beta
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       Double_t p = testTracks[ptrack]->GetP();
-      Double_t betaP = p / TMath::Sqrt( p * p + fPartMass * fPartMass );       
+      Double_t betaP = p / TMath::Sqrt( p * p + fPartMass * fPartMass );
       if ( ( TMath::Abs( testTracks[ptrack]->GetBeta() - betaP ) < fPruneBeta ) && ( keep[ptrack] ) ){
-	nGood ++; 
-      }	
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	Double_t p = testTracks[ptrack]->GetP();
-	Double_t betaP = p / TMath::Sqrt( p * p + fPartMass * fPartMass );       
-	if ( TMath::Abs( testTracks[ptrack]->GetBeta() - betaP ) >= fPruneBeta ) {	    
+	Double_t betaP = p / TMath::Sqrt( p * p + fPartMass * fPartMass );
+	if ( TMath::Abs( testTracks[ptrack]->GetBeta() - betaP ) >= fPruneBeta ) {
 	  keep[ptrack] = kFALSE;
-	  reject[ptrack] = reject[ptrack] + 100;	          
-	}	  
-      }	
+	  reject[ptrack] = reject[ptrack] + 100;
+	}
+      }
     }
-  
+
     // !     Prune on deg. freedom for track chisq
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( testTracks[ptrack]->GetNDoF() >= fPruneDf ) && ( keep[ptrack] ) ){
-	nGood ++; 	  
-      }		
-    }          
+	nGood ++;
+      }
+    }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
-	if ( testTracks[ptrack]->GetNDoF() < fPruneDf ){	  
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
+	if ( testTracks[ptrack]->GetNDoF() < fPruneDf ){
 	  keep[ptrack] = kFALSE;
 	  reject[ptrack] = reject[ptrack] + 200;
 	}
@@ -712,13 +712,13 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 
     //!     Prune on num pmt hits
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( testTracks[ptrack]->GetNPMT() >= fPruneNPMT ) && ( keep[ptrack] ) ){
-	nGood ++; 	  
-      }	        		
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( testTracks[ptrack]->GetNPMT() < fPruneNPMT ){
 	  keep[ptrack] = kFALSE;
 	  reject[ptrack] = reject[ptrack] + 100000;
@@ -728,87 +728,87 @@ Int_t THcHallCSpectrometer::BestTrackUsingPrune()
 
     // !     Prune on beta chisqr
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
-      if ( ( testTracks[ptrack]->GetBetaChi2() < fPruneChiBeta ) && 
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
+      if ( ( testTracks[ptrack]->GetBetaChi2() < fPruneChiBeta ) &&
 	   ( testTracks[ptrack]->GetBetaChi2() > 0.01 )          &&   ( keep[ptrack] ) ){
-	nGood ++; 	  
-      }	        			
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
-	if ( ( testTracks[ptrack]->GetBetaChi2() >= fPruneChiBeta ) || 
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
+	if ( ( testTracks[ptrack]->GetBetaChi2() >= fPruneChiBeta ) ||
 	     ( testTracks[ptrack]->GetBetaChi2() <= 0.01          ) ){
 	  keep[ptrack] = kFALSE;
 	  reject[ptrack] = reject[ptrack] + 1000;
-	}	  	  
+	}
       }
     }
 
     // !     Prune on fptime
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
-      if ( ( TMath::Abs( testTracks[ptrack]->GetFPTime() - fHodo->GetStartTimeCenter() ) < fPruneFpTime )  &&   
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
+      if ( ( TMath::Abs( testTracks[ptrack]->GetFPTime() - fHodo->GetStartTimeCenter() ) < fPruneFpTime )  &&
 	   ( keep[ptrack] ) ){
-	nGood ++; 	  
-      }	        			
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( TMath::Abs( testTracks[ptrack]->GetFPTime() - fHodo->GetStartTimeCenter() ) >= fPruneFpTime ) {
 	  keep[ptrack] = kFALSE;
-	  reject[ptrack] = reject[ptrack] + 2000;	    	    
+	  reject[ptrack] = reject[ptrack] + 2000;
 	}
       }
     }
-      
+
     // !     Prune on Y2 being hit
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( testTracks[ptrack]->GetGoodPlane4() == 1 )  &&  keep[ptrack] ) {
-	nGood ++; 	  	  
-      }	        			
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( testTracks[ptrack]->GetGoodPlane4() != 1 ) {
 	  keep[ptrack] = kFALSE;
-	  reject[ptrack] = reject[ptrack] + 10000;	    	    
+	  reject[ptrack] = reject[ptrack] + 10000;
 	}
       }
-    }      
-  
+    }
+
     // !     Prune on X2 being hit
     nGood = 0;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
       if ( ( testTracks[ptrack]->GetGoodPlane3() == 1 )  &&  keep[ptrack] ) {
-	nGood ++; 	  	  
-      }	        			
+	nGood ++;
+      }
     }
     if (nGood > 0 ) {
-      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      
+      for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 	if ( testTracks[ptrack]->GetGoodPlane3() != 1 ) {
 	  keep[ptrack] = kFALSE;
-	  reject[ptrack] = reject[ptrack] + 20000;	    	    	    	    
+	  reject[ptrack] = reject[ptrack] + 20000;
 	}
       }
-    }      
-      
+    }
+
     // !     Pick track with best chisq if more than one track passed prune tests
     Double_t chi2PerDeg = 0.;
-    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){	      	
+    for (Int_t ptrack = 0; ptrack < fNtracks; ptrack++ ){
 
       chi2PerDeg =  testTracks[ptrack]->GetChi2() / testTracks[ptrack]->GetNDoF();
 
       if ( ( chi2PerDeg < chi2Min ) && ( keep[ptrack] ) ){
 	fGoodTrack = ptrack;
 	chi2Min = chi2PerDeg;
-      }	
-    }      
+      }
+    }
 
     fGoldenTrack = static_cast<THaTrack*>( fTracks->At(fGoodTrack) );
     fTrkIfo      = *fGoldenTrack;
     fTrk         = fGoldenTrack;
-      
+
   } else // Condition for fNtrack > 0
     fGoldenTrack = NULL;
 
@@ -823,7 +823,7 @@ Int_t THcHallCSpectrometer::TrackTimes( TClonesArray* Tracks ) {
   // To be useful, a meaningful timing resolution should be assigned
   // to each Scintillator object (part of the database).
 
-  
+
   return 0;
 }
 
@@ -832,7 +832,7 @@ Int_t THcHallCSpectrometer::ReadRunDatabase( const TDatime& date )
 {
   // Override THaSpectrometer with nop method.  All needed kinamatics
   // read in ReadDatabase.
-  
+
   return kOK;
 }
 
diff --git a/src/THcHallCSpectrometer.h b/src/THcHallCSpectrometer.h
index cfb1335defedc56c6de3d2d0659e89b5926d86be..8045b645b9df689980acf9912b6eb3d46d168e31 100644
--- a/src/THcHallCSpectrometer.h
+++ b/src/THcHallCSpectrometer.h
@@ -34,7 +34,7 @@
 //class THaScintillator;
 
 class THcHallCSpectrometer : public THaSpectrometer {
-  
+
 public:
   THcHallCSpectrometer( const char* name, const char* description );
   virtual ~THcHallCSpectrometer();
@@ -129,7 +129,7 @@ protected:
   Double_t fPhiOffset; // Zero order term in xptar optics matrix (rad)
   Double_t fDeltaOffset; // Zero order term in delta optics matrix (%)
   Double_t fThetaCentralOffset; // Offset of Central spectrometer angle (rad)
-  Double_t fOopCentralOffset; //Offset of central out-of-plane angle (rad) 
+  Double_t fOopCentralOffset; //Offset of central out-of-plane angle (rad)
   Double_t fPCentralOffset; // Offset Central spectrometer momentum (%)
   Double_t fTheta_lab; // Central spectrometer angle (deg)
   // For spectrometer central momentum use fPcentral in THaSpectrometer.h
diff --git a/src/THcHodoEff.cxx b/src/THcHodoEff.cxx
index 402d72526d525a9665a1c39083e58c9c6f064a55..bcf662960403f3e164b1bc5e284b4a33db723464 100644
--- a/src/THcHodoEff.cxx
+++ b/src/THcHodoEff.cxx
@@ -2,7 +2,7 @@
     \ingroup DetSupport
 
  Class for accumulating statistics for and calculating hodoscope
- efficiencies.                                                  
+ efficiencies.
 
 */
 #include "THaEvData.h"
@@ -97,17 +97,17 @@ THaAnalysisObject::EStatus THcHodoEff::Init( const TDatime& run_time )
 
   // Standard initialization. Calls ReadDatabase(), ReadRunDatabase(),
   // and DefineVariables() (see THaAnalysisObject::Init)
-  
+
   fHod = dynamic_cast<THcHodoscope*>
     ( FindModule( fName.Data(), "THcHodoscope"));
 
   fSpectro = static_cast<THaSpectrometer*>(fHod->GetApparatus());
-  
+
   if( THaPhysicsModule::Init( run_time ) != kOK )
     return fStatus;
 
   cout << "THcHodoEff::Init nplanes=" << fHod->GetNPlanes() << endl;
-  cout << "THcHodoEff::Init Apparatus = " << fHod->GetName() << 
+  cout << "THcHodoEff::Init Apparatus = " << fHod->GetName() <<
     " " <<
      (fHod->GetApparatus())->GetName() << endl;
 
@@ -119,7 +119,7 @@ Int_t THcHodoEff::ReadDatabase( const TDatime& date )
 {
   // Read database. Gets variable needed for efficiency calculation
   // Get # of planes and their z positions here.
-  
+
   fNPlanes = fHod->GetNPlanes();
   fPlanes = new THcScintillatorPlane* [fNPlanes];
   fPosZ = new Double_t[fNPlanes];
@@ -143,7 +143,7 @@ Int_t THcHodoEff::ReadDatabase( const TDatime& date )
   fHodoOrEffi = new Int_t[totalpaddles];
   fHodoAndEffi = new Int_t[totalpaddles];
   fStatTrk = new Int_t[totalpaddles];
-  
+
   char prefix[2];
   prefix[0] = tolower((fHod->GetApparatus())->GetName()[0]);
   prefix[1] = '\0';
@@ -156,7 +156,7 @@ Int_t THcHodoEff::ReadDatabase( const TDatime& date )
   };
   //  fMaxShTrk = 0.05;		// For cut on fraction of momentum seen in shower
   gHcParms->LoadParmValues((DBRequest*)&list,prefix);
-  
+
   cout << "\n\nTHcHodoEff::ReadDatabase nplanes=" << fHod->GetNPlanes() << endl;
   // Setup statistics arrays
   // Better method to put this in?
@@ -219,7 +219,7 @@ Int_t THcHodoEff::DefineVariables( EMode mode )
 
   //  fEffiTest = 0;
   //  gHcParms->Define(Form("hodoeffi"),"Testing effi",fEffiTest);
-  
+
   const RVarDef vars[] = {
     // Move these into THcHallCSpectrometer using track fTracks
     // {"effitestvar",    "efficiency test var",      "fEffiTest"},
@@ -243,7 +243,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
   // Project the golden track to each
   // plane.  Need to get track at Focal Plane, not tgt.
   //
-  // Assumes that planes are X, Y, X, Y 
+  // Assumes that planes are X, Y, X, Y
   THaTrack* theTrack = fSpectro->GetGoldenTrack();
   // Since fSpectro knows the index of the golden track, we can
   // get other information about the track from fSpectro.
@@ -251,7 +251,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 
   if(!theTrack) return 0;
   Int_t trackIndex = theTrack->GetTrkNum()-1;
-  
+
   // May make these member variables
   Double_t hitPos[fNPlanes];
   Double_t hitDistance[fNPlanes];
@@ -268,7 +268,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 		       TMath::Min(
 		       TMath::Nint((hitPos[ip]-fCenterFirst[ip])/
 				   fSpacing[ip]+1),fNCounters[ip] ),1);
-      hitDistance[ip] =  hitPos[ip] - (fSpacing[ip]*(hitCounter[ip]-1) + 
+      hitDistance[ip] =  hitPos[ip] - (fSpacing[ip]*(hitCounter[ip]-1) +
 				       fCenterFirst[ip]);
     } else {			// Y Plane
       hitPos[ip] = theTrack->GetY() + theTrack->GetPhi()*fPosZ[ip];
@@ -276,10 +276,10 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 		       TMath::Min(
 		       TMath::Nint((fCenterFirst[ip]-hitPos[ip])/
 				   fSpacing[ip]+1), fNCounters[ip] ),1);
-      hitDistance[ip] =  hitPos[ip] -(fCenterFirst[ip] - 
+      hitDistance[ip] =  hitPos[ip] -(fCenterFirst[ip] -
 				      fSpacing[ip]*(hitCounter[ip]-1));
     }
-        
+
 
   }
 
@@ -287,7 +287,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
   // dpos stuff not implemented
   // Why do dpos stuff here, does any other part need the dpos historgrams
   // Look to VDCEff code to see how to create and fill histograms
-       
+
   for(Int_t ip=0;ip<fNPlanes;ip++) {
     Int_t hitcounter=hitCounter[ip];
     // goodTdcBothSides[ip] = kFALSE;
@@ -307,7 +307,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
       }
     }
   }
-       
+
   // Record position differences between track and center of scin
   // and increment 'should have hit' counters
   for(Int_t ip=0;ip<fNPlanes;ip++) {
@@ -315,9 +315,9 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
     Double_t dist = hitDistance[ip];
     if(TMath::Abs(dist) <= fStatSlop &&
        theTrack->GetChi2()/theTrack->GetNDoF() <= fMaxChisq &&
-       theTrack->GetEnergy() >= 0.05 ) 
+       theTrack->GetEnergy() >= 0.05 )
       {
-	fStatTrk[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;		
+	fStatTrk[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	// Double_t delta = theTrack->GetDp();
 	// Int_t idel = TMath::Floor(delta+10.0);
 	// Should
@@ -330,13 +330,13 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
    }
   // Is there a hit on or adjacent to paddle that track
   // passes through?
-  
+
   // May collapse this loop into last
-  
+
   // record the hits as a "didhit" if track is near center of
   // scintillator, the chisqared of the track is good and it is the
   // first "didhit" in that plane.
-  
+
   for(Int_t ip=0;ip<fNPlanes;ip++) {
     Int_t hitcounter = hitCounter[ip];
     Double_t dist = hitDistance[ip];
@@ -349,14 +349,14 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
       Bool_t onTrack, goodScinTime, goodTdcNeg, goodTdcPos;
       fHod->GetFlags(trackIndex,ip,ihit,
 		     onTrack, goodScinTime, goodTdcNeg, goodTdcPos);
-      
+
       if(TMath::Abs(dist) <= fStatSlop &&
 	 TMath::Abs(hitcounter-counter) <= checkHit[ip] &&
 	 fHitPlane[ip] == 0 &&
-	 theTrack->GetChi2()/theTrack->GetNDoF() <= fMaxChisq && 
+	 theTrack->GetChi2()/theTrack->GetNDoF() <= fMaxChisq &&
 	 theTrack->GetEnergy() >= 0.05 ) {
 	fHitPlane[ip]++;
-	
+
 	// Need to find out hgood_tdc_pos(igoldentrack,ihit) and neg
 	if(goodTdcPos) {
 	  if(goodTdcNeg) {	// Both fired
@@ -364,12 +364,12 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 	    fStatNegHit[ip][hitcounter]++;
 	    fStatAndHit[ip][hitcounter]++;
 	    fStatOrHit[ip][hitcounter]++;
-	    
+
 	    fHodoPosEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	    fHodoNegEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	    fHodoAndEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	    fHodoOrEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
-	    
+
 	    // Double_t delta = theTrack->GetDp();
 	    // Int_t idel = TMath::Floor(delta+10.0);
 	    // if(idel >=0 && idel < 20) {
@@ -387,7 +387,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 	  fHodoNegEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	  fHodoOrEffi[fHod->GetScinIndex(ip,hitCounter[ip]-1)]++;
 	}
-		
+
 	// Increment pos/neg/both fired.  Track independent, so
 	// no chisquared cut, but note that only scintillators on the
 	// track are examined.
@@ -401,7 +401,7 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 	  fNegGood[ip][hitcounter]++;
 	}
 	// Determine if one or both PMTs had a good tdc
-	
+
 	// if(goodTdcPos && goodTdcNeg) {
 	//  goodTdcBothSides[ip] = kTRUE;
 	// }
@@ -409,25 +409,25 @@ Int_t THcHodoEff::Process( const THaEvData& evdata )
 	//  goodTdcOneSide[ip] = kTRUE;
 	// }
       }
-      
+
       /*
 	For each plane, see of other 3 fired.  This means that they were enough
 	to form a 3/4 trigger, and so the fraction of times this plane fired is
 	the plane trigger efficiency.  NOTE: we only require a TDC hit, not a
 	TDC hit within the SCIN 3/4 trigger window, so high rates will make
 	this seem better than it is.  Also, make sure we're not near the edge
-	of the hodoscope (at the last plane), using the same hhodo_slop param. 
+	of the hodoscope (at the last plane), using the same hhodo_slop param.
 	as for h_tof.f
 	NOTE ALSO: to make this check simpler, we are assuming that all planes
 	have identical active areas.  y_scin = y_cent + y_offset, so shift track
 	position by offset for comparing to edges.
       */
-      
+
       // Need to add calculation and cuts on
       // xatback and yatback in order to set the
       // htrig_hododidflag, htrig_hodoshouldflag and otherthreehit flags
       //
-      
+
       ++fNevt;
     }
   }
diff --git a/src/THcHodoEff.h b/src/THcHodoEff.h
index ec7e2d7c7f5f6ad08738d5b049c88673b49b0cf6..b6720deb77fd47baad51b4ba6bbaae58e2b0290c 100644
--- a/src/THcHodoEff.h
+++ b/src/THcHodoEff.h
@@ -43,7 +43,7 @@ protected:
 
   // Data needed for efficiency calculation for one Hodoscope paddle
 
-  Double_t* fZPos;		// 
+  Double_t* fZPos;		//
 
   TString       fName;		// Name of hodoscope
   THcHodoscope* fHod;		// Hodscope object
@@ -82,7 +82,7 @@ protected:
   vector<vector<Int_t> > fBothGood;
   vector<vector<Int_t> > fNegGood;
   vector<vector<Int_t> > fPosGood;
-  
+
   Int_t* fHitPlane;
 
   ClassDef(THcHodoEff,0) 	// Hodoscope efficiency module
diff --git a/src/THcHodoHit.cxx b/src/THcHodoHit.cxx
index ecf8e1aaff2ca34f8582829329f488d1a15a8472..63b16b8c46a615587244a840906d245e3aace4de 100644
--- a/src/THcHodoHit.cxx
+++ b/src/THcHodoHit.cxx
@@ -1,7 +1,7 @@
 /** \class THcHodoHit
     \ingroup DetSupport
 
- Class representing a single hit for the Hodoscopes                        
+ Class representing a single hit for the Hodoscopes
 
 */
 #include "THcHodoHit.h"
diff --git a/src/THcHodoHit.h b/src/THcHodoHit.h
index b6d6aaee38d4c14ee37dabbebf41ec16d79d1559..e9adecff1fbebd18ef33144e1a3fa8ec637a8780 100644
--- a/src/THcHodoHit.h
+++ b/src/THcHodoHit.h
@@ -20,13 +20,13 @@ public:
   THcHodoHit(Int_t postdc, Int_t negtdc, Double_t posadc, Double_t negadc,
 	     Int_t ipad, THcScintillatorPlane* sp) :
   fPosTDC(postdc), fNegTDC(negtdc), fPosADC_Ped(posadc), fNegADC_Ped(negadc),
-    fPaddleNumber(ipad), fHasCorrectedTimes(kFALSE), 
+    fPaddleNumber(ipad), fHasCorrectedTimes(kFALSE),
     fTwoGoodTimes(kFALSE), fPlane(sp) {};
 
   virtual ~THcHodoHit() {}
 
   Bool_t IsSortable () const { return kFALSE; }
-  
+
   // Get and Set Functions
   Double_t GetPosADC() const { return fPosADC_Ped; }
   Double_t GetNegADC() const { return fNegADC_Ped; }
@@ -74,14 +74,14 @@ protected:
 
   Bool_t fHasCorrectedTimes;
   Bool_t fTwoGoodTimes;
-  
+
   THcScintillatorPlane* fPlane;	// Pointer to parent scintillator plane
-  
-  
+
+
 private:
   THcHodoHit( const THcHodoHit& );
   THcHodoHit& operator=( const THcHodoHit& );
-  
+
   ClassDef(THcHodoHit,0)             // Drift Chamber Hit
 };
 
diff --git a/src/THcHodoscope.cxx b/src/THcHodoscope.cxx
index c22b1d97ed74d44ae273f9b37548e6900ffeb247..eadc24e72663bfac75d509551ec752c3d7ee8dfd 100644
--- a/src/THcHodoscope.cxx
+++ b/src/THcHodoscope.cxx
@@ -71,14 +71,14 @@ void THcHodoscope::Setup(const char* name, const char* description)
 {
 
   //  static const char* const here = "Setup()";
-  //  static const char* const message = 
+  //  static const char* const message =
   //    "Must construct %s detector with valid name! Object construction failed.";
 
   cout << "In THcHodoscope::Setup()" << endl;
   // Base class constructor failed?
   if( IsZombie()) return;
 
-  fDebug   = 1;  // Keep this at one while we're working on the code    
+  fDebug   = 1;  // Keep this at one while we're working on the code
 
   char prefix[2];
 
@@ -93,11 +93,11 @@ void THcHodoscope::Setup(const char* name, const char* description)
   };
   //fNPlanes = 4; 		// Default if not defined
   gHcParms->LoadParmValues((DBRequest*)&listextra,prefix);
-  
+
   cout << "Plane Name List : " << planenamelist << endl;
 
   vector<string> plane_names = vsplit(planenamelist);
-  // Plane names  
+  // Plane names
   if(plane_names.size() != (UInt_t) fNPlanes) {
     cout << "ERROR: Number of planes " << fNPlanes << " doesn't agree with number of plane names " << plane_names.size() << endl;
     // Should quit.  Is there an official way to quit?
@@ -120,7 +120,7 @@ void THcHodoscope::Setup(const char* name, const char* description)
   }
 
   // --------------- To get energy from THcShower ----------------------
-  const char* shower_detector_name = "cal";  
+  const char* shower_detector_name = "cal";
   //  THaApparatus* app;
   THcHallCSpectrometer *app = dynamic_cast<THcHallCSpectrometer*>(GetApparatus());
   THaDetector* det = app->GetDetector( shower_detector_name );
@@ -129,30 +129,30 @@ void THcHodoscope::Setup(const char* name, const char* description)
     fShower = dynamic_cast<THcShower*>(det);
   }
   else if( !dynamic_cast<THcShower*>(det) ) {
-    cout << "Warining: calorimeter analysis module " 
+    cout << "Warining: calorimeter analysis module "
 	 << shower_detector_name << " not loaded for spectrometer "
 	 << prefix << endl;
-    
+
     fShower = NULL;
   }
-  
+
   // --------------- To get energy from THcShower ----------------------
 
   // --------------- To get NPEs from THcCherenkov -------------------
   const char* chern_detector_name = "cher";
   THaDetector* detc = app->GetDetector( chern_detector_name );
-  
+
   if( dynamic_cast<THcCherenkov*>(detc) ) {
-    fChern = dynamic_cast<THcCherenkov*>(detc);  
+    fChern = dynamic_cast<THcCherenkov*>(detc);
   }
   else if( !dynamic_cast<THcCherenkov*>(detc) ) {
-    cout << "Warining: Cherenkov detector analysis module " 
+    cout << "Warining: Cherenkov detector analysis module "
 	 << chern_detector_name << " not loaded for spectrometer "
 	 << prefix << endl;
-    
+
     fChern = NULL;
   }
-  
+
   // --------------- To get NPEs from THcCherenkov -------------------
 
   fScinShould = 0;
@@ -212,13 +212,13 @@ THaAnalysisObject::EStatus THcHodoscope::Init( const TDatime& date )
   fSumPlaneTime  = new Double_t [fNPlanes];
 
   //  Double_t  fHitCnt4 = 0., fHitCnt3 = 0.;
-  
+
   // Int_t m = 0;
-  // fScinHit = new Double_t*[fNPlanes];         
+  // fScinHit = new Double_t*[fNPlanes];
   // for ( m = 0; m < fNPlanes; m++ ){
   //   fScinHit[m] = new Double_t[fNPaddle[0]];
   // }
-  
+
 
   return fStatus = kOK;
 }
@@ -235,7 +235,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
   char prefix[2];
   char parname[100];
 
-  // Read data from database 
+  // Read data from database
   // Pull values from the THcParmList instead of reading a database
   // file like Hall A does.
 
@@ -253,7 +253,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
   fBetaP = 0.;
   fBetaNoTrk = 0.;
   fBetaNoTrkChiSq = 0.;
-  
+
   fNPaddle = new UInt_t [fNPlanes];
   fFPTime = new Double_t [fNPlanes];
   fPlaneCenter = new Double_t[fNPlanes];
@@ -264,7 +264,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
   prefix[1]='\0';
 
   for(Int_t i=0;i<fNPlanes;i++) {
-    
+
     DBRequest list[]={
       {Form("scin_%s_nr",fPlaneNames[i]), &fNPaddle[i], kInt},
       {0}
@@ -279,9 +279,9 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
     fMaxScinPerPlane=(fMaxScinPerPlane > fNPaddle[i])? fMaxScinPerPlane : fNPaddle[i];
   }
 // need this for "padded arrays" i.e. 4x16 lists of parameters (GN)
-  fMaxHodoScin=fMaxScinPerPlane*fNPlanes; 
+  fMaxHodoScin=fMaxScinPerPlane*fNPlanes;
   if (fDebug>=1)  cout <<"fMaxScinPerPlane = "<<fMaxScinPerPlane<<" fMaxHodoScin = "<<fMaxHodoScin<<endl;
-  
+
   fHodoVelLight=new Double_t [fMaxHodoScin];
   fHodoPosSigma=new Double_t [fMaxHodoScin];
   fHodoNegSigma=new Double_t [fMaxHodoScin];
@@ -299,12 +299,12 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
   fHodoNegInvAdcLinear=new Double_t [fMaxHodoScin];
   fHodoPosInvAdcAdc=new Double_t [fMaxHodoScin];
   fHodoNegInvAdcAdc=new Double_t [fMaxHodoScin];
-  
+
   fNHodoscopes = 2;
-  fxLoScin = new Int_t [fNHodoscopes]; 
-  fxHiScin = new Int_t [fNHodoscopes]; 
-  fyLoScin = new Int_t [fNHodoscopes]; 
-  fyHiScin = new Int_t [fNHodoscopes]; 
+  fxLoScin = new Int_t [fNHodoscopes];
+  fxHiScin = new Int_t [fNHodoscopes];
+  fyLoScin = new Int_t [fNHodoscopes];
+  fyHiScin = new Int_t [fNHodoscopes];
   fHodoSlop = new Double_t [fNPlanes];
 
   DBRequest list[]={
@@ -326,7 +326,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
     {"hodo_neg_time_offset",             &fHodoNegTimeOffset[0],  kDouble,  fMaxHodoScin},
     {"hodo_pos_ped_limit",               &fHodoPosPedLimit[0],    kInt,     fMaxHodoScin},
     {"hodo_neg_ped_limit",               &fHodoNegPedLimit[0],    kInt,     fMaxHodoScin},
-    {"tofusinginvadc",                   &fTofUsingInvAdc,        kInt,            0,  1},       
+    {"tofusinginvadc",                   &fTofUsingInvAdc,        kInt,            0,  1},
     {"xloscin",                          &fxLoScin[0],            kInt,     (UInt_t) fNHodoscopes},
     {"xhiscin",                          &fxHiScin[0],            kInt,     (UInt_t) fNHodoscopes},
     {"yloscin",                          &fyLoScin[0],            kInt,     (UInt_t) fNHodoscopes},
@@ -371,19 +371,19 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
     }
   }
 
-  cout << " x1 lo = " << fxLoScin[0] 
-       << " x2 lo = " << fxLoScin[1] 
-       << " x1 hi = " << fxHiScin[0] 
-       << " x2 hi = " << fxHiScin[1] 
+  cout << " x1 lo = " << fxLoScin[0]
+       << " x2 lo = " << fxLoScin[1]
+       << " x1 hi = " << fxHiScin[0]
+       << " x2 hi = " << fxHiScin[1]
        << endl;
 
-  cout << " y1 lo = " << fyLoScin[0] 
-       << " y2 lo = " << fyLoScin[1] 
-       << " y1 hi = " << fyHiScin[0] 
-       << " y2 hi = " << fyHiScin[1] 
+  cout << " y1 lo = " << fyLoScin[0]
+       << " y2 lo = " << fyLoScin[1]
+       << " y1 hi = " << fyHiScin[0]
+       << " y2 hi = " << fyHiScin[1]
        << endl;
 
-  cout << "Hdososcope planes hits for trigger = " << fTrackEffTestNScinPlanes 
+  cout << "Hdososcope planes hits for trigger = " << fTrackEffTestNScinPlanes
        << " normalized energy min = " << fNormETot
        << " number of photo electrons = " << fNCerNPE
        << endl;
@@ -488,12 +488,12 @@ THcHodoscope::~THcHodoscope()
 void THcHodoscope::DeleteArrays()
 {
   // Delete member arrays. Used by destructor.
-  // Int_t k;  
+  // Int_t k;
   // for( k = 0; k < fNPlanes; k++){
   //   delete [] fScinHit[k];
   // }
   // delete [] fScinHit;
-  
+
   delete [] fxLoScin;             fxLoScin = NULL;
   delete [] fxHiScin;             fxHiScin = NULL;
   delete [] fHodoSlop;            fHodoSlop = NULL;
@@ -524,7 +524,7 @@ void THcHodoscope::DeleteArrays()
 }
 
 //_____________________________________________________________________________
-inline 
+inline
 void THcHodoscope::ClearEvent()
 {
   /*! \brief Clears variables
@@ -561,33 +561,33 @@ Int_t THcHodoscope::Decode( const THaEvData& evdata )
 {
   /*! \brief Decodes raw data and processes raw data into hits for each instance of  THcScintillatorPlane
    *
-   *  - Calls THcHodoscope::ClearEvent  
+   *  - Calls THcHodoscope::ClearEvent
    *  - Reads raw data using THcHitList::DecodeToHitList
    *  - If one wants to subtract pedestals (assumed to be a set of data at beginning of run)
-   *    + Must define "Pedestal_event" cut in the cuts definition file 
+   *    + Must define "Pedestal_event" cut in the cuts definition file
    *    + For each "Pedestal_event" calls THcScintillatorPlane::AccumulatePedestals and returns
-   *    + After First event which is not a  "Pedestal_event" calls THcScintillatorPlane::CalculatePedestals  
+   *    + After First event which is not a  "Pedestal_event" calls THcScintillatorPlane::CalculatePedestals
    *  - For each scintillator plane THcScintillatorPlane::ProcessHits
    *  - Calls THcHodoscope::EstimateFocalPlaneTime
-   *      
+   *
    *
    */
   ClearEvent();
   // Get the Hall C style hitlist (fRawHitList) for this event
   fNHits = DecodeToHitList(evdata);
-  
+
   //
   // GN: print event number so we can cross-check with engine
-  // if (evdata.GetEvNum()>1000) 
+  // if (evdata.GetEvNum()>1000)
   //   cout <<"\nhcana_event " << evdata.GetEvNum()<<endl;
-  
+
   fCheckEvent = evdata.GetEvNum();
   fEventType =  evdata.GetEvType();
 
   if(gHaCuts->Result("Pedestal_event")) {
     Int_t nexthit = 0;
     for(Int_t ip=0;ip<fNPlanes;ip++) {
-            
+
       nexthit = fPlanes[ip]->AccumulatePedestals(fRawHitList, nexthit);
     }
     fAnalyzePedestals = 1;	// Analyze pedestals first normal events
@@ -595,7 +595,7 @@ Int_t THcHodoscope::Decode( const THaEvData& evdata )
   }
   if(fAnalyzePedestals) {
     for(Int_t ip=0;ip<fNPlanes;ip++) {
-      
+
       fPlanes[ip]->CalculatePedestals();
     }
     fAnalyzePedestals = 0;	// Don't analyze pedestals next event
@@ -609,7 +609,7 @@ Int_t THcHodoscope::Decode( const THaEvData& evdata )
 
     fPlaneCenter[ip] = fPlanes[ip]->GetPosCenter(0) + fPlanes[ip]->GetPosOffset();
     fPlaneSpacing[ip] = fPlanes[ip]->GetSpacing();
-    
+
     //    nexthit = fPlanes[ip]->ProcessHits(fRawHitList, nexthit);
     // GN: select only events that have reasonable TDC values to start with
     // as per the Engine h_strip_scin.f
@@ -637,11 +637,11 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
 {
   /*! \brief Calculates the Drift Chamber start time and fBetaNoTrk (velocity determined without track info)
    *
-   *  - Called by  THcHodoscope::Decode  
+   *  - Called by  THcHodoscope::Decode
    *  - selects good scintillator paddle hits
-   *     + loops through hits in each scintillator plane and fills histogram array, "timehist", with corrected times for positive 
+   *     + loops through hits in each scintillator plane and fills histogram array, "timehist", with corrected times for positive
    *        and negative ends of each paddle
-   *     + Determines the peak of "timehist"    
+   *     + Determines the peak of "timehist"
    *
    */
 
@@ -688,7 +688,7 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
   fNfptimes=0;
   Int_t  Ngood_hits_plane=0;
   Double_t Plane_fptime_sum=0.0;
-    
+
   Bool_t goodplanetime[fNPlanes];
   Bool_t twogoodtimes[nscinhits];
   for(Int_t ip=0;ip<fNPlanes;ip++) {
@@ -711,7 +711,7 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
 	// Both tubes fired
 	Int_t index=hit->GetPaddleNumber()-1;
 	// Need to put this in a multihit histo
-	Double_t fptime = hit->GetScinCorrectedTime() 
+	Double_t fptime = hit->GetScinCorrectedTime()
 	  - (fPlanes[ip]->GetZpos()+(index%2)*fPlanes[ip]->GetDzpos())
 	  / (29.979 * fBetaNominal);
 	if(TMath::Abs(fptime-fStartTimeCenter)<=fStartTimeSlop) {
@@ -746,23 +746,23 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
     Double_t sumT = 0.;
     Double_t sumZ = 0.;
     Double_t sumZZ = 0.;
-    Double_t sumTZ = 0.;    
-    Int_t ihhit = 0;  
+    Double_t sumTZ = 0.;
+    Int_t ihhit = 0;
 
     for(Int_t ip=0;ip<fNPlanes;ip++) {
       Int_t nphits=fPlanes[ip]->GetNScinHits();
       TClonesArray* hodoHits = fPlanes[ip]->GetHits();
 
-      for(Int_t i=0;i<nphits;i++) {	
+      for(Int_t i=0;i<nphits;i++) {
 	Int_t index=((THcHodoHit*)hodoHits->At(i))->GetPaddleNumber()-1;
-	    
+
 	if(twogoodtimes[ihhit]){
-	  
-	  Double_t sigma = 0.5 * ( TMath::Sqrt( TMath::Power( fHodoPosSigma[GetScinIndex(ip,index)],2) + 
+
+	  Double_t sigma = 0.5 * ( TMath::Sqrt( TMath::Power( fHodoPosSigma[GetScinIndex(ip,index)],2) +
 						TMath::Power( fHodoNegSigma[GetScinIndex(ip,index)],2) ) );
 	  Double_t scinWeight = 1 / TMath::Power(sigma,2);
 	  Double_t zPosition = fPlanes[ip]->GetZpos() + (index%2)*fPlanes[ip]->GetDzpos();
-	  
+
 	  //	  cout << "hit = " << ihhit + 1 << "   zpos = " << zPosition << "   sigma = " << sigma << endl;
 
 	  sumW  += scinWeight;
@@ -770,7 +770,7 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
 	  sumZ  += scinWeight * zPosition;
 	  sumZZ += scinWeight * ( zPosition * zPosition );
 	  sumTZ += scinWeight * zPosition * ((THcHodoHit*)hodoHits->At(i))->GetScinCorrectedTime();
-	  
+
 	} // condition of good scin time
 	ihhit ++;
       } // loop over hits of plane
@@ -779,46 +779,46 @@ void THcHodoscope::EstimateFocalPlaneTime( void )
     Double_t tmp = sumW * sumZZ - sumZ * sumZ ;
     Double_t t0 = ( sumT * sumZZ - sumZ * sumTZ ) / tmp ;
     Double_t tmpDenom = sumW * sumTZ - sumZ * sumT;
-    
+
     if ( TMath::Abs( tmpDenom ) > ( 1 / 10000000000.0 ) ) {
-      
+
       fBetaNoTrk = tmp / tmpDenom;
-      fBetaNoTrkChiSq = 0.;	  
+      fBetaNoTrkChiSq = 0.;
       ihhit = 0;
-      
+
       for (Int_t ip = 0; ip < fNPlanes; ip++ ){                           // Loop over planes
 	Int_t nphits=fPlanes[ip]->GetNScinHits();
 	TClonesArray* hodoHits = fPlanes[ip]->GetHits();
 
 	for(Int_t i=0;i<nphits;i++) {
 	  Int_t index=((THcHodoHit*)hodoHits->At(i))->GetPaddleNumber()-1;
-	  
+
 	  if(twogoodtimes[ihhit]) {
-	    
+
 	    Double_t zPosition = fPlanes[ip]->GetZpos() + (index%2)*fPlanes[ip]->GetDzpos();
-	    Double_t timeDif = ( ((THcHodoHit*)hodoHits->At(i))->GetScinCorrectedTime() - t0 );		
-	    Double_t sigma = 0.5 * ( TMath::Sqrt( TMath::Power( fHodoPosSigma[GetScinIndex(ip,index)],2) + 
+	    Double_t timeDif = ( ((THcHodoHit*)hodoHits->At(i))->GetScinCorrectedTime() - t0 );
+	    Double_t sigma = 0.5 * ( TMath::Sqrt( TMath::Power( fHodoPosSigma[GetScinIndex(ip,index)],2) +
 						  TMath::Power( fHodoNegSigma[GetScinIndex(ip,index)],2) ) );
-	    fBetaNoTrkChiSq += ( ( zPosition / fBetaNoTrk - timeDif ) *  
+	    fBetaNoTrkChiSq += ( ( zPosition / fBetaNoTrk - timeDif ) *
 				 ( zPosition / fBetaNoTrk - timeDif ) ) / ( sigma * sigma );
-	    
-	    
+
+
 	  } // condition for good scin time
 	  ihhit++;
 	} // loop over hits of a plane
       } // loop over planes
-	  
+
       Double_t pathNorm = 1.0;
-      
+
       fBetaNoTrk = fBetaNoTrk * pathNorm;
-      fBetaNoTrk = fBetaNoTrk / 29.979;    // velocity / c	  
-      
-    }  // condition for fTmpDenom	
+      fBetaNoTrk = fBetaNoTrk / 29.979;    // velocity / c
+
+    }  // condition for fTmpDenom
     else {
       fBetaNoTrk = 0.;
       fBetaNoTrkChiSq = -2.;
     } // else condition for fTmpDenom
-  }  
+  }
 
 }
 //_____________________________________________________________________________
@@ -838,7 +838,7 @@ Int_t THcHodoscope::CoarseProcess( TClonesArray&  tracks  )
 {
 
   ApplyCorrections();
- 
+
   return 0;
 }
 
@@ -862,9 +862,9 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
       THaTrack* theTrack = dynamic_cast<THaTrack*>( tracks.At(itrack) );
       if (!theTrack) return -1;
-      
-      for (Int_t ip = 0; ip < fNPlanes; ip++ ){ 
-	fGoodPlaneTime[ip] = kFALSE; 
+
+      for (Int_t ip = 0; ip < fNPlanes; ip++ ){
+	fGoodPlaneTime[ip] = kFALSE;
 	fNScinHits[ip] = 0;
 	fNPlaneTime[ip] = 0;
 	fSumPlaneTime[ip] = 0.;
@@ -873,16 +873,16 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
       fdEdX.push_back(dedx_temp); // Create array of dedx per hit
       std::vector<std::vector<GoodFlags> > goodflagstmp1;
       fGoodFlags.push_back(goodflagstmp1);
-      
+
       Int_t nFPTime = 0;
       Double_t betaChiSq = -3;
       Double_t beta = 0;
       //      timeAtFP[itrack] = 0.;
       Double_t sumFPTime = 0.; // Line 138
       fNScinHit.push_back(0);
-      Double_t p = theTrack->GetP(); // Line 142 
+      Double_t p = theTrack->GetP(); // Line 142
       fBetaP = p/( TMath::Sqrt( p * p + fPartMass * fPartMass) );
-      
+
       //! Calculate all corrected hit times and histogram
       //! This uses a copy of code below. Results are save in time_pos,neg
       //! including the z-pos. correction assuming nominal value of betap
@@ -894,24 +894,24 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
       //! reference particle, need to make sure this is big enough
       //! to accomodate difference in TOF for other particles
       //! Default value in case user hasnt defined something reasonable
-      
+
       for (Int_t j=0; j<200; j++) { timehist[j]=0; } // Line 176
-      
+
       // Loop over scintillator planes.
       // In ENGINE, its loop over good scintillator hits.
-      
-      fTOFCalc.clear();   // SAW - Can we 
+
+      fTOFCalc.clear();   // SAW - Can we
       fTOFPInfo.clear();  // SAW - combine these two?
       Int_t ihhit = 0;		// Hit # overall
 
       for(Int_t ip = 0; ip < fNPlanes; ip++ ) {
-	
+
 	std::vector<GoodFlags> goodflagstmp2;
 	fGoodFlags[itrack].push_back(goodflagstmp2);
 
 	fNScinHits[ip] = fPlanes[ip]->GetNScinHits();
 	TClonesArray* hodoHits = fPlanes[ip]->GetHits();
-	
+
 	Double_t zPos = fPlanes[ip]->GetZpos();
 	Double_t dzPos = fPlanes[ip]->GetDzpos();
 
@@ -919,7 +919,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	for (Int_t iphit = 0; iphit < fNScinHits[ip]; iphit++ ){
 	  // iphit is hit # within a plane
 	  THcHodoHit *hit = (THcHodoHit*)hodoHits->At(iphit);
-	  	  
+
 	  fTOFPInfo.push_back(TOFPInfo());
 	  // Can remove these as we will initialize in the constructor
 	  //	  fTOFPInfo[ihhit].time_pos = -99.0;
@@ -932,22 +932,22 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	  fTOFPInfo[ihhit].planeIndex = ip;
 	  fTOFPInfo[ihhit].hitNumInPlane = iphit;
 	  fTOFPInfo[ihhit].onTrack = kFALSE;
-	  
+
 	  Int_t paddle = hit->GetPaddleNumber()-1;
 	  Double_t zposition = zPos + (paddle%2)*dzPos;
 
 	  Double_t xHitCoord = theTrack->GetX() + theTrack->GetTheta() *
 	    ( zposition ); // Line 183
-	  
+
 	  Double_t yHitCoord = theTrack->GetY() + theTrack->GetPhi() *
 	    ( zposition ); // Line 184
-	  	  
+
 	  Double_t scinTrnsCoord, scinLongCoord;
 	  if ( ( ip == 0 ) || ( ip == 2 ) ){ // !x plane. Line 185
 	    scinTrnsCoord = xHitCoord;
 	    scinLongCoord = yHitCoord;
 	  }
-	  
+
 	  else if ( ( ip == 1 ) || ( ip == 3 ) ){ // !y plane. Line 188
 	    scinTrnsCoord = yHitCoord;
 	    scinLongCoord = xHitCoord;
@@ -955,7 +955,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	  else { return -1; } // Line 195
 	  fTOFPInfo[ihhit].scinTrnsCoord = scinTrnsCoord;
 	  fTOFPInfo[ihhit].scinLongCoord = scinLongCoord;
-	  
+
 	  Double_t scinCenter = fPlanes[ip]->GetPosCenter(paddle) + fPlanes[ip]->GetPosOffset();
 
 	  // Index to access the 2d arrays of paddle/scintillator properties
@@ -963,7 +963,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
 	  if ( TMath::Abs( scinCenter - scinTrnsCoord ) <
 	       ( fPlanes[ip]->GetSize() * 0.5 + fPlanes[ip]->GetHodoSlop() ) ){ // Line 293
-	    
+
 	    fTOFPInfo[ihhit].onTrack = kTRUE;
 
 	    Double_t zcor = zposition/(29.979*fBetaP)*
@@ -991,14 +991,14 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	      fTOFPInfo[ihhit].scin_pos_time = timep;
 	      timep -= zcor;
 	      fTOFPInfo[ihhit].time_pos = timep;
-	      
+
 	      for ( Int_t k = 0; k < 200; k++ ){ // Line 211
 		Double_t tmin = 0.5 * ( k + 1 ) ;
 		if ( ( timep > tmin ) && ( timep < ( tmin + fTofTolerance ) ) )
 		  timehist[k] ++;
 	      }
 	    }
-	    
+
 	    Double_t tdc_neg = hit->GetNegTDC();
 	    if(tdc_neg >=fScinTdcMin && tdc_neg <= fScinTdcMax ) {
 	      Double_t adc_neg = hit->GetNegADC();
@@ -1019,7 +1019,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	      fTOFPInfo[ihhit].scin_neg_time = timen;
 	      timen -=  zcor;
 	      fTOFPInfo[ihhit].time_neg = timen;
-	      
+
 	      for ( Int_t k = 0; k < 200; k++ ){ // Line 230
 		Double_t tmin = 0.5 * ( k + 1 );
 		if ( ( timen > tmin ) && ( timen < ( tmin + fTofTolerance ) ) )
@@ -1029,13 +1029,13 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	  } // condition for cenetr on a paddle
 	  ihhit++;
 	} // First loop over hits in a plane <---------
-	
+
 	//-----------------------------------------------------------------------------------------------
 	//------------- First large loop over scintillator hits ends here --------------------
 	//-----------------------------------------------------------------------------------------------
       }
       Int_t nhits=ihhit;
-	
+
       // Find bin with the most hits
       Int_t jmax = 0; // Line 240
       Int_t maxhit = 0;
@@ -1045,22 +1045,22 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	  maxhit = timehist[k];
 	}
       }
-	
+
 
       if(jmax > 0) {
 	Double_t tmin = 0.5 * jmax;
-	
+
 	for(Int_t ih = 0; ih < nhits; ih++) { // loop over all scintillator hits
 	  if ( ( fTOFPInfo[ih].time_pos > tmin ) && ( fTOFPInfo[ih].time_pos < ( tmin + fTofTolerance ) ) ) {
 	    fTOFPInfo[ih].keep_pos=kTRUE;
-	  }	
+	  }
 	  if ( ( fTOFPInfo[ih].time_neg > tmin ) && ( fTOFPInfo[ih].time_neg < ( tmin + fTofTolerance ) ) ){
 	    fTOFPInfo[ih].keep_neg=kTRUE;
-	  }	
+	  }
 	}
       }
-	
-	//---------------------------------------------------------------------------------------------	
+
+	//---------------------------------------------------------------------------------------------
 	// ---------------------- Scond loop over scint. hits in a plane ------------------------------
 	//---------------------------------------------------------------------------------------------
       for(Int_t ih=0; ih < nhits; ih++) {
@@ -1075,7 +1075,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	fGoodFlags[itrack][ip][iphit].goodScinTime = kFALSE;
 	fGoodFlags[itrack][ip][iphit].goodTdcNeg = kFALSE;
 	fGoodFlags[itrack][ip][iphit].goodTdcPos = kFALSE;
-	  
+
 	fTOFCalc.push_back(TOFCalc());
 	// Do we set back to false for each track, or just once per event?
 	fTOFCalc[ih].good_scin_time = kFALSE;
@@ -1087,43 +1087,43 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	Int_t paddle = hit->GetPaddleNumber()-1;
 	fTOFCalc[ih].hit_paddle = paddle;
 	fTOFCalc[ih].good_raw_pad = paddle;
-	  
+
 	//	Double_t scinCenter = fPlanes[ip]->GetPosCenter(paddle) + fPlanes[ip]->GetPosOffset();
 	//	Double_t scinTrnsCoord = fTOFPInfo[ih].scinTrnsCoord;
 	//	Double_t scinLongCoord = fTOFPInfo[ih].scinLongCoord;
 
 	Int_t fPIndex = GetScinIndex(ip,paddle);
-	  
+
 	if (fTOFPInfo[ih].onTrack) {
 	  if ( fTOFPInfo[ih].keep_pos ) { // 301
 	    fTOFCalc[ih].good_tdc_pos = kTRUE;
 	    fGoodFlags[itrack][ip][iphit].goodTdcPos = kTRUE;
 	    if(fDumpTOF && ntracks==1) {
 	      fDumpOut << "1 " << ip+1 << " " << paddle+1 << " " <<
-		hit->GetPosTDC()*fScinTdcToTime << " " << fTOFPInfo[ih].pathp << 
+		hit->GetPosTDC()*fScinTdcToTime << " " << fTOFPInfo[ih].pathp <<
 		" "  << fTOFPInfo[ih].zcor << " " << fTOFPInfo[ih].time_pos <<
 		" " << hit->GetPosADC() << endl;
 	    }
-	  }	    
+	  }
 	  if ( fTOFPInfo[ih].keep_neg ) { //
 	    fTOFCalc[ih].good_tdc_neg = kTRUE;
 	    fGoodFlags[itrack][ip][iphit].goodTdcNeg = kTRUE;
 	    if(fDumpTOF && ntracks==1) {
 	      fDumpOut << "2 " << ip+1 << " " << paddle+1 << " " <<
-		hit->GetNegTDC()*fScinTdcToTime << " " << fTOFPInfo[ih].pathn << 
+		hit->GetNegTDC()*fScinTdcToTime << " " << fTOFPInfo[ih].pathn <<
 		" "  << fTOFPInfo[ih].zcor << " " << fTOFPInfo[ih].time_neg <<
 		" " << hit->GetNegADC() << endl;
 	    }
-	  }	    
+	  }
 
 	  // ** Calculate ave time for scin and error.
 	  if ( fTOFCalc[ih].good_tdc_pos ){
-	    if ( fTOFCalc[ih].good_tdc_neg ){	
-	      fTOFCalc[ih].scin_time  = ( fTOFPInfo[ih].scin_pos_time + 
+	    if ( fTOFCalc[ih].good_tdc_neg ){
+	      fTOFCalc[ih].scin_time  = ( fTOFPInfo[ih].scin_pos_time +
 					     fTOFPInfo[ih].scin_neg_time ) / 2.;
-	      fTOFCalc[ih].scin_time_fp  = ( fTOFPInfo[ih].time_pos + 
+	      fTOFCalc[ih].scin_time_fp  = ( fTOFPInfo[ih].time_pos +
 					     fTOFPInfo[ih].time_neg ) / 2.;
-	      fTOFCalc[ih].scin_sigma = TMath::Sqrt( fHodoPosSigma[fPIndex] * fHodoPosSigma[fPIndex] + 
+	      fTOFCalc[ih].scin_sigma = TMath::Sqrt( fHodoPosSigma[fPIndex] * fHodoPosSigma[fPIndex] +
 							fHodoNegSigma[fPIndex] * fHodoNegSigma[fPIndex] )/2.;
 	      fTOFCalc[ih].good_scin_time = kTRUE;
 	      fGoodFlags[itrack][ip][iphit].goodScinTime = kTRUE;
@@ -1147,28 +1147,28 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
 	    // c     Get time at focal plane
 	  if ( fTOFCalc[ih].good_scin_time ){
-	      
+
 	    // scin_time_fp doesn't need to be an array
 	    // Is this any different than the average of time_pos and time_neg?
-	    //	    Double_t scin_time_fp = ( fTOFPInfo[ih].time_pos + 
+	    //	    Double_t scin_time_fp = ( fTOFPInfo[ih].time_pos +
 	    //				      fTOFPInfo[ih].time_neg ) / 2.;
 	    Double_t scin_time_fp = fTOFCalc[ih].scin_time_fp;
-	  
+
 	    sumFPTime = sumFPTime + scin_time_fp;
 	    nFPTime ++;
 
 	    fSumPlaneTime[ip] = fSumPlaneTime[ip] + scin_time_fp;
 	    fNPlaneTime[ip] ++;
 	    fNScinHit[itrack] ++;
-	      
+
 	    if ( ( fTOFCalc[ih].good_tdc_pos ) && ( fTOFCalc[ih].good_tdc_neg ) ){
 	      nPmtHit[itrack] = nPmtHit[itrack] + 2;
 	    } else {
 	      nPmtHit[itrack] = nPmtHit[itrack] + 1;
 	    }
-	    
+
 	    fdEdX[itrack].push_back(0.0);
-	      
+
 	    // --------------------------------------------------------------------------------------------
 	    if ( fTOFCalc[ih].good_tdc_pos ){
 	      if ( fTOFCalc[ih].good_tdc_neg ){
@@ -1191,7 +1191,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
 	  } // time at focal plane condition
 	} // on track condition
-	  
+
 	  // ** See if there are any good time measurements in the plane.
 	if ( fTOFCalc[ih].good_scin_time ){
 	  fGoodPlaneTime[ip] = kTRUE;
@@ -1216,9 +1216,9 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
       // * * Fit beta if there are enough time measurements (one upper, one lower)
       // From h_tof_fit
-      if ( ( ( fGoodPlaneTime[0] ) || ( fGoodPlaneTime[1] ) ) && 
-	   ( ( fGoodPlaneTime[2] ) || ( fGoodPlaneTime[3] ) ) ){	
-	
+      if ( ( ( fGoodPlaneTime[0] ) || ( fGoodPlaneTime[1] ) ) &&
+	   ( ( fGoodPlaneTime[2] ) || ( fGoodPlaneTime[3] ) ) ){
+
 	Double_t sumW = 0.;
 	Double_t sumT = 0.;
 	Double_t sumZ = 0.;
@@ -1227,54 +1227,54 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
 	for(Int_t ih=0; ih < nhits; ih++) {
 	  Int_t ip = fTOFPInfo[ih].planeIndex;
-	
+
 	  if ( fTOFCalc[ih].good_scin_time ) {
-	      
+
 	    Double_t scinWeight = 1 / ( fTOFCalc[ih].scin_sigma * fTOFCalc[ih].scin_sigma );
 	    Double_t zPosition = ( fPlanes[ip]->GetZpos()
-				   +( fTOFCalc[ih].hit_paddle % 2 ) * 
+				   +( fTOFCalc[ih].hit_paddle % 2 ) *
 				   fPlanes[ip]->GetDzpos() );
-	      
+
 	    sumW  += scinWeight;
 	    sumT  += scinWeight * fTOFCalc[ih].scin_time;
 	    sumZ  += scinWeight * zPosition;
 	    sumZZ += scinWeight * ( zPosition * zPosition );
 	    sumTZ += scinWeight * zPosition * fTOFCalc[ih].scin_time;
-	      	      
+
 	  } // condition of good scin time
 	} // loop over hits
-	
+
 	Double_t tmp = sumW * sumZZ - sumZ * sumZ ;
 	Double_t t0 = ( sumT * sumZZ - sumZ * sumTZ ) / tmp ;
 	Double_t tmpDenom = sumW * sumTZ - sumZ * sumT;
-	
+
 	if ( TMath::Abs( tmpDenom ) > ( 1 / 10000000000.0 ) ) {
-	  
+
 	  beta = tmp / tmpDenom;
-	  betaChiSq = 0.;	  
+	  betaChiSq = 0.;
 
 	  for(Int_t ih=0; ih < nhits; ih++) {
 	    Int_t ip = fTOFPInfo[ih].planeIndex;
-	    
+
 	    if ( fTOFCalc[ih].good_scin_time ){
-		
-	      Double_t zPosition = ( fPlanes[ip]->GetZpos() + ( fTOFCalc[ih].hit_paddle % 2 ) * 
+
+	      Double_t zPosition = ( fPlanes[ip]->GetZpos() + ( fTOFCalc[ih].hit_paddle % 2 ) *
 				     fPlanes[ip]->GetDzpos() );
-	      Double_t timeDif = ( fTOFCalc[ih].scin_time - t0 );		
-	      betaChiSq += ( ( zPosition / beta - timeDif ) * 
-			     ( zPosition / beta - timeDif ) )  / 
+	      Double_t timeDif = ( fTOFCalc[ih].scin_time - t0 );
+	      betaChiSq += ( ( zPosition / beta - timeDif ) *
+			     ( zPosition / beta - timeDif ) )  /
 		( fTOFCalc[ih].scin_sigma * fTOFCalc[ih].scin_sigma );
-		
+
 	    } // condition for good scin time
 	  } // loop over hits
-	  
-	  Double_t pathNorm = TMath::Sqrt( 1. + theTrack->GetTheta() * theTrack->GetTheta() + 
+
+	  Double_t pathNorm = TMath::Sqrt( 1. + theTrack->GetTheta() * theTrack->GetTheta() +
 				       theTrack->GetPhi()   * theTrack->GetPhi() );
 	  // Take angle into account
 	  beta = beta / pathNorm;
-	  beta = beta / 29.979;    // velocity / c	  
+	  beta = beta / 29.979;    // velocity / c
 
-	}  // condition for fTmpDenom	
+	}  // condition for fTmpDenom
 	else {
 	  beta = 0.;
 	  betaChiSq = -2.;
@@ -1284,13 +1284,13 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	beta = 0.;
 	betaChiSq = -1;
       }
-      
+
       if ( nFPTime != 0 ){
-      	timeAtFP[itrack] = ( sumFPTime / nFPTime ); 
+      	timeAtFP[itrack] = ( sumFPTime / nFPTime );
       }
       //
       // ---------------------------------------------------------------------------
-            
+
       Double_t FPTimeSum=0.0;
       Int_t nFPTimeSum=0;
       for (Int_t ip = 0; ip < fNPlanes; ip++ ){
@@ -1304,7 +1304,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	}
       }
       Double_t fptime = FPTimeSum/nFPTimeSum;
-      
+
       Double_t dedx=0.0;
       for(UInt_t ih=0;ih<fTOFCalc.size();ih++) {
 	if(fTOFCalc[ih].good_scin_time) {
@@ -1319,7 +1319,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
       theTrack->SetNPMT(nPmtHit[itrack]);
       theTrack->SetFPTime( timeAtFP[itrack]);
 
-      
+
     } // Main loop over tracks ends here.
 
   } // If condition for at least one track
@@ -1341,7 +1341,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
     for (UInt_t ipaddle = 0; ipaddle < fNPaddle[0]; ipaddle++ ){
 	  fScinHitPaddle[ip].push_back(0.0);
-	  fScinHitPaddle[ip][ipaddle] = 0.0;	  
+	  fScinHitPaddle[ip][ipaddle] = 0.0;
     }
   }
 
@@ -1356,7 +1356,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
     fNScinHits[ip] = fPlanes[ip]->GetNScinHits();
     for (Int_t iphit = 0; iphit < fNScinHits[ip]; iphit++ ){
       Int_t paddle = ((THcHodoHit*)hodoHits->At(iphit))->GetPaddleNumber()-1;
-      
+
       fScinHitPaddle[ip][paddle] = 1;
     }
   }
@@ -1388,7 +1388,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
       if ( ( fScinHitPaddle[ip][ipaddle] == 0 ) &&
 	   ( fScinHitPaddle[ip][ipaddle + 1] == 1 ) )
 	icount ++;
-      
+
     } // Loop over  paddles
 
     fNClust[ip] = icount;
@@ -1408,7 +1408,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
   } // Loop over X plane
 
-  // *look for clusters in y planes... (10 scins)  !this assume both y planes have same  
+  // *look for clusters in y planes... (10 scins)  !this assume both y planes have same
   // *number of scintillators.
 
   for (Int_t ip = 1; ip < 4; ip +=2 ) {
@@ -1449,7 +1449,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 
   // *now put some "tracking" like cuts on the hslopes, based only on scins...
   // *by "slope" here, I mean the difference in the position of scin hits in two
-  // *like-planes.  For example, a track that those great straight through will 
+  // *like-planes.  For example, a track that those great straight through will
   // *have a slope of zero.  If it moves one scin over from s1x to s2x it has an
   // *x-slope of 1...  I pick the minimum slope if there are multiple scin hits.
 
@@ -1482,7 +1482,7 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	Double_t slope = TMath::Abs(ipaddle - ipaddle2);
 
 	if ( slope < bestYpScin ) {
-	  bestYpScin = slope;	
+	  bestYpScin = slope;
 	}
       }
     }  // Second loop over Y paddles
@@ -1580,15 +1580,15 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
   }
 
 
-  if ( !fChern || !fShower ) { 
-    return 0;    
+  if ( !fChern || !fShower ) {
+    return 0;
   }
 
-  
+
   if ( ( fGoodScinHits == 1 ) && ( fShower->GetNormETot() > fNormETot ) &&
        ( fChern->GetCerNPE() > fNCerNPE ) )
     fScinShould = 1;
-  
+
   if ( ( fGoodScinHits == 1 ) && ( fShower->GetNormETot() > fNormETot ) &&
        ( fChern->GetCerNPE() > fNCerNPE ) && ( tracks.GetLast() + 1 > 0 ) ) {
       fScinDid = 1;
@@ -1596,14 +1596,14 @@ Int_t THcHodoscope::FineProcess( TClonesArray& tracks )
 	    if(fDumpTOF && ntracks==1) {
 	      fDumpOut << "0 "  << endl;
 	    }
-  
+
   return 0;
-  
+
 }
 //_____________________________________________________________________________
 Int_t THcHodoscope::GetScinIndex( Int_t nPlane, Int_t nPaddle ) {
   // GN: Return the index of a scintillator given the plane # and the paddle #
-  // This assumes that both planes and 
+  // This assumes that both planes and
   // paddles start counting from 0!
   // Result also counts from 0.
   return fNPlanes*nPaddle+nPlane;
diff --git a/src/THcHodoscope.h b/src/THcHodoscope.h
index 028125052ffbcd8cf7798643101bfdaf92c625d6..207c04b84cda7a0cc288b9f92e1116dff5912a05 100644
--- a/src/THcHodoscope.h
+++ b/src/THcHodoscope.h
@@ -43,10 +43,10 @@ public:
 
   virtual Int_t      Decode( const THaEvData& );
   virtual EStatus    Init( const TDatime& run_time );
-  
+
   virtual Int_t      CoarseProcess( TClonesArray& tracks );
   virtual Int_t      FineProcess( TClonesArray& tracks );
-  
+
   void EstimateFocalPlaneTime(void);
   virtual Int_t      ApplyCorrections( void );
   Double_t GetStartTime() const { return fStartTime; }
@@ -127,7 +127,7 @@ protected:
 
   // Per-event data
   Bool_t fGoodStartTime;
-  Double_t fStartTime; 
+  Double_t fStartTime;
   Int_t fNfptimes;
 
   Double_t     fBetaP;
@@ -138,7 +138,7 @@ protected:
 
   // Potential Hall C parameters.  Mostly here for demonstration
   Int_t fNPlanes;		// Number of planes
-  UInt_t fMaxScinPerPlane,fMaxHodoScin; // max number of scin/plane; product of the first two 
+  UInt_t fMaxScinPerPlane,fMaxHodoScin; // max number of scin/plane; product of the first two
   Double_t fStartTimeCenter, fStartTimeSlop, fScinTdcToTime;
   Double_t fTofTolerance;
   Double_t fPathLengthCentral;
@@ -218,7 +218,7 @@ protected:
   Int_t fHitSweet1Y;
   Int_t fHitSweet2X;
   Int_t fHitSweet2Y;
-  
+
   Int_t fSweet1XScin;
   Int_t fSweet1YScin;
   Int_t fSweet2XScin;
@@ -226,7 +226,7 @@ protected:
 
   //  Double_t**   fScinHit;                // [fNPlanes] Array
 
-  Double_t*    fFPTime;               // [fNPlanes] Array 
+  Double_t*    fFPTime;               // [fNPlanes] Array
 
 
   Double_t* fSumPlaneTime; // [fNPlanes]
@@ -240,7 +240,7 @@ protected:
 
   // Useful derived quantities
   // double tan_angle, sin_angle, cos_angle;
-  
+
   //  static const char NDEST = 2;
   //  struct DataDest {
   //    Int_t*    nthit;
@@ -261,7 +261,7 @@ protected:
   //    NoTrkPlaneInfo () : goodplanetime(kFALSE) {}
   //  };
   //  std::vector<NoTrkPlaneInfo> fNoTrkPlaneInfo;
-  
+
   // Inforamtion for each plane
   //  struct NoTrkHitInfo {
   //    Bool_t goodtwotimes;
@@ -290,12 +290,12 @@ protected:
     Int_t hitNumInPlane;
     THcHodoHit *hit;
     TOFPInfo () : onTrack(kFALSE), keep_pos(kFALSE), keep_neg(kFALSE),
-      time_pos(-99.0), time_neg(-99.0), 
-		 
+      time_pos(-99.0), time_neg(-99.0),
+
 scin_pos_time(0.0), scin_neg_time(0.0) {}
   };
   std::vector<TOFPInfo> fTOFPInfo;
-  
+
   // Used to hold information about all hits within the hodoscope for the TOF
   struct TOFCalc {
     Int_t hit_paddle;
@@ -331,13 +331,13 @@ scin_pos_time(0.0), scin_neg_time(0.0) {}
   };
   std::vector<std::vector<std::vector<GoodFlags> > > fGoodFlags;
   //
-    
+
   void           ClearEvent();
   void           DeleteArrays();
   virtual Int_t  ReadDatabase( const TDatime& date );
   virtual Int_t  DefineVariables( EMode mode = kDefine );
   enum ESide { kLeft = 0, kRight = 1 };
-  
+
   virtual  Double_t TimeWalkCorrection(const Int_t& paddle,
 					   const ESide side);
   void Setup(const char* name, const char* description);
diff --git a/src/THcInterface.cxx b/src/THcInterface.cxx
index f6bff8bccf405c2ecad338c1e927b14a56149174..247dadbe20ef5e31a033e2d9ff08710def1835fe 100644
--- a/src/THcInterface.cxx
+++ b/src/THcInterface.cxx
@@ -53,13 +53,13 @@ THcInterface* THcInterface::fgAint = NULL;  // Pointer to this interface
 static TString fgTZ;
 
 //_____________________________________________________________________________
-THcInterface::THcInterface( const char* appClassName, int* argc, char** argv, 
+THcInterface::THcInterface( const char* appClassName, int* argc, char** argv,
 			    void* options, int numOptions, Bool_t noLogo ) :
   TRint( appClassName, argc, argv, options, numOptions, kTRUE )
 {
   /**
-Create the Hall A/C analyzer application environment. The THcInterface 
-environment provides an interface to the the interactive ROOT system 
+Create the Hall A/C analyzer application environment. The THcInterface
+environment provides an interface to the the interactive ROOT system
 via inheritance of TRint as well as access to the Hall A/C analyzer classes.
 
 This class is copy of THaInterface with the addition of of the global
@@ -97,9 +97,9 @@ This class is copy of THaInterface with the addition of of the global
   //FIXME: investigate
   TTree::SetMaxTreeSize(1500000000);
 
-  // Make the Podd header directory(s) available so scripts don't have to 
+  // Make the Podd header directory(s) available so scripts don't have to
   // specify an explicit path.
-  // If $ANALYZER defined, we take our includes from there, otherwise we fall 
+  // If $ANALYZER defined, we take our includes from there, otherwise we fall
   // back to the compile-time directories (which may have moved!)
   TString s = gSystem->Getenv("ANALYZER");
   if( s.IsNull() ) {
@@ -111,7 +111,7 @@ This class is copy of THaInterface with the addition of of the global
     if( dp ) {
       gSystem->FreeDirectory(dp);
       s = p;
-    } else 
+    } else
       s = s+"/src " + s+"/hana_decode ";
   }
   // Directories names separated by blanks.
@@ -128,14 +128,14 @@ This class is copy of THaInterface with the addition of of the global
     s.Remove(0,s.Index(re)+ss.Length());
     ss = s(re);
   }
-  
+
   // Because of lack of foresight, the analyzer uses TDatime objects,
   // which are kept in localtime() and hence are not portable, and also
   // uses localtime() directly in several places. As a result, database
-  // lookups depend on the timezone of the machine that the replay is done on! 
-  // If this timezone is different from the one in which the data were taken, 
+  // lookups depend on the timezone of the machine that the replay is done on!
+  // If this timezone is different from the one in which the data were taken,
   // mismatches may occur. This is bad.
-  // FIXME: Use TTimeStamp to keep time in UTC internally. 
+  // FIXME: Use TTimeStamp to keep time in UTC internally.
   // To be done in version 1.5
   //
   // As a temporary workaround, we assume that all data were taken in
@@ -144,7 +144,7 @@ This class is copy of THaInterface with the addition of of the global
   fgTZ = gSystem->Getenv("TZ");
   gSystem->Setenv("TZ","US/Eastern");
 
-  
+
   fgAint = this;
 }
 
@@ -192,7 +192,7 @@ void THcInterface::PrintLogo( Bool_t lite )
    iday   = idatqq%100;
    imonth = (idatqq/100)%100;
    iyear  = (idatqq/10000);
-   if ( iyear < 90 ) 
+   if ( iyear < 90 )
      mille = 2000 + iyear;
    else if ( iyear < 1900 )
      mille = 1900 + iyear;
@@ -253,7 +253,7 @@ TClass* THcInterface::SetDecoder( TClass* c )
     return NULL;
   }
   if( !c->InheritsFrom("THaEvData")) {
-    ::Error("THcInterface::SetDecoder", 
+    ::Error("THcInterface::SetDecoder",
 	    "decoder class must inherit from THaEvData");
     return NULL;
   }
diff --git a/src/THcInterface.h b/src/THcInterface.h
index d89c3db81e2b8c3f2415bc07b30c5a31b2f4584e..3ccdabed54624d66130c2c44a720e66a0b4c48ca 100644
--- a/src/THcInterface.h
+++ b/src/THcInterface.h
@@ -4,7 +4,7 @@
 //////////////////////////////////////////////////////////////////////////
 //
 // THcInterface
-// 
+//
 //////////////////////////////////////////////////////////////////////////
 
 #include "TRint.h"
@@ -16,7 +16,7 @@ class THcInterface : public TRint {
 
 public:
   THcInterface( const char* appClassName, int* argc, char** argv,
-		void* options = NULL, int numOptions = 0, 
+		void* options = NULL, int numOptions = 0,
 		Bool_t noLogo = kFALSE );
   virtual ~THcInterface();
 
diff --git a/src/THcParmList.cxx b/src/THcParmList.cxx
index 50edcd99f4e5cef0d64e219979ec21e6e9d2413a..c471c8da6b360d8f8026207ff1d73b844606264d 100644
--- a/src/THcParmList.cxx
+++ b/src/THcParmList.cxx
@@ -39,7 +39,7 @@ An instance of THaTextvars is created to hold the string parameters.
 #include <stdexcept>
 
 using namespace std;
-Int_t  fDebug   = 1;  // Keep this at one while we're working on the code    
+Int_t  fDebug   = 1;  // Keep this at one while we're working on the code
 
 ClassImp(THcParmList)
 
@@ -112,7 +112,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
     Error (here, "error opening parameter file %s",fname);
     return;			// Need a success argument returned
   }
-  
+
   string line;
   char varname[100];
   Int_t InRunRange;
@@ -171,7 +171,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
 
     // Get rid of trailing comments and leading and trailing whitespace
     // Need to save the comment and put it in the thVar
-    
+
     while( (pos = line.find_first_of("#;/", pos+1)) != string::npos ) {
       if( IsComment(line, pos) ) {
 	current_comment.assign(line,pos+1,line.length());
@@ -203,7 +203,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
     }
 
     // Get rid of all white space not in quotes
-    // Step through one char at a time 
+    // Step through one char at a time
     pos = 0;
     int inquote=0;
     char quotechar=' ';
@@ -245,7 +245,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
 	  } else {
 	    InRunRange = 0;
 	  }
-	} else {		// A single number.  Run 
+	} else {		// A single number.  Run
 	  if(atoi(line.c_str()) == RunNumber) {
 	    InRunRange = 1;
 	  } else {
@@ -291,11 +291,11 @@ The ENGINE CTP support parameter "blocks" which were marked with
       }
       continue;
     }
-      
+
     TString values((line.substr(valuestartpos)).c_str());
     TObjArray *vararr = values.Tokenize(",");
     Int_t nvals = vararr->GetLast()+1;
-    
+
     Int_t* ip=0;
     Double_t* fp=0;
     // or expressions
@@ -329,7 +329,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
     // else (variable doesn't exist)
     //      make array of newlength
     //      create varname
-    //  
+    //
     // There is some code duplication here.  Refactor later
 
     Int_t newlength = currentindex + nvals;
@@ -427,7 +427,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
 	  }
 	}
 	currentindex += nvals;
-      }	
+      }
     } else {
       if(currentindex !=0) {
 	cout << "currentindex=" << currentindex << " shouldn't be!" << endl;
@@ -453,7 +453,7 @@ The ENGINE CTP support parameter "blocks" which were marked with
 	}
       }
       currentindex = nvals;
-      
+
       char *arrayname=new char [strlen(varname)+20];
       sprintf(arrayname,"%s[%d]",varname,nvals);
       if(ttype==0) {
@@ -502,7 +502,7 @@ is printed.  If the 5th element of a DBRequest structure is true (non
 zero), then there will be no error if the parameter is missing.
 
   */
-  
+
   const DBRequest *ti = list;
   Int_t cnt=0;
   Int_t this_cnt=0;
@@ -534,7 +534,7 @@ zero), then there will be no error if the parameter is missing.
 	switch (ti->type) {
 	case (kDouble) :
 	  if(ty == kInt) {
-	    *static_cast<Double_t*>(ti->var)=*(Int_t *)this->Find(key)->GetValuePointer();	    
+	    *static_cast<Double_t*>(ti->var)=*(Int_t *)this->Find(key)->GetValuePointer();
 	  } else if (ty == kDouble) {
 	    *static_cast<Double_t*>(ti->var)=*(Double_t *)this->Find(key)->GetValuePointer();
 	  } else {
@@ -589,14 +589,14 @@ zero), then there will be no error if the parameter is missing.
 Int_t THcParmList::GetArray(const char* attr, Int_t* array, Int_t size)
 {
   // Read in a set of Int_t's in to a C-style array.
-  
+
   return ReadArray(attr,array,size);
 }
 //_____________________________________________________________________________
 Int_t THcParmList::GetArray(const char* attr, Double_t* array, Int_t size)
 {
   // Read in a set of Double_t's in to a vector.
-  
+
   return ReadArray(attr,array,size);
 }
 
@@ -675,7 +675,7 @@ Int_t THcParmList::CloseCCDB()
   delete CCDB_obj;
   return(0);
 }
-Int_t THcParmList::LoadCCDBDirectory(const char* directory, 
+Int_t THcParmList::LoadCCDBDirectory(const char* directory,
 				     const char* prefix)
 {
   // Load all parameters in directory
@@ -757,10 +757,10 @@ Int_t THcParmList::LoadCCDBDirectory(const char* directory,
       } else {
 	cout << namepaths[iname] << ": Multicolumn CCDB variables not supported" << endl;
       }
-    }	
+    }
   }
   return 0;
 }
 
 #endif
-  
+
diff --git a/src/THcParmList.h b/src/THcParmList.h
index 13743888270c0d4ea8f3df721b6d55cd0e5ed648..389d7d6372b46c60ea592a8ca2ba2cbd026407c3 100644
--- a/src/THcParmList.h
+++ b/src/THcParmList.h
@@ -27,7 +27,7 @@ using namespace std;
 class THcParmList : public THaVarList {
 
 public:
- 
+
   THcParmList();
   virtual ~THcParmList() { Clear(); delete TextList; }
 
@@ -55,7 +55,7 @@ public:
   Int_t OpenCCDB(Int_t runnum);
   Int_t OpenCCDB(Int_t runnum, const char* connection_string);
   Int_t CloseCCDB();
-  Int_t LoadCCDBDirectory(const char* directory, 
+  Int_t LoadCCDBDirectory(const char* directory,
 			  const char* prefix);
 #endif
 
diff --git a/src/THcRaster.cxx b/src/THcRaster.cxx
index 03bc550d3217866bafb1ff65337c135825b4cfb3..54e3bf637c6c6fba5782530d6af2c760ab7355a3 100644
--- a/src/THcRaster.cxx
+++ b/src/THcRaster.cxx
@@ -1,9 +1,9 @@
 /** \class THcRaster
     \ingroup DetSupport
 
-  A class to decode the fast raster signals.                               
-  Measures the two magnet currents which are proportional to horizontal and 
-  vertical beam position                                                   
+  A class to decode the fast raster signals.
+  Measures the two magnet currents which are proportional to horizontal and
+  vertical beam position
 
 \author Buddhini Waidyawansa
 
@@ -61,7 +61,7 @@ THcRaster::~THcRaster()
 }
 
 
- 
+
 
 //_____________________________________________________________________________
 Int_t THcRaster::ReadDatabase( const TDatime& date )
@@ -118,7 +118,7 @@ Int_t THcRaster::DefineVariables( EMode mode )
 
   if( mode == kDefine && fIsSetup ) return kOK;
   fIsSetup = ( mode == kDefine );
-  
+
   // Register variables in global list
 
   RVarDef vars[] = {
@@ -142,7 +142,7 @@ THaAnalysisObject::EStatus THcRaster::Init( const TDatime& date )
   // Fill detector map with RASTER type channels
   if( gHcDetectorMap->FillMap(fDetMap, "RASTER") < 0 ) {
     static const char* const here = "Init()";
-    Error( Here(here), "Error filling detectormap for %s.", 
+    Error( Here(here), "Error filling detectormap for %s.",
   	   "RASTER");
     return kInitError;
   }
@@ -163,9 +163,9 @@ void THcRaster::AccumulatePedestals(TClonesArray* rawhits)
 {
   /*
   Extract data from the hit list, accumulating into arrays for
-  calculating pedestals. 
-  From ENGINE/g_analyze_misc.f - 
-  
+  calculating pedestals.
+  From ENGINE/g_analyze_misc.f -
+
   * JRA: Code to check FR pedestals.  Since the raster is a fixed frequency
   * and the pedestals come at a fixed rate, it is possible to keep getting
   * the same value for each pedestal event, and get the wrong zero value.
@@ -206,8 +206,8 @@ void THcRaster::CalculatePedestals( )
 {
   /*
   Use the accumulated pedestal data to calculate pedestals
-  From ENGINE/g_analyze_misc.f - 
-  
+  From ENGINE/g_analyze_misc.f -
+
      if (numfr.eq.1000) then
        avefrx = sumfrx / float(numfr)
        avefry = sumfry / float(numfr)
@@ -222,7 +222,7 @@ void THcRaster::CalculatePedestals( )
      endif
   */
   for(Int_t i=0;i<2;i++){
-    fAvgPedADC[i] = fPedADC[i]/ fNPedestalEvents; 
+    fAvgPedADC[i] = fPedADC[i]/ fNPedestalEvents;
     // std::cout<<" raster pedestal "<<fAvgPedADC[i]<<std::endl;
   }
 
@@ -240,14 +240,14 @@ Int_t THcRaster::Decode( const THaEvData& evdata )
 
   // Get the Hall C style hitlist (fRawHitList) for this event
   Int_t fNhits = THcHitList::DecodeToHitList(evdata);
-  
+
   // Get the pedestals from the first 1000 events
-  //if(fNPedestalEvents < 10) 
+  //if(fNPedestalEvents < 10)
   if((gHaCuts->Result("Pedestal_event")) & (fNPedestalEvents < 1000)){
-      AccumulatePedestals(fRawHitList);    
+      AccumulatePedestals(fRawHitList);
       fAnalyzePedestals = 1;	// Analyze pedestals first normal events
       fNPedestalEvents++;
-      
+
       return(0);
     }
   if(fAnalyzePedestals) {
@@ -256,24 +256,24 @@ Int_t THcRaster::Decode( const THaEvData& evdata )
   }
 
   Int_t ihit = 0;
-  
+
   while(ihit < fNhits) {
     THcRasterRawHit* hit = (THcRasterRawHit *) fRawHitList->At(ihit);
-    
+
     if(hit->fADC_xsig>0) {
       fRawXADC = hit->fADC_xsig;
       //std::cout<<" Raw X ADC = "<<fRawXADC<<std::endl;
     }
-    
+
     if(hit->fADC_ysig>0) {
       fRawYADC = hit->fADC_ysig;
       //std::cout<<" Raw Y ADC = "<<fRawYADC<<std::endl;
-    } 
+    }
     ihit++;
-  }  
+  }
 
   return 0;
-  
+
 }
 
 
@@ -287,7 +287,7 @@ Int_t THcRaster::Process( ){
   /*
     calculate raster position from ADC value.
     From ENGINE/g_analyze_misc.f -
-    
+
     gfrx_adc = gfrx_raw_adc - gfrx_adc_ped
     gfry_adc = gfry_raw_adc - gfry_adc_ped
   */
@@ -303,7 +303,7 @@ Int_t THcRaster::Process( ){
     gfrx = (gfrx_adc/gfrx_adcpercm)*(gfr_cal_mom/ebeam)
     gfry = (gfry_adc/gfry_adcpercm)*(gfr_cal_mom/ebeam)
   */
- 
+
   if(gHcParms->Find("gpbeam")){
     eBeam=*(Double_t *)gHcParms->Find("gpbeam")->GetValuePointer();
   }
@@ -311,7 +311,7 @@ Int_t THcRaster::Process( ){
   fYpos = (fYADC/fFrYADCperCM)*(fFrCalMom/eBeam);
 
   // std::cout<<" X = "<<fXpos<<" Y = "<<fYpos<<std::endl;
-  
+
 
   Double_t tt;
   Double_t tp;
@@ -326,7 +326,7 @@ Int_t THcRaster::Process( ){
   }
   fDirection.SetXYZ(tt, tp ,1.0); // Set arbitrarily to avoid run time warnings
   fDirection *= 1.0/TMath::Sqrt(1.0+tt*tt+tp*tp);
-    
+
   return 0;
 }
 
diff --git a/src/THcRaster.h b/src/THcRaster.h
index e71ec6ffac8af8c39d17270ef9df253be99377aa..102fbb44ab8ae896161355b74ee98dc9ef96db85 100644
--- a/src/THcRaster.h
+++ b/src/THcRaster.h
@@ -55,10 +55,10 @@ class THcRaster : public THaBeamDet, public THcHitList {
   Double_t       fYADC;     // Y ADC
   Double_t       fXpos;     // X position
   Double_t       fYpos;     // Y position
-  
 
-  Double_t       fPedADC[2];     // ADC poedestals 
-  Double_t       fAvgPedADC[2];     // Avergage ADC poedestals 
+
+  Double_t       fPedADC[2];     // ADC poedestals
+  Double_t       fAvgPedADC[2];     // Avergage ADC poedestals
 
   Double_t       fRawPos[2];     // current in Raster ADCs for position
   TVector3       fPosition[2];   // Beam position at 1st, 2nd BPM or at the target (meters)
@@ -76,7 +76,7 @@ class THcRaster : public THaBeamDet, public THcHitList {
   void   AccumulatePedestals(TClonesArray* rawhits);
 
   ClassDef(THcRaster, 0);	// add THcRaster to ROOT library
-};  
+};
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/src/THcRasterRawHit.cxx b/src/THcRasterRawHit.cxx
index 3603d358e1898b8e3666d0763e6227416253dddd..e6a58806c2f5f91955e5565ca473488564fd21ef 100644
--- a/src/THcRasterRawHit.cxx
+++ b/src/THcRasterRawHit.cxx
@@ -51,7 +51,7 @@ Int_t THcRasterRawHit::GetData(Int_t signal) {
   } else if (signal==4) {
     return(fADC_ysig);
   }
-  return(-1); 
+  return(-1);
 }
 
 // Int_t THcRasterRawHit::Compare(const TObject* obj) const
diff --git a/src/THcRasterRawHit.h b/src/THcRasterRawHit.h
index c35f51e2f7c9985392104ae938800681d534814e..b7062278ee2dc1fefbcd4f498c1a0733a57b71d7 100644
--- a/src/THcRasterRawHit.h
+++ b/src/THcRasterRawHit.h
@@ -14,17 +14,17 @@ class THcRasterRawHit : public THcRawHit {
 
  public:
 
- THcRasterRawHit(Int_t plane=0, Int_t counter=0) : THcRawHit(plane, counter), 
+ THcRasterRawHit(Int_t plane=0, Int_t counter=0) : THcRawHit(plane, counter),
     fADC_xsig(-1), fADC_ysig(-1),
     fADC_xsync(-1), fADC_ysync(-1) {
   }
 
   THcRasterRawHit& operator=( const THcRasterRawHit& );
   ~THcRasterRawHit() {}
-  
+
   void Clear( Option_t* opt="" )
   { fADC_xsig = -1; fADC_ysig = -1; fADC_xsync = -1; fADC_ysync = -1; }
-  
+
   void SetData(Int_t signal, Int_t data);
   Int_t GetData(Int_t signal);
 
@@ -39,6 +39,6 @@ class THcRasterRawHit : public THcRawHit {
  private:
 
   ClassDef(THcRasterRawHit, 0);	// Raw hit class for raster data
-};  
+};
 
 #endif
diff --git a/src/THcRasteredBeam.cxx b/src/THcRasteredBeam.cxx
index c4bd4312730a1554222a4859e94b11fb1abae567..41efe1f44b336f7e7abb633191978cdb1d8cbf23 100644
--- a/src/THcRasteredBeam.cxx
+++ b/src/THcRasteredBeam.cxx
@@ -1,7 +1,7 @@
 /** \class THcRasteredBeam
     \ingroup Detectors
 
-  A class to handle the raster processing tasks                            
+  A class to handle the raster processing tasks
 
 \author Buddhini Waidyawansa
 
@@ -17,7 +17,7 @@
 
 //_____________________________________________________________________________
 THcRasteredBeam::THcRasteredBeam( const char* name, const char* description ) :
-    THaBeam( name, description ) 
+    THaBeam( name, description )
 {
   AddDetector( new THcRaster("raster","raster",this) );
 }
@@ -27,19 +27,19 @@ THcRasteredBeam::THcRasteredBeam( const char* name, const char* description ) :
 Int_t THcRasteredBeam::Reconstruct()
 {
 
-  TIter nextDet( fDetectors ); 
+  TIter nextDet( fDetectors );
 
   nextDet.Reset();
 
-  // This apparatus assumes that there is only one detector 
-  // in the list. If someone adds detectors by hand, the first 
+  // This apparatus assumes that there is only one detector
+  // in the list. If someone adds detectors by hand, the first
   // detector in the list will be used to get the beam position
   // the others will be processed
-  // -- Iam not sure why the code is written like this. But for now, I am 
+  // -- Iam not sure why the code is written like this. But for now, I am
   // going to work with this code as it is since all I need for is to
   // decode the raster - Buddhini
 
-  
+
   if (THaBeamDet* theBeamDet=
       static_cast<THaBeamDet*>( nextDet() )) {
     theBeamDet->Process();
@@ -47,7 +47,7 @@ Int_t THcRasteredBeam::Reconstruct()
     fDirection = theBeamDet->GetDirection();
   }
   else {
-    Error( Here("THcRasteredBeam::Reconstruct"), 
+    Error( Here("THcRasteredBeam::Reconstruct"),
 	   "Beamline Detectors Missing in Detector List" );
   }
 
diff --git a/src/THcRasteredBeam.h b/src/THcRasteredBeam.h
index 2e78151771d201122d5db71c9004931bde1b2884..e7e245c111989ba0dcefa70b8b8fcb7e007f59ca 100644
--- a/src/THcRasteredBeam.h
+++ b/src/THcRasteredBeam.h
@@ -24,7 +24,7 @@ class THcRasteredBeam : public THaBeam {
   virtual Int_t Reconstruct() ;
 
   ClassDef(THcRasteredBeam, 0);	// add THcRasteredBeam to ROOT library
-};  
+};
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/src/THcRawHit.cxx b/src/THcRawHit.cxx
index 0dd4f0b7342c4e53231044085163843439949c8a..82debf24d37a20e2701670a61af48f553c435d73 100644
--- a/src/THcRawHit.cxx
+++ b/src/THcRawHit.cxx
@@ -1,9 +1,9 @@
 /** \class THcRawHit
     \ingroup DetSupport
 
- Abstract class for a single raw hit                        
+ Abstract class for a single raw hit
 
- Contains plane, counter and at least one data value        
+ Contains plane, counter and at least one data value
 
 */
 
diff --git a/src/THcRawHit.h b/src/THcRawHit.h
index eb58d109c068a505501e95fe03fb135486c66b35..9406e25ee5549b7fed1563229d2c2296ed6d288d 100644
--- a/src/THcRawHit.h
+++ b/src/THcRawHit.h
@@ -20,7 +20,7 @@ public:
       return *this; };
 
   virtual ~THcRawHit() {}
- 
+
   enum ESignalType { kUndefined, kTDC, kADC};
 
   // This line causes problem
@@ -50,7 +50,7 @@ public:
 
   Int_t fPlane;
   Int_t fCounter;
- 
+
  private:
 
   ClassDef(THcRawHit,0)      // Raw Hit Base Class
diff --git a/src/THcRawShowerHit.cxx b/src/THcRawShowerHit.cxx
index 2324e27271024e5888fb73a0851d07dddf4570e9..653c1df6d6e1632cb611c7b179cce78db114c085 100644
--- a/src/THcRawShowerHit.cxx
+++ b/src/THcRawShowerHit.cxx
@@ -1,16 +1,16 @@
 /** \class THcRawShowerHit
     \ingroup DetSupport
 
- Class representing a single raw hit for a hodoscope paddle                
+ Class representing a single raw hit for a hodoscope paddle
 
- Contains plane, counter and pos/neg adc and tdc values                    
-                                                                           
- Enhanced to work with FADC250 data samples.  If fNPosSamples/fNNegSamples 
- is greater than 1, assume that the data held in the hit is the sampled    
- waveform.  Signals 0,1 will return the integrated pulse with dynamic      
- pedestal subtraction (first four samples comprise the pedestal).  Signals 
- 2,3 are reserved for time information.  Signals 4,5 are pedestals and     
- 6 and 7 are the straight sum of all the samples.                          
+ Contains plane, counter and pos/neg adc and tdc values
+
+ Enhanced to work with FADC250 data samples.  If fNPosSamples/fNNegSamples
+ is greater than 1, assume that the data held in the hit is the sampled
+ waveform.  Signals 0,1 will return the integrated pulse with dynamic
+ pedestal subtraction (first four samples comprise the pedestal).  Signals
+ 2,3 are reserved for time information.  Signals 4,5 are pedestals and
+ 6 and 7 are the straight sum of all the samples.
 
 */
 
@@ -26,7 +26,7 @@ void THcRawShowerHit::SetData(Int_t signal, Int_t data) {
     fADC_pos[fNPosSamples++] = data;
   } else if (signal==1) {
     fADC_neg[fNNegSamples++] = data;
-  } 
+  }
 }
 
 Int_t THcRawShowerHit::GetData(Int_t signal, Int_t isamplow, Int_t isamphigh,
@@ -67,10 +67,10 @@ Int_t THcRawShowerHit::GetData(Int_t signal, Int_t isamplow, Int_t isamphigh,
       adcsum += fADC_neg[isample] - pedestal;
     }
     return(adcsum);
-  } 
+  }
   return(-1); // Actually should throw exception
 }
-  
+
 // Return sum of samples
 // For Fastbus ADC, this will simply be the hardware ADC value as there
 // is just one sample.  For Flash ADCs, this should return the
@@ -89,7 +89,7 @@ Int_t THcRawShowerHit::GetData(Int_t signal) {
       adcsum += fADC_neg[isample];
     }
     return(adcsum);
-  } 
+  }
   return(-1); // Actually should throw exception
 }
 
@@ -127,7 +127,7 @@ Double_t THcRawShowerHit::GetPedestal(Int_t signal, Int_t isamplow, Int_t isamph
   }
   return(pedestal);
 }
-      
+
 // Return the number of samples
 Int_t THcRawShowerHit::GetNSamples(Int_t signal) {
   if(signal==0) {
@@ -164,4 +164,4 @@ THcRawShowerHit& THcRawShowerHit::operator=( const THcRawShowerHit& rhs )
 //////////////////////////////////////////////////////////////////////////
 ClassImp(THcRawShowerHit)
 
- 
+
diff --git a/src/THcRawShowerHit.h b/src/THcRawShowerHit.h
index cc4b12e4d2de1ca49f515a69bf1031c651907419..93b325cf838b320923ba5996d003a24f8b13d5fd 100644
--- a/src/THcRawShowerHit.h
+++ b/src/THcRawShowerHit.h
@@ -11,7 +11,7 @@ class THcRawShowerHit : public THcRawHit {
   friend class THcShowerPlane;
   friend class THcShowerArray;
 
-  THcRawShowerHit(Int_t plane=0, Int_t counter=0) : 
+  THcRawShowerHit(Int_t plane=0, Int_t counter=0) :
     THcRawHit(plane, counter), fNPosSamples(0), fNNegSamples(0) {
   }
   THcRawShowerHit& operator=( const THcRawShowerHit& );
@@ -45,7 +45,7 @@ class THcRawShowerHit : public THcRawHit {
  private:
 
   ClassDef(THcRawShowerHit, 0);	// Raw Shower counter hit
-};  
+};
 
 #endif
- 
+
diff --git a/src/THcScalerEvtHandler.h b/src/THcScalerEvtHandler.h
index 8197591178dbf148005ee6008f60f0ef368f6c93..043edbd4e344912176a0cb87f6b001b6944a2b7c 100644
--- a/src/THcScalerEvtHandler.h
+++ b/src/THcScalerEvtHandler.h
@@ -15,7 +15,7 @@
 #include <string>
 #include <vector>
 #include "TTree.h"
-#include "TString.h"  
+#include "TString.h"
 
 class HCScalerLoc { // Utility class used by THaScalerEvtHandler
  public:
diff --git a/src/THcScintillatorPlane.cxx b/src/THcScintillatorPlane.cxx
index f3de6db6addbb7d9a15db29ceecea73cf64ecda4..9bbaef63f9a900d56c76bd75a405202dbc0a9493 100644
--- a/src/THcScintillatorPlane.cxx
+++ b/src/THcScintillatorPlane.cxx
@@ -26,7 +26,7 @@ using namespace std;
 ClassImp(THcScintillatorPlane)
 
 //______________________________________________________________________________
-THcScintillatorPlane::THcScintillatorPlane( const char* name, 
+THcScintillatorPlane::THcScintillatorPlane( const char* name,
 					    const char* description,
 					    const Int_t planenum,
 					    THaDetectorBase* parent )
@@ -44,7 +44,7 @@ THcScintillatorPlane::THcScintillatorPlane( const char* name,
   frNegADCPeds = new TClonesArray("THcSignalHit",16);
   fPlaneNum = planenum;
   fTotPlanes = planenum;
-  fNScinHits = 0; 
+  fNScinHits = 0;
   //
   fMaxHits=53;
 
@@ -73,7 +73,7 @@ THcScintillatorPlane::~THcScintillatorPlane()
   delete [] fScinSigma;
   delete [] fScinZpos;
   delete [] fPosCenter;
-  
+
   delete [] fHodoPosMinPh; fHodoPosMinPh = NULL;
   delete [] fHodoNegMinPh; fHodoNegMinPh = NULL;
   delete [] fHodoPosPhcCoeff; fHodoPosPhcCoeff = NULL;
@@ -124,11 +124,11 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
 {
 
   // See what file it looks for
-  
+
   //  static const char* const here = "ReadDatabase()";
   char prefix[2];
   char parname[100];
-  
+
   prefix[0]=tolower(GetParent()->GetPrefix()[0]);
   prefix[1]='\0';
 
@@ -139,13 +139,13 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
   strcat(parname,"_nr");
   fNelem = *(Int_t *)gHcParms->Find(parname)->GetValuePointer();
   //
-  // Based on the signs of these quantities in the .pos file the correspondence 
+  // Based on the signs of these quantities in the .pos file the correspondence
   // should be bot=>left  and top=>right when comparing x and y-type scintillators
   char tmpleft[6], tmpright[6];
   if (fPlaneNum==1 || fPlaneNum==3) {
     strcpy(tmpleft,"left");
     strcpy(tmpright,"right");
-  } 
+  }
   else {
     strcpy(tmpleft,"bot");
     strcpy(tmpright,"top");
@@ -162,7 +162,7 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
     {Form("scin_%s_%s",GetName(),tmpright), &fPosRight,kDouble},
     {Form("scin_%s_offset",GetName()), &fPosOffset, kDouble},
     {Form("scin_%s_center",GetName()), fPosCenter,kDouble,fNelem},
-    {"tofusinginvadc",   &fTofUsingInvAdc,        kInt,            0,  1},       
+    {"tofusinginvadc",   &fTofUsingInvAdc,        kInt,            0,  1},
     {"hodo_adc_mode", &fADCMode, kInt, 0, 1},
     {"hodo_pedestal_scale", &fADCPedScaleFactor, kDouble, 0, 1},
     {"hodo_adc_diag_cut", &fADCDiagCut, kInt, 0, 1},
@@ -221,7 +221,7 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
     Double_t negsigma = ((THcHodoscope *)GetParent())->GetHodoNegSigma(index);
     fHodoSigma[j] = TMath::Sqrt(possigma*possigma+negsigma*negsigma)/2.0;
   }
-  
+
   cout <<" plane num = "<<fPlaneNum<<endl;
   cout <<" nelem     = "<<fNelem<<endl;
   cout <<" zpos      = "<<fZpos<<endl;
@@ -233,9 +233,9 @@ Int_t THcScintillatorPlane::ReadDatabase( const TDatime& date )
   cout <<"PosRight = "<<fPosRight<<endl;
   cout <<"PosOffset = "<<fPosOffset<<endl;
   cout <<"PosCenter[0] = "<<fPosCenter[0]<<endl;
-  
+
   // Think we will make special methods to pass most
-  // How generic do we want to make this class?  
+  // How generic do we want to make this class?
   // The way we get parameter data is going to be pretty specific to
   // our parameter file naming conventions.  But on the other hand,
   // the Hall A analyzer read database is pretty specific.
@@ -284,9 +284,9 @@ Int_t THcScintillatorPlane::DefineVariables( EMode mode )
 void THcScintillatorPlane::Clear( Option_t* )
 {
   /*! \brief Clears fHodoHits,frPosTDCHits,frNegTDCHits,frPosADCHits,frNegADCHits
-   * 
+   *
    * -  Clears fHodoHits,frPosTDCHits,frNegTDCHits,frPosADCHits,frNegADCHits
-   */ 
+   */
   //cout << " Calling THcScintillatorPlane::Clear " << GetName() << endl;
   // Clears the hit lists
   fHodoHits->Clear();
@@ -300,8 +300,8 @@ void THcScintillatorPlane::Clear( Option_t* )
 //_____________________________________________________________________________
 Int_t THcScintillatorPlane::Decode( const THaEvData& evdata )
 {
-  /*! \brief Does nothing. Data decode in  THcScintillatorPlane::Processhits which is called by THcHodoscope::Decode 
-   */ 
+  /*! \brief Does nothing. Data decode in  THcScintillatorPlane::Processhits which is called by THcHodoscope::Decode
+   */
   cout << " Calling THcScintillatorPlane::Decode " << GetName() << endl;
 
   return 0;
@@ -310,8 +310,8 @@ Int_t THcScintillatorPlane::Decode( const THaEvData& evdata )
 Int_t THcScintillatorPlane::CoarseProcess( TClonesArray& tracks )
 {
   /*! \brief Does nothing
-   */ 
- 
+   */
+
   cout <<"*******************************\n";
   cout <<"NOW IN THcScintilatorPlane::CoarseProcess!!!!\n";
   cout <<"*******************************\n";
@@ -324,7 +324,7 @@ Int_t THcScintillatorPlane::CoarseProcess( TClonesArray& tracks )
 Int_t THcScintillatorPlane::FineProcess( TClonesArray& tracks )
 {
   /*! \brief Does nothing
-   */ 
+   */
   return 0;
 }
 
@@ -332,21 +332,21 @@ Int_t THcScintillatorPlane::FineProcess( TClonesArray& tracks )
 //_____________________________________________________________________________
 Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
 {
-  /*! \brief Extract scintillator paddle hits from raw data starting at "nexthit" 
-   * - Called by THcHodoscope::Decode 
+  /*! \brief Extract scintillator paddle hits from raw data starting at "nexthit"
+   * - Called by THcHodoscope::Decode
    * - Loops through "rawhits" array  starting at index of "nexthit"
-   * - Assumes that the hit list is sorted by plane and looping ends when plane number of hit doesn't match fPlaneNum  
+   * - Assumes that the hit list is sorted by plane and looping ends when plane number of hit doesn't match fPlaneNum
    * - Fills THcSignalHit objects frPosTDCHits and frNegTDCHits when TDC > 0
    * - Fills THcSignalHit objects frPosADCHits and frNegaDCHit with pedestal subtracted ADC when value larger than 50
    * - For hits that have TDC value for either positive or negative PMT within  fScinTdcMin and fScinTdcMax
    *  + Creates new  fHodoHits[fNScinHits] =  THcHodoHit
    *  + Calculates pulse height correction to the positive and negative PMT times
-   *  + Correct times for time traveled in paddle 
+   *  + Correct times for time traveled in paddle
    *  + Correct times for time of flight using beta from central spectrometer momentum and particle type
    *  + Calls  SetCorrectedTime method of THcHodoHit
    *  + Increments fNScinHits
    * - Returns value of nexthit + number of hits processed
-   * 
+   *
   */
   //raw
   Int_t nrPosTDCHits=0;
@@ -369,7 +369,7 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
   Int_t ihit = nexthit;
 
   //  cout << "THcScintillatorPlane: raw htis = " << nrawhits << endl;
-  
+
   // A THcRawHodoHit contains all the information (tdc and adc for both
   // pmts) for a single paddle for a single trigger.  The tdc information
   // might include multiple hits if it uses a multihit tdc.
@@ -384,9 +384,9 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
 
     Int_t index=padnum-1;
     // Need to be finding first hit in TDC range, not the first hit overall
-    if (hit->fNRawHits[2] > 0) 
+    if (hit->fNRawHits[2] > 0)
       ((THcSignalHit*) frPosTDCHits->ConstructedAt(nrPosTDCHits++))->Set(padnum, hit->GetTDCPos()+fTdcOffset);
-    if (hit->fNRawHits[3] > 0) 
+    if (hit->fNRawHits[3] > 0)
       ((THcSignalHit*) frNegTDCHits->ConstructedAt(nrNegTDCHits++))->Set(padnum, hit->GetTDCNeg()+fTdcOffset);
     // For making hit maps, we use >= 50 cut
     // For making raw hists, we don't want the cut
@@ -450,7 +450,7 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
 						hit->fCounter, this);
     // Do corrections if valid TDC on both ends of bar
       if(btdcraw_pos && btdcraw_neg) {
-      
+
 	// Do the pulse height correction to the time.  (Position dependent corrections later)
 	Double_t timec_pos, timec_neg;
 	if(fTofUsingInvAdc) {
@@ -512,7 +512,7 @@ Int_t THcScintillatorPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
 Int_t THcScintillatorPlane::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
 {
   /*! \brief Extract the data for this plane from raw hit list THcRawHodoHit, accumulating into arrays for calculating pedestals.
-   *  
+   *
    * - Loop through raw data for scintillator plane
    */
   Int_t nrawhits = rawhits->GetLast()+1;
@@ -556,12 +556,12 @@ Int_t THcScintillatorPlane::AccumulatePedestals(TClonesArray* rawhits, Int_t nex
 void THcScintillatorPlane::CalculatePedestals( )
 {
  /*! \brief   Calculate pedestals from arrays made in THcScintillatorPlane::AccumulatePedestals
-  * 
+  *
   * - Calculate pedestals from arrays made in THcScintillatorPlane::AccumulatePedestals
-  * - In old fortran ENGINE code, a comparison was made between calculated pedestals and the pedestals read in by the FASTBUS modules for zero supression. This is not implemented. 
+  * - In old fortran ENGINE code, a comparison was made between calculated pedestals and the pedestals read in by the FASTBUS modules for zero supression. This is not implemented.
   */
   for(UInt_t i=0; i<fNelem;i++) {
-    
+
     // Positive tubes
     fPosPed[i] = ((Double_t) fPosPedSum[i]) / TMath::Max(1, fPosPedCount[i]);
     fPosThresh[i] = fPosPed[i] + 15;
@@ -573,16 +573,16 @@ void THcScintillatorPlane::CalculatePedestals( )
     //    cout <<"Pedestals "<< i+1 << " " << fPosPed[i] << " " << fNegPed[i] << endl;
   }
   //  cout << " " << endl;
-  
+
 }
 
 //_____________________________________________________________________________
 void THcScintillatorPlane::InitializePedestals( )
 {
  /*! \brief   called by THcScintillatorPlane::ReadDatabase
-  * 
+  *
   * - Initialize variables used in  THcScintillatorPlane::AccumulatePedestals and THcScintillatorPlane::CalculatePedestals
-  * - Minimum number of pedestal events needed for calculation, fMinPeds, hadrcoded to 500 
+  * - Minimum number of pedestal events needed for calculation, fMinPeds, hadrcoded to 500
   */
   fNPedestalEvents = 0;
   fMinPeds = 500; 		// In engine, this is set in parameter file
diff --git a/src/THcScintillatorPlane.h b/src/THcScintillatorPlane.h
index 00f886e28c805f0bd6120d793bf070ea2b531eb5..2dcfe53ff931dd6d1418e88c29ff7e00aef05980 100644
--- a/src/THcScintillatorPlane.h
+++ b/src/THcScintillatorPlane.h
@@ -2,14 +2,14 @@
 #define ROOT_THcScintillatorPlane
 
 //////////////////////////////////////////////////////////////////////////////
-//                         
+//
 // THcScintillatorPlane
 //
 // A Hall C scintillator plane
 //
 // May want to later inherit from a THcPlane class if there are similarities
 // in what a plane is shared with other detector types (shower, etc.)
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 
 #include "THaSubDetector.h"
@@ -19,7 +19,7 @@ class THaEvData;
 class THaSignalHit;
 
 class THcScintillatorPlane : public THaSubDetector {
-  
+
  public:
   THcScintillatorPlane( const char* name, const char* description,
 			Int_t planenum, THaDetectorBase* parent = NULL);
@@ -42,7 +42,7 @@ class THcScintillatorPlane : public THaSubDetector {
   Int_t GetNelem() {return fNelem;}; // return number of paddles in this plane
   Int_t GetNScinHits() {return fNScinHits;}; // Get # hits in plane (that pass min/max TDC cuts)
   Int_t GetNGoodHits() {return fNGoodHits;}; // Get # hits in plane (used in determining focal plane time)
-  Double_t GetSpacing() {return fSpacing;}; // spacing of paddles 
+  Double_t GetSpacing() {return fSpacing;}; // spacing of paddles
   Double_t GetSize() {return fSize;};    // paddle size
   Double_t GetHodoSlop() {return fHodoSlop;}; // hodo slop
   Double_t GetZpos() {return fZpos;};   //return the z position
@@ -52,7 +52,7 @@ class THcScintillatorPlane : public THaSubDetector {
   Double_t GetPosOffset() {return fPosOffset;};
   Double_t GetPosCenter(Int_t PaddleNo) {return fPosCenter[PaddleNo];}; // counting from zero!
   Double_t GetFpTime() {return fFptime;};
- 
+
   void SetFpTime(Double_t f) {fFptime=f;};
   void SetNGoodHits(Int_t ng) {fNGoodHits=ng;};
 
@@ -74,7 +74,7 @@ class THcScintillatorPlane : public THaSubDetector {
 
   Int_t fPlaneNum;		/* Which plane am I 1-4 */
   UInt_t fTotPlanes;            /* so we can read variables that are not indexed by plane id */
-  UInt_t fNelem;		/* Need since we don't inherit from 
+  UInt_t fNelem;		/* Need since we don't inherit from
 				 detector base class */
   Int_t fNScinHits;                 /* number of hits in plane (that pass min/max TDC cuts) */
   Int_t fNGoodHits;                 /* number of hits in plane (used in determining focal plane time) */
diff --git a/src/THcShower.cxx b/src/THcShower.cxx
index 1c7e447628e0b74e68f00db8a064bcb523357fa0..6c7d1204714b23d30f5402db3c0e8b91fdbd50a4 100644
--- a/src/THcShower.cxx
+++ b/src/THcShower.cxx
@@ -56,13 +56,13 @@ void THcShower::Setup(const char* name, const char* description)
   prefix[0] = tolower(GetApparatus()->GetName()[0]);
   prefix[1] = '\0';
 
-  
+
   string layernamelist;
   fHasArray = 0;		// Flag for presence of fly's eye array
   DBRequest list[]={
     {"cal_num_layers", &fNLayers, kInt},
     {"cal_layer_names", &layernamelist, kString},
-    {"cal_array",&fHasArray, kInt,0, 1}, 
+    {"cal_array",&fHasArray, kInt,0, 1},
     {0}
   };
 
@@ -71,7 +71,7 @@ void THcShower::Setup(const char* name, const char* description)
   vector<string> layer_names = vsplit(layernamelist);
 
   if(layer_names.size() != fNTotLayers) {
-    cout << "THcShower::Setup ERROR: Number of layers " << fNTotLayers 
+    cout << "THcShower::Setup ERROR: Number of layers " << fNTotLayers
 	 << " doesn't agree with number of layer names "
 	 << layer_names.size() << endl;
     // Should quit.  Is there an official way to quit?
@@ -82,7 +82,7 @@ void THcShower::Setup(const char* name, const char* description)
     fLayerNames[i] = new char[layer_names[i].length()+1];
     strcpy(fLayerNames[i], layer_names[i].c_str());
   }
-  
+
   char *desc = new char[strlen(description)+100];
   fPlanes = new THcShowerPlane* [fNLayers];
 
@@ -91,7 +91,7 @@ void THcShower::Setup(const char* name, const char* description)
     strcat(desc, " Plane ");
     strcat(desc, fLayerNames[i]);
 
-    fPlanes[i] = new THcShowerPlane(fLayerNames[i], desc, i+1, this); 
+    fPlanes[i] = new THcShowerPlane(fLayerNames[i], desc, i+1, this);
 
   }
   if(fHasArray) {
@@ -191,7 +191,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
   //  static const char* const here = "ReadDatabase()";
   char prefix[2];
 
-  // Read data from database 
+  // Read data from database
   // Pull values from the THcParmList instead of reading a database
   // file like Hall A does.
 
@@ -336,7 +336,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
   for (UInt_t i=0; i<fNLayers; i++) fNTotBlocks += fNBlocks[i];
 
   // Debug output.
-  if (fdbg_init_cal) 
+  if (fdbg_init_cal)
     cout << "  Total number of blocks in the layers of calorimeter: " << dec
 	 << fNTotBlocks << endl;
 
@@ -545,7 +545,7 @@ void THcShower::DeleteArrays()
 }
 
 //_____________________________________________________________________________
-inline 
+inline
 void THcShower::Clear(Option_t* opt)
 {
 
@@ -620,7 +620,7 @@ Int_t THcShower::Decode( const THaEvData& evdata )
   }
   THcHallCSpectrometer *app = static_cast<THcHallCSpectrometer*>(GetApparatus());
   fEtotNorm=fEtot/(app->GetPcentral());
- 
+
   return nhits;
 }
 
@@ -628,11 +628,11 @@ Int_t THcShower::Decode( const THaEvData& evdata )
 Int_t THcShower::CoarseProcess( TClonesArray& tracks)
 {
   // Calculation of coordinates of particle track cross point with shower
-  // plane in the detector coordinate system. For this, parameters of track 
+  // plane in the detector coordinate system. For this, parameters of track
   // reconstructed in THaVDC::CoarseTrack() are used.
   //
   // Apply corrections and reconstruct the complete hits.
-  
+
   // Clustering of hits.
   //
 
@@ -707,7 +707,7 @@ Int_t THcShower::CoarseProcess( TClonesArray& tracks)
 	 ppcl != (*fClusterList).end(); ppcl++) {
 
       cout << "  Cluster #" << i++
-	   <<":  E=" << clE(*ppcl) 
+	   <<":  E=" << clE(*ppcl)
 	   << "  Epr=" << clEpr(*ppcl)
 	   << "  X=" << clX(*ppcl)
 	   << "  Z=" << clZ(*ppcl)
@@ -972,10 +972,10 @@ Int_t THcShower::MatchCluster(THaTrack* Track,
 	 << "  Y = " << YTrFront
 	 << "  Pathl = " << pathl
 	 << endl;
-    if (fvTest) 
+    if (fvTest)
       cout << "  Fiducial volume test: inFidVol = " << inFidVol << endl;
 
-    cout << "  Matched cluster #" << mclust << ",  delatX= " << deltaX 
+    cout << "  Matched cluster #" << mclust << ",  delatX= " << deltaX
     	 << endl;
     cout << "---------------------------------------------------------------\n";
   }
@@ -1014,7 +1014,7 @@ Float_t THcShower::GetShEnergy(THaTrack* Track) {
       // Coordinate correction factors for positive and negative sides,
       // different for double PMT counters in the 1-st two layes and for
       // single PMT counters in the rear two layers.
-      Float_t corpos = 1.;   
+      Float_t corpos = 1.;
       Float_t corneg = 1.;
 
       if (ip < fNegCols) {
@@ -1099,7 +1099,7 @@ Int_t THcShower::FineProcess( TClonesArray& tracks )
 
 Double_t THcShower::GetNormETot( ){
   return fEtotNorm;
-} 
+}
 
 ClassImp(THcShower)
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/src/THcShower.h b/src/THcShower.h
index 185ee9b788cc3f113d8c33161dbd1c266ea55a5e..b4ad6aa74a1d423f7546efa18731d8250a8d10fe 100644
--- a/src/THcShower.h
+++ b/src/THcShower.h
@@ -26,11 +26,11 @@ public:
   virtual EStatus    Init( const TDatime& run_time );
   virtual Int_t      CoarseProcess( TClonesArray& tracks );
   virtual Int_t      FineProcess( TClonesArray& tracks );
-  
+
   Double_t GetNormETot();
 
   Int_t GetNHits() const { return fNhits; }
-  
+
   Int_t GetNBlocks(Int_t NLayer) const { return fNBlocks[NLayer];}
 
   Double_t GetXPos(Int_t NLayer, Int_t NRow) const {
@@ -126,8 +126,8 @@ protected:
   Int_t fNclust;             // Number of clusters
   Int_t fNtracks;            // Number of shower tracks, i.e. number of
                              // cluster-to-track association
-  Double_t fEtot;            // Total energy 
-  Double_t fEtotNorm;        // Total energy divided by spec central momentum 
+  Double_t fEtot;            // Total energy
+  Double_t fEtotNorm;        // Total energy divided by spec central momentum
   Double_t fEtrack;          // Cluster energy associated to the last track
 
   THcShowerClusterList* fClusterList;   // List of hit clusters
diff --git a/src/THcShowerArray.cxx b/src/THcShowerArray.cxx
index 61cec9fe98b527b7620f0fd84516c70992a833ff..e59496881ecea88669d5a5acb29832d0ae65e1c2 100644
--- a/src/THcShowerArray.cxx
+++ b/src/THcShowerArray.cxx
@@ -30,7 +30,7 @@ using namespace std;
 ClassImp(THcShowerArray)
 
 //______________________________________________________________________________
-THcShowerArray::THcShowerArray( const char* name, 
+THcShowerArray::THcShowerArray( const char* name,
 				const char* description,
 				const Int_t layernum,
 				THaDetectorBase* parent )
@@ -411,7 +411,7 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
 	 ppcl != (*fClusterList).end(); ppcl++) {
 
       cout << "  Cluster #" << i++
-	   <<":  E=" << clE(*ppcl) 
+	   <<":  E=" << clE(*ppcl)
 	   << "  Epr=" << clEpr(*ppcl)
 	   << "  X=" << clX(*ppcl)
 	   << "  Z=" << clZ(*ppcl)
@@ -539,7 +539,7 @@ Int_t THcShowerArray::MatchCluster(THaTrack* Track,
 	 << "  Y = " << YTrFront
 	 << "  Pathl = " << pathl
 	 << endl;
-    if (fParent->fvTest) 
+    if (fParent->fvTest)
       cout << "  Fiducial volume test: inFidVol = " << inFidVol << endl;
 
     cout << "  Matched cluster #" << mclust << ",  Delta = " << Delta << endl;
@@ -640,7 +640,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
     if(hit->fPlane != fLayerNum) {
       break;
     }
-    
+
     // Should probably check that counter # is in range
     if(fUsingFADC) {
       fA[hit->fCounter-1] = hit->GetData(0,fPedSampLow,fPedSampHigh,
@@ -674,7 +674,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
 
     ihit++;
   }
-    
+
 #if 0
   if(ngood > 0) {
     cout << "+";
@@ -847,7 +847,7 @@ void THcShowerArray::CalculatePedestals( )
   // Use the accumulated pedestal data to calculate pedestals.
 
   for(Int_t i=0; i<fNelem;i++) {
-    
+
     fPed[i] = ((Float_t) fPedSum[i]) / TMath::Max(1, fPedCount[i]);
     fSig[i] = sqrt(((Float_t)fPedSum2[i])/TMath::Max(1, fPedCount[i])
 		   - fPed[i]*fPed[i]);
@@ -874,7 +874,7 @@ void THcShowerArray::CalculatePedestals( )
     cout << "---------------------------------------------------------------\n";
 
   }
-  
+
 }
 //_____________________________________________________________________________
 void THcShowerArray::InitializePedestals( )
@@ -894,7 +894,7 @@ void THcShowerArray::InitializePedestals( )
     fPedSum2[i] = 0;
     fPedCount[i] = 0;
   }
-} 
+}
 
 //------------------------------------------------------------------------------
 
diff --git a/src/THcShowerArray.h b/src/THcShowerArray.h
index 0b838f8f5750a8868d8a81183a72d376e137b857..8f59f2004830791f12f16e7e2091a597593935f9 100644
--- a/src/THcShowerArray.h
+++ b/src/THcShowerArray.h
@@ -1,5 +1,5 @@
 #ifndef ROOT_THcShowerArray
-#define ROOT_THcShowerArray 
+#define ROOT_THcShowerArray
 
 //#define HITPIC 1
 #ifdef HITPIC
@@ -7,13 +7,13 @@
 #endif
 
 //////////////////////////////////////////////////////////////////////////////
-//                         
+//
 // THcShowerArray
 //
 // A Hall C Fly's Eye Shower Array
 //
 // Subdetector for the fly's eye part of the SHMS shower counter.
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 
 #include "THaSubDetector.h"
@@ -66,7 +66,7 @@ public:
   };
 
   // Fiducial volume limits.
-  Double_t fvXmin(); 
+  Double_t fvXmin();
   Double_t fvYmax();
   Double_t fvXmax();
   Double_t fvYmin();
diff --git a/src/THcShowerHit.cxx b/src/THcShowerHit.cxx
index 514591c49e3168d4fc7757ab93554c8b2c594e0b..574d05646a1c4b567ec69ca4bac4f14298dfdaaa 100644
--- a/src/THcShowerHit.cxx
+++ b/src/THcShowerHit.cxx
@@ -1,4 +1,4 @@
-/** \classTHcShowerHit 
+/** \classTHcShowerHit
     \ingroup DetSupport
 
 */
@@ -44,8 +44,8 @@ bool THcShowerHit::isNeighbour(THcShowerHit* hit1) {
 //Print out hit information
 //
 void THcShowerHit::show() {
-  cout << "row=" << fRow << "  column=" << fCol 
-       << "  x=" << fX << "  z=" << fZ 
+  cout << "row=" << fRow << "  column=" << fCol
+       << "  x=" << fX << "  z=" << fZ
        << "  E=" << fE << "  Epos=" << fEpos << "  Eneg=" << fEneg << endl;
 }
 
diff --git a/src/THcShowerHit.h b/src/THcShowerHit.h
index 4df3a7f7100d126986420abc6b1b24f971e64626..8bc8be0238569a2c97ad567f735aba1b1038fae1 100644
--- a/src/THcShowerHit.h
+++ b/src/THcShowerHit.h
@@ -18,7 +18,7 @@ class THcShowerHit {       //HMS calorimeter hit class
   Double_t fE;             //hit mean energy deposition
   Double_t fEpos;          //hit energy deposition from positive PMT
   Double_t fEneg;          //hit energy deposition from negative PMT
-  
+
 public:
 
   THcShowerHit();
diff --git a/src/THcShowerPlane.cxx b/src/THcShowerPlane.cxx
index b50774d04df7b64dda723132ba3378a98cffcb5f..2ff44bbbfe65868e43af16e35a0071bada236e4f 100644
--- a/src/THcShowerPlane.cxx
+++ b/src/THcShowerPlane.cxx
@@ -29,7 +29,7 @@ using namespace std;
 ClassImp(THcShowerPlane)
 
 //______________________________________________________________________________
-THcShowerPlane::THcShowerPlane( const char* name, 
+THcShowerPlane::THcShowerPlane( const char* name,
 					    const char* description,
 					    const Int_t layernum,
 					    THaDetectorBase* parent )
@@ -87,7 +87,7 @@ THaAnalysisObject::EStatus THcShowerPlane::Init( const TDatime& date )
 //_____________________________________________________________________________
 Int_t THcShowerPlane::ReadDatabase( const TDatime& date )
 {
-  
+
   // Retrieve FADC parameters.  In principle may want different dynamic
   // pedestal and integration range for preshower and shower, but for now
   // use same parameters
@@ -97,7 +97,7 @@ Int_t THcShowerPlane::ReadDatabase( const TDatime& date )
   fUsingFADC=0;
   fPedSampLow=0;
   fPedSampHigh=9;
-  fDataSampLow=23; 
+  fDataSampLow=23;
   fDataSampHigh=49;
   DBRequest list[]={
     {"cal_using_fadc", &fUsingFADC, kInt, 0, 1},
@@ -126,7 +126,7 @@ Int_t THcShowerPlane::ReadDatabase( const TDatime& date )
 
   Double_t BlockThick = fParent->GetBlockThick(fLayerNum-1);
 
-  Double_t xOrig = (fParent->GetXPos(fLayerNum-1,0) + 
+  Double_t xOrig = (fParent->GetXPos(fLayerNum-1,0) +
 		    fParent->GetXPos(fLayerNum-1,fNelem-1))/2 +
     BlockThick/2;
 
@@ -263,7 +263,7 @@ Int_t THcShowerPlane::CoarseProcess( TClonesArray& tracks )
 {
 
   // Nothing is done here. See ProcessHits method instead.
-  //  
+  //
 
  return 0;
 }
@@ -320,7 +320,7 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
     if(hit->fPlane > fLayerNum) {
       break;
     }
-    
+
     // Should probably check that counter # is in range
     if(fUsingFADC) {
       fA_Pos[hit->fCounter-1] = hit->GetData(0,fPedSampLow,fPedSampHigh,
@@ -354,7 +354,7 @@ Int_t THcShowerPlane::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
     Double_t thresh_neg = fNegThresh[hit->fCounter -1];
     if(fA_Neg[hit->fCounter-1] >  thresh_neg) {
 
-      THcSignalHit *sighit = 
+      THcSignalHit *sighit =
 	(THcSignalHit*) fNegADCHits->ConstructedAt(nNegADCHits++);
       sighit->Set(hit->fCounter, fA_Neg[hit->fCounter-1]);
 
@@ -496,7 +496,7 @@ Int_t THcShowerPlane::AccumulatePedestals(TClonesArray* rawhits, Int_t nexthit)
 
   return(ihit);
 }
-    
+
 //_____________________________________________________________________________
 void THcShowerPlane::CalculatePedestals( )
 {
@@ -504,7 +504,7 @@ void THcShowerPlane::CalculatePedestals( )
   // Later add check to see if pedestals have drifted ("Danger Will Robinson!")
 
   for(Int_t i=0; i<fNelem;i++) {
-    
+
     // Positive tubes
     fPosPed[i] = ((Float_t) fPosPedSum[i]) / TMath::Max(1, fPosPedCount[i]);
     fPosSig[i] = sqrt(((Float_t)fPosPedSum2[i])/TMath::Max(1, fPosPedCount[i])
@@ -540,7 +540,7 @@ void THcShowerPlane::CalculatePedestals( )
     cout << "---------------------------------------------------------------\n";
 
   }
-  
+
 }
 
 //_____________________________________________________________________________
@@ -568,4 +568,4 @@ void THcShowerPlane::InitializePedestals( )
     fNegPedSum2[i] = 0;
     fNegPedCount[i] = 0;
   }
-} 
+}
diff --git a/src/THcShowerPlane.h b/src/THcShowerPlane.h
index a5540fcfbf98c05f3e6250d613f6e865da0c39bb..fdf8c0fa1d4e9c38e926592b4e1f49c312e21c20 100644
--- a/src/THcShowerPlane.h
+++ b/src/THcShowerPlane.h
@@ -1,15 +1,15 @@
 #ifndef ROOT_THcShowerPlane
-#define ROOT_THcShowerPlane 
+#define ROOT_THcShowerPlane
 
 //////////////////////////////////////////////////////////////////////////////
-//                         
+//
 // THcShowerPlane
 //
 // A Hall C Shower plane
 //
 // May want to later inherit from a THcPlane class if there are similarities
 // in what a plane is shared with other detector types (shower, etc.)
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 
 #include "THaSubDetector.h"
@@ -23,7 +23,7 @@ class THaEvData;
 class THaSignalHit;
 
 class THcShowerPlane : public THaSubDetector {
-  
+
 public:
   THcShowerPlane( const char* name, const char* description,
 			Int_t planenum, THaDetectorBase* parent = NULL);
@@ -128,7 +128,7 @@ protected:
   Double_t  fEplane_neg;   // Energy deposition in the plane from negative PMTs
 
   // These lists are not used actively for now.
-  TClonesArray* fPosADCHits;    // List of positive ADC hits 
+  TClonesArray* fPosADCHits;    // List of positive ADC hits
   TClonesArray* fNegADCHits;    // List of negative ADC hits
 
   Int_t fLayerNum;		// Layer # 1-4
diff --git a/src/THcSpacePoint.h b/src/THcSpacePoint.h
index 36faa3d347b911c4728e5baab1422ba3459b9b92..57c3ce23a41c86041108bdace4ef16471f84194c 100644
--- a/src/THcSpacePoint.h
+++ b/src/THcSpacePoint.h
@@ -44,7 +44,7 @@ public:
   Double_t GetY() {return fY;};
   THcDCHit* GetHit(Int_t ihit) {return fHits[ihit].dchit;};
   //  std::vector<THcDCHit*>* GetHitVectorP() {return &fHits;};
-  //std::vector<Hit>* GetHitStuffVectorP() {return &fHits;}; 
+  //std::vector<Hit>* GetHitStuffVectorP() {return &fHits;};
   void ReplaceHit(Int_t ihit, THcDCHit *hit) {
     fHits[ihit].dchit = hit;
     fHits[ihit].distCorr = 0.0;