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 next 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

Re: segfault in PndFsmMvdPid.cxx [message #16414 is a reply to message #16413] Tue, 22 April 2014 20:56 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 93.48.230*
In theory this particle should decay and it should not be seen in simulation. The good question is why this happens.
Re: segfault in PndFsmMvdPid.cxx [message #16415 is a reply to message #16414] Tue, 22 April 2014 23:22 Go to previous messageGo to next 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 Stefano,

Yes, it (lambdac+) indeed nicely decays albeit it with a c-tau of about 60 mum. The number of the particle 4122 does show up in the respective code which I can see with a "cout" the "part", evidently, causing the segfault. That is the information from my side. If you need more info, let me know...

Greets,

Johan.
Re: segfault in PndFsmMvdPid.cxx [message #16416 is a reply to message #16413] Wed, 23 April 2014 09:50 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi Johann,

The FastSim now does only care about "final state particles", i.e. e, mu, pi, K, p and gamma. See trunk and scrut14.

Cheers
Ralf
Re: segfault in PndFsmMvdPid.cxx [message #16417 is a reply to message #16415] Wed, 23 April 2014 09:54 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Can you upload the .dec file?
Re: segfault in PndFsmMvdPid.cxx [message #16420 is a reply to message #16417] Wed, 23 April 2014 11:29 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: 106.2.165*
Hi,

Here it is...

-------------
noPhotos

Decay pbarpSystem0
1.0 Lambda_c+ anti-Lambda_c- PHSP;
Enddecay

Decay Lambda_c+
1.0 p+ K- pi+ PHSP;
Enddecay

End
--------------

(with pbarpSystem0 as unstable object of course)

j.
Re: segfault in PndFsmMvdPid.cxx [message #16421 is a reply to message #16420] Wed, 23 April 2014 11:33 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
Then your lambdac should not reach the PndFsmTrack status.
have you seen already such crashes, or maybe this is your "educated guess"?
Re: segfault in PndFsmMvdPid.cxx [message #16422 is a reply to message #16421] Wed, 23 April 2014 11:38 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: 106.2.165*
I have seen the crash, that is why I tried to check what is going on... Wink

j.
Re: segfault in PndFsmMvdPid.cxx [message #16423 is a reply to message #16413] Wed, 23 April 2014 11:42 Go to previous messageGo to next message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: *gsi.de
Hi.

Does the bug still exist?

Ralf
Re: segfault in PndFsmMvdPid.cxx [message #16424 is a reply to message #16423] Wed, 23 April 2014 11:50 Go to previous message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: 106.2.165*
It is OK now with the newest revision of scrut14, thanks....

Greets,

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


Current Time: Mon Dec 09 11:20:19 CET 2024

Total time taken to generate the page: 0.00593 seconds