[Gate-users] About Timing Window
Sebastien JAN
sebastien.jan at cea.fr
Thu Nov 16 13:54:25 CET 2006
Hi Qingguo,
I will be out of my office during one week, I will be back to you ASAP
about this problem
Cheers
Sebastien
qgxie at mail.hust.edu.cn wrote:
> Hi Gaters,
>
> I aksed a question about timing window problem during the workshop held
> at NSS/MIC.
>
> I expected the time difference not lager than the timing window in the
> coincidence events.
>
> Attached please find cw100.mac and timediff.C(for root). In this case,
> there are more than 50% coincidence events with the time difference
> larger than the timing window(100ps).
>
> Please help me to test it.
>
> Thanks a lot.
>
> Qingguo Xie
>
>
> ------------------------------------------------------------------------
>
> # W O R L D
> /gate/world/geometry/setXLength 900 mm
> /gate/world/geometry/setYLength 900 mm
> /gate/world/geometry/setZLength 220 mm
>
> # C Y L I N D R I C A L
> /gate/world/daughters/name cylindricalPET
> /gate/world/daughters/insert cylinder
> /gate/cylindricalPET/setMaterial Air
> /gate/cylindricalPET/geometry/setRmax 437.5 mm
> /gate/cylindricalPET/geometry/setRmin 412.5 mm
> /gate/cylindricalPET/geometry/setHeight 210 mm
>
> # resector
> /gate/cylindricalPET/daughters/name rsector
> /gate/cylindricalPET/daughters/insert box
> /gate/rsector/placement/setTranslation 425 0 0 mm
> /gate/rsector/geometry/setXLength 25 mm
> /gate/rsector/geometry/setYLength 54 mm
> /gate/rsector/geometry/setZLength 162 mm
> /gate/rsector/setMaterial Air
>
> # module
> /gate/rsector/daughters/name module
> /gate/rsector/daughters/insert box
> /gate/module/geometry/setXLength 25 mm
> /gate/module/geometry/setYLength 54 mm
> /gate/module/geometry/setZLength 54 mm
> /gate/module/setMaterial Air
>
> #crystal
> /gate/module/daughters/name crystal
> /gate/module/daughters/insert box
> /gate/crystal/geometry/setXLength 25 mm
> /gate/crystal/geometry/setYLength 6.45 mm
> /gate/crystal/geometry/setZLength 6.45 mm
> /gate/crystal/setMaterial Air
>
> # layer 0
> /gate/crystal/daughters/name LSO
> /gate/crystal/daughters/insert box
> /gate/LSO/geometry/setXLength 25 mm
> /gate/LSO/geometry/setYLength 6.45 mm
> /gate/LSO/geometry/setZLength 6.45 mm
> /gate/LSO/setMaterial LSO
>
> # R E P E A T C R Y S T A L
> /gate/crystal/repeaters/insert cubicArray
> /gate/crystal/cubicArray/setRepeatNumberX 1
> /gate/crystal/cubicArray/setRepeatNumberY 8
> /gate/crystal/cubicArray/setRepeatNumberZ 8
> /gate/crystal/cubicArray/setRepeatVector 0 6.75 6.75 mm
> #repeat module
> /gate/module/repeaters/insert linear
> /gate/module/linear/setRepeatNumber 3
> /gate/module/linear/setRepeatVector 0 0 54 mm
> # repeat rsector
> /gate/rsector/repeaters/insert ring
> /gate/rsector/ring/setRepeatNumber 48
>
> # A T T A C H S Y S T E M
> /gate/systems/cylindricalPET/rsector/attach rsector
> /gate/systems/cylindricalPET/module/attach module
> /gate/systems/cylindricalPET/crystal/attach crystal
> /gate/systems/cylindricalPET/layer0/attach LSO
>
> # A T T A C H L A Y E R SD
> /gate/LSO/attachCrystalSD
>
> # P H A N T O M
> /gate/world/daughters/name phantom
> /gate/world/daughters/insert cylinder
> /gate/phantom/geometry/setRmax 100 mm
> /gate/phantom/geometry/setHeight 190 mm
> /gate/phantom/placement/setTranslation 0 0 0 mm
> /gate/phantom/setMaterial Water
> # A T T A C H P H A N T O M S D
> /gate/phantom/attachPhantomSD
>
>
> # P H Y S I C S
> /gate/physics/gamma/selectCompton standard
> /gate/physics/gamma/selectPhotoelectric standard
> /gate/physics/gamma/selectRayleigh lowenergy
> /gate/physics/setElectronCut 1000. km
> /gate/physics/setXRayCut 1. GeV
> /gate/physics/setDeltaRayCut 1. GeV
> /gate/physics/verbose 2
>
>
> # I N I T I A L I Z E
> /gate/systems/cylindricalPET/verbose 0
> /gate/geometry/enableAutoUpdate
> /run/initialize
>
> # S O U R C E S
> /gate/source/addSource twogamma
> /gate/source/twogamma/setActivity 1000000 becquerel
> /gate/source/twogamma/setType backtoback
> /gate/source/twogamma/gps/particle gamma
> /gate/source/twogamma/gps/energytype Mono
> /gate/source/twogamma/gps/monoenergy 0.511 MeV
> /gate/source/twogamma/gps/type Volume
> /gate/source/twogamma/gps/shape Cylinder
> /gate/source/twogamma/gps/radius 100 mm
> /gate/source/twogamma/gps/halfz 95 mm
> /gate/source/twogamma/gps/angtype iso
> /gate/source/twogamma/gps/mintheta 0. deg
> /gate/source/twogamma/gps/maxtheta 180. deg
> /gate/source/twogamma/gps/minphi 0. deg
> /gate/source/twogamma/gps/maxphi 360. deg
> /gate/source/twogamma/gps/centre 0. 0. 0. cm
> /gate/source/list
>
>
> # D I G I T I Z E R
> /gate/digitizer/Singles/insert adder
> /gate/digitizer/Singles/insert readout
> /gate/digitizer/Singles/readout/setDepth 2
> /gate/digitizer/Coincidences/setWindow 0.1 ns
> /gate/digitizer/Coincidences/minSectorDifference 10
>
> /gate/systems/cylindricalPET/describe
>
> # V E R B O S I T Y
> /control/verbose 0
> /grdm/verbose 0
> /run/verbose 0
> /event/verbose 0
> /tracking/verbose 0
> /gate/application/verbose 0
> /gate/generator/verbose 0
> /gate/stacking/verbose 0
> /gate/event/verbose 0
> /gate/source/verbose 0
>
> # O U T P U T
> # ASCII
> /gate/output/ascii/setOutFileSizeLimit 100000000
> /gate/output/ascii/setOutFileHitsFlag 0
> /gate/output/ascii/setOutFileSinglesFlag 0
> /gate/output/ascii/setOutFileCoincidencesFlag 1
>
> # ROOT
> /gate/output/root/setFileName cwbug
> /gate/output/root/setRootNtupleFlag 0
> /gate/output/root/setRootHitFlag 0
> /gate/output/root/setRootSinglesFlag 0
> /gate/output/root/setRootCoincidencesFlag 1
> /gate/output/root/setSaveRndmFlag 1
>
> # S T A R T
> /gate/application/setTimeSlice 1 s
> /gate/application/setTimeStart 0 s
> /gate/application/setTimeStop 1 s
> /gate/application/startDAQ
>
> exit
>
>
> ------------------------------------------------------------------------
>
> void timediff( char src[200] )
> {
> FILE *outf;
> outf=fopen("timeinf.txt","w");
> TFile *pRootFile = new TFile(src);
> TTree *pTreeCoin = (TTree*)pRootFile->Get("Coincidences");
> double time1;
> double time2;
> int eventID1;
> int nentries = (int) pTreeCoin -> GetEntries();
> int nBug=0;
>
> pTreeCoin->SetBranchAddress("time1",&time1);
> pTreeCoin->SetBranchAddress("time2",&time2);
> pTreeCoin->SetBranchAddress("eventID1",&eventID1);
>
> for(int i=0 ; i<nentries ; i++){
> pTreeCoin->GetEntry(i);
> fprintf(outf,"%1.12lf, %1.12lf\n",time1,time2);
> if( fabs(time1-time2)*1.0e12 > 100. ) nBug++;
> }
> printf("Total Coincidences event %d, coincidences events out of window %d\n", nentries, nBug);
> delete pTreeCoin;
> fclose(outf);
> }
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.healthgrid.org
> http://lists.healthgrid.org/mailman/listinfo/gate-users
More information about the Gate-users
mailing list