Some doubts about TRestRawSignalChannelActivity Process

REST version : v2.3.8
REST commit : 4ff2821d

I want to perform the official analysis in some data using the next REST official version, so I’m revising all the processes in my analysis before to make sure everything works.

I’m not sure how TRestRawSignalChannelActivityProcess is working now. The output daqChannelActivityRaw histogram looks exactly as I expected:

However the metadata look weird:

In commit 6b822f2 all this part was removed. Can this be the cause?

/// \brief Function to read input parameters from the RML
/// TRestRawSignalChannelActivityProcess metadata section
///
void TRestRawSignalChannelActivityProcess::InitFromConfigFile() {
    fLowThreshold = StringToDouble(GetParameter("lowThreshold", "25"));
    fHighThreshold = StringToDouble(GetParameter("highThreshold", "50"));

    fDaqHistogramChannels = StringToInteger(GetParameter("daqChannels", "300"));
    fDaqStartChannel = StringToInteger(GetParameter("daqStartCh", "4320"));
    fDaqEndChannel = StringToInteger(GetParameter("daqEndCh", "4620"));
    fReadoutHistogramChannels = StringToInteger(GetParameter("readoutChannels", "128"));
    fReadoutStartChannel = StringToInteger(GetParameter("readoutStartCh", "0"));
    fReadoutEndChannel = StringToInteger(GetParameter("readoutEndCh", "128"));
}

Then I don’t get the histogram translated to readout channel numbers, rChannelActivityRaw, which I think can be important when trying to understand the noise in our detectors. I think this is because in line 184 #ifdef REST_DetectorLib is not fulfilled, but I’m not sure how to solve it. Is it possible to make this Detector feature available to this process?

Thanks!

Hi Cristina,

the lines removed at commit 6b822f2 were removed in order to complain with the new standard way of retrieving parameters. The standard way takes effect when no InitFromConfigFile method is implemented at the process. We should move all processes to the new scheme when possible.

So, in the standard way, one needs to define the parameter name exactly as the class member, but removing the f and making the second character lower case.

So that, fLowThreshold parameter name should be lowThreshold, or fDaqEndChannel should be the parameter name daqEndChannel.

I bet the problem in your case is that you are not defining lowThreshold in your RML, because when you use PrintMetadata the value is undefined.

In one hand, the problem comes because on the new implementation, the header does not take any default values. It is just as follows:

   protected:
    /// The value of the lower signal threshold to add it to the histogram
    Double_t fLowThreshold;

    /// The value of the higher signal threshold to add it to the histogram
    Double_t fHighThreshold;

    /// The number of bins at the daq channels histogram
    Int_t fDaqChannels;

But, it is possible to assign a default value, so I just took the values we had before at the InitFromConfigFile definition and placed them here, at the following PR.

Please, notice that the default values are just a value used when no value is given at the RML, I would advice to always provide the value at your RML config file.

If REST was compiled with libRestDetector, then REST_DetectorLib will be fulfilled. It is libRestDetector showing when you launch restRoot?

Yes, it is there… I’m using the instalation in Sultan: /programas/rest/latest/thisREST.sh
image

Oh, so perhaps there is no common library rule at CMake to create the REST_DetectorLib? I cannot find it quickly where those definitions are created. @nkx you know?