import argparse, ROOT, math ROOT.gROOT.ProcessLine(".x rootlogon.C") ROOT.gROOT.ProcessLine('gSystem->Load("libPhysics")') ROOT.gROOT.ProcessLine('gStyle->SetPalette(1)') ROOT.gROOT.ProcessLine('gROOT->SetStyle("Plain")') ROOT.gROOT.ProcessLine('gSystem->Load("libGeom")') ROOT.gROOT.LoadMacro("stlPYROOT.h+") tpcField=ROOT.TpcEFieldCyl("FOPI/mberger/last_strip/tpcfield.txt") fieldR=ROOT.TH2D("rfield","rfield",1000,50,150,185,0,18.5) pos=ROOT.TVector3(0,0,0) print pos print tpcField.value(pos) for i in range(1000): for j in range(185): pos=ROOT.TVector3(float(i/10.),float(i/10.),float(j/10.)) #fieldR.Fill(float(i/10.),float(j/10.),tpcField.value(pos)) print tpcField.value(pos)