I would like to plot eta versus phi histogram after PYTHIA run. For this reason I write followig lines. But unfortunately it can not be worked. It gives “bad numerical expression” error. When I try to plot eta or phi histogram seperetaly with using these expressions I can get the correct histograms. I don’t know what is the reason which I could not use these two formula together.
I would be grateful if you could help me to solve this problem.
Thank you very much and kind regards.
TH2F* EtaPhi = new TH2F(“EtaPhi”, “Eta vs Phi +”, 760, -190., 190., 400, 160., 180.);
part->Draw(" -log(tan(atan2(sqrt(pow(particles.fPx,2)+pow(particles.fPy,2)),particles.fPz)/2.0)), TMath::Pi()+atan2(-particles.fPy,-particles.fPx) >> EtaPhi ",“charge!=0 && fKS==1”);