hi,

we just found that the parameters (ifourmomentum) of the mugirl muons with a refit are not filled correctly. instead of taking the parameters of the refitted track, the parameters of the id track are used when constructing the muon. 
however if you ask the muon for its track() you get the refitted track. 

as a result:

muon.pt() != muon-&gt;track()-&gt;pt()

personally i think this is extremely confusing and should be fixed for the next reprocessing, especially if we want to start profiting from the improved momentum resolution of the refitted tracks. 

the problem is fixed with the following patch:

index: src/mugirlparticlecreatortool.cxx
===================================================================
--- src/mugirlparticlecreatortool.cxx   (revision 450095)
+++ src/mugirlparticlecreatortool.cxx   (working copy)
@@ -222,10 +222,13 @@
             double  mass= 105.7;
             if (psummary-&gt;startfrommf == false &amp;&amp; psummary-&gt;startfromef== false)
             {
+               const rec::trackparticle* primarytp = ptrackparticle;
+               if (psummary-&gt;prefittedtrack!=null) primarytp = psummary-&gt;prefittedtrack;
+
                 if (1==savestau)
                 {   
                     msg(msg::debug) &lt;&lt; &quot;candidate is id stau&quot;&lt;&lt;endreq;
-                    pcbmuon = new analysis::muon(muonparameters::mugirllowbeta,ptrackparticle,psegmentcontainer,newsegments);
+                    pcbmuon = new analysis::muon(muonparameters::mugirllowbeta,primarytp,psegmentcontainer,newsegments);
                     const rec::trackparticle* ptrack = psummary-&gt;prefittedtrack;
                     if (ptrack ==null)
                        ptrack=psummary-&gt;ptrackparticle;
@@ -251,11 +254,12 @@
                 else
                 {
                     msg(msg::debug) &lt;&lt; &quot; candidate is id muon&quot;&lt;&lt;endreq;
-                    pcbmuon = new analysis::muon(muonparameters::mugirl,ptrackparticle,psegmentcontainer,newsegments);
+
+                    pcbmuon = new analysis::muon(muonparameters::mugirl,primarytp,psegmentcontainer,newsegments);
                     pcbmuon-&gt;setm(mass);
                 }
-                pcbmuon-&gt;set_indettrackparticlecontainer(indetparticlecontainer);
 
+                pcbmuon-&gt;set_indettrackparticle(indetparticlecontainer,ptrackparticle);
                 const rec::trackparticle* ptrack = psummary-&gt;prefittedtrack;
                 if (ptrack !=null)
                     pcbmuon-&gt;set_innerextrapolatedtrackparticle(inextrpparticlecontainer,ptrack);


could somebody prepare a tag?

cheers niels