[FIXED] Recontruction of neutrals - macro is very slow [message #15413] |
Tue, 03 September 2013 11:45 |
Elisabetta Prencipe (2)
Messages: 214 Registered: February 2013
|
first-grade participant |
From: *ikp.kfa-juelich.de
|
|
Dear Klaus, dear rho-experts,
I am running the reconstruction of the chain:
p barp---->
Ds- Ds(2317)+
Ds- --->K+K-pi-
Ds(2317)+ ----> Ds*+ pi0
Ds*+ --------> Ds+ gamma
Ds+ --------> K+ K- pi+
pi0 -------->2 photons
I am doing a very basic study, asking for the mass constraint fit for the Ds(2317)+, and plotting the full truth match value of mass and momentum, and the the combinatorial with "best" pid selection. When I run a similar decay chain, but no gammas were involved, the macro was running quickly. Now I have the same number of chain steps, but with photons. The speed of macro becomes worse and worse especially if I apply some selection cuts (e.g., I require for photons that the maximum candidate per event should not be larger than 100, or the momentum should be >0.150 GeV/c, in order to reduce noisy-gammas).
Just to give some numbers: to run a similar decay, but only charged particles got involved: 5000 events --->~4 hours (analysis macro, only); in this new case: in 4 hours I get 600 events only...is this a known problem or am I doing something really wrong here? Do you have by chance any suggestion how to modify this macro in order to run it faster? I attach my very simple macro to this email. There are many histograms initialized here, but only few of them are filled. I had to exclude many, because of problem with time.
Thanks in advance for your useful suggestions,
Elisabetta
[Updated on: Sun, 08 September 2013 12:03] by Moderator Report message to a moderator
|
|
|
Re: Recontruction of neutrals - macro is very slow [message #15417 is a reply to message #15413] |
Tue, 03 September 2013 13:32 |
Klaus Götzen
Messages: 293 Registered: June 2006 Location: GSI
|
first-grade participant |
From: *gsi.de
|
|
Hi Elisabetta,
I think of two effects, which make your macros running slow:
1. When using neutrals, the combinatorics usually gets blown up quite significantly, since there are always huge numbers of neutral objects reconstructed.
2. This effect of getting slower and slower from event to event is a buggy effect of CINT I think. I observed it always, when the 'complexity' (however that really is defined) of the macro code gets above a certain threshold, which basically always happens at some point for complicated analyses.
An improvement for (1.) can be achieved but requiring a lower energy threshold for your gamma candidates, e.g. 30-100 MeV, in order to reduce the number of candidates.
This can be easily done with a RhoEnergyParticleSelector:
double minE = 0.03;
RhoEnergyParticleSelector *SelEnergy = new RhoEnergyParticleSelector("SelEnergy",50.+minE,100.);
while (theAnalysis->GetEvent())
{
theAnalysis->FillList(gamma, "Neutral");
gamma.Select(SelEnergy);
...
You should try some values or take a look at the gamma energy distribution beforehand to find an appropriate threshold.
In order to cope with (2.), you should convert your analysis code to run in a task. I already sent you a task version of your Ds2535 macro last week or that before, where you can take a look how this can be done, or you read the corresponding section in the new tutorial wiki
http://panda-wiki.gsi.de/cgi-bin/view/Computing/PandaRootRhoTutorial#3_A nalysis_in_a_Task
where it is also described.
Best regards,
Klaus
|
|
|
|