Index: cards/CMS_PhaseII_0PU.tcl
===================================================================
--- cards/CMS_PhaseII_0PU.tcl	(revision ff9f67fb6bc526ac51b310e8d853997383681f8d)
+++ cards/CMS_PhaseII_0PU.tcl	(revision 53036567681ec388b090ea4caa650fea3983a659)
@@ -294,29 +294,29 @@
   
   set PhiBins {}
-  for {set i -157} {$i <= 157} {incr i} {
-    add PhiBins [expr {$i * $pi/157.0}]
+  for {set i -180} {$i <= 180} {incr i} {
+    add PhiBins [expr {$i * $pi/180.0}]
   }
 
   # 0.02 unit in eta up to eta = 1.5 (barrel)
-  for {set i -74} {$i <= 75} {incr i} {
-    set eta [expr {$i * 0.02}]
+  for {set i -85} {$i <= 86} {incr i} {
+    set eta [expr {$i * 0.0174}]
     add EtaPhiBins $eta $PhiBins
   }
 
-  # assume 0.05 x 0.05 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL)
+  # assume 0.02 x 0.02 resolution in eta,phi in the endcaps 1.5 < |eta| < 3.0 (HGCAL- ECAL)
   
   set PhiBins {}
-  for {set i -65} {$i <= 65} {incr i} {
-    add PhiBins [expr {$i * $pi/65.0}]
-  }
-
-  # 0.05 unit in eta up to eta = 3
-  for {set i 1} {$i <= 30} {incr i} {
-    set eta [expr { -3.00 + $i * 0.05}]
+  for {set i -180} {$i <= 180} {incr i} {
+    add PhiBins [expr {$i * $pi/180.0}]
+  }
+
+  # 0.02 unit in eta up to eta = 3
+  for {set i 1} {$i <= 84} {incr i} {
+    set eta [expr { -2.958 + $i * 0.0174}]
     add EtaPhiBins $eta $PhiBins
   }
 
-  for {set i 1} {$i <= 30} {incr i} {
-    set eta [expr { 1.5 + $i * 0.05}]
+  for {set i 1} {$i <= 84} {incr i} {
+    set eta [expr { 1.4964 + $i * 0.0174}]
     add EtaPhiBins $eta $PhiBins
   }
@@ -330,5 +330,5 @@
   }
   
-  foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -3 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} {
+  foreach eta {-5 -4.7 -4.525 -4.35 -4.175 -4 -3.825 -3.65 -3.475 -3.3 -3.125 -2.958 3.125 3.3 3.475 3.65 3.825 4 4.175 4.35 4.525 4.7 5} {
     add EtaPhiBins $eta $PhiBins
   }
@@ -359,9 +359,9 @@
   # for the endcaps (1.5 < |eta| < 3.0), we take HGCAL  see LHCC-P-008, Fig. 3.39, p.117
 
-  set ResolutionFormula {                     (abs(eta) <= 1.50) * sqrt(energy^2*0.003^2 + energy*0.028^2 + 0.12^2) + \
+  set ResolutionFormula {                     (abs(eta) <= 1.50) * sqrt(energy^2*0.005^2 + energy*0.027^2 + 0.15^2) + \
                            (abs(eta) > 1.50 && abs(eta) <= 1.75) * sqrt(energy^2*0.006^2 + energy*0.20^2) + \
                            (abs(eta) > 1.75 && abs(eta) <= 2.15) * sqrt(energy^2*0.007^2 + energy*0.21^2) + \
                            (abs(eta) > 2.15 && abs(eta) <= 3.00) * sqrt(energy^2*0.008^2 + energy*0.24^2) + \
-                           (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.08^2 + energy*1.97^2)}
+                           (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.08^2 + energy*1.98^2)}
 
 }
@@ -453,7 +453,7 @@
 
 # set ResolutionFormula {resolution formula as a function of eta and energy}
-  set ResolutionFormula {                  (abs(eta) <= 1.7) * sqrt(energy^2*0.03^2 + energy*0.52^2 + 1.59^2) + \
-						   (abs(eta) > 1.7 && abs(eta) <= 3.2) * sqrt(energy^2*0.05^2 + energy*0.706^2) + \
-						   (abs(eta) > 3.0 && abs(eta) <= 4.9) * sqrt(energy^2*0.05^2 + energy*1.00^2)}
+  set ResolutionFormula {                    (abs(eta) <= 1.5) * sqrt(energy^2*0.05^2 + energy*1.00^2) + \
+						   (abs(eta) > 1.5 && abs(eta) <= 3.0) * sqrt(energy^2*0.05^2 + energy*1.00^2) + \
+						   (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.11^2 + energy*2.80^2)}
 
 }
@@ -1377,13 +1377,16 @@
   set DeltaR 0.5
 
-  set TauPTMin 1.0
-
-  set TauEtaMax 4.0
+  set TauPTMin 20.0
+
+  set TauEtaMax 2.3
 
   # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
 
-  add EfficiencyFormula {0} {0.01} 
-  add EfficiencyFormula {11} {0.005} 
-  add EfficiencyFormula {15} {0.6} 
+  add EfficiencyFormula {0}  { (abs(eta) < 2.3) * ((( -0.00621816+0.00130097*pt-2.19642e-5*pt^2+1.49393e-7*pt^3-4.58972e-10*pt^4+5.27983e-13*pt^5 )) * (pt<250) + 0.0032*(pt>250)) + \
+                               (abs(eta) > 2.3) * (0.000)
+                             }
+  add EfficiencyFormula {15} { (abs(eta) < 2.3) * 0.97*0.77*( (0.32 + 0.01*pt - 0.000054*pt*pt )*(pt<100)+0.78*(pt>100) ) + \
+                               (abs(eta) > 2.3) * (0.000)
+                             } 
 }
 
