Photo: Scott Cunningham / Getty Images Photo: Mike Zarrilli / Getty Images Photo: Laurence Kesterson / Associated Press Photo: Hunter Martin / Getty Images Photo: Hunter Martin / Getty Images Photo: Matt Slocum / Associated Press Photo: Gene J. Puskar / Associated Press Photo: Hunter Martin / Getty Images

Had Alen Hanson lived his childhood dream, he would be shooting hoops in the NBA instead of jumping through them trying to establish himself as a major-leaguer with the Giants. His true love is basketball, which he played as a lad in the Dominican Republic.

Point guard?

“I don’t care,” Hanson said, smiling. “Just making baskets.”

Dominicans who stand 6 feet tall, weigh 170 pounds and run like a cheetah do not play basketball. They become shortstops. They sign as teenagers with major-league organizations that dream of landing potential five-tool players from the streets of towns like La Romana, whence Hanson hails.

Hanson’s career has not worked out that way. The Pirates, who signed him at 16, let him go last season. Though Hanson’s best friend, outfielder Gregory Polanco, has thrived with Pittsburgh, Hanson was set free after 92 plate appearances. He got another 175 last year with the White Sox, who claimed him on waivers then gave up on him, too.

Did the Giants sign a late-blooming player as a minor-league free agent before spring training? Or is Hanson a dreaded “Four-A” player who can flourish at Triple-A and not so much in the bigs?

The Giants hope to find out when Hanson returns from a hamstring injury. He is due to come off the disabled list Wednesday but will need a slightly longer recovery.

“He’s definitely not a Triple-A player in my mind,” said Pittsburgh first baseman Josh Bell, who rose through the minors with Hanson. “He’s got what it takes. Hopefully, he’ll take advantage of it in San Francisco to show what he can do, and it looks like he’s doing it for the most part.”

He was doing it until the hamstring injury.

History suggests a 25-year-old playing for his third organization in two seasons is not suddenly going to become an Omar Vizquel, Cal Ripken Jr., Jose Reyes or Robinson Cano, the players Hanson liked as a lad and tried to mimic.

But the talent is unmistakable.

Hanson replaced an injured Joe Panik on April 28 and immediately injected life into a dugout that rarely sees a player like him, a switch-hitter with enough pop to homer in his first Giants at-bat and enough speed to score a run in Atlanta that left even his teammates stunned. He whooshed home from third base on a Gregor Blanco grounder despite a perfect throw from first baseman Freddie Freeman.

Hanson is the type of player the Giants have struggled to draft, sign internationally and get to the big leagues, and they are happy he fell into their laps.

“It makes me feel good that I’m able to bring that speed aspect to the game,” Hanson said through translator Erwin Higueros. “It’s something I have and something I know a lot of teams don’t have. By me adding that to the team, it’s a difference-maker. I can change the outcome of the game.”

Hanson is the son of a former Pittsburgh prospect, David De La Rosa Hanson, a Dominican whose family has European roots. David Hanson rose no higher than A-ball.

The Pirates converted Alen Hanson from shortstop to second base when he struggled defensively, particularly on routine plays, a rap he has not yet shaken.

The Giants have seen Hanson make some tough plays look easy, but he also has let a few easy plays slip through his grasp.

The story of Hanson’s rise and fall in Pittsburgh contains a common difference of opinion.

Bell said Hanson was “definitely one of those superstars in the minor leagues who was fun to play with, one of those guys who’s always going to hit in the top two or three in the lineup, always with an opportunity to steal bags.”

The Pirates thought Hanson was not committed to the work necessary to take that huge, final leap from Triple-A to the majors, particularly on defense. Hanson thought the Pirates did not give him enough of a chance to establish himself.

“I’m a hard worker and I put in the work that I needed,” Hanson said. “It’s something you don’t control, the evaluators, how they evaluated talent.”

He dropped below Josh Harrison and Jordy Mercer on the Pirates’ middle-infield depth chart. In 2017, his eighth year in the organization, they exposed him to waivers and the White Sox claimed him.

Hanson and Polanco remain good friends. They train together in the Dominican during the winter and break a lot of bread, sometimes in the house that Hanson built for his mother, Luisa, and where Hanson lives with his wife and two small children.

Hanson hit .201 with the Pirates and .231 with the White Sox. Harrison surmised that Hanson struggled to adapt from being an everyday player in the minors to an off-the-bench role in the majors.

When Hanson became a free agent last winter, his agent, Daniel Szew, worked to land him in San Francisco, understanding the team’s need for speed and pop. Szew also figured the Giants would be a better personality fit, too.

“If you look in the dugout, you’ll see him smiling,” Szew said. “He’ll be the guy dancing when something good happens. He’s all about the team and having a good time. That didn’t fly in Pittsburgh at the time. In San Fran, that’s kind of what they needed.”

Hanson said he grew up watching Barry Bonds and once dreamed of being a Giant. Bonds, now a Giants special assistant, saw Hanson in the clubhouse dining room and complimented his play, which landed the infielder on Cloud 9.

Hanson also said he would be happy with a bench role once Panik returns. That Hanson will stick is hardly in question. He was hitting .298 with four doubles, four homers and three steals when he was hurt. Besides, he is out of minor-league options.

The Giants can ill afford to risk losing a player who could score from third on that Blanco groundball in Atlanta.

“That’s a play where we probably shouldn’t have gotten a run and we did get one,” catcher Buster Posey said.

Hanson said even some teammates asked, “How did you do that?”

“I didn’t have an answer,” he said. “It’s just an ability I was born with.”

Henry Schulman is a San Francisco Chronicle staff writer. Email: hschulman@sfchronicle.com Twitter: @hankschulman