Home » PANDA » PandaRoot » EMC » MC Truth propagation with FairLinks in timebased sim
Re: MC Truth propagation with FairLinks in timebased sim [message #19087 is a reply to message #19035] |
Fri, 26 February 2016 13:53 |
Marcel Tiemens
Messages: 47 Registered: January 2014
|
continuous participant |
From: *kvi-cart.rug.nl
|
|
I tried tracing the problem, but I still don't understand what's causing it. As far as I can see, this is where it goes wrong:
PndEmcFWEndcapTimebasedWaveforms puts EmcWaveforms somewhere using FairWriteoutBuffer, but for some reason the next step, PndEmcFWEndcapDigi, has zero entries in its input waveform array.
Hits are converted to waveforms using
(Init)
...
// Create and activiate output Buffer....choose between PndEmcWaveform and PndEmcMultiWaveform
#ifndef MULTI
fWaveformBuffer = new PndEmcWaveformBuffer("EmcWaveform", "PndEmcWaveform", "Emc", fStoreWaves);
#else
fWaveformBuffer = new PndEmcWaveformBuffer("EmcWaveform", "PndEmcMultiWaveform", "Emc", fStoreWaves);
#endif
fWaveformBuffer = (PndEmcWaveformBuffer*) ioman ->RegisterWriteoutBuffer("EmcTimebasedWaveform", fWaveformBuffer);
...etc
(Exec)
...
// construct corresponding waveform data Object
PndEmcWaveformData wfData(theHit->GetDetectorID(), wfSimulator);
//register hit...timebased framework uses ns, whereas emc deals with seconds as time unit
FairLink linkToHit(-1, ioman->GetEntryNr(), "EmcHit", iHit, 1.0);
wfData.AddHit(linkToHit, ioman->GetEventTime() + theHit->GetTime()*1.0e9, theHit->GetEnergy());
fWaveformBuffer->FillNewData(&wfData);
...etc
, and it looks like the buffer is written out only at the end. The next task tries to make digis out of them using
(Init)
...
// Get input array
fWaveformArray = (TClonesArray*) ioman->GetObject("EmcMultiWaveform");
if (!fWaveformArray) {
//check if EmcWaveform contains MultiWaveforms
fWaveformArray = (TClonesArray*) ioman->GetObject("EmcWaveform");
if((!fWaveformArray) || (!fWaveformArray->GetClass()->InheritsFrom("PndEmcMultiWaveform"))){
cout << "-W- PndEmcFWEndcapDigi::Init: "
<< "No PndEmcWaveform array containing multi waveforms!" << endl;
return kERROR;
}
}
// Create and register output array
fDigiArray = ioman->Register("EmcDigi","PndEmcDigi", "Emc", fStoreDigis);
...etc
, but then fWaveformArray->GetEntriesFast() yields zero in the Exec part.
Also, the macros in /macro/run/ return a segmentation violation from PndFileNameCreator:
===========================================================
#5 0x00007f74fe344850 in std::basic_ostream<char, std::char_traits<char> >& std::operator<< <char, std::char_traits<char>, std::allocator<char> >(std::basic_ostream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007f74ec5c6ce3 in PndFileNameCreator::GetPath (this=0x7ffeea9a6c70) at /home/marcel/jan16/pandaroot/PndTools/generalTools/PndFileNameCreator.cx x:188
#7 0x00007f74ec5c70a0 in PndFileNameCreator::TruncateFileName (this=0x7ffeea9a6c70, cut=false) at /home/marcel/jan16/pandaroot/PndTools/generalTools/PndFileNameCreator.cx x:212
#8 0x00007f74ec5c6910 in PndFileNameCreator::GetCustomFileName (this=0x7ffeea9a6c70, ext="par", addon="", cut=false) at /home/marcel/jan16/pandaroot/PndTools/generalTools/PndFileNameCreator.cx x:147
#9 0x00007f74ec5c6121 in PndFileNameCreator::GetParFileName (this=0x7ffeea9a6c70, addon="", cut=false) at /home/marcel/jan16/pandaroot/PndTools/generalTools/PndFileNameCreator.cx x:28
#10 0x00007f74e4c30d53 in PndMasterRunSim::Setup (this=0x26529b0) at /home/marcel/jan16/pandaroot/PndTools/master/PndMasterRunSim.cxx:64
===========================================================
|
|
|
Goto Forum:
Current Time: Sun Dec 08 13:03:40 CET 2024
Total time taken to generate the page: 0.01536 seconds
|