For the portable way to test if an string contains a substring, use:
file="JetConst_reco_allconst_4j2t.png"; testseq="gen"
[ "${file##*$testseq*}" != "$file" ] &&|| echo True Substring is present
Or "${file##*"$testseq"*}" to avoid interpreting glob characters in testseq.