import ROOT, glob, math, sys, os from ROOT import std from array import array outf = "./testdev.root" paramf = "/nfs/hicran/project/panda/SIM/bergerm/fopiroot/tpc/FOPI/par/tpc.run3888.par" rBin = -1 # -1 for calculating all r bins. rBin>0 calculate rbin rBin mom = 3.672 nbinsr = 5 nbinsz = 10 ROOT.gROOT.ProcessLine(".x rootlogon.C") fRun = ROOT.FairRunSim() fRun.SetBeamMom(mom) efield = ROOT.TpcEFieldCyl("/nfs/hicran/project/panda/SIM/bergerm/fopiroot/macro/tpc/FOPI/mberger/last_strip/tpcfield.txt") bfield = ROOT.PndMultiField("FULL") #use FOPI fieldmap #bfield = ROOT.PndConstField(); #bfield.SetField(0.,0.,6.); #bfield.SetFieldRegion(-50,50,-50,50,-2000,2000); bfield.Init() #the actual calculation drifter = ROOT.TpcInhFieldDrifter(efield, bfield, outf, paramf, nbinsr, nbinsz, rBin ) print "Starting the drifter...." print "Writing Deviation Map output to",outf drifter.run()