Empty rChannelActivity_xx histograms

REST version : v2.3.4
REST commit : 30b4091f

Hello, when I run TRestDetectorSignalChannelActivityProcess, the rChannelActivity_XX histograms are appended to the output root file, but they are empty. The daqChannelActivity;1 is not empty, but the channel numbers are not converted into strip numbers.

RawToSignal.rml (4.9 KB) processes.rml (21.4 KB) globals.xml (815 Bytes)

Hi Barbara,

could this be connected with the decoding range? If I look to the daqChannelActivity the channels seem to be in the range between 4300-4600.

However, if I look into the IAXO readout the corresponding daq channel definitions are in the range 8600-8900. I.e. the daqIds in that range are associated with physical channels in the readout module.

If I go to the iaxo-readouts project and open the readouts.root file I can check that range for any module (in IAXO there is just 1 module)

restRoot readouts.root
root [0] iaxo_readout->GetReadoutPlane(0)->GetModule(0)->GetMinDaqID()
(int) 8643
root [1] iaxo_readout->GetReadoutPlane(0)->GetModule(0)->GetMaxDaqID()
(int) 8924

It is also possible to get any specific channel daqId, as follows (where I get readout channel 10).

root [2] iaxo_readout->GetReadoutPlane(0)->GetModule(0)->GetChannel(10)->GetDaqID()
(int) 8769

So, there will be a mismatch.

Looking inside the RML definition

there is a field at <addReadoutModule that controls the offset of the first physical channel of the module. Which now takes the following value

firstDaqChannel="15*72*4"

The reason behind this product is because the card your are using gets ID=15, there are 4 AGET chips, and 72 channels per chip.

Thats the way the DAQ software uses to determine the daqID to be assigned in a card in the case that there are several cards. These values are hardcoded on the electronics cards firmware.

@CMargalejo The problem I see is that the IAXOD0.dec offset is already starting at 15*72*4=4320, and therefore each channelID is defined as 4320+X where X is the first column at the decoding file.

This produces the daqID 8643 for the first channel in that file, and that does not exist in the AQS file.

The best solution would be to update IAXOD0.dec so that the decoding would correspond to the CARD numbered 0, and keep the firstDaqChannel="15*72*4". In such way if the CARD firmware is updated to match card 0, the decoding would match when I do firstDaqChannel=0.

Of course, a quick solution is to regenerate the readout with firstDaqChannel=0 without modifying the decoding. However, that would mean that if I change my card, and the new card number is 7, I would have to introduce a negative offset, since the decoding has been coded to fit with card 15.

It might be one of the problems. Now, I tested with IAXO-D0 data, but not sure what is the DaqID range for CAST data.

I would just add a new readout inside readouts.root named iaxo_readout_15 so to know, that this readout name correspond with card 15.

See also details about readout generation at: GitHub - rest-for-physics/basic-readouts: It contains very basic readout definitions to serve as a reference for more complex readout definitions.

Oh yes, that’s it! I can upload the decoding file for ID=0 (I already have it locally). But both for CAST and IAXO-D0, the current card ID is 15 (ID=16 for the vetoes in IAXO-D0), so the readout file is the same and the first daq channel number is also the same.

So I can apply the solution you think is better:

  • Upload a new .dec file written for card ID=0 and regenrate the readout keeping firstDaqChannel="15*72*4"
  • Regenerate the readout with firstDaqChannel=0 with the current .dec file

Just let me know what you think is better and I’ll do it.

For me thats the best choice.

Then, when you open the readouts.root file in UPDATE mode.

TFile *f = new TFile("readouts.root", "UPDATE");

and write the generated readout as:

readoutPointer->Write("iaxo_readout_15");

Ok!

I’ve removed the current readout from readouts.root because it can be confusing, and I kept just the new iaxo_readout_15. I’ve also introduced a new variable in the globals section of the RML to define the card number.

I’ve tested it and it works, so I’ve pushed it (commit 1dd29ab9).

1 Like

Thanks! I generated the readout with the updated files, and it works.