why > 4?  (though I'd have to check)

seems like it should be 
if (?) {
   model->HandC(q,qd,f_ext,H,C,dH,dC,df_ext);  
} else {
    model->HandC(q,qd,f_ext,H,C);
}