GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » EMC » failure of QA macro of EMC reconstruction
failure of QA macro of EMC reconstruction [message #9870] Sat, 05 December 2009 13:47 Go to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Dear EMCers,

I noted that the QA macro "/trunk/macro/qa/emc/QAmacro_emc_3.C" produces a failure on many platforms:

http://fairroot.gsi.de/CDash/testSummary.php?project=2&name=qa_emc_m acro3&date=2009-12-05

It seems that the reconstruction of the azimuthal angle of photon clusters deviates systematically by 0.3-0.4 degrees from the MC truth information. This failure appears on many machines in the nightly tests. Unfortunately, I could not find any trivial mistake in the macro. Could someone with expertise take a look at it (Dima, Marc, Stefano,...)?

Thanks in advance,

Johan.
Re: failure of QA macro of EMC reconstruction [message #9871 is a reply to message #9870] Sat, 05 December 2009 16:22 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *0-87-r.retail.telecomitalia.it
When I found this error, few months ago, I have found that it was just a problem of statystic, too few counts to have a decent gaussian, then sometime you could have a large rms.
I have not checked it since that time, but I suppose it is the same problem. Maybe one should icnrease the number of processed events.
Re: failure of QA macro of EMC reconstruction [message #9873 is a reply to message #9871] Sat, 05 December 2009 17:15 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

I just run it (QAmacro_emc_x.C) with 10000 events and there is really a significant shift in phi... well, at least on my computer. Let me attach figures which shows it: the difference between phi(cluster)-phi(MC) versus the phi angle (!) of the photon (histogram h2phi in the macro)...

index.php?t=getfile&id=5757&private=0

Alternatively, the difference against the polar angle... it appears to be related to the barrel part...

index.php?t=getfile&id=5758&private=0

Greetings,

Johan

[Updated on: Sat, 05 December 2009 17:27]

Report message to a moderator

Re: failure of QA macro of EMC reconstruction [message #9876 is a reply to message #9873] Sun, 06 December 2009 00:23 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *4-87-r.retail.telecomitalia.it
I attach the slide I have presented in Dubna on 2nd July 2007,
there phi was good.
Maybe some changes in the code have produced that shift, but at that time the barrel seemed fine.

Does this problem appear only on few machines, or in all the cases?
  • Attachment: emc.pdf
    (Size: 136.78KB, Downloaded 319 times)
Re: failure of QA macro of EMC reconstruction [message #9877 is a reply to message #9876] Sun, 06 December 2009 00:35 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

I only checked the spectra on one of the machines (suse-enterprise, gcc4.3.2, 64-bit, rev. 7276). The QA checks report problems on most of the other machines as well, with all a positive shift in delta-phi (albeit all small). I changed the QA macro now with 1000 events, which for the average one should get a very precise number. There might be a logic mistake in the macro, but to me it looked fine. Could you take a look at QAmacro_emc_3.C and maybe try to run it with high statistics on your machine?

Actually, looking at your PDF file, I do see a statistically significant shift in the mean of delta-phi as well, also positive.

Greetings,

Johan

[Updated on: Sun, 06 December 2009 00:45]

Report message to a moderator

Re: failure of QA macro of EMC reconstruction [message #9879 is a reply to message #9877] Sun, 06 December 2009 12:00 Go to previous messageGo to next message
mpeliz is currently offline  mpeliz
Messages: 51
Registered: February 2008
Location: Ruhr-Universitaet Bochum
continuous participant
From: *dip.t-dialin.net
Hello,

looking to the standard macros in the emc directory
it seems that for the geometry used in the qa macros
the mapper version 6 should be used, e.g.

macro/emc/sim_emc.C: Emc->SetGeometryFileNameTriple("emc_module125.dat","emc_module3new.root ","emc_module4_StraightGeo24.4.root"); //MapperVersion: 6

while the mapper for the 3rd macro is instantiated with version number 2
macro/qa/emc/QAmacro_emc_3.C: PndEmcMapper *emcMap=PndEmcMapper::Instance(2);

I do not know if this causes the problem, but it is inconsistent anyway. Since Johan has simulated and digitized 10k events, could you try to run the reconstruction with a consistent setting of the mapper and see if this changes anything?

Another point to check might be the latest changes for the PndEmcStructure and PndEmcXtal classes announced recently by Ola and Elwin on this forum. But this is just a wild guess, since we do not know at which point the error did not occur. Maybe it was even present at Dubna, 2.5 years ago.

Best regards,
Marc
Re: failure of QA macro of EMC reconstruction [message #9880 is a reply to message #9879] Sun, 06 December 2009 12:23 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *15-87-r.retail.telecomitalia.it
If I remember well the mapper defines the position of the crystal with respect to the others, i.e. the neighbour crystals, and not the position in lab frame. And the mapping of the barrel is always the same for all the mapper versions.
Therefore, it should not change the results (for barrel) a wrong map.
Re: failure of QA macro of EMC reconstruction [message #9881 is a reply to message #9879] Sun, 06 December 2009 13:00 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

I already changed the mapper version in the QA macro yesterday and that didn't change the result at all. I will try to make some comparison on different machines and older versions as well.....

Johan
Re: failure of QA macro of EMC reconstruction [message #9884 is a reply to message #9881] Sun, 06 December 2009 14:32 Go to previous messageGo to next message
Elwin Dijck
Messages: 16
Registered: June 2009
Location: Groningen, The Netherland...
occasional visitor
From: *mxp.dsl.internl.net
Hi all,

I think the macros/mapper versions etc. are alright and the shift is caused by incorrect handling of the skewed shapes of the barrel crystals.

In my changes to the PndEmcXtal class, I changed PndEmcXtal::frontCentre to properly take the skewing of crystals into account (ie. cases where the parameters phi and theta of TGeoTrap are non-zero). To show that the skewed shapes can result in the observed phi-shift, here is a plot of the phi-difference between the center of the front face and the center of the crystal as a function of theta (the normals of the front faces of the crystals all point towards the target). It looks similar to the theta-dependence of the shift.

index.php?t=getfile&id=5760&private=0

Interesting from the QA test results is that the sign of the shift seems to have flipped around November 24 when my changes to the PndEmcXtal class were commited. I think the origin of the problem is in PndEmcDigi::depthPosition. Before my changes the result was wrong, and afterwards it was still wrong but in a different way. The main problem is that for the skewed TGeoTraps, the front face normal vector and crystal axis vector are not the same, which PndEmcDigi::depthPosition doesn't take into account. Thus PndEmcDigi::depthPosition that uses the front face normal does not return a position that lies on the central axis of the crystal.

I think the shift can be fixed by adding another parameter to PndEmcXtal that returns the unit vector in the direction of the central axis of the crystal and using that in the digi position calculation. Since my changes this vector is already calculated in the PndEmcXtal constructor anyway, it only needs to be accessable. See the attached files for changes in the code.

svn diffs


I haven't fully tested this, but here are some results for 500 photons @ theta = 90 degrees (1 GeV) where the shift is biggest. Black - old code (negative phi shift), blue - after my changes to PndEmcXtal (positive phi shift), red - using axis vector (phi shift seems mostly gone).

index.php?t=getfile&id=5761&private=0

Could someone properly check whether this really helps?

Best regards,
Elwin Dijck
  • Attachment: skewing.gif
    (Size: 8.56KB, Downloaded 738 times)
  • Attachment: test.gif
    (Size: 10.73KB, Downloaded 682 times)
  • Attachment: PndEmcXtal.h
    (Size: 1.89KB, Downloaded 291 times)
  • Attachment: PndEmcXtal.cxx
    (Size: 3.81KB, Downloaded 298 times)
  • Attachment: PndEmcDigi.cxx
    (Size: 7.58KB, Downloaded 350 times)

[Updated on: Sun, 06 December 2009 15:14]

Report message to a moderator

Re: failure of QA macro of EMC reconstruction [message #9885 is a reply to message #9884] Sun, 06 December 2009 16:29 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
Hi,

Excellent. That seems indeed to account for the small shift. I just run 10000 events of 1 GeV photons with the updates Elwin proposes (axis labeling is wrong, should be delta phi against polar angle):

index.php?t=getfile&id=5765&private=0

I also checked the procedure at a few other energies, and G4, and it all seems to fit nicely. If there are no objections, I will commit the changes to the trunk...

Thanks guys,

Johan.

[Updated on: Sun, 06 December 2009 16:35]

Report message to a moderator

Re: failure of QA macro of EMC reconstruction [message #9886 is a reply to message #9884] Sun, 06 December 2009 16:53 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: *52-82-r.retail.telecomitalia.it
It's nice that people prefer to spend their sundays working on a pc instead of resting a bit Smile

However, in my correlation from the PndPidCorrelator, I had always sistematic shifts of the track projected point from the emc cluster position, and maybe it was connected to this problem. But I cannot check it from home.
Re: failure of QA macro of EMC reconstruction [message #9887 is a reply to message #9886] Sun, 06 December 2009 17:49 Go to previous message
Elwin Dijck
Messages: 16
Registered: June 2009
Location: Groningen, The Netherland...
occasional visitor
From: *mxp.dsl.internl.net
Good. I expect there can still be a small phi shift in some cases because the actual depth of showers is energy-dependent, while the depth used for reconstruction is constant. The default depth of 6.2 cm seems to work reasonably well, but I guess making this value energy-dependent at some point might further improve the reconstruction, especially at the lowest energies.

[Updated on: Sun, 06 December 2009 17:56]

Report message to a moderator

Previous Topic: Removal of obsolete macros in emc
Next Topic: Changes in simplified digitisation of emc
Goto Forum:
  


Current Time: Fri Nov 29 14:50:48 CET 2024

Total time taken to generate the page: 0.00869 seconds