#48 closed Bug (fixed)
CalorTower.Phi
Reported by: | hwolfe | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Delphes code | Version: | 1.9 |
Keywords: | CaloTower, TOWER_dphi | Cc: |
Description
Hello,
cat Delphes/VERSION: 2.0.0
I'm using Delphes 2.0.0 with MG5-1.4.5+ME+Phythia.
In delphes_card.dat, I'm setting
==========================================================================
# Calorimetric towers
TOWER_number 35
TOWER_eta_edges 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.0 3.1 3.2 3.3 3.4 3.5
TOWER_dphi 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 15.0 30.0 30.0 30.0 30.0
==========================================================================
I would expect that this produces wedges 15 degrees in width, with the first being [0,15], and the last being [345,0]. What I'm seeing is these tower centers:
Analysis->Scan("CaloTower.Phi","abs(CaloTower.Eta) < .5")
-172.5,-157.5,-142.5,-127.5,-112.5,-97.5,-82.5-67.5,-52.5,-37.5,-22.5,-7.5,
7.5,22.5,37.5,52.5,67.5,82.5,97.5,112.5,127.5,142.5,157.5,165,
Note that the distance between the last two tower centers is (165-157.5)=7.5 degrees, while the distance between all other towers is 15. The distance between the last and first is 22.5. Why is this tower center not set to 172.5?
I've tried several values for TOWER_dphi, even non-divisors of 360, and all produce this effect.
Am I doing something wrong?
Change History (4)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
In fact, you can change line 1544 from:
if (phi > pi-dphi) iPhi = pi-dphi;
to
if (phi > pi-dphi) iPhi = pi-dphi/2.;
Since it is supposed to give the center of the cell. The lines of code above this line are not efficient but should give the right answer. The solution above is not meant to be final as it gets crazy if one uses non standard values of dphi.
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
We are now working on optimisations of the code. This part is one of the most buggy and resource-consuming ones, so it will be rewritten in the next release.
Since your problem should be solved, please follow discussion on ticket #49
Hi,
After a closer look, it seems there is a bug around line 1537 in src/SmearUtil.cc . In fact the few lines computing the middle of calotowers in phi seem awkward.
As this code is now community-based, I encourage you to suggest a patch with some comments. I will then test it and include it in the working version.
cheers,
Jerome