Issue in running program in root

I am using the following command to run the program

root -q sand-spill-events.0.edep.root loadEDepSim.C readEDepSim.C

and getting following errors

In file included from input_line_40:1:
/home/saradindu/postdoc_genoa/dune-ge-main/readEDepSim.C:83:16: error: ‘Position’ is a private member of ‘TG4PrimaryVertex’
<< " " <Position.Y()
^
libedepsim_io dictionary payload:88:20: note: declared private here
TLorentzVector Position;
^
In file included from input_line_40:1:
/home/saradindu/postdoc_genoa/dune-ge-main/readEDepSim.C:84:17: error: ‘Position’ is a private member of ‘TG4PrimaryVertex’
<< " " << v->Position.Z()
^
libedepsim_io dictionary payload:88:20: note: declared private here
TLorentzVector Position;
^
In file included from input_line_40:1:
/home/saradindu/postdoc_genoa/dune-ge-main/readEDepSim.C:85:22: error: ‘Position’ is a private member of ‘TG4PrimaryVertex’
<< " Time " << v->Position.T()
^
libedepsim_io dictionary payload:88:20: note: declared private here
TLorentzVector Position;
^
In file included from input_line_40:1:
/home/saradindu/postdoc_genoa/dune-ge-main/readEDepSim.C:86:31: error: ‘Reaction’ is a private member of ‘TG4PrimaryVertex’
<< " ReacType "<Reaction;
^
libedepsim_io dictionary payload:94:17: note: declared private here
std::string Reaction;
^
In file included from input_line_40:1:
/home/saradindu/postdoc_genoa/dune-ge-main/readEDepSim.C:88:63: error: ‘Position’ is a private member of ‘TG4PrimaryVertex’
std::cout<<"Position in local coord. "<<LocalCoordinates(v->Position).Y()<<std::endl;
^
readEDepSim.C (5.0 KB)

The code is attached readEDepSim.C .

Please let me know what is the problem and how to solve this.

regards,
Saradindu

The “TG4PrimaryVertex” class is not a part of ROOT. You need to consult its author(s).

Thank you. I can’t understand where to write.

Could you please advise.

Regards,
Saradindu

Talk to the one who gave you this file and/or your colleagues and/or your supervisor.

BTW. I would try with:
v->GetPosition().Y()
v->GetPosition().Z()
v->GetPosition().T()
v->GetReaction()

Respected Wile,
Thank you very much . It works.

regards,
Saradindu

Respected Wile,

Thank you very much. It works.

regards,
Saradindu