Macros for Simulation, Reconstruction and ESD analysis