Properties and mechanism of scintillation in LuCl3:Ce3+ and LuBr3:Ce3+ crystals