Namespaces | Functions | Variables
tracks.py File Reference

Go to the source code of this file.

Namespaces

 tracks
 

Functions

def tracks.GetTrackPars (rec, itrk)
 python wrapper for track parameters array N.B. More...
 
def tracks.GetPhi (pos, x0, pars)
 
def tracks.GetDeltaPhi (rec, itrk)
 

Variables

 tracks.tm = ROOT.TreeManager("../structuredtree.root")
 
 tracks.bt = ROOT.Backtracker(tm)
 
 tracks.gen = tm.GetGenTree()
 
 tracks.g4 = tm.GetG4Tree()
 
 tracks.rec = tm.GetRecoTree()
 
 tracks.hntrack = TH1F("hntrack", ";N^{0} tracks per #nu;", 50,-0.5,49.5)
 
 tracks.hnhit = TH1F("hnhit", "TPC track reco; N^{0} hits per track;",200,0.5,1000.5)
 
 tracks.hnvtx = TH1F("hnvtx", ";N^{0} vertices per #nu;", 6,1.5,7.5)
 
 tracks.hnvtxtrk = TH1F("hnvtxtrk",";N^{0} vertices per track;", 5,-0.5,4.5)
 
 tracks.hntrkvtx = TH1F("hntrkvtx",";N^{0} tracks per vertex;", 7,2.5,9.5)
 
 tracks.hx0 = TH1F("hx0", "TPC track reco: fit parameters;x_{0} [cm]", 50,-280,280)
 
 tracks.hy0 = TH1F("hy0", "TPC track reco: fit parameters;y_{0} [cm]", 50,-450,150)
 
 tracks.hz0 = TH1F("hz0", "TPC track reco: fit parameters;z_{0} [cm]", 50,1250,1750)
 
 tracks.hr = TH1F("hr", "TPC track reco: fit parameters;radius in y-z plane [cm]", 100,0,800)
 
 tracks.hphi0 = TH1F("hphi0", "TPC track reco: fit parameters;#phi_{0} [rad]", 40,-20,-20)
 
 tracks.hlambda = TH1F("hlambda", "TPC track reco: fit parameters;#lambda [rad]", 50,-3.2,3.2)
 
 tracks.hdeltaphi = TH1F("hdeltaphi", "TPC track reco: fit parameters;#phi_{end}- #phi_{vertex} [rad]",50,-2*math.pi,2*math.pi)
 
 tracks.hdeltaphilen = TH1F("hdeltaphilen", "TPC track reco: fit parameters;(#phi_{end}- #phi_{vertex})/track length [rad/cm]",50,-0.005,0.005)
 
 tracks.hlength_fwd = TH1F("hlength_fwd",";track length [cm]",100,0,500)
 
 tracks.hlength_bkd = TH1F("hlength_bkd",";track length [cm]",100,0,500)
 
 tracks.hmom_fwd = TH1F("hmom_fwd",";momentum [GeV/c]",100,0,5)
 
 tracks.hmom_bkd = TH1F("hmom_bkd",";momentum [GeV/c]",100,0,5)
 
 tracks.hpval = TH1F("hpval","Track reco;p-value;",100,0,1)
 
 tracks.hpdg = TH1F("hpdg",";PDG code",2800,-500,2300)
 
 tracks.hpdg_max = TH1F("hpdg_max",";PDG code",2800,-500,2300)
 
 tracks.hpdg_max_pval = TH2F("hpdg_max_pval",";track fit p-value;PDG code",40,0,1,2800,-500,2300)
 
 tracks.hng4p = TH1F("hng4p",";number MCParticles matched to track",7,-0.5,6.5)
 
 tracks.hg4mom = TH1F("hg4mom",";momentum per particle [GeV/c]",100,0,5)
 
 tracks.hg4mom_tot_pval = TH2F("hg4mom_tot_pval","TPC track reco;track fit p-value ; p_{true} [GeV/c]",40,0,1,40,0,3)
 
 tracks.hg4mom1 = TH1F("hg4mom1",";maximum single-particle momentum [GeV/c]",100,0,5)
 
 tracks.hg4mom1_frac = TH1F("hg4mom1_frac",";fraction of total momentum held by single-particle max",100,0,1.01)
 
 tracks.hntrkpart = TH1F("hntrkpart", "MCParticle #rightarrow Track ; N^{0} tracks per particle",10,-0.5,9.5)
 
 tracks.hntrkpart_p = TH1F("hntrkpart_p", "MCParticle #rightarrow Track ; N^{0} tracks per particle",9,0.5,9.5)
 
 tracks.hntrkpart_mu = TH1F("hntrkpart_mu", "MCParticle #rightarrow Track ; N^{0} tracks per particle",9,0.5,9.5)
 
 tracks.hntrkpart_pic = TH1F("hntrkpart_pic","MCParticle #rightarrow Track ; N^{0} tracks per particle",9,0.5,9.5)
 
 tracks.hntrkpart_e = TH1F("hntrkpart_e", "MCParticle #rightarrow Track ; N^{0} tracks per particle",9,0.5,9.5)
 
 tracks.hntrkpart_vs_mom = TH2F('hntrkpart_vs_mom','MCParticle #rightarrow Track ; N^{0} tracks per particle; true initial momentum [GeV/c]',10,-0.5,9.5,50,0,3)
 
 tracks.hntrkpart_vs_gyro = TH2F('hntrkpart_vs_gyro','MCParticle #rightarrow Track ; N^{0} tracks per particle;gyroradius [m]',10,-0.5,9.5,50,0,10)
 
 tracks.hnmom1_frac = TH2F("hnmom1_frac",";fraction of total momentum ; number of particles",50,0,1.01,14,0.5,14.5)
 
 tracks.hmomres2d = TH2F("hmomres2d",";P_{true} [GeV/c] ; P_{reco} [GeV/c]",50,0,3,50,0,3)
 
 tracks.hmomres2d_pval = TH2F("hmomres2d_pval",";track fit p-value;p_{true} - p_{reco} [GeV/c]",50,0,1,50,-3,5)
 
 tracks.hmomres2d_frac_pval = TH2F("hmomres2d_frac_pval",";track fit p-value;(p_{true} - p_{reco})/p_{true}",50,0,1,50,-1,1)
 
 tracks.hmomres_diff = TH1F("hmomres_diff","TPC track reco; p_{true} - p_{reco} [GeV/c];",80,-3,5)
 
 tracks.hmomres_frac = TH1F("hmomres_frac","TPC track reco; ( p_{true} - p_{reco})/p_{true};",60,-1,1)
 
 tracks.hxdiff = TH1F("hxdiff","TPC track reco;true - reco [cm]",100,-35,35)
 
 tracks.hydiff = TH1F("hydiff","TPC track reco;true - reco [cm]",100,-35,35)
 
 tracks.hzdiff = TH1F("hzdiff","TPC track reco;true - reco [cm]",100,-35,35)
 
 tracks.pval = ROOT.TMath.Prob(rec.TrackChiSqrFwd(itrk),rec.NTrackHit(itrk)-5)
 
 tracks.trkpars = GetTrackPars(rec,itrk)
 
 tracks.trkvtx = rec.TrackVertex(itrk)
 
 tracks.ig4ps = bt.TrackToG4Particles(itrk)
 
int tracks.imax = 0
 
int tracks.maxp = -1
 
int tracks.sump = 0
 
 tracks.posbeg = rec.TrackVertex(itrk)
 
 tracks.posend = rec.TrackEnd(itrk)
 
 tracks.trueposbeg = rec.TrackTruePosBeg(itrk);
 
 tracks.trueposend = rec.TrackTruePosEnd(itrk);
 
 tracks.itrks = bt.G4ParticleToTracks(ig4p)
 
int tracks.ntracks = 0
 
 tracks.clength = TCanvas()
 
 tracks.cmom = TCanvas()
 
 tracks.cng4p = TCanvas()
 
 tracks.cg4mom = TCanvas()
 
 tracks.cg4mom1 = TCanvas()
 
 tracks.cg4mom1_frac = TCanvas()
 
 tracks.cnmom1_frac = TCanvas()
 
 tracks.cmomres2d = TCanvas()
 
 tracks.cpdg = TCanvas()
 
 tracks.cntrkpart = TCanvas()
 
 tracks.leg = ROOT.TLegend(0.65,0.4,0.8,0.75)
 
 tracks.cmomres_diff = TCanvas()
 
 tracks.cmomres_frac = TCanvas()
 
 tracks.cntrack = TCanvas()
 
 tracks.cnhit = TCanvas()
 
 tracks.cmomres2d_pval = TCanvas()
 
 tracks.cg4mom_tot_pval = TCanvas()
 
 tracks.cpdg_max_pval = TCanvas()
 
 tracks.cposdiff = TCanvas()
 
 tracks.legdiff = ROOT.TLegend(0.2,0.6,0.35,0.85)
 
 tracks.cpval = TCanvas()
 
 tracks.cmomfracres2d_pval = TCanvas()
 
 tracks.cnvtx = TCanvas()
 
 tracks.cnvtxtrk = TCanvas()
 
 tracks.cntrkvtx = TCanvas()
 
 tracks.cx0 = TCanvas()
 
 tracks.cy0 = TCanvas()
 
 tracks.cz0 = TCanvas()
 
 tracks.cr = TCanvas()
 
 tracks.cphi0 = TCanvas()
 
 tracks.clambda = TCanvas()
 
 tracks.cdeltaphi = TCanvas()
 
 tracks.cdeltaphilen = TCanvas()
 
 tracks.cntrkpart_vs_mom = TCanvas()
 
 tracks.prof = hntrkpart_vs_mom.ProfileX()
 
 tracks.cntrkpart_vs_gyro = TCanvas()
 
 tracks.null = input("press <Enter> to close canvas and exit program.")
 ask for user input as a way to keep the program from ending so we can see the histogram. More...