how can i define photochromic glass and electrochromic glass in glazing material for analysing daylight simulation?
Typically, you would assign multiple values, based on tinting, to the glass and then run them as separate simulations. My colleague @fazel.ganji had a worked on a related project a while ago: https://www.researchgate.net/publication/330485693_A_Simulation-based_Framework_Exploring_the_Controls_for_a_Dynamic_Facade_with_Electrochromic_Glazing_EC/citations
I believe he had used Ladybug for some aspects of the simulation.
I would suggest to use LBNL WINDOW tool. In the glazing library they have both photochromic and electrochromic system. You need to generate BSDF (xml format) file for each tinting state of each system, After that you can use it for daylighting simulation.