Index: modules/Calorimeter.cc
===================================================================
--- modules/Calorimeter.cc	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/Calorimeter.cc	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -231,8 +231,13 @@
   fItParticleInputArray->Reset();
   number = -1;
+  fTowerRmax=0.;
   while((particle = static_cast<Candidate *>(fItParticleInputArray->Next())))
   {
     const TLorentzVector &particlePosition = particle->Position;
     ++number;
+
+    // compute maximum radius (needed in FinalizeTower to assess whether barrel or endcap tower)
+    if (particlePosition.Perp() > fTowerRmax)
+      fTowerRmax=particlePosition.Perp();
 
     pdgCode = TMath::Abs(particle->PID);
@@ -518,5 +523,9 @@
   }
 
-  r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y());
+  // check whether barrel or endcap tower
+  if (fTower->Position.Perp() < fTowerRmax && TMath::Abs(eta) > 0.)
+    r = fTower->Position.Z()/TMath::SinH(eta);
+  else
+    r = fTower->Position.Pt();
 
   if(sumWeight > 0.0)
Index: modules/Calorimeter.h
===================================================================
--- modules/Calorimeter.h	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/Calorimeter.h	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -60,4 +60,5 @@
   Double_t fTimingEnergyMin;
   Bool_t fElectronsFromTrack;
+  Double_t fTowerRmax;
 
   Int_t fTowerTrackHits, fTowerPhotonHits;
Index: modules/DualReadoutCalorimeter.cc
===================================================================
--- modules/DualReadoutCalorimeter.cc	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/DualReadoutCalorimeter.cc	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -247,8 +247,13 @@
   fItParticleInputArray->Reset();
   number = -1;
+  fTowerRmax=0.;
   while((particle = static_cast<Candidate*>(fItParticleInputArray->Next())))
   {
     const TLorentzVector &particlePosition = particle->Position;
     ++number;
+
+    // compute maximum radius (needed in FinalizeTower to assess whether barrel or endcap tower)
+    if (particlePosition.Perp() > fTowerRmax)
+      fTowerRmax=particlePosition.Perp();
 
     pdgCode = TMath::Abs(particle->PID);
@@ -558,5 +563,9 @@
   }
 
-  r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y());
+  // check whether barrel or endcap tower
+  if (fTower->Position.Perp() < fTowerRmax && TMath::Abs(eta) > 0.)
+    r = fTower->Position.Z()/TMath::SinH(eta);
+  else
+    r = fTower->Position.Pt();
 
   if(sumWeight > 0.0)
Index: modules/DualReadoutCalorimeter.h
===================================================================
--- modules/DualReadoutCalorimeter.h	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/DualReadoutCalorimeter.h	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -60,4 +60,5 @@
   Double_t fECalTrackEnergy, fHCalTrackEnergy;
   Double_t fTrackEnergy;
+  Double_t fTowerRmax;
 
   Double_t fTimingEnergyMin;
Index: modules/SimpleCalorimeter.cc
===================================================================
--- modules/SimpleCalorimeter.cc	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/SimpleCalorimeter.cc	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -208,8 +208,13 @@
   fItParticleInputArray->Reset();
   number = -1;
+  fTowerRmax=0.;
   while((particle = static_cast<Candidate *>(fItParticleInputArray->Next())))
   {
     const TLorentzVector &particlePosition = particle->Position;
     ++number;
+
+    // compute maximum radius (needed in FinalizeTower to assess whether barrel or endcap tower)
+    if (particlePosition.Perp() > fTowerRmax)
+      fTowerRmax=particlePosition.Perp();
 
     pdgCode = TMath::Abs(particle->PID);
@@ -444,6 +449,11 @@
 
   pt = energy / TMath::CosH(eta);
-  r = TMath::Sqrt(fTower->Position.X()*fTower->Position.X()+fTower->Position.Y()*fTower->Position.Y());
-  
+
+  // check whether barrel or endcap tower
+  if (fTower->Position.Perp() < fTowerRmax && TMath::Abs(eta) > 0.)
+    r = fTower->Position.Z()/TMath::SinH(eta);
+  else
+    r = fTower->Position.Pt();
+
   fTower->Position.SetPtEtaPhiE(r, eta, phi, time);
   fTower->Momentum.SetPtEtaPhiE(pt, eta, phi, energy);
Index: modules/SimpleCalorimeter.h
===================================================================
--- modules/SimpleCalorimeter.h	(revision d1678fd35cd10951a9db1a8f24c6be1010f090d4)
+++ modules/SimpleCalorimeter.h	(revision 5eda6767f8d822f03108d52e684958b8edd5ce5c)
@@ -62,4 +62,6 @@
   Double_t fTrackTime;
 
+  Double_t fTowerRmax;
+
   Double_t fTowerTimeWeight;
   Double_t fTrackTimeWeight;
