With all the attention and coverage given to the “The Dark Knight Rises” shootings and the psychopath perpetrator, the fundamental question remains unanswered: Why do we keep reliving this nightmare?

Though she doesn’t have a quick answer, one of those with some insights into the question, and explanations of why it is a more difficult question than it appears, is Katherine Newman, a Johns Hopkins University dean and sociologist. She wrote the 2004 book “Rampage: The Social Roots of School Shootings” (Basic Books).

Newman first came to my attention earlier this year, after the Ohio school shootings. Our conversation back then about what might trigger a young person to become so violent made it into a post titled “Why we keep repeating the past.”

I had hoped we wouldn’t have to broach the topic again soon. But James Holmes changed that.

“We have to remember how rare these incidents are,” Newman wrote to me from Sweden, where she is traveling, after I asked her about her take on the case. “They don’t feel rare when they happen because the scale of the violence and the loss is so enormous. But they are very uncommon.”

People continue to visit the makeshift memorial to the 12 movie theater shooting victims. (Kevork Djansezian/Getty Images)

“They felt insignificant or marginal to their social scene and were solving for that problem through the most terrible means. Most of the time, the shooters do not focus on the fact that they are going to kill people. They are thinking about how great it will be for them to be infamous which, sadly, feels better than invisible.”

Newman’s assessment touches on a debate that The Post’s Paul Farhi wrote about yesterday: Is the intense media coverage irresponsible given that it may fuel other mentally disturbed kids to seek the same kind of fame?

Newman is not ready to call for a media blackout.

“It is true that the media create celebrity, which is what the shooters crave. It is also true that without media coverage, people who hear threats would not know how real they can be. And that is our only real hope for prevention: that people who hear the warnings and veiled threats come forward.

“Whether that would have made any difference in this case will not be known for some time. But without the news coverage, no one would know how important it is to come forward. A classic double-edged sword.”

Newman also suggested that the school killers she studied were more than mere fame-seekers. They were also concerned about their more immediate audience.

“… Most feel quite ambivalent about the act [of killing] and push themselves to do it in order to avoid the less attractive fate of defaulting on a commitment they have made to themselves, or in the case of the high school shooters in my book, to many others they have warned in oblique ways about their intentions.”

“I have been asked before whether these shootings are about revenge. Most of the time, this is not the motive, unless we can use the word very, very loosely to indicate getting back at a broad social structure that they feel ignored by. … The motive is to change the way people around them thing of the protagonist, to become known as notorious rather than a loser.”

The shootings have also inspired, once again, a debate over gun control. And once again, Newman is ready to point out the nuances.

“A dedicated killer is very hard to stop. We studied shooters who took a blow torch to a safe to get at the guns they were after. So in that simple sense, it is not a sure-fire solution.

“That said, rampage shooters tend to be ambivalent. They are mentally ill, but they know right from wrong and they know what they are about to do is wrong. Any way in which that ambivalence can be exploited, by making it harder to get a hold of weapons, will dissuade a certain proportion of these killers …

“But someone who has hardened himself to his intentions is past that ambivalence and hence hard to stop, either through gun control or law enforcement.”

Related coverage:

Aurora, Colo., ‘Dark Knight’ shootings

Colorado shootings: Parents need to talk to their kids about it

Colorado movie theater shootings: No time to blame a victim