Problem in distribution

Dear Developers,

I am running a script. It is not showing any error but could not able to plot a distribution. It only shows a straight line. Kindly check it

Regards,new_macro.cc (11.1 KB)

Nab

Hi,

When I run this script it generates a root file which is not executable. This file is attached below. Kindly check it too.

output1_Veto.root (9.4 KB)

Thanks

You redefine variables:

// ...
float VetoMupx, VetoMupy, VetoMupz, VetoMuen, VetoMucharge, VetoMueta, VetoMuphi, VetoMupt;
// ...
float        VetoMuphi(0), VetoMupt(0), VetoMueta(0), lelectronpt(0), lelectroneta(0), VetoMupx(0), VetoMupy(0), VetoMupz(0), VetoMuen(0);

 float    	 VetoMucharge(0);
// ...

But when I will not define these variables, it will give me an error.

Error: Symbol VetoMupx is not defined in current scope new_macro.cc:114:

I have already commented on almost exactly the same code (including the error Wile E Coyote was pointing out). See your previous thread. Segmentation error while creating a tree - yet it seems you have fixed none of the issues but instead added some random code.

Maybe your problem is more fundamental. Can’t you ask a colleague? That’s probably more useful than discussing your code here.

Hi behrenhoff,

I tried to do what you suggested me but still couldn’t get the desired results. May be I am not getting exactly. Could you please code some lines to correct this issue. The whole analysis is perfectly working but only the issue is with tree recreation. I know this will be very simple but I am not getting it.

Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.