Few hits observables not calculated correctly

REST version : v2.2.13
REST commit : 46320c86

Hello,

Some hits observables are not being calculated correctly, namely those related to the number of hits and to the fiducial volume. The values I get are 6e-310. I attach the restManager PrintTrees output: PrintTrees_hitsObs.txt (6.2 KB)

I’ve tried both setting the observables manualy and auto, but I get the same result.

Any thoughts?

I cannot reproduce your problem. the nHits values are all right for me in both setup(manuall/auto).

If I set the auto setup, I don`t get any hits observables! (sorry I said before I got the same than in manual mode, but I was wrong).
image

I think the config file I’m using is ok, but I attach it in case someone spots any mistake: signalToTrack.rml (4.2 KB)

Can I have a look at your input file?

I cannot upload the files so I send a dropbox link with the input .root file and also the original .aqs file from which I produced it using rawToSignal.rml (4.5 KB)

It seems too large for me to download… Can you reduce the event number to reduce the file size, and upload directly in the forum?

I’ve uploaded the complete .root file and the .aqs to Index of /rawdata

I have also produced smaller version of the .root file with just 10 events: R10391_00000_RawToSignal_Calibration_15min_10events_V2.2.13.root (590.8 KB)

Hi @CMargalejo, I tried to open the root file, there are no hitsAna observables then I looked into your RML, that you quoted here

and launched. No hits observables were produced. Then, I enabled the SignalToHits and HitsAnalysisProcess. It is important to remark that this process relays on an external processes.rml that you did not provide.

I have replaced by one processes.rml that I had around. It seems observables are normal.

Except for hitsAna_xSkew, or hitsAna_ySkew, etc. Those are observables defined in processes.rml, but when looking to the code, they do not exist. So, I imagine that’s it, @nkx? They should just be removed from processes.rml to fix the “problem”?

It is OK for those observables. But I am still curious how did @CMargalejo got wrong value for hitsAna_nHits. It is defined in the code but not in “double” type as usual. Could there be some problems in the fundamental code?

Hello,

Yes, but the problem of not seeing the observables comes when I do <parameter name="observable" value="all"/>, so I don’t use the processes.rml file. If I set them ON manually, they do appear.

I noticed that if I turn to OFF the TRestHitsRotateAndTraslateProcess I get correct values for hitsAna_nHits and related observables.
My readout is rotated 45 degrees, so I have to traslate the hits so that their positions are centered at (0,0). In former versions the hits appeared at the centre of the non-rotated readout, but now they appear in a position I don’t understand I attach I sketch I’ve done:
image

The hitmap if I don’t apply TRestHitsRotateAndTraslateProcess is
image

I think the problem must be related to this… I’m going to have a deeper look. Any ideas are welcome! :slight_smile:

I have replaced TRestHitsAnalysisProcess addProcess definition by the following one. And I am still observing the observables.

<addProcess type="TRestHitsAnalysisProcess" name="hitsAna" title="Hits analysis template" verboseLevel="silent" value="ON" >
    <parameter name="cylinderFiducialization" value="false" />
    <parameter name="prismFiducialization" value="false" />
    <parameter name="observable" value="all"/>
</addProcess>

Could you share the exact RML file you are using where no hitsAna_ are produced?

The file is processes.rml (19.8 KB)

However, this again only happens if TRestHitsRotateAndTraslateProcess is ON, so I think the problem must be in this process or on how I’m using it.

Ok, and the main RML?

I first use rawToSignal.rml (4.5 KB) and then, with the output .root file I get, I use signalToTrack.rml (4.3 KB)

1 Like

Ok, I confirm I can reproduce the problem when enabling/disabling TRestHitsRotateAndTranslateProcess.

I have spotted the bug when you use this file as input. This problem is same as this post:

, where the process returned null before observable assignment. I have fixed it in the latest commit.

1 Like

Ok, so if I understood the problem is that TRestHitsRotateAndTranslateProcess is transforming the hits event in such a way that the resulting number of hits in the output TRestHitsEvent is 0, and return NULL is reached in TRestHitsAnalysisProcess?

Thats why when you enable/disable the TRestHitsRotateAndTranslateProcess the problem is visible?

But why when applying the rotation/translation we have as result zero hits? @CMargalejo It is because hit fiducialization?

Sorry, I don’t understand the question. Now it’s solved with the latest commit, and I don’t get 0 hits anymore. Now the hits obervables appear and the values are correct.

If I understood the problem, the hitsAna_ observables were not present when you plugin the TRestHitsRotateAndTranslateProcess, and that is because the if statement inside TRestHitsAnalysisProcess

if (fOutputHitsEvent->GetNumberOfHits() == 0) return NULL;

was fulfilled, and then I would guess that your first event after being processed by TRestHitsRotateAndTranslateProcess got zero hits.

In other words, when you did not plug the TRestHitsRotateAndTranslateProcess the if statement would not be fulfilled, the NULL pointer would not be returned, and the observables would be constructed normally.

I have added a validateProcesses.py script that will be run in the pipeline to avoid falling into this error again in the future.