Weird segmentation fault
Hello,
I'm using MadAnalysis v.1.6 to do a simple parton level analysis in expert mode with some templates that I've been using for quite a while, but I find a strange error which I don't understand. I am studying p p > Wprime -> w+ h, w+ > e+ ve events and in my Execute part of the code I have the following
if (event.mc()!=0){
std::vector<const MCParticleFormat*> ep;
cout << "---------------NEW EVENT--
// Event weight
double myWeight=1.;
if (!Configuration
// Initial state
for (MAuint32 i=0;i<event.
const MCParticleFormat* prt = &event.
// Collect ep
if(
}
} // end loop on particle
cerr << "Number of positrons " << endl;
cerr << ep.size() << endl;
which correctly prints "1" for each events. If I add the following lines however
cerr << "Positron pT " << endl;
cerr << ep[0]->pt() << endl;
I get the following output
Number of positrons
0
Positron pT
*** Break *** segmentation violation
Generating stack trace...
0x00007fff6b8ed08d in start (in libdyld.dylib) + 1
0x0000000000000002 in <unknown function>
I didn't manage to track down the error, it's funny that now I get a "0" length for the ep array. Is it something that have to due to my compilers? I have a Mac with macOS Mojave 10.14.1 and I have already noticed some strange behaviour in MadGraph after the update...
Thanks!
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Daniele Barducci for more information if necessary.