zoglauer / megalib

MEGAlib - the Medium-Energy Gamma-ray Astronomy library
http://megalibtoolkit.com
Other
41 stars 32 forks source link

Problem with Revan and .evta file! #93

Closed tva050 closed 1 month ago

tva050 commented 1 month ago

Hey!

I am trying to use real measurements in Revan, but i get that Event 157865: Hit has no positive energy: 0 keV and Event statistics for all triggered (!) events: No events available. The complete output is added further down.
My geometry is defined as the following:

//---TRY 5---//

Name NewDetector
Version 1.3

Include $(MEGALIB)/resource/examples/geomega/materials/Materials.geo

Volume WorldVolume
WorldVolume.Material Vacuum
WorldVolume.Visibility 0
WorldVolume.Shape BRIK 50000. 50000. 50000.
WorldVolume.Mother 0

Volume CZTdetec
CZTdetec.Material CZT
CZTdetec.Visibility 1
CZTdetec.Color 6
CZTdetec.Shape BRIK 1.1 1.1 0.5
CZTdetec.Position 0.0 0.0 0.0 
CZTdetec.Mother WorldVolume

SurroundingSphere 150  0.0  0.0  0.0  150.0

// Detector information 

Voxel3D ActiveDetector
ActiveDetector.SensitiveVolume    CZTdetec
ActiveDetector.DetectorVolume     CZTdetec

ActiveDetector.NoiseThresholdEqualsTriggerThreshold true
ActiveDetector.TriggerThreshold 0.0

ActiveDetector.Offset 0.0 0.0 0.0
ActiveDetector.VoxelNumber 11 11 11

ActiveDetector.EnergyResolution Ideal

ActiveDetector.FailureRate 0.0

This geometry worked with a simulation file i made, but when i use it for my .evta file (a portion of it):

Version 100
Type EVTA

SE
ID 0
TI 22897
HT 8;0.1925;-0.7699;0.09259259259259256;260.6
HT 8;0.3849;-0.7699;0.05555555555555558;456.55
SE
ID 1
TI 23861
HT 8;0.7699;0.7699;0.16666666666666663;449.5
HT 8;0.5775;0.7699;0.09259259259259256;243.75
SE
ID 2
TI 104271
HT 8;0.9625;-0.7699;0.38888888888888884;326.95
HT 8;0.7699;-0.7699;0.35185185185185186;384.2
SE
ID 3
TI 106381
HT 8;0.9625;0.0;0.16666666666666663;305.95
HT 8;0.9625;0.5775;0.35185185185185186;315.05
SE
ID 4
TI 118773
HT 8;-0.7699;-0.5774;-0.16666666666666669;553.15
HT 8;-0.5774;-0.5774;-0.20370370370370372;140.45

I though that maybe the hit's needed to be within the center of the voxels that did't work, so i tried copying the exact hits from the simulation file but still got that no hit is registrated and don't have any energy. Output from Revan (shortened):

Event 1: Hit has no positive energy: 0 keV
Event 1: Hit has no positive energy: 0 keV
Event 2: Hit has no positive energy: 0 keV
Event 2: Hit has no positive energy: 0 keV
Event 3: Hit has no positive energy: 0 keV
Event 4: Hit has no positive energy: 0 keV
Event 5: Hit has no positive energy: 0 keV
Event 5: Hit has no positive energy: 0 keV
Event 5: Hit has no positive energy: 0 keV
---------------------------------------------------------------------------

# Tracked events file options
# Date 2024-07-12 15:18:35
# *********************************
# *********************************
#
# Clusterizer options:
#
# Clusterizing by adjacent voxels
# Level: 2
# Sigma: -1
#
#
# CSR Chi-Square options:
#
# Test statistics:                 0
# QualityFactorMin:                0
# QualityFactorMax:                1000
# MaxNInteractions:                7
# UseComptelTypeEvents:            1
# AssumeD1First:                   0
# UndecidedHandling:               3
# GuaranteeStartD1:                0
# RejectOneDetectorTypeOnlyEvents: 0
#

----------------------------------------------------------------------------

----------------------------------------------------------------------------

Event statistics for all triggered (!) events:

  No events available

----------------------------------------------------------------------------

Is there any error from MEGAlib or i'am doing something wrong @zoglauer or anyone?

All help is very much appreciated!

tva050 commented 1 month ago

After 1 week with struggle to find the problem why this occurred, i changed to Version 200 instead of Version 100. Which worked and i should have of course tested this earlier!

Is this a BUG that Revan don't recognize Version 100 and Version 101 or maybe there's a update that i don't have seen, which states that only version 200 and 201 is functional for Revan when using real measurements.

I see that in the MEGAlibWithMeasurements.pdf, you have written "Attention 1: This is the format for MEGAlib 2.99 (experimental branch on github) / 3.x". This may be the statement that we can only use the version 200 and 201, maybe this could be stated more obliviously for the further?