GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Microcandidates writing fails for large simulation file
Microcandidates writing fails for large simulation file [message #8184] Wed, 08 April 2009 11:24 Go to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi all,

I have a simulation which is split into many files because of large file size (>2 GB).

While using PndMicroWriter task with the writeMicro.C in /macro/fsim no Microcandidates are written, if more than one simulation file (that have been split) is included. I chain the files using AddFile from FairRunAna task.

Everything works well, if only the first of the split simulation file is included ( Of course, with less number of events).

Regards,
Vishwajeet


Re: Microcandidates writing fails for large simulation file [message #8185 is a reply to message #8184] Wed, 08 April 2009 13:13 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi can you attach the file macro
you are using in order to understand
in detail what you are doing?

thanks
Alicia S.
Re: Microcandidates writing fails for large simulation file [message #8186 is a reply to message #8184] Wed, 08 April 2009 15:13 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi...

I have uploaded the simple macro which works when the split sim files are not added. (only the first file is used).

Vishwajeet
  • Attachment: writeMicro.C
    (Size: 1.54KB, Downloaded 279 times)
Re: Microcandidates writing fails for large simulation file [message #8187 is a reply to message #8186] Wed, 08 April 2009 15:48 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *gsi.de
Hi Vjha,

i think you should
add your digi/reco output file(infile)
after having added the corresponding simfile
so like that,


FairRunAna *fRunA= new FairRunAna();
fRunA->SetInputFile(simfile); // your simulation file
fRunA->AddFriend(infile); // your reco/digi output file
fRunA->AddFile(simfile1);
fRunA->AddFriend(infile); // your reco/digi output file
fRunA->AddFile(simfile2);
fRunA->AddFriend(infile); // your reco/digi output file

fRunA->SetOutputFile(outfile.Data()); //your microcandidates output file


I have modified the writeMicro so that you can try now again.
tell me it is working.

best regrads
alicia
  • Attachment: writeMicro.C
    (Size: 1.66KB, Downloaded 304 times)
Re: Microcandidates writing fails for large simulation file [message #8189 is a reply to message #8187] Wed, 08 April 2009 17:02 Go to previous messageGo to next message
Vishwajeet Jha is currently offline  Vishwajeet Jha
Messages: 9
Registered: August 2008
occasional visitor
From: *ikp.kfa-juelich.de
Hi...

Thanks a lot ...
It works perfect.

VJ
Re: Microcandidates writing fails for large simulation file [message #8813 is a reply to message #8189] Fri, 05 June 2009 17:50 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
Dear all,
it is not so clear to me why this procedure does not work in my case.
I have run the simulation, which produces two files: points_tpccombi.root and points_tpcombi_1.root.
Then digitization, one output file: digi_tpccombi.root.

At the end reconstruction, but I need also the MC information.
I have written:

FairRunAna *fRun= new FairRunAna();
fRun->SetInputFile("points_tpccombi.root");
fRun->AddFriend("digi_tpccombi.root");
fRun->AddFile("points_tpccombi_1.root");
fRun->AddFriend("digi_tpccombi.root");
fRun->SetOutputFile(outFile);


The first file is processed normally, but when the second file starts:


-I FairRootManager: switching to chained file: points_tpccombi_1.root
connected friends: digi_tpccombi.root


after few events I have a segmentation violation, related to the wrong coupling of the initial file and his friend.

Has somebody managed to handle different friend files in a reconstruction macro? And how? It seems Alicia's method is not working for me (no idea why)
Thanks in advance.
Re: Microcandidates writing fails for large simulation file [message #8815 is a reply to message #8813] Fri, 05 June 2009 18:06 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Stephano, can you please also send
the error message you get.?

In principle, i'm using the same procedure like you
and for me it is working.

regards
alicia
Re: Microcandidates writing fails for large simulation file [message #8816 is a reply to message #8815] Sat, 06 June 2009 08:32 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *13-87-r.retail.telecomitalia.it
The error message does not come from base classes. For them everything is ok.
The error comes from the fact that I am using trackID of the simulation and friend file(hit->digi->point). Therefore, if the friend is not aligned to the other file, the trackid points to a not existing member of the TClonesArray.
Do you use such kind of information? Only in this case you can see the error.
At the moment I have no error message on this computer, on monday I could send it, but he meaning of the error is what I wrote before.
Re: Microcandidates writing fails for large simulation file [message #8823 is a reply to message #8816] Mon, 08 June 2009 15:37 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
This is the error I got,
because the MVD trackID does not correspond to the effective MCTrack ID, and then it crashes.

Toggle Spoiler
Re: Microcandidates writing fails for large simulation file [message #8824 is a reply to message #8823] Mon, 08 June 2009 15:40 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi stefano

Can you try the following (if not already tried).

Quote:


FairRunAna *fRun= new FairRunAna();
fRun->SetInputFile("points_tpccombi.root");
fRun->AddFile("points_tpccombi_1.root");
fRun->AddFriend("digi_tpccombi.root");
fRun->SetOutputFile(outFile);




Ciao

Florian
Re: Microcandidates writing fails for large simulation file [message #8825 is a reply to message #8824] Mon, 08 June 2009 15:44 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
In this case the error is at the beginning:

Toggle Spoiler


but it is not clear to me why it is in TOF dictionary.

At the beginning:

-I- FairRunAna: Opening Input file: points_tpccombi.root
-I- FairRunAna Adding input file: points_tpccombi_1.root
-I- FairRunAna Input file: points_tpccombi_1.root is connected to friend: digi_tpccombi.root


It is like only the added file is friend of the... "friend".

[Updated on: Mon, 08 June 2009 16:03]

Report message to a moderator

Re: Microcandidates writing fails for large simulation file [message #8826 is a reply to message #8825] Mon, 08 June 2009 16:42 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Stephano,
try to do the following,

by doing the same procedure as before in your macro,
FairRunAna *fRun= new FairRunAna();
fRun->SetInputFile("points_tpccombi.root");
fRun->AddFriend("digi_tpccombi.root");
fRun->AddFile("points_tpccombi_1.root");
fRun->AddFriend("digi_tpccombi.root");
fRun->SetOutputFile(outFile);

go to your task and
add before calling FairMCPoint::GetTrackID(),

if pointer( your pointer to PndMvdPoint) is zero
then continue;

then you will be able to run it completely.

good luck.

ALicia.
Re: Microcandidates writing fails for large simulation file [message #8827 is a reply to message #8826] Mon, 08 June 2009 16:55 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
In this way of course it works (or better, it does not crash), but this is not the solution but just cheating.
If I do this the analysis related to the second file will have the information completely screwed up, it makes no sense.
Re: Microcandidates writing fails for large simulation file [message #8828 is a reply to message #8827] Mon, 08 June 2009 17:06 Go to previous messageGo to next message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
I don't think
it is a problem related to how are you
adding your files but on how are you sorting hits id's.

regards
Alicia.
Re: Microcandidates writing fails for large simulation file [message #8829 is a reply to message #8828] Mon, 08 June 2009 18:14 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *to.infn.it
The code works perfectly for the first file, 1500 events, with good results, and always if there is only one file. And it is not sorting TCA, whose structure is not touched at all.
Previous Topic: trunk doesnt compile
Next Topic: trunk doesnt compile
Goto Forum:
  


Current Time: Tue Nov 12 19:13:11 CET 2024

Total time taken to generate the page: 0.00921 seconds