I have long suspected there is an issue in the trigger data the v3 electronics are sending. This provides several new calibration routines (and supporting infrastructure) to qualify the trigger data in the v3 electronics. When a new set of electronics hardware, CTP7 firmware, or OH firmware is released two main questions should be asked:
Is the mapping of vfat channel to sbit in the OH correct?
Is the measurement of rate of sbits done by the OH/CTP7 correct?
This PR adds the required RPC methods for answering these questions.
New Supporting Methods
setChannelRegistersVFAT3SimpleLocal(...)
The present RPC method for setting VFAT3 channel registers setChannelRegistersVFAT3Local(...) and it's non-local counterpart takes six separate arrays for:
calEnable,
mask,
trim ZCC,
trim ZCC polarity,
trim ARM, and
trim ARM polarity
While this offers flexibility it doesn't pair well with the getting the channel registers using getChannelRegistersVFAT3Local(...) which returns a single array of channel register data where each element is the 16 bit channel register in question. Additionally looking to the future the DB will most likely not store six different columns for the channel register data.
Hence an additional function has been added which takes only a single array and pairs well with the existing get method.
It has been incorporated into the same remote method and a check for the key simple toggles between setChannelRegistersVFAT3Local(...) and setChannelRegistersVFAT3SimpleLocal(...).
See documentation in include/vfat3.h found in this PR for usage.
confCalPulseLocal(...)
Multiple local methods:
genScanLocal(...),
`checkSbitMappingWithCalPulseLocal(...), and
checkSbitRateWithCalPulseLocal(...).
Require configuring the cal pulse for a particular channel. This method provides the functionality to do so.
See documentation found in src/calibration_routines.cpp for usage. Not sure if this should be placed in vfat3.cpp/h but it seemed appropriate to be found in the calibration library.
checkSbitMappingWithCalPulseLocal(...)
This specifically addresses the first goal mentioned at the top of this PR. This method will:
Store the current channel register settings,
Mask all channels and disable the calpulse for all unmasked vfats,
For the vfat of interest unmask a single channel and enable the calpulse,
Send nevts number of calpulses,
readout the sbits observed by the CTP7 and unpack the data,
Mask the channel again and disable the calpulse
repeat steps 3 through 6 for all channels on the vfat of interest
Revert to the original channel register settings
This allows the user to check that the (vfat,chan) being pulsed is the same as the (vfat,sbit) being observed by the OH/CTP7 and confirm the mapping. It will also report the sbit cluster size.
See documentation in src/calibration_routines.cpp for usage.
checkSbitRateWithCalPulseLocal()
This specifically addresses the second goal mentioned at the top of this PR. This method will:
Store the current channel register settings,
Mask all channels and disable the calpulse for all unmasked vfats,
For the vfat of interest unmask a single channel and enable the calpulse,
Send calpulses at a specific rate using the TTC Generator for a fixed time,
readout the rate counters on the CTP7 and OH,
Stop sending calpulses, then mask the channel again and disable the calpulse,
repeat steps 3 through 6 for all channels on the vfat of interest
revert to the original channel register settings
This allows to confirm that the known rate pulsed matches the measured rate by the CTP7, specifically this is reading out registers:
GEM_AMC.OH.OHY.FPGA.TRIG.CNT.VFATX_SBITS for vfat X of interest on OH Y,
GEM_AMC.OH.OHY.FPGA.TRIG.CNT.CLUSTER_COUNT for OH Y
GEM_AMC.TRIGGER.OHY.TRIGGER_RATE for OH Y
The first is the number of sbits for VFATX seen in GEM_AMC.OH.OHX.FPGA.TRIG.CNT.SBIT_CNT_TIME_MAX which then gives the rate.
The second is the sum of all sbit clusters from all vfats observed by the OH.
The third is the rate observed by the CTP7.
In this case all three values should be the same.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
I have long suspected there is an issue in the trigger data the v3 electronics are sending. This provides several new calibration routines (and supporting infrastructure) to qualify the trigger data in the v3 electronics. When a new set of electronics hardware, CTP7 firmware, or OH firmware is released two main questions should be asked:
vfat
channel to sbit in the OH correct?This PR adds the required RPC methods for answering these questions.
New Supporting Methods
setChannelRegistersVFAT3SimpleLocal(...)
The present RPC method for setting VFAT3 channel registers
setChannelRegistersVFAT3Local(...)
and it's non-local counterpart takes six separate arrays for:While this offers flexibility it doesn't pair well with the getting the channel registers using
getChannelRegistersVFAT3Local(...)
which returns a single array of channel register data where each element is the 16 bit channel register in question. Additionally looking to the future the DB will most likely not store six different columns for the channel register data.Hence an additional function has been added which takes only a single array and pairs well with the existing
get
method.It has been incorporated into the same remote method and a check for the key
simple
toggles betweensetChannelRegistersVFAT3Local(...)
andsetChannelRegistersVFAT3SimpleLocal(...)
.See documentation in
include/vfat3.h
found in this PR for usage.confCalPulseLocal(...)
Multiple local methods:
genScanLocal(...)
,checkSbitRateWithCalPulseLocal(...)
.Require configuring the cal pulse for a particular channel. This method provides the functionality to do so.
See documentation found in
src/calibration_routines.cpp
for usage. Not sure if this should be placed invfat3.cpp/h
but it seemed appropriate to be found in the calibration library.checkSbitMappingWithCalPulseLocal(...)
This specifically addresses the first goal mentioned at the top of this PR. This method will:
nevts
number of calpulses,This allows the user to check that the (vfat,chan) being pulsed is the same as the (vfat,sbit) being observed by the OH/CTP7 and confirm the mapping. It will also report the sbit cluster size.
See documentation in
src/calibration_routines.cpp
for usage.checkSbitRateWithCalPulseLocal()
This specifically addresses the second goal mentioned at the top of this PR. This method will:
This allows to confirm that the known rate pulsed matches the measured rate by the CTP7, specifically this is reading out registers:
GEM_AMC.OH.OHY.FPGA.TRIG.CNT.VFATX_SBITS
for vfat X of interest on OH Y,GEM_AMC.OH.OHY.FPGA.TRIG.CNT.CLUSTER_COUNT
for OH YGEM_AMC.TRIGGER.OHY.TRIGGER_RATE
for OH YThe first is the number of sbits for VFATX seen in
GEM_AMC.OH.OHX.FPGA.TRIG.CNT.SBIT_CNT_TIME_MAX
which then gives the rate.The second is the sum of all sbit clusters from all vfats observed by the OH.
The third is the rate observed by the CTP7.
In this case all three values should be the same.
Types of changes
Motivation and Context
Goals 1 & 2 at the top of this page.
How Has This Been Tested?
http://cmsonline.cern.ch/cms-elog/1058329
Screenshots (if appropriate):
Channel pulsed, sbit observed
rate pulsed, rate observed
Checklist: