adapt to 3 types of reco
speed up  analysis macro