I tracked the plate in two parts before but I realize that I only need one camera, in this case I re-track the plate with suitable lens undistortion and other given parameters, and it works very well, better than before.
I write out the camera and some planes as reference and import them in maya. I also improt the undistorted plate image sequence as background, as well as HDRI.
We do not use HDRI to cast shadows because it will cause shadows on undesirable places. I just choose to use area lights to mimic the effect.
camera sample should be larger than 3 if using casting shadows.
More info: https://docs.arnoldrenderer.com/display/A5AFMUG/Shadow+Matte
Multipass rendering
Mid-drag the assets in suitable collections under the layers that we created, we can create Override to exclude the unwanted assets in the scene. In this case, we just separate shadow and no shadow scenes.
To save time, I choose to render different layers separately, as GPU rendering does not support shadow matte alpha channel, I deicide to render geo_no_shadow layer by GPU and shadows layer by CPU.
Because I forgot to render with ID pass, so I have to roto the part that I want to correct separately and merge them afterwards. It is important to care about the alpha channel in each node, and I just turn the alpha into black colour in roto node. And we need to grade with alpha mask, or premult in advance, otherwise it may affect the original plate.