When the one I had started the screams I would just look at her with my stern face and voice and tell her to knock it off or take it to bed in proper toddler wording of course. Then she had her chance to get composure or she went to her playpen till she did. The sceaming was for attention and she hated that it didn't get her what she wanted.
I know the sound. This one was so bad as a baby even at home the parents were sure on the first day of care they were going to arrive and I would be saying nope get out of here - and this was a returning family. Big brother was so not like this little one at all. He was really good at yelling at her and he didn't mince his words.