Castor TOF reconstruction

Hello,

I have a question regarding the conversion of TOF information. How do we set the TOF information flag to “on” when we use “castor-GATERootToCastor” or “castor-datafileConversionEx” tools to convert GATE root output to castor data file? Is there a specific command for that?

Best Regards
Nikta Zarif Yussefian

Hello Nikta,
See example in the attached file (search for "SetTOFInfoFlag)

Slava

castor-GATERootToCastorWithTOF.cc (71.1 KB)

Hello Slava,

Thanks for your answer and for sharing the file.

How do you have access to this file? In the version I have downloaded from website the file you shared does not exist. I was not able to find it on doxygen either.

If I replace the file you shared with castor-GATERootToCastor and recompile, does castor-recon also need modification?

Regards

These is a modified version of castor-GATERootToCastor i made myself.
I don’t remember if there is anything to modify other than this file.
Try to compile it and tell me if something is missing.

The simplest way to add it is to copy the file instead of GATERootToCastor.
If you want to have both, this file and GATERootToCastor, than you need to change the CMakeLists.txt file and add
lines similar to those containing GATERootToCastor.

Slava

Dear Slava,

Thanks for your immediate response.

Did you modify the iDataFilePET.cc as well? I tried to recompile and I am having these errors:

toolkits/castor-GATERootToCastor.cc: In function ‘int main(int, char**)’:
toolkits/castor-GATERootToCastor.cc:825:39: error: ‘class iDataFilePET’ has no member named ‘SetTOFInfoFlag’
((iDataFilePET*)Out_data_file)->SetTOFInfoFlag(true);
^
toolkits/castor-GATERootToCastor.cc:827:34: error: ‘class iDataFilePET’ has no member named ‘SetTOFResolution’
((iDataFilePET*)Out_data_file)->SetTOFResolution(tof_reso);
^
toolkits/castor-GATERootToCastor.cc:829:34: error: ‘class iDataFilePET’ has no member named ‘SetTOFRange’
((iDataFilePET*)Out_data_file)->SetTOFRange(tof_range);
^
toolkits/castor-GATERootToCastor.cc:1602:28: error: ‘class vDataFile’ has no member named ‘PROJ_WriteEvent’
Out_data_file->PROJ_WriteEvent(Event, 0);
^
toolkits/castor-GATERootToCastor.cc:1631:27: error: ‘class vDataFile’ has no member named ‘PROJ_WriteEvent’
Out_data_file->PROJ_WriteEvent(Event, 0);
^
toolkits/castor-GATERootToCastor.cc:1706:26: error: ‘class vDataFile’ has no member named ‘PROJ_WriteEvent’
Out_data_file->PROJ_WriteEvent(Event, 0);
^
toolkits/castor-GATERootToCastor.cc:1777:20: error: ‘class vDataFile’ has no member named ‘PROJ_WriteHeader’
Out_data_file->PROJ_WriteHeader();
^
toolkits/castor-GATERootToCastor.cc:1819:26: error: ‘class vDataFile’ has no member named ‘PROJ_WriteEvent’
Out_data_file->PROJ_WriteEvent(Event, 0);
^
toolkits/castor-GATERootToCastor.cc:1835:22: error: ‘class vDataFile’ has no member named ‘PROJ_WriteHeader’
Out_data_file->PROJ_WriteHeader();
^
toolkits/castor-GATERootToCastor.cc:1848:22: error: ‘class vDataFile’ has no member named ‘PROJ_WriteHeader’
Out_data_file->PROJ_WriteHeader();
^
Makefile:223: recipe for target ‘build/__tool_castor-GATERootToCastor.o’ failed
make: *** [build/__tool_castor-GATERootToCastor.o] Error 1

Regards
Nikta

Hello Nikta,

I attache my iDataFilePET.hh.
I see that there are other modification to in the version v2.0, so you need to copy to the new file the part related to the TOF modification (you can see it with diff). If not, I will try to merge my modification with the v2.0 version this week.

I also see that iDataFilePET::PROJ_WriteHeader() method is absent now in v.2.0. You will probably need to replace Out_data_file->PROJ_WriteEvent with Out_data_file->WriteEvent in toolkits/castor-GATERootToCastor.cc

Slava

iDataFilePET.hh (14.8 KB)