Bug #5080
Multiplicity display for the proportonal tubes
0%
Description
*Bryan has provided a fix for the multiplicity display for the proportonal tubes:
*
So, I believe that changing the multiplicity query to the following might work around this problem without causing any other problems. Here's the revised multiplicity query:
SELECT IF="P",CONCAT,"_",RIGHT),detectorName) as `grpName`, `multiplicity`, COUNT()
FROM (
SELECT detectorName, COUNT() as `multiplicity`
FROM run_004729_R001.Hit
WHERE spillID BETWEEN 5 AND 9
GROUP BY detectorName, eventID
) slice
WHERE detectorName LIKE "P2H_f"
OR detectorName LIKE "P2V_f"
OR detectorName LIKE "P2H_b"
OR detectorName LIKE "P2V_b"
GROUP BY `grpName`, `multiplicity`
ORDER BY `grpName` ASC, `multiplicity` ASC;
I've tested this, and it works for all detectors (as it only changes the name for prop tubes)
The IF part looks to see if it's a prop tube detector, and if so, it changes it's name from P1H1b to P1H_b (literally, not wildcard '_'). If it's not a prop tube, it leaves its detectorName alone. No noticeable slowdown from the additional IF computation.
The appropriate changes to make are to change the following lines from get_detector_data() in main.py
query = db.Query(con,
subquery,
['detectorName', modeID, 'COUNT'])
query.group(['detectorName', modeID])
query.order(['detectorName', modeID])
to the following lines:
query = db.Query(con,
subquery,
['IF="P",CONCAT,"_",RIGHT),detectorName) AS `grpName`', modeID, 'COUNT'])
query.group(['`grpName`', modeID])
query.order(['`grpName`', modeID])
This, copied and pasted into the current SeaScape Dev should work right away.
History
#1 Updated by Markus Diefenthaler about 7 years ago
- Status changed from New to Resolved
#2 Updated by Markus Diefenthaler about 7 years ago
- Status changed from Resolved to Closed