Hi
my error error: “base operand of ‘->’ is not a pointer”
and part of the code:
TFile::Open("/home/jacek/pluto_v5.42.4/macros/acc/acceptances.root");
(proton_acc = (TH3F*) gROOT->FindObject(“ProtonAcc”));
PParticle *p;
#define R2D 57;
for (int p = 0; p <= Npart; p++)
{
//pi_reco.SetXYZM(p_x,p_y,p_z,0.000139570);
//cout<<Particles_pid[p]<<endl;
if (Particles_pid[p] == 14)
{
hist = proton_acc;
int bin = hist->FindBin(p->P()*1000,p->Theta() * R2D,int(p->Phi() * R2D + 180) % 60);
//int bin = hist -> FindBin(x,y,z);
// float w1 = hist->GetBinContent(1,1);
}
}
I have no idea where I`m making an error.
Cheers && Thanks
J.