GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Fast Simulations » [FIXED] segfault in PndFsmMvdPid.cxx
[FIXED] segfault in PndFsmMvdPid.cxx [message #16413] Tue, 22 April 2014 19:55 Go to previous message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: 202.122.36*
Hi Ralf & Klaus,

I justed noted a "trivial" segfault with my simulations related to the piece of code below in PndFsmMvdPid.cxx.
The problem is that the parameter "part" is not always setup properly, after which it sends random "part" to MeanEnergyLoss with segfault. For example, I am running some Lambda_c simulations (4122), which might give a crash when this particle is seen in the simulations.

Greets,

Johan.

-----------------------------------
PndFsmResponse*
PndFsmMvdPid::respond(PndFsmTrack *t)
{
PndFsmResponse *result=new PndFsmResponse();

result->setDetector(this);
bool wasDetected=detected(t);
result->setDetected(wasDetected);

if (wasDetected && fabs(t->charge())>1e-8)
{
//select particle
PidType part; <=========
switch(abs(t->pdt())) {
case 2212:part=proton; break;
case 321: part=kaon; break;
case 211: part=pion; break;
case 13: part=muon; break;
case 11: part=electron; break;
}

//build random energy loss
_momentum = t->p4().Vect().Mag();
_energyloss = MeanEnergyLoss(part) + mpv(part) + _rand->Landau(0, width1(part)) + _rand->Gaus(0, width2(part))*_dEdxResMulti; <=====
...
----------------------------

[Updated on: Fri, 25 April 2014 06:47]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FIXED] Bug with parameters set to '0.' in Fast Sim
Next Topic: Photons reconstruction
Goto Forum:
  


Current Time: Sun Nov 24 04:06:04 CET 2024

Total time taken to generate the page: 0.00754 seconds