Index: cards/delphes_card_IDEAtrkCov.tcl
===================================================================
--- cards/delphes_card_IDEAtrkCov.tcl	(revision 31f3bcaa997a74c48dab1adc75637db03788b7d3)
+++ cards/delphes_card_IDEAtrkCov.tcl	(revision 3e5f05c554effab387cb0280c554c45a631f071a)
@@ -1,11 +1,12 @@
 ####################################################################                                l
-# FCC-ee IDEA detector model                                                                                      
-#                                                                                                    
-# Authors: Elisa Fontanesi, Lorenzo Pezzotti, Massimiliano Antonello                                 
+# FCC-ee IDEA detector model
+#
+# Authors: Elisa Fontanesi, Lorenzo Pezzotti, Massimiliano Antonello, Michele Selvaggi
 # email: efontane@bo.infn.it,
-#        lorenzo.pezzotti01@universitadipavia.it,                                                    
-#        m.antonello@uninsubria.it,                                                                  
-#####################################################################                                
-#       
+#        lorenzo.pezzotti01@universitadipavia.it,
+#        m.antonello@uninsubria.it,
+#        michele.selvaggi@cern.ch
+#####################################################################
+#
 #######################################
 # Order of execution of various modules
@@ -22,5 +23,5 @@
   TrackSmearing
 
-  TrackMerger 
+  TrackMerger
   Calorimeter
   EFlowMerger
@@ -28,4 +29,6 @@
   PhotonEfficiency
   PhotonIsolation
+
+  MuonFilter
 
   ElectronFilter
@@ -41,5 +44,5 @@
   GenJetFinder
   GenMissingET
-  
+
   FastJetFinder
 
@@ -97,5 +100,5 @@
 }
 
-#	(pt <= 0.1)                                     * (0.00) + 
+#	(pt <= 0.1)                                     * (0.00) +
 #	(abs(eta) <= 3.0)               * (pt > 0.1)    * (1.00) +
 #	(abs(eta) > 3)                                  * (0.00)
@@ -118,5 +121,5 @@
         (energy < 0.5 && energy >= 0.3) * (abs(eta) <= 3.0)    * (0.65) +
         (energy < 0.3) * (abs(eta) <= 3.0)                     * (0.06)
-    } 
+    }
 }
 
@@ -160,7 +163,13 @@
     set OutputArray tracks
 
-    set DetectorGeometry GeoIDEA_BASE.txt
+    ## uses https://raw.githubusercontent.com/selvaggi/FastTrackCovariance/master/GeoIDEA_BASE.txt
+    set DetectorGeometry {
+
+        1 PIPE -100 100 0.015 0.0012 0.35276 0 0 0 0 0 0
+        1 VTXLOW -0.12 0.12 0.017 0.00028 0.0937 2 0 1.5708 3e-006 3e-006 1
+
+      }
+
     set Bz 2.0
-
 }
 
@@ -172,12 +181,12 @@
 module Merger TrackMerger {
 # add InputArray InputArray
-  add InputArray TrackCovariance/tracks
+  add InputArray TrackSmearing/tracks
   set OutputArray tracks
 }
 
 
-#############                                                                                                                         
-# Calorimeter                                                                                                                                            
-#############                                                                                                                                           
+#############
+# Calorimeter
+#############
 module DualReadoutCalorimeter Calorimeter {
   set ParticleInputArray ParticlePropagator/stableParticles
@@ -201,17 +210,17 @@
     set pi [expr {acos(-1)}]
 
-    # Lists of the edges of each tower in eta and phi;                                                                                            
-    # each list starts with the lower edge of the first tower;                                                                                                    
-    # the list ends with the higher edged of the last tower.                                                                                        
-    # Barrel:  deta=0.02 towers up to |eta| <= 0.88 ( up to 45Â°)                                                                                        
-    # Endcaps: deta=0.02 towers up to |eta| <= 3.0 (8.6Â° = 100 mrad)                                                                                           
-    # Cell size: about 6 cm x 6 cm                                                  
-
-    #barrel:                                                                                        
+    # Lists of the edges of each tower in eta and phi;
+    # each list starts with the lower edge of the first tower;
+    # the list ends with the higher edged of the last tower.
+    # Barrel:  deta=0.02 towers up to |eta| <= 0.88 ( up to 45Â°)
+    # Endcaps: deta=0.02 towers up to |eta| <= 3.0 (8.6Â° = 100 mrad)
+    # Cell size: about 6 cm x 6 cm
+
+    #barrel:
     set PhiBins {}
     for {set i -120} {$i <= 120} {incr i} {
         add PhiBins [expr {$i * $pi/120}]
     }
-    #deta=0.02 units for |eta| <= 0.88                                                              
+    #deta=0.02 units for |eta| <= 0.88
     for {set i -44} {$i < 45} {incr i} {
         set eta [expr {$i * 0.02}]
@@ -219,16 +228,16 @@
     }
 
-    #endcaps:                                                                                       
+    #endcaps:
     set PhiBins {}
     for {set i -120} {$i <= 120} {incr i} {
         add PhiBins [expr {$i* $pi/120}]
     }
-    #deta=0.02 units for 0.88 < |eta| <= 3.0                                                        
-    #first, from -3.0 to -0.88                                                                      
+    #deta=0.02 units for 0.88 < |eta| <= 3.0
+    #first, from -3.0 to -0.88
     for {set i 1} {$i <=106} {incr i} {
         set eta [expr {-3.00 + $i * 0.02}]
         add EtaPhiBins $eta $PhiBins
     }
-    #same for 0.88 to 3.0                                                                           
+    #same for 0.88 to 3.0
     for  {set i 1} {$i <=106} {incr i} {
         set eta [expr {0.88 + $i * 0.02}]
@@ -236,11 +245,11 @@
     }
 
-    # default energy fractions {abs(PDG code)} {Fecal Fhcal}                                                                                  
+    # default energy fractions {abs(PDG code)} {Fecal Fhcal}
     add EnergyFraction {0} {0.0 1.0}
-    # energy fractions for e, gamma and pi0                                                                                                           
+    # energy fractions for e, gamma and pi0
     add EnergyFraction {11} {1.0 0.0}
     add EnergyFraction {22} {1.0 0.0}
     add EnergyFraction {111} {1.0 0.0}
-    # energy fractions for muon, neutrinos and neutralinos                                                                             
+    # energy fractions for muon, neutrinos and neutralinos
     add EnergyFraction {12} {0.0 0.0}
     add EnergyFraction {13} {0.0 0.0}
@@ -252,10 +261,10 @@
     add EnergyFraction {1000035} {0.0 0.0}
     add EnergyFraction {1000045} {0.0 0.0}
-    # energy fractions for K0short and Lambda                                                                                                            
+    # energy fractions for K0short and Lambda
     add EnergyFraction {310} {0.3 0.7}
     add EnergyFraction {3122} {0.3 0.7}
 
 
-    # set ECalResolutionFormula {resolution formula as a function of eta and energy}                                
+    # set ECalResolutionFormula {resolution formula as a function of eta and energy}
     set ECalResolutionFormula {
     (abs(eta) <= 0.88 )                     * sqrt(energy^2*0.01^2 + energy*0.11^2)+
@@ -263,5 +272,5 @@
     }
 
-    # set HCalResolutionFormula {resolution formula as a function of eta and energy}                                                
+    # set HCalResolutionFormula {resolution formula as a function of eta and energy}
     set HCalResolutionFormula {
     (abs(eta) <= 0.88 )                     * sqrt(energy^2*0.01^2 + energy*0.30^2)+
@@ -329,4 +338,17 @@
 }
 
+#################
+# Muon filter
+#################
+
+module PdgCodeFilter MuonFilter {
+  set InputArray Calorimeter/eflowTracks
+  set OutputArray muons
+  set Invert true
+  add PdgCode {13}
+  add PdgCode {-13}
+}
+
+
 #####################
 # Electron efficiency
@@ -340,5 +362,5 @@
 
   # efficiency formula for electrons
-  set EfficiencyFormula {          
+  set EfficiencyFormula {
         (energy < 2.0)                                         * (0.000)+
         (energy >= 2.0) * (abs(eta) <= 0.88)                   * (0.99) +
@@ -370,5 +392,5 @@
 
 module Efficiency MuonEfficiency {
-  set InputArray MuonMomentumSmearing/muons
+  set InputArray MuonFilter/muons
   set OutputArray muons
 
@@ -376,5 +398,5 @@
 
   # efficiency formula for muons
-  set EfficiencyFormula {                                   
+  set EfficiencyFormula {
         (energy < 2.0)                                         * (0.000)+
         (energy >= 2.0) * (abs(eta) <= 0.88)                   * (0.99) +
@@ -524,5 +546,5 @@
 
   # add EfficiencyFormula {abs(PDG code)} {efficiency formula as a function of eta and pt}
-  
+
   # default efficiency formula (misidentification rate)
   add EfficiencyFormula {0} {0.01}
@@ -580,10 +602,10 @@
 module TreeWriter TreeWriter {
     # add Branch InputArray BranchName BranchClass
-    
+
     add Branch Delphes/allParticles Particle GenParticle
 
     add Branch TrackMerger/tracks Track Track
     add Branch Calorimeter/towers Tower Tower
-    
+
     add Branch Calorimeter/eflowTracks EFlowTrack Track
     add Branch Calorimeter/eflowPhotons EFlowPhoton Tower
@@ -593,17 +615,16 @@
     add Branch PhotonEfficiency/photons PhotonEff Photon
     add Branch PhotonIsolation/photons PhotonIso Photon
-    
+
     add Branch GenJetFinder/jets GenJet Jet
     add Branch GenMissingET/momentum GenMissingET MissingET
-    
+
     add Branch UniqueObjectFinder/jets Jet Jet
     add Branch UniqueObjectFinder/electrons Electron Electron
     add Branch UniqueObjectFinder/photons Photon Photon
     add Branch UniqueObjectFinder/muons Muon Muon
-    
-    add Branch JetEnergyScale/jets AntiKtJet Jet  
-    
+
+    add Branch JetEnergyScale/jets AntiKtJet Jet
+
     add Branch MissingET/momentum MissingET MissingET
     add Branch ScalarHT/energy ScalarHT ScalarHT
 }
-
