GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Bug in PndEmcHitProducer
Re: Bug in PndEmcHitProducer [message #10534 is a reply to message #10533] Wed, 14 April 2010 22:05 Go to previous message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

I tend to agree with Elwin. I did some tests with a simple program using a map simulating the code and indeed a first time call of the []-operator gives on all tested platforms nicely gives a zero. So, I also think that this cannot be a problem. The time issue is more nasty, but then again, if you don't use the time information in the analysis, it should not be a problem. So, honestly speaking, I cannot understand why the energy deposited using the PndEmcHitProducer should differ from looping over the points manually. The problem must be hidden somewhere else.

Mohammad A. pointed out to me another potential problem in the PndEmcHitProducer code related to the filling of the container of the hits:

Quote:

// ------------------------------------------------------------------------ -
// ----- Private method AddDigi --------------------------------------------
PndEmcHit* PndEmcHitProducer::AddHit(Int_t trackID,Int_t detID, Float_t energy,
Float_t time, std::vector <Int_t> &mctruth)
{
// It fills the PndEmcHit category

//cout << "PndEmcHitProducer: track " << trackID << " evt " << eventID
//<< " sec " << sec << " plane " << pla << " strip " << strip << "box
//" << box << " tube " << tub << endl;
TClonesArray& clref = *fDigiArray;
Int_t size = clref.GetEntriesFast();
return new(clref[size]) PndEmcHit(trackID, detID, energy, time, emcX[detID],
emcY[detID], emcZ[detID], mctruth);
}
// ----



Note that the TClonesArray is filled with an object which can have a variable vector size: mctruth! I don't know the details of TClonesArrays, but can one fill it with a dynamic array containing a std::vector <Int_t> ???? I guess that this mctruth propagation is also obsolete with the new code of Tobias. So, maybe we should remove it anyway...

Best wishes,

Johan.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: *** glibc detected *** double free or corruption (out): 0x0a0c66f0 ***
Next Topic: Genfit server is down
Goto Forum:
  


Current Time: Wed Dec 08 09:44:43 CET 2021

Total time taken to generate the page: 0.02770 seconds