Thanks for your question.
there are three phases of hamstring injury and till 3 weeks you have the subacute phase where the inflammation subsides and that is why you do not need any painkillers.
After 3 weeks remodeling phase starts and here the help of a physical therapist is very useful as they can help you strengthen the muscles using particular exercises.
To decrease pain, icing and TENS that is trans cutaneous electrical nerve stimulation is helpful.Physiotherapists administer TENS.
This is my initial answer.Please reply if you need any clarification.
If done do take a moment to rate my answer as this is the only way we get paid for our work and time on this website.