diff --git a/Katerina/AnalyseThat.py b/Katerina/AnalyseThat.py new file mode 100644 index 0000000..b60fd8a --- /dev/null +++ b/Katerina/AnalyseThat.py @@ -0,0 +1,57 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +import numpy as n +from ShipGeoConfig import ConfigRegistry +chi2CutOff = 4. +PDG = ROOT.TDatabasePDG.Instance() +inputFile = None +geoFile = None +dy = None +nEvents = 99999 +fiducialCut = False +measCut = 25 + +try: + opts, args = getopt.getopt(sys.argv[1:], "n:f:g:A:Y:i", ["nEvents=","geoFile="]) +except getopt.GetoptError: + # print help information and exit: + print ' enter file name' + sys.exit() +for o, a in opts: + if o in ("-f"): + inputFile = a + if o in ("-g", "--geoFile"): + geoFile = a + if o in ("-Y"): + dy = float(a) + if o in ("-n", "--nEvents="): + nEvents = int(a) + +if not dy: + # try to extract from input file name + tmp = inputFile.split('.') + try: + dy = float( tmp[1]+'.'+tmp[2] ) + except: + dy = None +else: + inputFile = 'ship.'+str(dy)+'.Pythia8-TGeant4_rec.root' + +if not geoFile: + geoFile = inputFile.replace('ship.','geofile_full.').replace('_rec.','.') + +f = ROOT.TFile(inputFile) +sTree = f.cbmsim + + + +from LoopAnalyse import LoopAnalyse +la = LoopAnalyse(sTree, dy, geoFile, debug=0, + plotField = False, + plotTracking = False, + plotVertex = True, + plotVertexDetailed = False, + plotMomentum = True, + compareFits = True) +la.Loop(nEvents) \ No newline at end of file diff --git a/Katerina/BookHistos.py b/Katerina/BookHistos.py new file mode 100644 index 0000000..56a8c25 --- /dev/null +++ b/Katerina/BookHistos.py @@ -0,0 +1,381 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +import RecoSettings +def SetGrid(pad): + pad.SetGridx() + pad.SetGridy() + +def SetAxis(histo): + histo.GetXaxis().SetTitleSize(.06) + histo.GetYaxis().SetTitleSize(.06) + histo.GetXaxis().SetTitleOffset(1.3) + histo.GetYaxis().SetTitleOffset(1.3) + histo.GetXaxis().SetNdivisions(5) + histo.GetYaxis().SetNdivisions(5) + + +################################################################################### +################################################################################### +################################################################################### +def bookMFieldHistos(h): + #ax0 = ';#chi^{2}/ndf;(P_{MCthuth}-P_{RECO})/P_{MCtruth}' + #ax = ';P_{MCthuth} [GeV];(P_{MCthuth}-P_{RECO})/P_{MCtruth}' + colour = {"fit":2, "sim":1} + for fall in ["fit", "sim"] : + ut.bookHist(h,'magZ' +fall, 'Field.Mag() vs Z at (0,0)'+fall+';z [cm];|B| [T]', 3000, 1000, 4000,200,0,2) + h['magZ'+fall].SetLineColor(colour[fall]) + h['magZ'+fall].SetMarkerColor(colour[fall]) + ut.bookHist(h,'magXY1'+fall, 'Field.Mag() vs (X,Y) at Z=2500 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300) + ut.bookHist(h,'magXY2'+fall, 'Field.Mag() vs (X,Y) at Z=2800 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300) + ut.bookHist(h,'magXY3'+fall, 'Field.Mag() vs (X,Y) at Z=3000 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300) + for histo in h: + SetAxis(h[histo]) + h[histo].SetLineColor(1) + h[histo].SetMarkerStyle(20) + +################################################################################### +def plotMFieldHistos(h): + ROOT.gStyle.SetStatY(0.9) + ROOT.gStyle.SetStatX(0.9) + ROOT.gStyle.SetStatW(0.3) + ROOT.gStyle.SetStatH(0.2) + ROOT.gStyle.SetPadBottomMargin(0.2) + ROOT.gStyle.SetPadLeftMargin(0.2) + ROOT.gStyle.SetPadRightMargin(0.2) + + ROOT.gStyle.SetOptStat(0) + ut.bookCanvas(h,"mfield1","mfield1",nx=600,ny=600,cx=1,cy=1) + cv = h['mfield1'].cd(1) + h['magZsim'].Draw("") + h['magZfit'].Draw("sames") + h['mfield1'].Print('mfield1.gif') + + ut.bookCanvas(h,"mfield2","mfield2",nx=1200,ny=800,cx=3,cy=2) + pad = 0 + for fall in ["fit", "sim"] : + for ci in range (1,4): + pad+=1 + cv = h['mfield2'].cd(pad) + h['magXY'+str(ci)+fall].Draw("colz") + h['mfield2'].Print('mfield2.gif') + + +################################################################################### +################################################################################### +################################################################################### +def bookMomentumHistos(h,prefix=""): + ax0 = ';#chi^{2}/ndf;(P_{MCthuth}-P_{RECO})/P_{MCtruth}' + ax = ';P_{MCthuth} [GeV];(P_{MCthuth}-P_{RECO})/P_{MCtruth}' + ut.bookHist(h,'delPOverP0'+prefix, 'dP/P vs #chi^{2}/ndf'+prefix+ax0, 500,0.,50.,100,-0.5,0.5) + ut.bookHist(h,'delPOverP1'+prefix, 'dP/P'+prefix+ax,100,0.,50.,100,-0.5,0.5) + ut.bookHist(h,'delPOverP2'+prefix, 'dP/P ndf>'+str(RecoSettings.trackMinNofHits)+prefix+ax,100,0.,50.,100,-0.5,0.5) + ut.bookHist(h,'delPOverP3'+prefix, 'dP/P cleaned #chi^{2}/ndf<'+str(RecoSettings.chi2CutOff)+prefix+ax,100,0.,50.,100,-0.5,0.5) + ut.bookHist(h,'MomRes'+prefix, 'MomRes'+prefix+';P_{MCthuth} [GeV];#sigma_{Gauss}(#DeltaP/P)',5,0.,50.) + for i in range (1,6): + hhname='delPOverP3_'+str(i)+prefix + cond ='P_{MCtruth} < '+str(i*10)+" GeV" + ut.bookHist(h, hhname, cond+';(P_{MCthuth}-P_{RECO})/P_{MCtruth}', 200, -.2, .2) + h[hhname].StatOverflows(True) # to include overflow/underflow in mean/sigma (range independence) + + for histo in h: + h[histo].Sumw2() + h[histo].SetLineColor(1) + h[histo].SetMarkerStyle(20) + +################################################################################### +def plotMomentumHistos(h,prefix=""): + ROOT.gStyle.SetStatY(0.9) + ROOT.gStyle.SetStatX(0.9) + ROOT.gStyle.SetStatW(0.3) + ROOT.gStyle.SetStatH(0.2) + ROOT.gStyle.SetPadBottomMargin(0.2) + ROOT.gStyle.SetPadLeftMargin(0.2) + + ROOT.gStyle.SetOptStat(10) + ut.bookCanvas(h,key='momentum1'+prefix,title='momentum1'+prefix,nx=1000,ny=800,cx=2,cy=2) + for cid in range (1,5): + cv = h['momentum1'+prefix].cd(cid) + hname = 'delPOverP'+str(cid-1)+prefix + h[hname].Draw("box") + SetAxis(h[hname]) + if(cid==1): + cv.SetLogx() + h[hname].GetXaxis().SetRangeUser(.01,50) + h['momentum1'+prefix].Print('momentum1'+prefix+'.gif') + + ROOT.gStyle.SetStatY(0.93) + ROOT.gStyle.SetStatX(0.99) + ROOT.gStyle.SetStatW(0.4) + ROOT.gStyle.SetStatH(0.35) + f={} + key='momentum2'+prefix + ut.bookCanvas(h,key,title=key,nx=1200,ny=1200,cx=3,cy=2) + rname = 'MomRes'+prefix + for cvn in range (1,6): + hname='delPOverP3_'+str(cvn)+prefix + cv = h[key].cd(cvn) + h[hname].Draw("E") + SetAxis(h[hname]) + ROOT.gStyle.SetOptFit(11111) + f[hname] = ROOT.TF1(hname,'gaus',-.05, .05) + f[hname].SetParameter(1,0.) + f[hname].SetNpx(1000) + h[hname].Fit(f[hname],"R") + print "fit", f[hname].GetParameter(2), f[hname].GetParError(2) + h[rname].SetBinContent(cvn, f[hname].GetParameter(2)) + h[rname].SetBinError (cvn, f[hname].GetParError(2)) + h[key].Print(key+'.gif') + + ROOT.gStyle.SetOptStat(0) + ROOT.gStyle.SetOptTitle(0) + ut.bookCanvas(h,'momentum3'+prefix,title='momentum3'+prefix,nx=600,ny=600,cx=1,cy=1) + h[rname].Draw('E') + SetAxis(h[rname]) + h[hname].GetYaxis().SetTitleOffset(1.5) + h['momentum3'+prefix].Print('momentum3'+prefix+'.gif') + + + + + + + + + +################################################################################### +################################################################################### +################################################################################### +def bookCompareFitHistos(h): + ut.bookHist(h,'dNFoldFNnew', 'Number of fitted tracks;N(old);N(new)', + 10, -1, 9, 10, -1, 9) + h['dNFoldFNnew'].SetMarkerSize(1.8) + ut.bookHist(h,'FitCorrespondence', 'CorrespondenceBins: 0,5-ok', + 10, -1, 9) + ut.bookHist(h,'NDFold', 'NDF old Fit;NDF', 140, 0, 70) + ut.bookHist(h,'NDFnew', 'NDF new Fit;NDF', 140, 0, 70) + ut.bookHist(h,'Chi2NDFold', '#chi^{2}/NDF old Fit;#chi^{2}/NDF', 200, 0, 20) + ut.bookHist(h,'Chi2NDFnew', '#chi^{2}.NDF old Fit;#chi^{2}/NDF', 200, 0, 20) + style={'old':0,'new':1} + for name in ('NDF','Chi2NDF'): + for st in style: + h[name+st].SetLineColor(1+style[st]) + h[name+st].SetMarkerColor(1+style[st]) + h[name+st].SetMarkerStyle(22+style[st]) + for histo in h: + h[histo].Sumw2() + h[histo].SetLineWidth(2) + + +################################################################################### +def plotCompareFitHistos(h): + ROOT.gStyle.SetStatY(0.9) + ROOT.gStyle.SetStatX(0.9) + ROOT.gStyle.SetStatW(0.3) + ROOT.gStyle.SetStatH(0.2) + ROOT.gStyle.SetOptStat(11) + ut.bookCanvas(h,key='FitCompare',title='FitCompare',nx=800,ny=800,cx=2,cy=2) + cv = h['FitCompare'].cd(1) + cv.SetLogz() + h['dNFoldFNnew'].Draw('coltext') + cv = h['FitCompare'].cd(2) + cv.SetLogy() + h['FitCorrespondence'].Draw() + cv = h['FitCompare'].cd(3) + cv.SetLogy() + h['NDFold'].Draw() + h['NDFnew'].Draw("sames") + cv = h['FitCompare'].cd(4) + cv.SetLogx() + cv.SetLogy() + h['Chi2NDFold'].Draw() + h['Chi2NDFnew'].Draw("sames") + h['FitCompare'].Print('FitCompare.gif') + + + + + + + + + +################################################################################### +################################################################################### +################################################################################### +def bookTrackingHistos(h): + ut.bookHist(h,'dxdyALLTrHm', 'dxdy(MCtr,firstHit)@firstHitZ - all-;dx [cm];dy [cm]', + 2000, -100, 100, 2000, -100, 100) + ut.bookHist(h,'dxdyALLTrHp', 'dxdy(MCtr,firstHit)@firstHitZ - all+;dx [cm];dy [cm]', + 2000, -100, 100, 2000, -100, 100) + + ut.bookHist(h,'dxdyHNLTrHm', 'dxdy(MCtr,firstHit)@firstHitZ - HNL-;dx [cm];dy [cm]', + 2000, -100, 100, 2000, -100, 100) + ut.bookHist(h,'dxdyHNLTrHp', 'dxdy(MCtr,firstHit)@firstHitZ - HNL+;dx [cm];dy [cm]', + 2000, -100, 100, 2000, -100, 100) + + ut.bookHist(h,'dRvsPz', 'dR(MCtr,firstHit)@firstHitZ vs Pz;Pz_{MC} [GeV];dR [cm]', + 1000, 0, 50, 1000, 0, 100) + ut.bookHist(h,'dRvsZhit', 'dR(MCtr,firstHit)@firstHitZ vs firstHitZ;Z_{Hit0} [cm];dR [cm]', + 2400, 2500, 3700, 1000, 0, 100) + + ut.bookHist(h,'YMC2dZMCVer', 'abs(YMCprop)/dZMCVer - HNL', 2000, 0,10) + + for histo in h: + h[histo].Sumw2() + h[histo].SetLineColor(1) + +################################################################################### +def plotMCTrackHitCorrelation(h): + ROOT.gStyle.SetStatY(0.9) + ROOT.gStyle.SetStatX(0.9) + ROOT.gStyle.SetStatW(0.3) + ROOT.gStyle.SetStatH(0.2) + ROOT.gStyle.SetOptStat(11) + + ut.bookCanvas(h,key='dRCanvas',title='dRCanvas',nx=1200,ny=600,cx=2,cy=1) + ROOT.gStyle.SetOptStat(1) + cv = h['dRCanvas'].cd(1) + h['dRvsPz'].Draw('colzbox') + cv = h['dRCanvas'].cd(2) + h['dRvsZhit'].Draw('colzbox') + h['dRCanvas'].Print('dRCanvas.gif') + + ROOT.gStyle.SetOptStat(11) + ut.bookCanvas(h,key='ratioYZ',title='ratioYZ',nx=600,ny=600,cx=1,cy=1) + ROOT.gStyle.SetOptStat(1) + cv = h['ratioYZ'].cd(1) + h['YMC2dZMCVer'].Draw() + h['ratioYZ'].Print('ratioYZ.gif') + + for x in ['ALL','HNL']: + ut.bookCanvas(h,key='MCTrackHit'+x,title='MCTrackHit'+x,nx=800,ny=800,cx=2,cy=2) + ROOT.gStyle.SetOptStat(1) + cv = h['MCTrackHit'+x].cd(1) + h['dxdy'+x+'TrHp'].Draw('colz') + cv = h['MCTrackHit'+x].cd(2) + h['dxdy'+x+'TrHm'].Draw('colz') + cv = h['MCTrackHit'+x].cd(3) + SetGrid(cv) + hh=h['dxdy'+x+'TrHp'].DrawCopy('colz') + for ax in [hh.GetXaxis(), hh.GetYaxis()]: + ax.SetRangeUser(-5,5) + cv = h['MCTrackHit'+x].cd(4) + SetGrid(cv) + hh=h['dxdy'+x+'TrHm'].DrawCopy('colz') + for ax in [hh.GetXaxis(), hh.GetYaxis()]: + ax.SetRangeUser(-5,5) + h['MCTrackHit'+x].Print('MCTrackHit'+x+'.gif') + + + + + + + + +################################################################################### +################################################################################### +################################################################################### +def bookVertexHistos(h, prefix=""): + if prefix=="NEW": + ut.bookHist(h,'docaRel'+prefix, 'docaRel'+prefix+";step;doca/doca0", 5, 0, 5, 2000, 0., 2.) + ut.bookHist(h,'doca' +prefix, 'doca' +prefix+";doca [cm]", 500, 0., 100.) + h['doca'+prefix].SetLineColor(2) + ut.bookHist(h,'doca0' +prefix, 'doca0' +prefix+";doca0 [cm]", 500, 0., 100.) + ut.bookHist(h,'vdx2'+prefix, 'vdx2'+prefix, 500, 0, 5000, 400, -20., 20.) + ut.bookHist(h,'vdy2'+prefix, 'vdy2'+prefix, 500, 0, 5000, 400, -20., 20.) + ut.bookHist(h,'vdz2'+prefix, 'vdz2'+prefix, 500, 0, 5000, 4000, -400., 400.) + ut.bookHist(h,'vdx2ndf'+prefix, 'vdx2ndf'+prefix, 500, 0, 5000, 400, -20., 20.) + ut.bookHist(h,'vdy2ndf'+prefix, 'vdy2ndf'+prefix, 500, 0, 5000, 400, -20., 20.) + ut.bookHist(h,'vdz2ndf'+prefix, 'vdz2ndf'+prefix, 500, 0, 5000, 4000, -400., 400.) + if ( (prefix=="mUP") or (prefix=="mDN") ) : return + for i in range (1,11): + hhname='vdx2_'+str(i)+prefix + ut.bookHist(h, hhname, hhname, 100, -20., 20.) + h[hhname].StatOverflows(True) # to include overflow/underflow in mean/sigma (range independence) + hhname='vdy2_'+str(i)+prefix + ut.bookHist(h, hhname, hhname, 100, -20., 20.) + h[hhname].StatOverflows(True) + hhname='vdz2_'+str(i)+prefix + ut.bookHist(h, hhname, hhname, 200, -400., 400.) + h[hhname].StatOverflows(True) + for coord in ('x','y','z') : + hname = "vres"+coord+prefix + ut.bookHist(h, hname, hname+"z_{0}-z_{truth} [cm];", 10, 0., 5000.) + for histo in h: + h[histo].Sumw2() + h[histo].SetLineColor(1) + + +################################################################################### +def plotVertexHistos(h,prefix=""): + ROOT.gStyle.SetStatY(0.9) + ROOT.gStyle.SetStatX(0.9) + ROOT.gStyle.SetStatW(0.3) + ROOT.gStyle.SetStatH(0.1) + ROOT.gStyle.SetOptStat(1) + + coordTitle = {1:'x',2:'y',3:'z'} + cut = {0:'',1:'ndf'} + ut.bookCanvas(h,key='vertex2'+prefix,title='vertex2'+prefix,nx=600,ny=1200,cx=2,cy=3) + for fall in cut: + for cid in coordTitle.keys(): + cv = h['vertex2'+prefix].cd(cid*2-1+fall) + cv.SetBottomMargin(0.2) + cv.SetLeftMargin(0.2) + hname = 'vd'+coordTitle[cid]+'2'+cut[fall]+prefix + h[hname].Draw("box") + h[hname].GetXaxis().SetTitle("z_{0}-z_{truth} [cm]") + ytitle = coordTitle[cid]+"_{truth}-v"+coordTitle[cid]+"_{reco} [cm]" + h[hname].GetXaxis().SetTitleSize(.06) + h[hname].GetYaxis().SetTitleSize(.06) + h[hname].GetYaxis().SetTitleOffset(1.3) + h[hname].GetYaxis().SetNdivisions(5) + h['vertex2'+prefix].Print('vertex2'+prefix+'.gif') + if ( (prefix=="mUP") or (prefix=="mDN") ) : return + + f={} + for ct in coordTitle.values(): + key =ct+prefix + ut.bookCanvas(h,key,title=key,nx=1600,ny=1200,cx=5,cy=2) + f[key]={} + for cvn in range (1,11): + hname='vd'+ct+'2_'+str(cvn)+prefix + cv = h[key].cd(cvn) + cv.SetBottomMargin(0.2) + h[hname].Draw("E") + xtitle = "v"+ct+"_{truth}-v"+ct+"_{reco} [cm]" + h[hname].GetXaxis().SetTitle(xtitle) + h[hname].GetXaxis().SetTitleSize(.06) + ROOT.gStyle.SetOptFit(11111) + f[key][hname] = ROOT.TF1(hname,'gaus') + f[key][hname].SetNpx(1000) + f[key][hname].SetParameter(1,0.) + f[key][hname].SetParameter(2,0.2*cvn) + h[hname].Fit(f[key][hname]) + rmsht='vres'+key + #h[rmsht].SetBinContent(cvn, h[hname].GetRMS()) + #h[rmsht].SetBinError (cvn, h[hname].GetRMSError()) + h[rmsht].SetBinContent(cvn, f[key][hname].GetParameter(2)) + h[rmsht].SetBinError (cvn, f[key][hname].GetParError(2)) + h[key].Print(ct+prefix+'.gif') + + key='vRes'+prefix + ut.bookCanvas(h,key,title='vRes'+prefix,nx=800,ny=800,cx=2,cy=2) + for cti in coordTitle : + cv = h[key].cd(cti) + rmsht ="vres"+coordTitle[cti]+prefix + h[rmsht].SetTitle("vertex "+coordTitle[cti]+" resolution;z_{0}-z_{truth} [cm];#sigma_{Gauss}(#Delta"+coordTitle[cti]+") [cm]") + h[rmsht].Draw("E") + h[key].Print(key+'.gif') + + if ( prefix=='NEW' ) : + key='docaPlots'+prefix + ut.bookCanvas(h,key,key,nx=1200,ny=600,cx=2,cy=1) + cv = h[key].cd(1) + h['doca'+prefix].Draw() + h['doca0'+prefix].Draw("sames") + cv = h[key].cd(2) + h['docaRel'+prefix].Draw() + h[key].Print(key+'.gif') diff --git a/Katerina/FitTrackInfo.py b/Katerina/FitTrackInfo.py new file mode 100644 index 0000000..9e979be --- /dev/null +++ b/Katerina/FitTrackInfo.py @@ -0,0 +1,158 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u + +class FitTrackInfo(object): + + def __init__(self, tree, debug=0): + self.tree = tree + self.debug = debug + self.count = 0 + self.Momentum = {} + self.Direction = {} + self.Position = {} + self.__info = {} + self.Vertex = None + self.Doca = None + # 0 orig, 1 refit, -1 failed refit + self.vertexEFlag = 0 + + def clean(self): + self.count = 0 + self.Momentum.clear() + self.Direction.clear() + self.Position.clear() + self.__info.clear() + self.Vertex = None + self.Doca = None + + def Print(self): + print "FitTrackInfo:" + for tid in self.__info: + print "\t", tid, "{:10.4f}".format(self.__info[tid]['Ndf']), "{:10.4f}".format(self.__info[tid]['Chi2']), + print " pos:", " ".join("{:10.4f}".format(self.Position[tid](ii)) for ii in range(0,3)), + print " mom:", " ".join("{:10.4f}".format(self.Direction[tid](ii)*self.Momentum[tid]) for ii in range(0,3)), + print " P:", "{:10.4f}".format(self.Momentum[tid]) + + ## \brief returns list of keys #__info . + # \return list of MCtrackIDs of fitted tracks. + def getTrIDs(self): + trID = [] + for tid in self.__info: + trID.append(tid) + return trID + + def getNtracks(self) : + return len(self.__info) + + def getChi2Ndf(self, tid): + return self.__info[tid]['Chi2']/self.__info[tid]['Ndf'] + + def getNdf(self, tid): + return self.__info[tid]['Ndf'] + + def compareTracks(self, tid, Pos, Dir, Pval): + false2 = (Pos==None or Dir==None or Pval==None) + false1 = (not tid in self.__info) + if (false2 and false1): return True + if (false2 or false1): return False + return ( (self.Direction[tid]==Dir) and (self.Position[tid]==Pos) and (self.Momentum[tid]==Pval) ) + + + def getPosDirPval(self, tid): + if not tid in self.__info: return None, None, None + return self.Position[tid], self.Direction[tid], self.Momentum[tid] + + def getVertex(self) : + return self.Vertex + + def getDoca(self): + return self.Doca + + def myVertex2(self, t1,t2): + deltaPos =(self.Position[t1]-self.Position[t2]) # A1-A2 + dotDir = self.Direction[t1].Dot(self.Direction[t2]) # a1.a2 + crossDir = self.Direction[t1].Cross(self.Direction[t2]) # a1xa2 + uPerpend = crossDir*(1./crossDir.Mag()) # (a1xa2)/|a1xa2| from a1 to a2 + + minDist = deltaPos.Dot(uPerpend) # (A1-A2).(a1xa2)/|a1xa2| + + # A1 + a1*t1 + (minDist * uPerpend) is (A1 + a1*t1) projected to the plane: + # 1) A2+a2*t2 belons to the plane, + # 2) A1+a1*t1 is parallel to the plane + # cross at t1,t2: A1+a1*t1+(minDist*uPerpend) = A2+a2*t2 + t2X = self.Direction[t2].X() + if (t2X == 0) : t2X = 0.00000000001 + a2a = self.Direction[t2].Y()/t2X + alpha = deltaPos - minDist*uPerpend + nomin = alpha.Y() - a2a*alpha.X() + denom = a2a*self.Direction[t1].X() - self.Direction[t1].Y() + s1 = nomin/denom + s2 = ( alpha.X() + self.Direction[t1].X()*s1 ) / t2X#self.Direction[t2].X() + vec1 = self.Position[t1]+s1*self.Direction[t1] + vec2 = self.Position[t2]+s2*self.Direction[t2] + ave = (vec1+vec2)*0.5 + dif = vec1-vec2 + debugNeed = False + if(abs(abs(minDist)-dif.Mag())>0.00000001): + print "myVertex2 - problem:" + debugNeed = True + if(self.debug>2 or debugNeed): + for tid in (t1,t2): + print str(tid)+": Pos : ", "".join(str(self.Position[tid](ii)) +" " for ii in range(0,3)), + print "\t\tMom : ", "".join(str(self.Direction[tid](ii))+" " for ii in range(0,3)) + print "uPerpend: ","".join(str(uPerpend(ii))+" " for ii in range(0,3)) + if(self.debug>0 or debugNeed): + print "fit vertex: -> 1st poing : ", vec1.X(), vec1.Y(), vec1.Z() + print "fit vertex: -> 2nd point : ", vec2.X(), vec2.Y(), vec2.Z() + print "fit vertex: -> average : ", ave.X(), ave.Y(), ave.Z() + print "distance", abs(minDist), dif.Mag() + return ave, abs(minDist) + + + def readEvent(self): + self.clean() + indx = -1 + for atrack in self.tree.FitTracks: + # kill tracks outside fiducial volume + # if not checkFiducialVolume(sTree,key,dy): continue + fitStatus = atrack.getFitStatus() + if not fitStatus.isFitConverged() : continue + + indx+=1 + mcTrID = self.tree.fitTrack2MC[indx] + + self.__info[mcTrID] = {} + self.__info[mcTrID]['Ndf'] = fitStatus.getNdf() + self.__info[mcTrID]['Chi2'] = fitStatus.getChi2() + + fittedState = atrack.getFittedState() + self.Momentum[mcTrID] = fittedState.getMomMag() + self.Direction[mcTrID] = fittedState.getDir() + self.Position[mcTrID] = fittedState.getPos() + + if(indx>0): + if(indx==1): + self.createVertex(self.__info.keys()[0], self.__info.keys()[1]) + else: + pass + #print "More than 2 fitterd tracks" + return len(self.__info) + + def createVertex(self, tid1, tid2, flag=0): + if( (tid1 in self.__info) and (tid2 in self.__info) ): + self.Vertex, self.Doca = self.myVertex2(tid1, tid2) + self.vertexEFlag = flag + + def addNewTrack(self, mcTrID, position, direction, Pval, ndf, chi2, verb = True): + if (verb and mcTrID in self.Momentum): + print "FotTrackInfo WARNING - trID ", mcTrID, "already filled! Will rewrite all records for this trID!" + + self.__info[mcTrID]={} + self.__info[mcTrID]['Ndf'] = ndf + self.__info[mcTrID]['Chi2'] = chi2 + + self.Momentum[mcTrID] = Pval + self.Direction[mcTrID] = direction + self.Position[mcTrID] = position + \ No newline at end of file diff --git a/Katerina/LoopAnalyse.py b/Katerina/LoopAnalyse.py new file mode 100644 index 0000000..19d115c --- /dev/null +++ b/Katerina/LoopAnalyse.py @@ -0,0 +1,421 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +import numpy as n +import collections + +from ShipGeoConfig import ConfigRegistry +import shipDet_conf + +import BookHistos + +from MCTrackInfo import MCTrackInfo +from StrawHits import StrawHits +from FitTrackInfo import FitTrackInfo + +import RecoSettings + + +class LoopAnalyse(object): + def __init__(self, tree, pref, geoFile, debug=0, + plotField = False, + plotTracking = False, + plotVertex = False, + plotVertexDetailed = False, + plotMomentum = False, + compareFits = False): + self.tree = tree + self.debug = debug + + self.modules = None + self.ShipGeo = None + self.run = None + self.createGeom(pref, geoFile) + + self.stat = collections.OrderedDict() + + self.hmagnet = {} + self.htrck = {} + self.hvtx = {} + self.hmom = {} + self.hcmfits = {} + self.plotField = False + self.plotTracking = False + self.plotVertex = False + self.plotVertexCh = False + self.plotMomentum = False + self.compareFits = False + + + if plotField: + self.plotField = True + BookHistos.bookMFieldHistos(self.hmagnet) + if plotTracking: + self.plotTracking = True + BookHistos.bookTrackingHistos(self.htrck) + if plotVertex: + self.plotVertex = True + BookHistos.bookVertexHistos(self.hvtx) + if plotVertexDetailed: + self.plotVertexCh = True + BookHistos.bookVertexHistos(self.hvtx,"mUp") + BookHistos.bookVertexHistos(self.hvtx,"mDn") + + if plotMomentum: + self.plotMomentum = True + BookHistos.bookMomentumHistos(self.hmom) + if compareFits: + self.compareFits = True + BookHistos.bookCompareFitHistos(self.hcmfits) + if plotVertex : BookHistos.bookVertexHistos(self.hvtx, "NEW") + if plotMomentum: BookHistos.bookMomentumHistos(self.hmom, "NEW") + + self.MCTracks = MCTrackInfo(self.tree, 0)#self.debug) + self.StrHits = StrawHits(self.tree, self.modules, self.ShipGeo.straw.resol, self.debug, self.hmagnet, self.ShipGeo) + self.FitTracks = FitTrackInfo(self.tree, 0)#self.debug) + # FIXneeded - to introduce one more FixTracks! + + + def createGeom(self,pref, geoFile): + self.ShipGeo = ConfigRegistry.loadpy("$FAIRSHIP/geometry/geometry_config.py", Yheight = pref ) + self.run = ROOT.FairRunSim() + self.modules = shipDet_conf.configure(self.run,self.ShipGeo) + tgeom = ROOT.TGeoManager("Geometry", "Geane geometry") + gMan = tgeom.Import(geoFile) + geoMat = ROOT.genfit.TGeoMaterialInterface() + ROOT.genfit.MaterialEffects.getInstance().init(geoMat) + volDict = {} + i=0 + for x in ROOT.gGeoManager.GetListOfVolumes(): + volDict[i]=x.GetName() + i+=1 + + bfield = ROOT.genfit.BellField(self.ShipGeo.Bfield.max ,self.ShipGeo.Bfield.z,2, self.ShipGeo.Yheight/2.) + fM = ROOT.genfit.FieldManager.getInstance() + fM.init(bfield) + + + + def CleanStat(self): + self.stat['total'] = 0 + self.stat['HNLnTr'] = 0 + self.stat['HNLzAcc'] = 0 + self.stat['HNLeAcc'] = 0 + self.stat['twoFitsO'] = 0 + self.stat['twoFitsN'] = 0 + self.stat['twoFitsNdfO'] = 0 + self.stat['twoFitsNdfN'] = 0 + + def writeHistos(self): + ut.writeHists(htrck,"LoopA.root") + + + + + def hitMCtrackCorellations(self, weight=1): + # FIXneeded - add HNL vertex distribution plots! + if ( not self.plotTracking): + print "hitMCtrackCorellations does nothing since BookHistos.bookTrackingHistos() was not called!" + return + for tid in self.StrHits.getTrIDs(): # only multi-hits>25 tracks + if ( self.StrHits.checkVetoHits(tid) > 0) : continue # remove ones with vetoStattion + vec3h = self.StrHits.getStartHit(tid) + vec3p = self.MCTracks.getTrackPropagation(tid, vec3h.Z()) + if(self.debug>0): + print "extr.", tid, "\t", vec3p.X(), vec3p.Y(), vec3p.Z(), + print "\tcharge:", self.MCTracks.getCharge(tid), "\tdx=", vec3p.X()-vec3h.X(), "dy=", vec3p.Y()-vec3h.Y() + dR = ROOT.TMath.Sqrt( (vec3p.X()-vec3h.X())**2 + (vec3p.Y()-vec3h.Y())**2 ) + self.htrck['dRvsPz'].Fill(self.MCTracks.getMomentum(tid).Z(), dR, weight) + self.htrck['dRvsZhit'].Fill(vec3h.Z(), dR, weight) + charge = self.MCTracks.getCharge(tid) + theRatio = abs(vec3p.Y())/(vec3h.Z()-self.MCTracks.getHNLdecayVertex().Z()) + HNLflag = tid in self.MCTracks.getHNLdecayTrIDs() + if HNLflag: + self.htrck['YMC2dZMCVer'].Fill(theRatio,weight) + if charge<0: + self.htrck['dxdyALLTrHm'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight) + if HNLflag: + self.htrck['dxdyHNLTrHm'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight) + elif charge>0: + self.htrck['dxdyALLTrHp'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight) + if HNLflag: + self.htrck['dxdyHNLTrHp'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight) + + + + def fitMCvertexCorellations(self, weight=1, old=True, cut=False, detailed=False): + if( cut and detailed ) : print "fitMCvertexCorellations can't plot detailed vertex for cut! FIX me!" + vMC = self.MCTracks.getHNLdecayVertex() + if old : + vFt = self.FitTracks.getVertex() + else : + vFt = self.StrHits.getReFitVertex() + if (not vFt or not vMC) : return + + if(self.plotVertex or self.plotVertexCh): + distanceToTracker = self.ShipGeo.TrackStation1['z']-vMC.Z() + coord = ['x','y','z'] + iz = 1 + while ( (iz<11) and (distanceToTracker>iz*500) ): + iz = iz+1 + + pref="" + prefCut="" + if( cut ) : prefCut='ndf' + if( not old ): pref='NEW' + for i in range(0,3): + delta = vMC(i)-vFt(i) + if( self.plotVertex ): + hname = 'vd'+coord[i]+'2'+prefCut+pref + self.hvtx[hname].Fill(distanceToTracker, delta, weight) + if (not cut): + if (iz<11): + hname='vd'+coord[i]+'2_'+str(iz)+pref + self.hvtx[hname].Fill(delta, weight) + + if( self.plotVertexCh and old ): + sign = self.MCTracks.checkVertexUpDown() + if ( sign==0 ): continue + if ( sign<0) : + pref = "mUp" + else: + pref = "mDn" + hname = 'vd'+coord[i]+'2'+pref + self.hvtx[hname].Fill(distanceToTracker, delta, weight) + if( pref=='NEW') : + doca = self.StrHits.getStepDoca(RecoSettings.VertexExtrSteps-1) + if ( doca!=None ) : self.hvtx['doca'+pref].Fill(doca) + doca0 = self.StrHits.getStepDoca(0) + if ( doca0!=None ) : self.hvtx['doca0'+pref].Fill(doca0) + if ( doca0!=None and doca0!=0): + self.hvtx['docaRel'+pref].Fill(1,1.) + for ii in range (1, RecoSettings.VertexExtrSteps): + doca = self.StrHits.getStepDoca(ii) + #print "...", doca, doca/doca0 + if ( doca!=None ) : + self.hvtx['docaRel'+pref].Fill(ii+1, doca/doca0) + return vFt + + + + + + def doCompareFits(self, oldStyle=True, ellCut=False, weight=1): + ntracks = self.StrHits.FitTracks(oldStyle) # does re-fitting + if (self.debug>0) : self.StrHits.PrintNewTracks() + + fitOldTrIDs = self.FitTracks.getTrIDs() + fitNewTrIDs = self.StrHits.getReFitTrIDs() + + for tid in fitOldTrIDs: + self.hcmfits['Chi2NDFold'].Fill(self.FitTracks.getChi2Ndf(tid)) + self.hcmfits['NDFold'].Fill(self.FitTracks.getNdf(tid)) + for tid in fitNewTrIDs: + self.hcmfits['Chi2NDFnew'].Fill(self.StrHits.getReFitChi2Ndf(tid)) + self.hcmfits['NDFnew'].Fill(self.StrHits.getReFitNdf(tid)) + + for tid in self.StrHits.getTrIDsALL(): # hists with MCTrID>0 + told = ( tid in fitOldTrIDs) + tnew = ( tid in fitNewTrIDs) + if( (not told) and (not tnew) ): + self.hcmfits['FitCorrespondence'].Fill(0) + elif( (not told) and tnew): + self.hcmfits['FitCorrespondence'].Fill(1) + elif( told and (not tnew) ): + self.hcmfits['FitCorrespondence'].Fill(2) + else: + eq = self.StrHits.compareFitTracks(tid, self.FitTracks) + if eq: + self.hcmfits['FitCorrespondence'].Fill(5) + else: + self.hcmfits['FitCorrespondence'].Fill(6) + self.hcmfits['dNFoldFNnew'].Fill(len(fitOldTrIDs), len(fitNewTrIDs)) + return ntracks + + + + + def doPlotMomentum(self, weight, old=True): + tids = [] + pfix = "" + if old: + tids = self.FitTracks.getTrIDs() + else: + tids = self.StrHits.getReFitTrIDs() + pfix = "NEW" + + for tid in tids: + r,d,pFit = None, None, None + chi2ndf,ndf = None, None + if old: + r,d,pFit = self.FitTracks.getPosDirPval(tid) + ndf = self.FitTracks.getNdf(tid) + chi2ndf = self.FitTracks.getChi2Ndf(tid) + else: + r,d,pFit = self.StrHits.getReFitPosDirPval(tid) + ndf = self.StrHits.getReFitNdf(tid) + chi2ndf = self.StrHits.getReFitChi2Ndf(tid) + if( not tid in self.MCTracks.getTrIDs() ): continue + pMC = self.MCTracks.getMomentum(tid).Mag() + dPP = (pMC - pFit)/pMC + hname = 'delPOverP0'+pfix + self.hmom[hname].Fill(chi2ndf, dPP, weight) + hname = 'delPOverP1'+pfix + self.hmom[hname].Fill(pMC, dPP, weight) + + if( ndfiz*10) ): + iz = iz+1 + if (iz<6): + hname = 'delPOverP3_'+str(iz)+pfix + self.hmom[hname].Fill(dPP, weight) + + + + + + + + + + + + + + def PrintStat(self): + for stage in self.stat: + print "{0:15}{1:10}".format(stage, self.stat[stage]) + + + + +################################################################################################ + def Loop(self, stat=-1): + self.CleanStat() + + if(stat==-1): + nEvents = self.tree.GetEntries() + else: + nEvents = min(self.tree.GetEntries(),stat) + + # --------------- cut related values ------------------------------------------------------# + # FIXneeded - should be done depending on RecoSettings.trackMinNofStations! + # self.MCTracks.setAccPlaneZ(3380*u.cm) # - after 3rd Station + self.MCTracks.setAccPlaneZ(2500*u.cm) #- before 1st Station + + + + # -----------------------------------------------------------------------------------------# + # -----------------------------------------------------------------------------------------# + for n in range(nEvents): + + rc = self.tree.GetEntry(n) + self.stat['total'] +=1 + + # ------------------- MCTracks -----------------------------------------------------------# + nMCPrimTracks = self.MCTracks.readEvent() + if( self.debug>0) : + print "\n\nevent ", n, "====================================================" + self.MCTracks.PrintHNL() + + #=> + if( nMCPrimTracks!=2 ) : continue + self.stat['HNLnTr']+=1 + + #=> + # FIXneeded - should be setting from ShipGeo here! + if( (self.MCTracks.getHNLdecayVertex().Z()<-1900*u.cm) \ + or (self.MCTracks.getHNLdecayVertex().Z()>RecoSettings.VertexMaxZcut) ) : continue + self.stat['HNLzAcc']+=1 + + #=> + if( (not self.MCTracks.checkEllipticAcc()) ) : continue + self.stat['HNLeAcc'] +=1 + if( self.debug>1 ): print "MC event accepted" + + + weight = self.MCTracks.getEventWeight() + #weight = 1 + + # ------------------- FitTracks -----------------------------------------------------------# + nFitTracks = self.FitTracks.readEvent() + if(self.plotMomentum):self.doPlotMomentum(weight, old=True) + if(self.debug>0) : self.FitTracks.Print() + + printMCVert = False + if (nFitTracks==2): + self.stat['twoFitsO']+=1 + v=self.fitMCvertexCorellations(weight, old=True, cut=False, detailed=self.plotVertexCh) + printMCVert = True + print "\n\nOld vertex ", v.X(), v.Y(), v.Z() + + ndfok = True + for tid in self.FitTracks.getTrIDs() : + ndfok = ( ndfok and (self.FitTracks.getNdf(tid)>RecoSettings.trackMinNofHits) ) + if ( not ndfok ) : break + if ndfok : # FIXneeded - not optimal to call it once more :( + self.stat['twoFitsNdfO']+=1 + v=self.fitMCvertexCorellations(weight, old=True, cut=True, detailed=False) + print "the old vertex passes ndf cut!" + + # -------------------- StrawHits --------------------------------------------------------------# + if ( self.compareFits or self.plotTracking ) : + self.StrHits.readEvent() + + + # -------------------- ReFit --------------------------------------------------------------# + nNewFitTracks = 0 + if self.compareFits : + nNewFitTracks = self.doCompareFits(oldStyle=True, ellCut=False, weight=weight) + if(self.plotMomentum):self.doPlotMomentum(weight, old=False) + + if (nNewFitTracks==2): + self.stat['twoFitsN']+=1 + v=self.fitMCvertexCorellations(weight, old=False) + print "New vertex ", v.X(), v.Y(), v.Z() + printMCVert = True + + ndfok = True + for tid in self.StrHits.getReFitTrIDs() : + ndfok = ( ndfok and (self.StrHits.getReFitNdf(tid)>RecoSettings.trackMinNofHits) ) + if ( not ndfok ) : break + if ndfok : # FIXneeded - not optimal to call it once more :( + self.stat['twoFitsNdfN']+=1 + v=self.fitMCvertexCorellations(weight, old=False, cut=True, detailed=False) + print "the new vertex passes ndf cut!" + + + if printMCVert : self.MCTracks.PrintHNL() + + + + if(self.plotTracking) : self.hitMCtrackCorellations(weight) + + + + + # end event loop + #======================================= + print "here -> ", self.plotField + if self.plotField : BookHistos.plotMFieldHistos(self.hmagnet) + if self.plotTracking : BookHistos.plotMCTrackHitCorrelation(self.htrck) + if self.plotVertex : BookHistos.plotVertexHistos(self.hvtx) + if self.plotVertexCh : + BookHistos.plotVertexHistos(self.hvtx,"mUp") + BookHistos.plotVertexHistos(self.hvtx,"mDn") + if self.plotMomentum : BookHistos.plotMomentumHistos(self.hmom) + if self.compareFits : + BookHistos.plotCompareFitHistos(self.hcmfits) + if self.plotVertex : BookHistos.plotVertexHistos(self.hvtx,'NEW') + if self.plotMomentum : BookHistos.plotMomentumHistos(self.hmom, 'NEW') + + #======================================= + self.PrintStat() \ No newline at end of file diff --git a/Katerina/MCTrackInfo.py b/Katerina/MCTrackInfo.py new file mode 100644 index 0000000..b3fa4f3 --- /dev/null +++ b/Katerina/MCTrackInfo.py @@ -0,0 +1,253 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +import RecoSettings +######################################################################## +## For a single event stores HNL, its decay products and several other tracks (if requested) +# from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)\n +# +# +class MCTrackInfo(object): + """ More description here""" + def __init__(self, tree, debug=0): + ## root tree to be read. + self.__tree = tree + ## debug level [0,3]. + self.__debug = debug + ## z of the last full acceptance plane (to be used in #checkEllipticAcc), must be set later. + self.__zAcc = 3380*u.cm + ## event weight. Read in #readEvent as weight of HNL. + self.__weight = 0 + ## HNL decay vertex coordinates (TVector3). Assigned in #readEvent() + self.__HNLdecayCoord = None + ## MCTrID (index of the track in MCtrack list) for \b HNL \b daughter products. + self.__decayProdTrID = [] + ## Production vertices of several stored products (\b not \b only HNL daughter) as {MCTrID : TVector3}. + self.__productVertex = {} + ## Momentum of several stored products (\b not \b only HNL daughter) as {MCTrID : TVector3}. Correspond to $__productVertex. + self.__productMoment = {} + ## Charge of several stored products (\b not \b only HNL daughter) as {MCTrID : value}. Correspond to $__productVertex. + self.__productCharge = {} + ## Basic information on the particle (pdg, mother pdg,... to be added - z decay!) + self.__productInfo = {} + + + + + + ######################################################################## + ##\brief clears all dictionaries and lists. To be called inside #readEvent. + def __clean(self): + self.__weight = 0 + self.__HNLdecayCoord = None + self.__decayProdTrID = [] + self.__productVertex.clear() + self.__productMoment.clear() + self.__productCharge.clear() + self.__productInfo.clear() + + ######################################################################## + ##\brief set z of the last full acceptance plane (to be used in #checkEllipticAcc), depends on #RecoSettings. trackMinNofStations. + # \param z - the value [cm]. + def setAccPlaneZ(self, z): + self.__zAcc = z + + + ######################################################################## + ##\brief prints HNL decay products + def PrintHNL(self): + print type(self).__name__, " : " + print "\tdecay vertex: ", " ".join("{:10.4f}".format(self.__HNLdecayCoord(ii)) for ii in range(0,3)), + print "\n\tdecay products (trID, pdg, charge, momentum):" + for tid in self.__decayProdTrID : + print "\t", "{0:6}{1:10}{2:6.0f}".format(tid, self.__productInfo[tid]['pdg'], self.__productCharge[tid]), + print "\t", " ".join("{:10.4f}".format(self.__productMoment[tid](ii)) for ii in range(0,3)) + + + + ######################################################################## + ## \brief returns event weight. + # \return value of #__weight + def getEventWeight(self): + return self.__weight + + + ######################################################################## + ## \brief returns \b HNL \b decay \b vertex coordinates (TVector3 #__HNLdecayCoord). + # \return TVector3 #__HNLdecayCoord + def getHNLdecayVertex(self): + return self.__HNLdecayCoord + + + ######################################################################## + ## \brief returns list of MCtrIDs (index in MCTrack collection) fot \b HNL \b decay \b products. + # \return list of MCtrIDs (index in MCTrack collection) fot \b HNL \b decay \b products. + def getHNLdecayTrIDs(self): + trID = [] + for tid in self.__decayProdTrID: + trID.append(tid) + return trID + + + ######################################################################## + ## \brief returns list of all MCtrIDs read by #readEvent and #readTrack - \b not \b only HNL decay products. + # \return list of MCtrIDs (index in MCTrack collection) fot all tracks read by #readEvent and #readTrack. + def getTrIDs(self): + trID = [] + for tid in self.__productMoment: + trID.append(tid) + return trID + + + ######################################################################## + ## \brief returns charge of a particle with the given trID (index in MCTrack collection). May return None. + # Tries to get charge from #__productCharge; + # if it is not available, tries to add the track calling #readTrack. If fails, returns None. + # \param trID - index of the MCTrack + # \return charge of the track or None + def getCharge(self, trID): + if ( not trID in self.__productCharge ): self.readTrack(trID) + return self.__productCharge[trID] + + + + ######################################################################## + ## \brief returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection). May return None. + # Tries to get momentum from #__productMoment; + # if it is not available, tries to add the track calling #readTrack. If fails, returns None. + # \param trID - index of the MCTrack + # \return momentum of the track (TVector3) or None + def getMomentum(self, trID): + if ( not trID in self.__productMoment ): self.readTrack(trID) + return self.__productMoment[trID] + + + + + ######################################################################## + ## \brief checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at #__zAcc. + # For tight cut each HNL daughter is propagated to #__zAcc (see #getTrackPropagation) + # and checked if it in the acceptance (see #RecoSettings .checkEllipticAcc). Also checks HNL decay vertex. + # \param tight - if true, not only HNL vertex but also propagated tracks are checked. + # \return True if the vertex (and both tracks, if tight cut) are in the acceptance. + def checkEllipticAcc(self, tight=True): + ok = RecoSettings.checkEllipticAcc(self.__HNLdecayCoord) + if ( not ok ) : return False + if ( tight ) : + for tid in self.__decayProdTrID : + v3 = self.getTrackPropagation(tid, self.__zAcc) + ok = ( ok and RecoSettings.checkEllipticAcc(v3) ) + if ( not ok ) : break + return ok + + + + + ######################################################################## + ## \brief for Tracker Performance studies. Returns -1, 0, 1 depending on vertex topology. + # defines direction in y: 0 if both momY the same direction, -1 if (negative up, positive down). + # \return 0 if both momY the same direction, -1 if (negative up, positive down). + def checkVertexUpDown(self): + theCase = 0 # undefined + if ( (not self.__productVertex) or (len(self.__decayProdTrID)<2) ): return theCase + tid1 = self.__decayProdTrID[0] + tid2 = self.__decayProdTrID[1] + if ( self.__productMoment[tid1].Y()*self.__productMoment[tid2].Y() >=0 ): return theCase + + theCase = self.__productCharge[tid1]*self.__productMoment[tid1].Y()/abs(self.__productMoment[tid1].Y()) + + return theCase + + + ######################################################################## + ## \brief for Tracker Performance studies. Returns TVector3. + # Linear propagation of a given track to a plane (0,0,z) perendicular to Z-axis. + # \param trID - track index (MCtrID). + # \param z - coordinate of the plane. + # \return coordinates of the point of track crossing the given plalne (TVector3). + def getTrackPropagation(self, trID, z): + if ( not trID in self.__productMoment ): self.readTrack(trID) + xy=[0.,0.] + for ii in [0,1]: + xy[ii] = self.__productVertex[trID][ii]+self.__productMoment[trID][ii]/self.__productMoment[trID][2]*(z-self.__productVertex[trID][2]) + vec3 = ROOT.TVector3(xy[0],xy[1],z) + return vec3 + + + + + ######################################################################## + ## \brief reads one additional track with trID from MCTrack collection. Returns 1 if success, 0 otherwise. + # fills #__productVertex, #__productMoment, #__productCharge dictionaries. + # \param trID - track index (MCtrID). + # \return 1 if successful, 0 if trID is not found and the dictionaries are not modified. + def readTrack(self, trID): + x = None + try: + x=self.__tree.MCTrack[trID] + except: + pass + if (not b) : return 0 + + vec3 = ROOT.TVector3(x.GetPx(),x.GetPy(),x.GetPz()) + self.__productMoment[trID] = vec3 + vec3 = ROOT.TVector3(x.GetStartX(),x.GetStartY(),x.GetStartZ()) + self.__productVertex[trID] = vec3 + self.__productCharge[trID] = RecoSettings.chargePDG(x.GetPdgCode()) + self.__productInfo[trID] ={} + self.__productInfo[trID]['pdg'] = x.GetPdgCode() + mid = x.GetMotherId() + if(mid>=0) : self.__productInfo[trID]['mpdg'] = self.__tree.MCTrack[mid].GetPdgCode() + else : self.__productInfo[trID]['mpdg'] = 0 + if( self.__debug>0 ): + print "additional MC track for trID", trID + print "\tpdgid/charge/mother: ", x.GetPdgCode(), self.__productCharge[trID], mid, "(pdf=",self.__productInfo[trID]['mpdg'], ")" + print "\torigin: ", self.__productVertex[trID].X(), self.__productVertex[trID].Y(), self.__productVertex[trID].Z() + print "\tmomentum: ", self.__productMoment[trID].X(), self.__productMoment[trID].Y(), self.__productMoment[trID].Z() + return 1 + + + + + + ######################################################################## + ## \brief reads \b HNL \b decay \b products from MCTrack collection (\b two at the moment!). Returns number of daughters. + # Fills #__HNLdecayCoord and #__productVertex, #__productMoment, #__productCharge dictionaries for \b HNL \b daughters. + # \return number of daughters (loop stops at daughter==2 at the moment!). + def readEvent(self): + self.__clean() + if (self.__debug>0 ): + print "sTree.MCTrack", self.__tree.MCTrack, "size:", len(self.__tree.MCTrack) + daughter = 0 + tid = 0 + #/home/kkuzn/SHIP/ShipSoft/tmp/FairShip/shipdata/ShipMCTrack.h + for x in self.__tree.MCTrack: + if daughter>1: + break + mid = x.GetMotherId() + Z = x.GetStartZ() + if( Z>5000 ): Z=5000 + if mid==0: # #NB# here I suppose HNL is record #1 always! + self.__weight = x.GetWeight() + if self.__debug>0: print "HNL\t\t", tid,"\t", x.GetStartX(), x.GetStartY(), x.GetStartZ(), "\t\t", x.GetPx(), x.GetPy(), x.GetPz() + elif( mid==1 ): # HNL decay products + self.__decayProdTrID.append(tid) + vec3 = ROOT.TVector3(x.GetPx(),x.GetPy(),x.GetPz()) + self.__productMoment[tid] = vec3 + vec3 = ROOT.TVector3(x.GetStartX(),x.GetStartY(),x.GetStartZ()) + self.__productVertex[tid] = vec3 + self.__productCharge[tid] = RecoSettings.chargePDG(x.GetPdgCode()) + self.__productInfo[tid] ={} + self.__productInfo[tid]['pdg'] = x.GetPdgCode() + self.__productInfo[tid]['mpdg'] = self.__tree.MCTrack[mid].GetPdgCode() + if( self.__debug>0 ): print x.GetPdgCode(), "\t\t", tid,"\t", x.GetStartX(), x.GetStartY(), x.GetStartZ(), "\t\t", x.GetPx(), x.GetPy(), x.GetPz() + if daughter<1: + self.__HNLdecayCoord = ROOT.TVector3(x.GetStartX(), x.GetStartY(), x.GetStartZ()) + else: + if self.__HNLdecayCoord.Z()!=x.GetStartZ(): + self.__HNLdecayCoord.SetXYZ(0,0,-8899) + daughter+=1 + tid+=1 + + return daughter + diff --git a/Katerina/RecoSettings.py b/Katerina/RecoSettings.py new file mode 100644 index 0000000..57a6b22 --- /dev/null +++ b/Katerina/RecoSettings.py @@ -0,0 +1,23 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +""" +Parameter settings for reconstruction +""" + +## min number of hits to produce a track +trackMinNofHits = 25 +trackMinNofStations = 3 +chi2CutOff = 4. +dy = 10.0 +VertexMaxZcut = 2500*u.cm +VertexExtrSteps = 5 +PDG = ROOT.TDatabasePDG.Instance() + +def chargePDG(pdg): + if not PDG.GetParticle(pdg): return + return PDG.GetParticle(pdg).Charge()/(3.) + +def checkEllipticAcc(vec): + Rsq = (vec.X()/(2.45*u.m) )**2 + (vec.Y()/((dy/2.-0.05)*u.m) )**2 + return ( Rsq<1 ) diff --git a/Katerina/StrawHits.py b/Katerina/StrawHits.py new file mode 100644 index 0000000..21415c3 --- /dev/null +++ b/Katerina/StrawHits.py @@ -0,0 +1,507 @@ +import ROOT,os,sys,getopt +import rootUtils as ut +import shipunit as u +from pythia8_conf import addHNLtoROOT +from array import array + +import RecoSettings +from FitTrackInfo import FitTrackInfo + + +######################################################################## +class StrawHits(object): + """StrawHit class""" + def __init__(self, tree, modules, resolution, debug=0, mhistdict=None, ship_geo=None): + ## root tree to be read. + self.__tree = tree + ## geometry description modules. + self.__modules = modules + ## debug level [0,3] + self.__debug = debug + ## hit resolition + self.__resolution = resolution + ## {MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position. Created if MCtrackID>0. + self.__trackHits = {} + ## + self.__oldSmearedHits ={} + ## {MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit. + ## Created for tracks with more than #RecoSettings .trackMinNofHits hits. + self.__trackEdgeHits = {} + ## {MCtrackID : number of hits at Z<0 (veto tracker)}. + self.__vetoHits = {} + ## {MCtrackID: number of crossed stations (exclude veto tracker)}. + self.__nStations = {} + ## root random engent for hit smearing (see #__hitSmear). + self.__random = ROOT.TRandom() + ROOT.gRandom.SetSeed(13) + #fitter = ROOT.genfit.KalmanFitter() + #fitter = ROOT.genfit.KalmanFitterRefTrack() + self.__fitter = ROOT.genfit.DAF() + # refitted traks + self.__reFitTracks = FitTrackInfo(tree=None, debug = self.__debug) + self.__docaEval = [] + + if (mhistdict and ship_geo) : + fm = ROOT.genfit.FieldManager.getInstance() + # copy from python/shipDet_conf.py + sbf = ROOT.ShipBellField("wilfried", ship_geo.Bfield.max,ship_geo.Bfield.z,2,ship_geo.Yheight/2.*u.m ) + for i in range (0,300): + z = 1000. + i*10 + pvec3 = ROOT.TVector3(0,0,z) + fx = ROOT.Double(0) + fy = ROOT.Double(0) + fz = ROOT.Double(0) + #fvec3f = fm.getField().get(pvec3) + fm.getField().get(0,0,z,fx,fy,fz) + fvec3f = ROOT.TVector3(fx,fy,fz) + + fvec3s = ROOT.TVector3( sbf.GetBx(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBy(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBz(pvec3.X(),pvec3.Y(),pvec3.Z())) + + #print z, " ".join("{:10.4f}".format(fvec3f(ii)) for ii in range(0,3)), + #print "\t", " ".join("{:10.4f}".format(fvec3s(ii)) for ii in range(0,3)) + mhistdict['magZfit'].Fill(z,fvec3f.Mag()) + mhistdict['magZsim'].Fill(z,fvec3s.Mag()) + + zdict = {1:2500., 2:2800., 3:3000.} + for zi in zdict: + for xi in range (-30, 30): + for yi in range (-30,30): + x = xi*10. + y = yi*10. + pvec3 = ROOT.TVector3(x, y, zdict[zi]) + fx = ROOT.Double(0) + fy = ROOT.Double(0) + fz = ROOT.Double(0) + #fvec3f = fm.getField().get(pvec3) + fm.getField().get(x,y,zdict[zi],fx,fy,fz) + fvec3f = ROOT.TVector3(fx,fy,fz) + + fvec3s = ROOT.TVector3( sbf.GetBx(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBy(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBz(pvec3.X(),pvec3.Y(),pvec3.Z())) + #print x, " ", y, " ", zdict[zi], + #print "\t", " ".join("{:10.4f}".format(fvec3f(ii)) for ii in range(0,3)), + #print "\t", " ".join("{:10.4f}".format(fvec3s(ii)) for ii in range(0,3)) + mhistdict['magXY'+str(zi)+"fit"].Fill(x, y,fvec3f.Mag()) + mhistdict['magXY'+str(zi)+"sim"].Fill(x, y,fvec3s.Mag()) +######################################################################## + + + ## \brief to be called for each new event (called in #readEvent()) + # cleans all dictionaries (#__trackHits, #__trackEdgeHits, #__vetoHits, #__nStations). + def __clean(self): + self.__trackHits.clear() + self.__oldSmearedHits.clear() + self.__trackEdgeHits.clear() + self.__vetoHits.clear() + self.__nStations.clear() + self.__docaEval = [] +######################################################################## + + + ## \brief returns list of keys #__trackEdgeHits (MCtrackIDs>0 with more than #RecoSettings .trackMinNofHits hits). + # \return list of MCtrackIDs of "good" tracks. + def getTrIDs(self): + trID = [] + for tid in self.__trackEdgeHits: + trID.append(tid) + return trID +######################################################################## + + + ## \brief returns list of keys #__trackHits (MCtrackIDs>0. + # \return list of MCtrackIDs of MC assigned tracks. + def getTrIDsALL(self): + trID = [] + for tid in self.__trackEdgeHits: + trID.append(tid) + return trID +######################################################################## + + + ## \brief returns list of keys #__reFitTracks. + # \return list of MCtrackIDs of "good" tracks. + def getReFitTrIDs(self): + return self.__reFitTracks.getTrIDs() +######################################################################## + + + def getReFitChi2Ndf(self,tid): + return self.__reFitTracks.getChi2Ndf(tid) +######################################################################## + + + def getReFitNdf(self,tid): + return self.__reFitTracks.getNdf(tid) + + + +######################################################################## + ## \brief returns vertex (if number of tracks!=2 will return None!). + # \return new vertex (if number of tracks!=2 will return None!). + def getReFitVertex(self): + return self.__reFitTracks.getVertex() +######################################################################## + + + +######################################################################## + ## \brief returns doca's of each extrapolation steps (size is defined in #RecoSettings .VertexExtrSteps). + # \return new vertex (if number of tracks!=2 will return None!). + def getStepDoca(self, step): + if ( step>RecoSettings.VertexExtrSteps or (not self.__reFitTracks.Vertex) ) : return None + return self.__docaEval[step] +######################################################################## + + + ## \brief returns vertex (if number of tracks!=2 will return None!). + # \return new vertex (if number of tracks!=2 will return None!). + def getReFitPosDirPval(self, tid): + return self.__reFitTracks.getPosDirPval(tid) +######################################################################## + + + ## \brief returns number of hits in proper tracker stations (Z>0) calculated from #__trackHits and #__vetoHits. + # \param tid - MCtrackID. + # \return number of hits in proper tracker stations (Z>0). + def getNofPHits(self, tid): + return len(self.__trackHits[tid]) - self.__vetoHits[tid] +######################################################################## + + + ## \brief returns TVector3 of a tracker entry hit (Z>0) from #__trackEdgeHits. + # \param tid - MCtrackID. + # \return position of a tracker entry hit (Z>0) from #__trackEdgeHits. + def getStartHit(self, tid): + return self.__trackEdgeHits[tid]['entry'] +######################################################################## + + + ## \brief returns number of hits with Z<0 of #__trackHits. + # \param tid - MCtrackID. + # \return number of hits with Z<0 of #__trackHits. + def checkVetoHits(self, tid): + vh = 0 + if tid in self.__vetoHits: + vh = self.__vetoHits[tid] + return vh +######################################################################## + + + def PrintNewTracks(self): + print "new Fits: ", + self.__reFitTracks.Print() +######################################################################## + + + def compareFitTracks(self, tid, theFitTracks): + pos, direct, pval = theFitTracks.getPosDirPval(tid) + return self.__reFitTracks.compareTracks(tid, pos, direct, pval) + +######################################################################## + ## \brief returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit. + # \param tid - MCtrackID. + # \param hid - hit index of #__trackHits + # \param new - to generate new smearing (True) or get from SmearedHits (det.position still recalculated!) + # \return a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit. + def __hitSmear(self,tid,hid, new=False): + top = ROOT.TVector3() + bot = ROOT.TVector3() + dw = self.__trackHits[tid][hid]['dw'] + detID = self.__trackHits[tid][hid]['det'] + + self.__modules["Strawtubes"].StrawEndPoints(detID,bot,top) + + if( new ): + smear = abs(self.__random.Gaus(dw, self.__resolution)) + else: + smear = self.__trackHits[tid][hid]['smdw'] + smearedHit = {'xtop':top.x(),'ytop':top.y(),'z':top.z(),'xbot':bot.x(),'ybot':bot.y(),'z':bot.z(),'dist':smear} + + if(self.__debug>2): + print "\tsmear :", "".join("{:8.2f}".format(self.__trackHits[tid][hid]['pos'](ii)) for ii in range(0,3)), + print "{:6.2f}".format(dw), + print "\t(xt,xb, yt, yb, z, dw) : ", + for x in ['xtop','xbot', 'ytop','ybot','z', 'dist']: + print "".join("{:8.2f}".format(smearedHit[x])), + print "" + return smearedHit +######################################################################## + + + ## \brief to be called per each event. Fills #__trackHits, #__trackEdgeHits, #__vetoHits, #__nStations. + # \return number of "good" tracks (size of #__trackEdgeHits) + def readEvent(self): + self.__clean() + toSort = [] # list of MCtrackID which has unsorted hits (I saw also hits from different tracks assigned to the same MCtrackID) + stationList = {} # {MCtrackID:[stations]} + + # loop over all hits and fill __trackHits[MCtrackID] + hindx = -1 + for ahit in self.__tree.strawtubesPoint: + detID = ahit.GetDetectorID() + trID = ahit.GetTrackID() + + # get old smearing + hindx +=1 + origSmHit = self.__tree.SmearedHits.At(hindx) + if( (abs(ahit.GetZ()-origSmHit[3])>0.8) or (abs(ahit.dist2Wire()-origSmHit[7])>0.2) ): + print "problem getting smeared his, but do not change anything" + print "=>", ahit.GetZ(), origSmHit[3], ahit.dist2Wire(), origSmHit[7] + # m = array('d',[i,sm['xtop'],sm['ytop'],sm['z'],sm['xbot'],sm['ybot'],sm['z'],sm['dist']]) + + #=> + if(trID<0): continue # these are hits not assigned to MC track because low E cut + + if (not self.__trackHits.has_key(trID)): + self.__trackHits[trID] = [] + stationList[trID] = [] + + hinfo = {} + hinfo['pos'] = ROOT.TVector3(ahit.GetX(), ahit.GetY(), ahit.GetZ()) + hinfo['det'] = ahit.GetDetectorID() + hinfo['dw'] = ahit.dist2Wire() + hinfo['smdw'] = origSmHit[7] + self.__trackHits[trID].append(hinfo) + + lastIndx = len(self.__trackHits[trID])-1 + if( self.__trackHits[trID][lastIndx]['pos'].Z() < self.__trackHits[trID][lastIndx-1]['pos'].Z() ): + if( not trID in toSort): + toSort.append(trID) + if(self.__debug>0): print "StrawHitsEntry: wrong order of hits for track ", trID + + station = int(ahit.GetDetectorID()/10000000) + if station > 4 : continue + if ( not station in stationList[trID]) : stationList[trID].append(station) + + # sort + for trID in toSort: + if(self.__debug>0): print "StrawHitsEntry: will sort hits for track ", trID + if(self.__debug>2): + print "\t\thits to be sorted" + for hinfo in self.__trackHits[trID]: + vec3 = hinfo['pos'] + print "\t\t\t\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw'] + self.__trackHits[trID].sort(key=lambda x: x['pos'].Z(), reverse=False) + if(self.__debug>2): + print "\t\thits after sorting" + for hinfo in self.__trackHits[trID]: + vec3 = hinfo['pos'] + print "\t\t\t\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw'] + + # fill self.__nStations + for trID in self.__trackHits: + self.__nStations[trID] = len(stationList[trID]) + if(self.__debug>0): + print "Number of crossed stations (trID:n)", trID, " : ", self.__nStations[trID] + + # find entry and exit positions + for trID in self.__trackHits: + if(self.__debug>1): + print "hits for trID ", trID + for hinfo in self.__trackHits[trID]: + vec3 = hinfo['pos'] + print "\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw'] + if(self.__debug>0): print "start/stop position for hits of track ", trID + #find number of vetoTracker hits + firstHit = 0 + nHits = len(self.__trackHits[trID]) + while( firstHit + # the EdgeHits are filled only if nHits(stations1-4)>25 + if( (firstHitRecoSettings.trackMinNofHits) ): + self.__trackEdgeHits[trID] = {} + self.__trackEdgeHits[trID]['entry'] = self.__trackHits[trID][firstHit]['pos'] + self.__trackEdgeHits[trID]['exit'] = self.__trackHits[trID][-1]['pos'] + self.__vetoHits[trID] = firstHit + if(self.__debug>0): + for pos in self.__trackEdgeHits[trID]: + vec3 = self.__trackEdgeHits[trID][pos] + print "\t", pos, vec3.X(), "\t", vec3.Y(), "\t", vec3.Z() + elif( self.__debug>0): print "not set due to small number of hits" + + return len(self.__trackEdgeHits) +######################################################################## + + + + + + def __getIniDir(self,trID): + v1 = self.__trackEdgeHits[trID]['entry'] + i2 = self.__vetoHits[trID]+1 + if( len(self.__trackHits[trID])>i2 ): + v2 = self.__trackHits[trID][i2]['pos'] + dv = v2-v1 + else: + dv = ROOT.TVector3(0., 0., 1.) + if(self.__debug>0): + print "trying to get initial direction having just one hit, will set (0,0,1)" + return dv*(1./dv.Mag()) + + + def __prepareIniPosMomCov(self, tid, original=True): + if ( original ) : + pos = ROOT.TVector3(0, 0, 0) + mom = ROOT.TVector3(0,0,3.*u.GeV) + cov = ROOT.TMatrixDSym(6) + resolution = self.__resolution + for i in range(3): cov[i][i] = resolution*resolution + cov[0][0]=resolution*resolution*100. + nM = self.getNofPHits(tid) + for i in range(3,6): cov[i][i] = ROOT.TMath.pow(resolution / nM / ROOT.TMath.sqrt(3), 2) + else: + pos = self.__trackEdgeHits[tid]['entry'] + mom = self.__getIniDir(tid) + cov = ROOT.TMatrixDSym(6) + resolution = self.__resolution + for i in range(3): cov[i][i] = resolution*resolution + cov[0][0]=resolution*resolution*100. + nM = self.getNofPHits(tid) + for i in range(3,6): cov[i][i] = ROOT.TMath.pow(resolution / nM / ROOT.TMath.sqrt(3), 2) + return pos, mom, cov +######################################################################## + + + + def __prepareWireMeasurements(self, tid, fTrack): + #WireMeasurement::WireMeasurement(const TVectorD& rawHitCoords, + # const TMatrixDSym& rawHitCov, + # int detId, + # int hitId, + # genfit::TrackPoint* trackPoint) + # per each proper hit TMP ??? does it make sense to do for tracks with __vetoHits>0??? + #self.__measurements4fit[trID] = [] + for hindx in range (self.__vetoHits[tid], len(self.__trackHits[tid])): + sm = self.__hitSmear(tid,hindx) + mVector = ROOT.TVectorD(7,array('d',[sm['xtop'],sm['ytop'],sm['z'],sm['xbot'],sm['ybot'],sm['z'],sm['dist']])) + #self.__measurements4fit[trID].push_back(mVector) + + hitCov = ROOT.TMatrixDSym(7) + hitCov[6][6] = self.__resolution*self.__resolution + + tp = ROOT.genfit.TrackPoint(fTrack) # note how the point is told which track it belongs to + measurement = ROOT.genfit.WireMeasurement(mVector,hitCov,1,6,tp) # the measurement is told which trackpoint it belongs to + # print measurement.getMaxDistance() + measurement.setMaxDistance(0.5*u.cm) + #measurement.setLeftRightResolution(-1) + tp.addRawMeasurement(measurement) # package measurement in the TrackPoint + if(self.__debug>2): + tp.Print() + fTrack.insertPoint(tp) # add point to Track + + + + + + +######################################################################## + def FitTracks(self, old=True): + + self.__reFitTracks.clean() + + fitTrack = {} + #self.__measurements4fit = {} + nTrack = -1 + + + for trID in self.__trackEdgeHits : # these are already tracks with large number of hits + #print "track entry", self.__trackEdgeHits[tid]['entry']. + #print "mfield: ", ROOT + + # minimal requirements on number of crossed stations + if ( self.__nStations2): print "preparing measurements for track ID", trID + self.__prepareWireMeasurements(trID, fitTrack[trID]) + + + if not fitTrack[trID].checkConsistency(): + print 'Problem with track before fit, not consistent',self.fitTrack[atrack] + continue + try: self.__fitter.processTrack(fitTrack[trID]) # processTrackWithRep(fitTrack[atrack],rep,True) + except: + print "genfit failed to fit track" + continue + if not fitTrack[trID].checkConsistency(): + print 'Problem with track after fit, not consistent',self.fitTrack[atrack] + continue + + stat = fitTrack[trID].getFitStatus() + if not stat.isFitConverged() : continue + f = fitTrack[trID].getFittedState() + + #if(self.__debug>0): + #print "for track ", trID, + #print " pos:", " ".join("{:10.4f}".format(f.getPos()(ii)) for ii in range(0,3)), + #print " mom:", " ".join("{:10.4f}".format(f.getMom()(ii)) for ii in range(0,3)) + self.__reFitTracks.addNewTrack(trID, f.getPos(), f.getDir(), f.getMomMag(), + stat.getNdf(), stat.getChi2()) + + + + + newFitTrIDs = self.__reFitTracks.getTrIDs() + twoTracks = ( len(newFitTrIDs)==2 ) + theStep = 0 + self.__docaEval = [] + if (twoTracks) : + self.__reFitTracks.createVertex(newFitTrIDs[0], newFitTrIDs[1], flag=0) # original + iniDoca = self.__reFitTracks.Doca + iniY = self.__reFitTracks.Vertex.Y() + while ( theStep1): + print "==>vertex ", theStep, " ", self.__reFitTracks.Doca + self.__reFitTracks.Vertex.Print() + self.__docaEval.append(self.__reFitTracks.Doca) + for tid in fitTrack : + try: + state = fitTrack[tid].getFittedState() + except: + print "can't get fittedState" + flag = -1 + vPosEx = ROOT.TVector3(0,0,0) + vMomEx = ROOT.TVector3(0,0,0) + try : + state.extrapolateToPoint(self.__reFitTracks.Vertex) + except : + flag = -1 + print "track exctrapolation failed!tid: ", tid + if (flag > 0 ) : # + status = fitTrack[tid].getFitStatus() + #print "extr track ", tid, + #print " pos:", " ".join("{:10.4f}".format(state.getPos()(ii)) for ii in range(0,3)), + #print " mom:", " ".join("{:10.4f}".format(state.getMom()(ii)) for ii in range(0,3)) + self.__reFitTracks.addNewTrack(trID, state.getPos(), state.getDir(), state.getMomMag(), + status.getNdf(), status.getChi2(), verb=False) + # FIX temporary + self.__reFitTracks.createVertex(newFitTrIDs[0], newFitTrIDs[1], flag) + self.__reFitTracks.Vertex.SetY(iniY) + theStep+=1 + twoTacks = ( len(self.__reFitTracks.getTrIDs())==2 ) + return len(newFitTrIDs) + + diff --git a/Katerina/doc/html/AnalyseThat_8py.html b/Katerina/doc/html/AnalyseThat_8py.html new file mode 100644 index 0000000..b49a043 --- /dev/null +++ b/Katerina/doc/html/AnalyseThat_8py.html @@ -0,0 +1,94 @@ + + + + + + +Python: AnalyseThat.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
AnalyseThat.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Namespaces

 AnalyseThat
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

int AnalyseThat.chi2CutOff = 4
 
tuple AnalyseThat.PDG = ROOT.TDatabasePDG.Instance()
 
 AnalyseThat.inputFile = None
 
 AnalyseThat.geoFile = None
 
 AnalyseThat.dy = None
 
int AnalyseThat.nEvents = 99999
 
 AnalyseThat.fiducialCut = False
 
int AnalyseThat.measCut = 25
 
tuple AnalyseThat.tmp = inputFile.split('.')
 
tuple AnalyseThat.f = ROOT.TFile(inputFile)
 
 AnalyseThat.sTree = f.cbmsim
 
tuple AnalyseThat.la
 
+
+ + + + diff --git a/Katerina/doc/html/AnalyseThat_8py_source.html b/Katerina/doc/html/AnalyseThat_8py_source.html new file mode 100644 index 0000000..fd5bd3f --- /dev/null +++ b/Katerina/doc/html/AnalyseThat_8py_source.html @@ -0,0 +1,114 @@ + + + + + + +Python: AnalyseThat.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
AnalyseThat.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 import numpy as n
+
5 from ShipGeoConfig import ConfigRegistry
+
6 chi2CutOff = 4.
+
7 PDG = ROOT.TDatabasePDG.Instance()
+
8 inputFile = None
+
9 geoFile = None
+
10 dy = None
+
11 nEvents = 99999
+
12 fiducialCut = False
+
13 measCut = 25
+
14 
+
15 try:
+
16  opts, args = getopt.getopt(sys.argv[1:], "n:f:g:A:Y:i", ["nEvents=","geoFile="])
+
17 except getopt.GetoptError:
+
18  # print help information and exit:
+
19  print ' enter file name'
+
20  sys.exit()
+
21 for o, a in opts:
+
22  if o in ("-f"):
+
23  inputFile = a
+
24  if o in ("-g", "--geoFile"):
+
25  geoFile = a
+
26  if o in ("-Y"):
+
27  dy = float(a)
+
28  if o in ("-n", "--nEvents="):
+
29  nEvents = int(a)
+
30 
+
31 if not dy:
+
32  # try to extract from input file name
+
33  tmp = inputFile.split('.')
+
34  try:
+
35  dy = float( tmp[1]+'.'+tmp[2] )
+
36  except:
+
37  dy = None
+
38 else:
+
39  inputFile = 'ship.'+str(dy)+'.Pythia8-TGeant4_rec.root'
+
40 
+
41 if not geoFile:
+
42  geoFile = inputFile.replace('ship.','geofile_full.').replace('_rec.','.')
+
43 
+
44 f = ROOT.TFile(inputFile)
+
45 sTree = f.cbmsim
+
46 
+
47 
+
48 
+
49 from LoopAnalyse import LoopAnalyse
+
50 la = LoopAnalyse(sTree, dy, geoFile, debug=0,
+
51  plotField = False,
+
52  plotTracking = False,
+
53  plotVertex = True,
+
54  plotVertexDetailed = False,
+
55  plotMomentum = True,
+
56  compareFits = True)
+
57 la.Loop(nEvents)
+ +
+ + + + diff --git a/Katerina/doc/html/BookHistos_8py.html b/Katerina/doc/html/BookHistos_8py.html new file mode 100644 index 0000000..333dfec --- /dev/null +++ b/Katerina/doc/html/BookHistos_8py.html @@ -0,0 +1,94 @@ + + + + + + +Python: BookHistos.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
BookHistos.py File Reference
+
+ + + + + diff --git a/Katerina/doc/html/BookHistos_8py_source.html b/Katerina/doc/html/BookHistos_8py_source.html new file mode 100644 index 0000000..0868fb0 --- /dev/null +++ b/Katerina/doc/html/BookHistos_8py_source.html @@ -0,0 +1,449 @@ + + + + + + +Python: BookHistos.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
BookHistos.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 import RecoSettings
+
5 def SetGrid(pad):
+
6  pad.SetGridx()
+
7  pad.SetGridy()
+
8 
+
9 def SetAxis(histo):
+
10  histo.GetXaxis().SetTitleSize(.06)
+
11  histo.GetYaxis().SetTitleSize(.06)
+
12  histo.GetXaxis().SetTitleOffset(1.3)
+
13  histo.GetYaxis().SetTitleOffset(1.3)
+
14  histo.GetXaxis().SetNdivisions(5)
+
15  histo.GetYaxis().SetNdivisions(5)
+
16 
+
17 
+
18 ###################################################################################
+
19 ###################################################################################
+
20 ###################################################################################
+ +
22  #ax0 = ';#chi^{2}/ndf;(P_{MCthuth}-P_{RECO})/P_{MCtruth}'
+
23  #ax = ';P_{MCthuth} [GeV];(P_{MCthuth}-P_{RECO})/P_{MCtruth}'
+
24  colour = {"fit":2, "sim":1}
+
25  for fall in ["fit", "sim"] :
+
26  ut.bookHist(h,'magZ' +fall, 'Field.Mag() vs Z at (0,0)'+fall+';z [cm];|B| [T]', 3000, 1000, 4000,200,0,2)
+
27  h['magZ'+fall].SetLineColor(colour[fall])
+
28  h['magZ'+fall].SetMarkerColor(colour[fall])
+
29  ut.bookHist(h,'magXY1'+fall, 'Field.Mag() vs (X,Y) at Z=2500 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300)
+
30  ut.bookHist(h,'magXY2'+fall, 'Field.Mag() vs (X,Y) at Z=2800 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300)
+
31  ut.bookHist(h,'magXY3'+fall, 'Field.Mag() vs (X,Y) at Z=3000 cm, '+fall+';x [cm];y [cm]', 60, -300.,300.,60,-300,300)
+
32  for histo in h:
+
33  SetAxis(h[histo])
+
34  h[histo].SetLineColor(1)
+
35  h[histo].SetMarkerStyle(20)
+
36 
+
37 ###################################################################################
+ +
39  ROOT.gStyle.SetStatY(0.9)
+
40  ROOT.gStyle.SetStatX(0.9)
+
41  ROOT.gStyle.SetStatW(0.3)
+
42  ROOT.gStyle.SetStatH(0.2)
+
43  ROOT.gStyle.SetPadBottomMargin(0.2)
+
44  ROOT.gStyle.SetPadLeftMargin(0.2)
+
45  ROOT.gStyle.SetPadRightMargin(0.2)
+
46 
+
47  ROOT.gStyle.SetOptStat(0)
+
48  ut.bookCanvas(h,"mfield1","mfield1",nx=600,ny=600,cx=1,cy=1)
+
49  cv = h['mfield1'].cd(1)
+
50  h['magZsim'].Draw("")
+
51  h['magZfit'].Draw("sames")
+
52  h['mfield1'].Print('mfield1.gif')
+
53 
+
54  ut.bookCanvas(h,"mfield2","mfield2",nx=1200,ny=800,cx=3,cy=2)
+
55  pad = 0
+
56  for fall in ["fit", "sim"] :
+
57  for ci in range (1,4):
+
58  pad+=1
+
59  cv = h['mfield2'].cd(pad)
+
60  h['magXY'+str(ci)+fall].Draw("colz")
+
61  h['mfield2'].Print('mfield2.gif')
+
62 
+
63 
+
64 ###################################################################################
+
65 ###################################################################################
+
66 ###################################################################################
+
67 def bookMomentumHistos(h,prefix=""):
+
68  ax0 = ';#chi^{2}/ndf;(P_{MCthuth}-P_{RECO})/P_{MCtruth}'
+
69  ax = ';P_{MCthuth} [GeV];(P_{MCthuth}-P_{RECO})/P_{MCtruth}'
+
70  ut.bookHist(h,'delPOverP0'+prefix, 'dP/P vs #chi^{2}/ndf'+prefix+ax0, 500,0.,50.,100,-0.5,0.5)
+
71  ut.bookHist(h,'delPOverP1'+prefix, 'dP/P'+prefix+ax,100,0.,50.,100,-0.5,0.5)
+
72  ut.bookHist(h,'delPOverP2'+prefix, 'dP/P ndf>'+str(RecoSettings.trackMinNofHits)+prefix+ax,100,0.,50.,100,-0.5,0.5)
+
73  ut.bookHist(h,'delPOverP3'+prefix, 'dP/P cleaned #chi^{2}/ndf<'+str(RecoSettings.chi2CutOff)+prefix+ax,100,0.,50.,100,-0.5,0.5)
+
74  ut.bookHist(h,'MomRes'+prefix, 'MomRes'+prefix+';P_{MCthuth} [GeV];#sigma_{Gauss}(#DeltaP/P)',5,0.,50.)
+
75  for i in range (1,6):
+
76  hhname='delPOverP3_'+str(i)+prefix
+
77  cond ='P_{MCtruth} < '+str(i*10)+" GeV"
+
78  ut.bookHist(h, hhname, cond+';(P_{MCthuth}-P_{RECO})/P_{MCtruth}', 200, -.2, .2)
+
79  h[hhname].StatOverflows(True) # to include overflow/underflow in mean/sigma (range independence)
+
80 
+
81  for histo in h:
+
82  h[histo].Sumw2()
+
83  h[histo].SetLineColor(1)
+
84  h[histo].SetMarkerStyle(20)
+
85 
+
86 ###################################################################################
+
87 def plotMomentumHistos(h,prefix=""):
+
88  ROOT.gStyle.SetStatY(0.9)
+
89  ROOT.gStyle.SetStatX(0.9)
+
90  ROOT.gStyle.SetStatW(0.3)
+
91  ROOT.gStyle.SetStatH(0.2)
+
92  ROOT.gStyle.SetPadBottomMargin(0.2)
+
93  ROOT.gStyle.SetPadLeftMargin(0.2)
+
94 
+
95  ROOT.gStyle.SetOptStat(10)
+
96  ut.bookCanvas(h,key='momentum1'+prefix,title='momentum1'+prefix,nx=1000,ny=800,cx=2,cy=2)
+
97  for cid in range (1,5):
+
98  cv = h['momentum1'+prefix].cd(cid)
+
99  hname = 'delPOverP'+str(cid-1)+prefix
+
100  h[hname].Draw("box")
+
101  SetAxis(h[hname])
+
102  if(cid==1):
+
103  cv.SetLogx()
+
104  h[hname].GetXaxis().SetRangeUser(.01,50)
+
105  h['momentum1'+prefix].Print('momentum1'+prefix+'.gif')
+
106 
+
107  ROOT.gStyle.SetStatY(0.93)
+
108  ROOT.gStyle.SetStatX(0.99)
+
109  ROOT.gStyle.SetStatW(0.4)
+
110  ROOT.gStyle.SetStatH(0.35)
+
111  f={}
+
112  key='momentum2'+prefix
+
113  ut.bookCanvas(h,key,title=key,nx=1200,ny=1200,cx=3,cy=2)
+
114  rname = 'MomRes'+prefix
+
115  for cvn in range (1,6):
+
116  hname='delPOverP3_'+str(cvn)+prefix
+
117  cv = h[key].cd(cvn)
+
118  h[hname].Draw("E")
+
119  SetAxis(h[hname])
+
120  ROOT.gStyle.SetOptFit(11111)
+
121  f[hname] = ROOT.TF1(hname,'gaus',-.05, .05)
+
122  f[hname].SetParameter(1,0.)
+
123  f[hname].SetNpx(1000)
+
124  h[hname].Fit(f[hname],"R")
+
125  print "fit", f[hname].GetParameter(2), f[hname].GetParError(2)
+
126  h[rname].SetBinContent(cvn, f[hname].GetParameter(2))
+
127  h[rname].SetBinError (cvn, f[hname].GetParError(2))
+
128  h[key].Print(key+'.gif')
+
129 
+
130  ROOT.gStyle.SetOptStat(0)
+
131  ROOT.gStyle.SetOptTitle(0)
+
132  ut.bookCanvas(h,'momentum3'+prefix,title='momentum3'+prefix,nx=600,ny=600,cx=1,cy=1)
+
133  h[rname].Draw('E')
+
134  SetAxis(h[rname])
+
135  h[hname].GetYaxis().SetTitleOffset(1.5)
+
136  h['momentum3'+prefix].Print('momentum3'+prefix+'.gif')
+
137 
+
138 
+
139 
+
140 
+
141 
+
142 
+
143 
+
144 
+
145 
+
146 ###################################################################################
+
147 ###################################################################################
+
148 ###################################################################################
+ +
150  ut.bookHist(h,'dNFoldFNnew', 'Number of fitted tracks;N(old);N(new)',
+
151  10, -1, 9, 10, -1, 9)
+
152  h['dNFoldFNnew'].SetMarkerSize(1.8)
+
153  ut.bookHist(h,'FitCorrespondence', 'CorrespondenceBins: 0,5-ok',
+
154  10, -1, 9)
+
155  ut.bookHist(h,'NDFold', 'NDF old Fit;NDF', 140, 0, 70)
+
156  ut.bookHist(h,'NDFnew', 'NDF new Fit;NDF', 140, 0, 70)
+
157  ut.bookHist(h,'Chi2NDFold', '#chi^{2}/NDF old Fit;#chi^{2}/NDF', 200, 0, 20)
+
158  ut.bookHist(h,'Chi2NDFnew', '#chi^{2}.NDF old Fit;#chi^{2}/NDF', 200, 0, 20)
+
159  style={'old':0,'new':1}
+
160  for name in ('NDF','Chi2NDF'):
+
161  for st in style:
+
162  h[name+st].SetLineColor(1+style[st])
+
163  h[name+st].SetMarkerColor(1+style[st])
+
164  h[name+st].SetMarkerStyle(22+style[st])
+
165  for histo in h:
+
166  h[histo].Sumw2()
+
167  h[histo].SetLineWidth(2)
+
168 
+
169 
+
170 ###################################################################################
+ +
172  ROOT.gStyle.SetStatY(0.9)
+
173  ROOT.gStyle.SetStatX(0.9)
+
174  ROOT.gStyle.SetStatW(0.3)
+
175  ROOT.gStyle.SetStatH(0.2)
+
176  ROOT.gStyle.SetOptStat(11)
+
177  ut.bookCanvas(h,key='FitCompare',title='FitCompare',nx=800,ny=800,cx=2,cy=2)
+
178  cv = h['FitCompare'].cd(1)
+
179  cv.SetLogz()
+
180  h['dNFoldFNnew'].Draw('coltext')
+
181  cv = h['FitCompare'].cd(2)
+
182  cv.SetLogy()
+
183  h['FitCorrespondence'].Draw()
+
184  cv = h['FitCompare'].cd(3)
+
185  cv.SetLogy()
+
186  h['NDFold'].Draw()
+
187  h['NDFnew'].Draw("sames")
+
188  cv = h['FitCompare'].cd(4)
+
189  cv.SetLogx()
+
190  cv.SetLogy()
+
191  h['Chi2NDFold'].Draw()
+
192  h['Chi2NDFnew'].Draw("sames")
+
193  h['FitCompare'].Print('FitCompare.gif')
+
194 
+
195 
+
196 
+
197 
+
198 
+
199 
+
200 
+
201 
+
202 
+
203 ###################################################################################
+
204 ###################################################################################
+
205 ###################################################################################
+ +
207  ut.bookHist(h,'dxdyALLTrHm', 'dxdy(MCtr,firstHit)@firstHitZ - all-;dx [cm];dy [cm]',
+
208  2000, -100, 100, 2000, -100, 100)
+
209  ut.bookHist(h,'dxdyALLTrHp', 'dxdy(MCtr,firstHit)@firstHitZ - all+;dx [cm];dy [cm]',
+
210  2000, -100, 100, 2000, -100, 100)
+
211 
+
212  ut.bookHist(h,'dxdyHNLTrHm', 'dxdy(MCtr,firstHit)@firstHitZ - HNL-;dx [cm];dy [cm]',
+
213  2000, -100, 100, 2000, -100, 100)
+
214  ut.bookHist(h,'dxdyHNLTrHp', 'dxdy(MCtr,firstHit)@firstHitZ - HNL+;dx [cm];dy [cm]',
+
215  2000, -100, 100, 2000, -100, 100)
+
216 
+
217  ut.bookHist(h,'dRvsPz', 'dR(MCtr,firstHit)@firstHitZ vs Pz;Pz_{MC} [GeV];dR [cm]',
+
218  1000, 0, 50, 1000, 0, 100)
+
219  ut.bookHist(h,'dRvsZhit', 'dR(MCtr,firstHit)@firstHitZ vs firstHitZ;Z_{Hit0} [cm];dR [cm]',
+
220  2400, 2500, 3700, 1000, 0, 100)
+
221 
+
222  ut.bookHist(h,'YMC2dZMCVer', 'abs(YMCprop)/dZMCVer - HNL', 2000, 0,10)
+
223 
+
224  for histo in h:
+
225  h[histo].Sumw2()
+
226  h[histo].SetLineColor(1)
+
227 
+
228 ###################################################################################
+ +
230  ROOT.gStyle.SetStatY(0.9)
+
231  ROOT.gStyle.SetStatX(0.9)
+
232  ROOT.gStyle.SetStatW(0.3)
+
233  ROOT.gStyle.SetStatH(0.2)
+
234  ROOT.gStyle.SetOptStat(11)
+
235 
+
236  ut.bookCanvas(h,key='dRCanvas',title='dRCanvas',nx=1200,ny=600,cx=2,cy=1)
+
237  ROOT.gStyle.SetOptStat(1)
+
238  cv = h['dRCanvas'].cd(1)
+
239  h['dRvsPz'].Draw('colzbox')
+
240  cv = h['dRCanvas'].cd(2)
+
241  h['dRvsZhit'].Draw('colzbox')
+
242  h['dRCanvas'].Print('dRCanvas.gif')
+
243 
+
244  ROOT.gStyle.SetOptStat(11)
+
245  ut.bookCanvas(h,key='ratioYZ',title='ratioYZ',nx=600,ny=600,cx=1,cy=1)
+
246  ROOT.gStyle.SetOptStat(1)
+
247  cv = h['ratioYZ'].cd(1)
+
248  h['YMC2dZMCVer'].Draw()
+
249  h['ratioYZ'].Print('ratioYZ.gif')
+
250 
+
251  for x in ['ALL','HNL']:
+
252  ut.bookCanvas(h,key='MCTrackHit'+x,title='MCTrackHit'+x,nx=800,ny=800,cx=2,cy=2)
+
253  ROOT.gStyle.SetOptStat(1)
+
254  cv = h['MCTrackHit'+x].cd(1)
+
255  h['dxdy'+x+'TrHp'].Draw('colz')
+
256  cv = h['MCTrackHit'+x].cd(2)
+
257  h['dxdy'+x+'TrHm'].Draw('colz')
+
258  cv = h['MCTrackHit'+x].cd(3)
+
259  SetGrid(cv)
+
260  hh=h['dxdy'+x+'TrHp'].DrawCopy('colz')
+
261  for ax in [hh.GetXaxis(), hh.GetYaxis()]:
+
262  ax.SetRangeUser(-5,5)
+
263  cv = h['MCTrackHit'+x].cd(4)
+
264  SetGrid(cv)
+
265  hh=h['dxdy'+x+'TrHm'].DrawCopy('colz')
+
266  for ax in [hh.GetXaxis(), hh.GetYaxis()]:
+
267  ax.SetRangeUser(-5,5)
+
268  h['MCTrackHit'+x].Print('MCTrackHit'+x+'.gif')
+
269 
+
270 
+
271 
+
272 
+
273 
+
274 
+
275 
+
276 
+
277 ###################################################################################
+
278 ###################################################################################
+
279 ###################################################################################
+
280 def bookVertexHistos(h, prefix=""):
+
281  if prefix=="NEW":
+
282  ut.bookHist(h,'docaRel'+prefix, 'docaRel'+prefix+";step;doca/doca0", 5, 0, 5, 2000, 0., 2.)
+
283  ut.bookHist(h,'doca' +prefix, 'doca' +prefix+";doca [cm]", 500, 0., 100.)
+
284  h['doca'+prefix].SetLineColor(2)
+
285  ut.bookHist(h,'doca0' +prefix, 'doca0' +prefix+";doca0 [cm]", 500, 0., 100.)
+
286  ut.bookHist(h,'vdx2'+prefix, 'vdx2'+prefix, 500, 0, 5000, 400, -20., 20.)
+
287  ut.bookHist(h,'vdy2'+prefix, 'vdy2'+prefix, 500, 0, 5000, 400, -20., 20.)
+
288  ut.bookHist(h,'vdz2'+prefix, 'vdz2'+prefix, 500, 0, 5000, 4000, -400., 400.)
+
289  ut.bookHist(h,'vdx2ndf'+prefix, 'vdx2ndf'+prefix, 500, 0, 5000, 400, -20., 20.)
+
290  ut.bookHist(h,'vdy2ndf'+prefix, 'vdy2ndf'+prefix, 500, 0, 5000, 400, -20., 20.)
+
291  ut.bookHist(h,'vdz2ndf'+prefix, 'vdz2ndf'+prefix, 500, 0, 5000, 4000, -400., 400.)
+
292  if ( (prefix=="mUP") or (prefix=="mDN") ) : return
+
293  for i in range (1,11):
+
294  hhname='vdx2_'+str(i)+prefix
+
295  ut.bookHist(h, hhname, hhname, 100, -20., 20.)
+
296  h[hhname].StatOverflows(True) # to include overflow/underflow in mean/sigma (range independence)
+
297  hhname='vdy2_'+str(i)+prefix
+
298  ut.bookHist(h, hhname, hhname, 100, -20., 20.)
+
299  h[hhname].StatOverflows(True)
+
300  hhname='vdz2_'+str(i)+prefix
+
301  ut.bookHist(h, hhname, hhname, 200, -400., 400.)
+
302  h[hhname].StatOverflows(True)
+
303  for coord in ('x','y','z') :
+
304  hname = "vres"+coord+prefix
+
305  ut.bookHist(h, hname, hname+"z_{0}-z_{truth} [cm];", 10, 0., 5000.)
+
306  for histo in h:
+
307  h[histo].Sumw2()
+
308  h[histo].SetLineColor(1)
+
309 
+
310 
+
311 ###################################################################################
+
312 def plotVertexHistos(h,prefix=""):
+
313  ROOT.gStyle.SetStatY(0.9)
+
314  ROOT.gStyle.SetStatX(0.9)
+
315  ROOT.gStyle.SetStatW(0.3)
+
316  ROOT.gStyle.SetStatH(0.1)
+
317  ROOT.gStyle.SetOptStat(1)
+
318 
+
319  coordTitle = {1:'x',2:'y',3:'z'}
+
320  cut = {0:'',1:'ndf'}
+
321  ut.bookCanvas(h,key='vertex2'+prefix,title='vertex2'+prefix,nx=600,ny=1200,cx=2,cy=3)
+
322  for fall in cut:
+
323  for cid in coordTitle.keys():
+
324  cv = h['vertex2'+prefix].cd(cid*2-1+fall)
+
325  cv.SetBottomMargin(0.2)
+
326  cv.SetLeftMargin(0.2)
+
327  hname = 'vd'+coordTitle[cid]+'2'+cut[fall]+prefix
+
328  h[hname].Draw("box")
+
329  h[hname].GetXaxis().SetTitle("z_{0}-z_{truth} [cm]")
+
330  ytitle = coordTitle[cid]+"_{truth}-v"+coordTitle[cid]+"_{reco} [cm]"
+
331  h[hname].GetXaxis().SetTitleSize(.06)
+
332  h[hname].GetYaxis().SetTitleSize(.06)
+
333  h[hname].GetYaxis().SetTitleOffset(1.3)
+
334  h[hname].GetYaxis().SetNdivisions(5)
+
335  h['vertex2'+prefix].Print('vertex2'+prefix+'.gif')
+
336  if ( (prefix=="mUP") or (prefix=="mDN") ) : return
+
337 
+
338  f={}
+
339  for ct in coordTitle.values():
+
340  key =ct+prefix
+
341  ut.bookCanvas(h,key,title=key,nx=1600,ny=1200,cx=5,cy=2)
+
342  f[key]={}
+
343  for cvn in range (1,11):
+
344  hname='vd'+ct+'2_'+str(cvn)+prefix
+
345  cv = h[key].cd(cvn)
+
346  cv.SetBottomMargin(0.2)
+
347  h[hname].Draw("E")
+
348  xtitle = "v"+ct+"_{truth}-v"+ct+"_{reco} [cm]"
+
349  h[hname].GetXaxis().SetTitle(xtitle)
+
350  h[hname].GetXaxis().SetTitleSize(.06)
+
351  ROOT.gStyle.SetOptFit(11111)
+
352  f[key][hname] = ROOT.TF1(hname,'gaus')
+
353  f[key][hname].SetNpx(1000)
+
354  f[key][hname].SetParameter(1,0.)
+
355  f[key][hname].SetParameter(2,0.2*cvn)
+
356  h[hname].Fit(f[key][hname])
+
357  rmsht='vres'+key
+
358  #h[rmsht].SetBinContent(cvn, h[hname].GetRMS())
+
359  #h[rmsht].SetBinError (cvn, h[hname].GetRMSError())
+
360  h[rmsht].SetBinContent(cvn, f[key][hname].GetParameter(2))
+
361  h[rmsht].SetBinError (cvn, f[key][hname].GetParError(2))
+
362  h[key].Print(ct+prefix+'.gif')
+
363 
+
364  key='vRes'+prefix
+
365  ut.bookCanvas(h,key,title='vRes'+prefix,nx=800,ny=800,cx=2,cy=2)
+
366  for cti in coordTitle :
+
367  cv = h[key].cd(cti)
+
368  rmsht ="vres"+coordTitle[cti]+prefix
+
369  h[rmsht].SetTitle("vertex "+coordTitle[cti]+" resolution;z_{0}-z_{truth} [cm];#sigma_{Gauss}(#Delta"+coordTitle[cti]+") [cm]")
+
370  h[rmsht].Draw("E")
+
371  h[key].Print(key+'.gif')
+
372 
+
373  if ( prefix=='NEW' ) :
+
374  key='docaPlots'+prefix
+
375  ut.bookCanvas(h,key,key,nx=1200,ny=600,cx=2,cy=1)
+
376  cv = h[key].cd(1)
+
377  h['doca'+prefix].Draw()
+
378  h['doca0'+prefix].Draw("sames")
+
379  cv = h[key].cd(2)
+
380  h['docaRel'+prefix].Draw()
+
381  h[key].Print(key+'.gif')
+
def plotCompareFitHistos
Definition: BookHistos.py:171
+
def plotMomentumHistos
Definition: BookHistos.py:87
+
def plotMCTrackHitCorrelation
Definition: BookHistos.py:229
+
def plotVertexHistos
Definition: BookHistos.py:312
+
def SetAxis
Definition: BookHistos.py:9
+
def SetGrid
Definition: BookHistos.py:5
+
def bookVertexHistos
Definition: BookHistos.py:280
+
def plotMFieldHistos
Definition: BookHistos.py:38
+
def bookMFieldHistos
Definition: BookHistos.py:21
+
def bookTrackingHistos
Definition: BookHistos.py:206
+
def bookCompareFitHistos
Definition: BookHistos.py:149
+
def bookMomentumHistos
Definition: BookHistos.py:67
+
+ + + + diff --git a/Katerina/doc/html/FitTrackInfo_8py.html b/Katerina/doc/html/FitTrackInfo_8py.html new file mode 100644 index 0000000..e0da707 --- /dev/null +++ b/Katerina/doc/html/FitTrackInfo_8py.html @@ -0,0 +1,72 @@ + + + + + + +Python: FitTrackInfo.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
FitTrackInfo.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  FitTrackInfo.FitTrackInfo
 
+ + + +

+Namespaces

 FitTrackInfo
 
+
+ + + + diff --git a/Katerina/doc/html/FitTrackInfo_8py_source.html b/Katerina/doc/html/FitTrackInfo_8py_source.html new file mode 100644 index 0000000..b634750 --- /dev/null +++ b/Katerina/doc/html/FitTrackInfo_8py_source.html @@ -0,0 +1,240 @@ + + + + + + +Python: FitTrackInfo.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
FitTrackInfo.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 
+
5 class FitTrackInfo(object):
+
6 
+
7  def __init__(self, tree, debug=0):
+
8  self.tree = tree
+
9  self.debug = debug
+
10  self.count = 0
+
11  self.Momentum = {}
+
12  self.Direction = {}
+
13  self.Position = {}
+
14  self.__info = {}
+
15  self.Vertex = None
+
16  self.Doca = None
+
17  # 0 orig, 1 refit, -1 failed refit
+
18  self.vertexEFlag = 0
+
19 
+
20  def clean(self):
+
21  self.count = 0
+
22  self.Momentum.clear()
+
23  self.Direction.clear()
+
24  self.Position.clear()
+
25  self.__info.clear()
+
26  self.Vertex = None
+
27  self.Doca = None
+
28 
+
29  def Print(self):
+
30  print "FitTrackInfo:"
+
31  for tid in self.__info:
+
32  print "\t", tid, "{:10.4f}".format(self.__info[tid]['Ndf']), "{:10.4f}".format(self.__info[tid]['Chi2']),
+
33  print " pos:", " ".join("{:10.4f}".format(self.Position[tid](ii)) for ii in range(0,3)),
+
34  print " mom:", " ".join("{:10.4f}".format(self.Direction[tid](ii)*self.Momentum[tid]) for ii in range(0,3)),
+
35  print " P:", "{:10.4f}".format(self.Momentum[tid])
+
36 
+
37  ## \brief returns list of keys #__info .
+
38  # \return list of MCtrackIDs of fitted tracks.
+
39  def getTrIDs(self):
+
40  trID = []
+
41  for tid in self.__info:
+
42  trID.append(tid)
+
43  return trID
+
44 
+
45  def getNtracks(self) :
+
46  return len(self.__info)
+
47 
+
48  def getChi2Ndf(self, tid):
+
49  return self.__info[tid]['Chi2']/self.__info[tid]['Ndf']
+
50 
+
51  def getNdf(self, tid):
+
52  return self.__info[tid]['Ndf']
+
53 
+
54  def compareTracks(self, tid, Pos, Dir, Pval):
+
55  false2 = (Pos==None or Dir==None or Pval==None)
+
56  false1 = (not tid in self.__info)
+
57  if (false2 and false1): return True
+
58  if (false2 or false1): return False
+
59  return ( (self.Direction[tid]==Dir) and (self.Position[tid]==Pos) and (self.Momentum[tid]==Pval) )
+
60 
+
61 
+
62  def getPosDirPval(self, tid):
+
63  if not tid in self.__info: return None, None, None
+
64  return self.Position[tid], self.Direction[tid], self.Momentum[tid]
+
65 
+
66  def getVertex(self) :
+
67  return self.Vertex
+
68 
+
69  def getDoca(self):
+
70  return self.Doca
+
71 
+
72  def myVertex2(self, t1,t2):
+
73  deltaPos =(self.Position[t1]-self.Position[t2]) # A1-A2
+
74  dotDir = self.Direction[t1].Dot(self.Direction[t2]) # a1.a2
+
75  crossDir = self.Direction[t1].Cross(self.Direction[t2]) # a1xa2
+
76  uPerpend = crossDir*(1./crossDir.Mag()) # (a1xa2)/|a1xa2| from a1 to a2
+
77 
+
78  minDist = deltaPos.Dot(uPerpend) # (A1-A2).(a1xa2)/|a1xa2|
+
79 
+
80  # A1 + a1*t1 + (minDist * uPerpend) is (A1 + a1*t1) projected to the plane:
+
81  # 1) A2+a2*t2 belons to the plane,
+
82  # 2) A1+a1*t1 is parallel to the plane
+
83  # cross at t1,t2: A1+a1*t1+(minDist*uPerpend) = A2+a2*t2
+
84  t2X = self.Direction[t2].X()
+
85  if (t2X == 0) : t2X = 0.00000000001
+
86  a2a = self.Direction[t2].Y()/t2X
+
87  alpha = deltaPos - minDist*uPerpend
+
88  nomin = alpha.Y() - a2a*alpha.X()
+
89  denom = a2a*self.Direction[t1].X() - self.Direction[t1].Y()
+
90  s1 = nomin/denom
+
91  s2 = ( alpha.X() + self.Direction[t1].X()*s1 ) / t2X#self.Direction[t2].X()
+
92  vec1 = self.Position[t1]+s1*self.Direction[t1]
+
93  vec2 = self.Position[t2]+s2*self.Direction[t2]
+
94  ave = (vec1+vec2)*0.5
+
95  dif = vec1-vec2
+
96  debugNeed = False
+
97  if(abs(abs(minDist)-dif.Mag())>0.00000001):
+
98  print "myVertex2 - problem:"
+
99  debugNeed = True
+
100  if(self.debug>2 or debugNeed):
+
101  for tid in (t1,t2):
+
102  print str(tid)+": Pos : ", "".join(str(self.Position[tid](ii)) +" " for ii in range(0,3)),
+
103  print "\t\tMom : ", "".join(str(self.Direction[tid](ii))+" " for ii in range(0,3))
+
104  print "uPerpend: ","".join(str(uPerpend(ii))+" " for ii in range(0,3))
+
105  if(self.debug>0 or debugNeed):
+
106  print "fit vertex: -> 1st poing : ", vec1.X(), vec1.Y(), vec1.Z()
+
107  print "fit vertex: -> 2nd point : ", vec2.X(), vec2.Y(), vec2.Z()
+
108  print "fit vertex: -> average : ", ave.X(), ave.Y(), ave.Z()
+
109  print "distance", abs(minDist), dif.Mag()
+
110  return ave, abs(minDist)
+
111 
+
112 
+
113  def readEvent(self):
+
114  self.clean()
+
115  indx = -1
+
116  for atrack in self.tree.FitTracks:
+
117  # kill tracks outside fiducial volume
+
118  # if not checkFiducialVolume(sTree,key,dy): continue
+
119  fitStatus = atrack.getFitStatus()
+
120  if not fitStatus.isFitConverged() : continue
+
121 
+
122  indx+=1
+
123  mcTrID = self.tree.fitTrack2MC[indx]
+
124 
+
125  self.__info[mcTrID] = {}
+
126  self.__info[mcTrID]['Ndf'] = fitStatus.getNdf()
+
127  self.__info[mcTrID]['Chi2'] = fitStatus.getChi2()
+
128 
+
129  fittedState = atrack.getFittedState()
+
130  self.Momentum[mcTrID] = fittedState.getMomMag()
+
131  self.Direction[mcTrID] = fittedState.getDir()
+
132  self.Position[mcTrID] = fittedState.getPos()
+
133 
+
134  if(indx>0):
+
135  if(indx==1):
+
136  self.createVertex(self.__info.keys()[0], self.__info.keys()[1])
+
137  else:
+
138  pass
+
139  #print "More than 2 fitterd tracks"
+
140  return len(self.__info)
+
141 
+
142  def createVertex(self, tid1, tid2, flag=0):
+
143  if( (tid1 in self.__info) and (tid2 in self.__info) ):
+
144  self.Vertex, self.Doca = self.myVertex2(tid1, tid2)
+
145  self.vertexEFlag = flag
+
146 
+
147  def addNewTrack(self, mcTrID, position, direction, Pval, ndf, chi2, verb = True):
+
148  if (verb and mcTrID in self.Momentum):
+
149  print "FotTrackInfo WARNING - trID ", mcTrID, "already filled! Will rewrite all records for this trID!"
+
150 
+
151  self.__info[mcTrID]={}
+
152  self.__info[mcTrID]['Ndf'] = ndf
+
153  self.__info[mcTrID]['Chi2'] = chi2
+
154 
+
155  self.Momentum[mcTrID] = Pval
+
156  self.Direction[mcTrID] = direction
+
157  self.Position[mcTrID] = position
+
158 
+ + + + + + + + + + + + + + + + + +
def getTrIDs
returns list of keys __info .
Definition: FitTrackInfo.py:39
+ + + + + + + + +
+ + + + diff --git a/Katerina/doc/html/LoopAnalyse_8py.html b/Katerina/doc/html/LoopAnalyse_8py.html new file mode 100644 index 0000000..2281c66 --- /dev/null +++ b/Katerina/doc/html/LoopAnalyse_8py.html @@ -0,0 +1,72 @@ + + + + + + +Python: LoopAnalyse.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
LoopAnalyse.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  LoopAnalyse.LoopAnalyse
 
+ + + +

+Namespaces

 LoopAnalyse
 
+
+ + + + diff --git a/Katerina/doc/html/LoopAnalyse_8py_source.html b/Katerina/doc/html/LoopAnalyse_8py_source.html new file mode 100644 index 0000000..66c0525 --- /dev/null +++ b/Katerina/doc/html/LoopAnalyse_8py_source.html @@ -0,0 +1,521 @@ + + + + + + +Python: LoopAnalyse.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
LoopAnalyse.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 import numpy as n
+
5 import collections
+
6 
+
7 from ShipGeoConfig import ConfigRegistry
+
8 import shipDet_conf
+
9 
+
10 import BookHistos
+
11 
+
12 from MCTrackInfo import MCTrackInfo
+
13 from StrawHits import StrawHits
+
14 from FitTrackInfo import FitTrackInfo
+
15 
+
16 import RecoSettings
+
17 
+
18 
+
19 class LoopAnalyse(object):
+
20  def __init__(self, tree, pref, geoFile, debug=0,
+
21  plotField = False,
+
22  plotTracking = False,
+
23  plotVertex = False,
+
24  plotVertexDetailed = False,
+
25  plotMomentum = False,
+
26  compareFits = False):
+
27  self.tree = tree
+
28  self.debug = debug
+
29 
+
30  self.modules = None
+
31  self.ShipGeo = None
+
32  self.run = None
+
33  self.createGeom(pref, geoFile)
+
34 
+
35  self.stat = collections.OrderedDict()
+
36 
+
37  self.hmagnet = {}
+
38  self.htrck = {}
+
39  self.hvtx = {}
+
40  self.hmom = {}
+
41  self.hcmfits = {}
+
42  self.plotField = False
+
43  self.plotTracking = False
+
44  self.plotVertex = False
+
45  self.plotVertexCh = False
+
46  self.plotMomentum = False
+
47  self.compareFits = False
+
48 
+
49 
+
50  if plotField:
+
51  self.plotField = True
+ +
53  if plotTracking:
+
54  self.plotTracking = True
+ +
56  if plotVertex:
+
57  self.plotVertex = True
+ +
59  if plotVertexDetailed:
+
60  self.plotVertexCh = True
+ + +
63 
+
64  if plotMomentum:
+
65  self.plotMomentum = True
+ +
67  if compareFits:
+
68  self.compareFits = True
+ +
70  if plotVertex : BookHistos.bookVertexHistos(self.hvtx, "NEW")
+
71  if plotMomentum: BookHistos.bookMomentumHistos(self.hmom, "NEW")
+
72 
+
73  self.MCTracks = MCTrackInfo(self.tree, 0)#self.debug)
+
74  self.StrHits = StrawHits(self.tree, self.modules, self.ShipGeo.straw.resol, self.debug, self.hmagnet, self.ShipGeo)
+
75  self.FitTracks = FitTrackInfo(self.tree, 0)#self.debug)
+
76  # FIXneeded - to introduce one more FixTracks!
+
77 
+
78 
+
79  def createGeom(self,pref, geoFile):
+
80  self.ShipGeo = ConfigRegistry.loadpy("$FAIRSHIP/geometry/geometry_config.py", Yheight = pref )
+
81  self.run = ROOT.FairRunSim()
+
82  self.modules = shipDet_conf.configure(self.run,self.ShipGeo)
+
83  tgeom = ROOT.TGeoManager("Geometry", "Geane geometry")
+
84  gMan = tgeom.Import(geoFile)
+
85  geoMat = ROOT.genfit.TGeoMaterialInterface()
+
86  ROOT.genfit.MaterialEffects.getInstance().init(geoMat)
+
87  volDict = {}
+
88  i=0
+
89  for x in ROOT.gGeoManager.GetListOfVolumes():
+
90  volDict[i]=x.GetName()
+
91  i+=1
+
92 
+
93  bfield = ROOT.genfit.BellField(self.ShipGeo.Bfield.max ,self.ShipGeo.Bfield.z,2, self.ShipGeo.Yheight/2.)
+
94  fM = ROOT.genfit.FieldManager.getInstance()
+
95  fM.init(bfield)
+
96 
+
97 
+
98 
+
99  def CleanStat(self):
+
100  self.stat['total'] = 0
+
101  self.stat['HNLnTr'] = 0
+
102  self.stat['HNLzAcc'] = 0
+
103  self.stat['HNLeAcc'] = 0
+
104  self.stat['twoFitsO'] = 0
+
105  self.stat['twoFitsN'] = 0
+
106  self.stat['twoFitsNdfO'] = 0
+
107  self.stat['twoFitsNdfN'] = 0
+
108 
+
109  def writeHistos(self):
+
110  ut.writeHists(htrck,"LoopA.root")
+
111 
+
112 
+
113 
+
114 
+
115  def hitMCtrackCorellations(self, weight=1):
+
116  # FIXneeded - add HNL vertex distribution plots!
+
117  if ( not self.plotTracking):
+
118  print "hitMCtrackCorellations does nothing since BookHistos.bookTrackingHistos() was not called!"
+
119  return
+
120  for tid in self.StrHits.getTrIDs(): # only multi-hits>25 tracks
+
121  if ( self.StrHits.checkVetoHits(tid) > 0) : continue # remove ones with vetoStattion
+
122  vec3h = self.StrHits.getStartHit(tid)
+
123  vec3p = self.MCTracks.getTrackPropagation(tid, vec3h.Z())
+
124  if(self.debug>0):
+
125  print "extr.", tid, "\t", vec3p.X(), vec3p.Y(), vec3p.Z(),
+
126  print "\tcharge:", self.MCTracks.getCharge(tid), "\tdx=", vec3p.X()-vec3h.X(), "dy=", vec3p.Y()-vec3h.Y()
+
127  dR = ROOT.TMath.Sqrt( (vec3p.X()-vec3h.X())**2 + (vec3p.Y()-vec3h.Y())**2 )
+
128  self.htrck['dRvsPz'].Fill(self.MCTracks.getMomentum(tid).Z(), dR, weight)
+
129  self.htrck['dRvsZhit'].Fill(vec3h.Z(), dR, weight)
+
130  charge = self.MCTracks.getCharge(tid)
+
131  theRatio = abs(vec3p.Y())/(vec3h.Z()-self.MCTracks.getHNLdecayVertex().Z())
+
132  HNLflag = tid in self.MCTracks.getHNLdecayTrIDs()
+
133  if HNLflag:
+
134  self.htrck['YMC2dZMCVer'].Fill(theRatio,weight)
+
135  if charge<0:
+
136  self.htrck['dxdyALLTrHm'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight)
+
137  if HNLflag:
+
138  self.htrck['dxdyHNLTrHm'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight)
+
139  elif charge>0:
+
140  self.htrck['dxdyALLTrHp'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight)
+
141  if HNLflag:
+
142  self.htrck['dxdyHNLTrHp'].Fill(vec3p.X()-vec3h.X(), vec3p.Y()-vec3h.Y(), weight)
+
143 
+
144 
+
145 
+
146  def fitMCvertexCorellations(self, weight=1, old=True, cut=False, detailed=False):
+
147  if( cut and detailed ) : print "fitMCvertexCorellations can't plot detailed vertex for cut! FIX me!"
+
148  vMC = self.MCTracks.getHNLdecayVertex()
+
149  if old :
+
150  vFt = self.FitTracks.getVertex()
+
151  else :
+
152  vFt = self.StrHits.getReFitVertex()
+
153  if (not vFt or not vMC) : return
+
154 
+
155  if(self.plotVertex or self.plotVertexCh):
+
156  distanceToTracker = self.ShipGeo.TrackStation1['z']-vMC.Z()
+
157  coord = ['x','y','z']
+
158  iz = 1
+
159  while ( (iz<11) and (distanceToTracker>iz*500) ):
+
160  iz = iz+1
+
161 
+
162  pref=""
+
163  prefCut=""
+
164  if( cut ) : prefCut='ndf'
+
165  if( not old ): pref='NEW'
+
166  for i in range(0,3):
+
167  delta = vMC(i)-vFt(i)
+
168  if( self.plotVertex ):
+
169  hname = 'vd'+coord[i]+'2'+prefCut+pref
+
170  self.hvtx[hname].Fill(distanceToTracker, delta, weight)
+
171  if (not cut):
+
172  if (iz<11):
+
173  hname='vd'+coord[i]+'2_'+str(iz)+pref
+
174  self.hvtx[hname].Fill(delta, weight)
+
175 
+
176  if( self.plotVertexCh and old ):
+
177  sign = self.MCTracks.checkVertexUpDown()
+
178  if ( sign==0 ): continue
+
179  if ( sign<0) :
+
180  pref = "mUp"
+
181  else:
+
182  pref = "mDn"
+
183  hname = 'vd'+coord[i]+'2'+pref
+
184  self.hvtx[hname].Fill(distanceToTracker, delta, weight)
+
185  if( pref=='NEW') :
+
186  doca = self.StrHits.getStepDoca(RecoSettings.VertexExtrSteps-1)
+
187  if ( doca!=None ) : self.hvtx['doca'+pref].Fill(doca)
+
188  doca0 = self.StrHits.getStepDoca(0)
+
189  if ( doca0!=None ) : self.hvtx['doca0'+pref].Fill(doca0)
+
190  if ( doca0!=None and doca0!=0):
+
191  self.hvtx['docaRel'+pref].Fill(1,1.)
+
192  for ii in range (1, RecoSettings.VertexExtrSteps):
+
193  doca = self.StrHits.getStepDoca(ii)
+
194  #print "...", doca, doca/doca0
+
195  if ( doca!=None ) :
+
196  self.hvtx['docaRel'+pref].Fill(ii+1, doca/doca0)
+
197  return vFt
+
198 
+
199 
+
200 
+
201 
+
202 
+
203  def doCompareFits(self, oldStyle=True, ellCut=False, weight=1):
+
204  ntracks = self.StrHits.FitTracks(oldStyle) # does re-fitting
+
205  if (self.debug>0) : self.StrHits.PrintNewTracks()
+
206 
+
207  fitOldTrIDs = self.FitTracks.getTrIDs()
+
208  fitNewTrIDs = self.StrHits.getReFitTrIDs()
+
209 
+
210  for tid in fitOldTrIDs:
+
211  self.hcmfits['Chi2NDFold'].Fill(self.FitTracks.getChi2Ndf(tid))
+
212  self.hcmfits['NDFold'].Fill(self.FitTracks.getNdf(tid))
+
213  for tid in fitNewTrIDs:
+
214  self.hcmfits['Chi2NDFnew'].Fill(self.StrHits.getReFitChi2Ndf(tid))
+
215  self.hcmfits['NDFnew'].Fill(self.StrHits.getReFitNdf(tid))
+
216 
+
217  for tid in self.StrHits.getTrIDsALL(): # hists with MCTrID>0
+
218  told = ( tid in fitOldTrIDs)
+
219  tnew = ( tid in fitNewTrIDs)
+
220  if( (not told) and (not tnew) ):
+
221  self.hcmfits['FitCorrespondence'].Fill(0)
+
222  elif( (not told) and tnew):
+
223  self.hcmfits['FitCorrespondence'].Fill(1)
+
224  elif( told and (not tnew) ):
+
225  self.hcmfits['FitCorrespondence'].Fill(2)
+
226  else:
+
227  eq = self.StrHits.compareFitTracks(tid, self.FitTracks)
+
228  if eq:
+
229  self.hcmfits['FitCorrespondence'].Fill(5)
+
230  else:
+
231  self.hcmfits['FitCorrespondence'].Fill(6)
+
232  self.hcmfits['dNFoldFNnew'].Fill(len(fitOldTrIDs), len(fitNewTrIDs))
+
233  return ntracks
+
234 
+
235 
+
236 
+
237 
+
238  def doPlotMomentum(self, weight, old=True):
+
239  tids = []
+
240  pfix = ""
+
241  if old:
+
242  tids = self.FitTracks.getTrIDs()
+
243  else:
+
244  tids = self.StrHits.getReFitTrIDs()
+
245  pfix = "NEW"
+
246 
+
247  for tid in tids:
+
248  r,d,pFit = None, None, None
+
249  chi2ndf,ndf = None, None
+
250  if old:
+
251  r,d,pFit = self.FitTracks.getPosDirPval(tid)
+
252  ndf = self.FitTracks.getNdf(tid)
+
253  chi2ndf = self.FitTracks.getChi2Ndf(tid)
+
254  else:
+
255  r,d,pFit = self.StrHits.getReFitPosDirPval(tid)
+
256  ndf = self.StrHits.getReFitNdf(tid)
+
257  chi2ndf = self.StrHits.getReFitChi2Ndf(tid)
+
258  if( not tid in self.MCTracks.getTrIDs() ): continue
+
259  pMC = self.MCTracks.getMomentum(tid).Mag()
+
260  dPP = (pMC - pFit)/pMC
+
261  hname = 'delPOverP0'+pfix
+
262  self.hmom[hname].Fill(chi2ndf, dPP, weight)
+
263  hname = 'delPOverP1'+pfix
+
264  self.hmom[hname].Fill(pMC, dPP, weight)
+
265 
+
266  if( ndf<RecoSettings.trackMinNofHits ): continue
+
267  hname = 'delPOverP2'+pfix
+
268  self.hmom[hname].Fill(pMC, dPP, weight)
+
269 
+
270  if( not tid in self.MCTracks.getHNLdecayTrIDs() ): continue
+
271  hname = 'delPOverP3'+pfix
+
272  self.hmom[hname].Fill(pMC, dPP, weight)
+
273 
+
274  iz = 1
+
275  while ( (iz<6) and (pMC>iz*10) ):
+
276  iz = iz+1
+
277  if (iz<6):
+
278  hname = 'delPOverP3_'+str(iz)+pfix
+
279  self.hmom[hname].Fill(dPP, weight)
+
280 
+
281 
+
282 
+
283 
+
284 
+
285 
+
286 
+
287 
+
288 
+
289 
+
290 
+
291 
+
292 
+
293  def PrintStat(self):
+
294  for stage in self.stat:
+
295  print "{0:15}{1:10}".format(stage, self.stat[stage])
+
296 
+
297 
+
298 
+
299 
+
300 ################################################################################################
+
301  def Loop(self, stat=-1):
+
302  self.CleanStat()
+
303 
+
304  if(stat==-1):
+
305  nEvents = self.tree.GetEntries()
+
306  else:
+
307  nEvents = min(self.tree.GetEntries(),stat)
+
308 
+
309  # --------------- cut related values ------------------------------------------------------#
+
310  # FIXneeded - should be done depending on RecoSettings.trackMinNofStations!
+
311  # self.MCTracks.setAccPlaneZ(3380*u.cm) # - after 3rd Station
+
312  self.MCTracks.setAccPlaneZ(2500*u.cm) #- before 1st Station
+
313 
+
314 
+
315 
+
316  # -----------------------------------------------------------------------------------------#
+
317  # -----------------------------------------------------------------------------------------#
+
318  for n in range(nEvents):
+
319 
+
320  rc = self.tree.GetEntry(n)
+
321  self.stat['total'] +=1
+
322 
+
323  # ------------------- MCTracks -----------------------------------------------------------#
+
324  nMCPrimTracks = self.MCTracks.readEvent()
+
325  if( self.debug>0) :
+
326  print "\n\nevent ", n, "===================================================="
+
327  self.MCTracks.PrintHNL()
+
328 
+
329  #=>
+
330  if( nMCPrimTracks!=2 ) : continue
+
331  self.stat['HNLnTr']+=1
+
332 
+
333  #=>
+
334  # FIXneeded - should be setting from ShipGeo here!
+
335  if( (self.MCTracks.getHNLdecayVertex().Z()<-1900*u.cm) \
+
336  or (self.MCTracks.getHNLdecayVertex().Z()>RecoSettings.VertexMaxZcut) ) : continue
+
337  self.stat['HNLzAcc']+=1
+
338 
+
339  #=>
+
340  if( (not self.MCTracks.checkEllipticAcc()) ) : continue
+
341  self.stat['HNLeAcc'] +=1
+
342  if( self.debug>1 ): print "MC event accepted"
+
343 
+
344 
+
345  weight = self.MCTracks.getEventWeight()
+
346  #weight = 1
+
347 
+
348  # ------------------- FitTracks -----------------------------------------------------------#
+
349  nFitTracks = self.FitTracks.readEvent()
+
350  if(self.plotMomentum):self.doPlotMomentum(weight, old=True)
+
351  if(self.debug>0) : self.FitTracks.Print()
+
352 
+
353  printMCVert = False
+
354  if (nFitTracks==2):
+
355  self.stat['twoFitsO']+=1
+
356  v=self.fitMCvertexCorellations(weight, old=True, cut=False, detailed=self.plotVertexCh)
+
357  printMCVert = True
+
358  print "\n\nOld vertex ", v.X(), v.Y(), v.Z()
+
359 
+
360  ndfok = True
+
361  for tid in self.FitTracks.getTrIDs() :
+
362  ndfok = ( ndfok and (self.FitTracks.getNdf(tid)>RecoSettings.trackMinNofHits) )
+
363  if ( not ndfok ) : break
+
364  if ndfok : # FIXneeded - not optimal to call it once more :(
+
365  self.stat['twoFitsNdfO']+=1
+
366  v=self.fitMCvertexCorellations(weight, old=True, cut=True, detailed=False)
+
367  print "the old vertex passes ndf cut!"
+
368 
+
369  # -------------------- StrawHits --------------------------------------------------------------#
+
370  if ( self.compareFits or self.plotTracking ) :
+
371  self.StrHits.readEvent()
+
372 
+
373 
+
374  # -------------------- ReFit --------------------------------------------------------------#
+
375  nNewFitTracks = 0
+
376  if self.compareFits :
+
377  nNewFitTracks = self.doCompareFits(oldStyle=True, ellCut=False, weight=weight)
+
378  if(self.plotMomentum):self.doPlotMomentum(weight, old=False)
+
379 
+
380  if (nNewFitTracks==2):
+
381  self.stat['twoFitsN']+=1
+
382  v=self.fitMCvertexCorellations(weight, old=False)
+
383  print "New vertex ", v.X(), v.Y(), v.Z()
+
384  printMCVert = True
+
385 
+
386  ndfok = True
+
387  for tid in self.StrHits.getReFitTrIDs() :
+
388  ndfok = ( ndfok and (self.StrHits.getReFitNdf(tid)>RecoSettings.trackMinNofHits) )
+
389  if ( not ndfok ) : break
+
390  if ndfok : # FIXneeded - not optimal to call it once more :(
+
391  self.stat['twoFitsNdfN']+=1
+
392  v=self.fitMCvertexCorellations(weight, old=False, cut=True, detailed=False)
+
393  print "the new vertex passes ndf cut!"
+
394 
+
395 
+
396  if printMCVert : self.MCTracks.PrintHNL()
+
397 
+
398 
+
399 
+
400  if(self.plotTracking) : self.hitMCtrackCorellations(weight)
+
401 
+
402 
+
403 
+
404 
+
405  # end event loop
+
406  #=======================================
+
407  print "here -> ", self.plotField
+ + + +
411  if self.plotVertexCh :
+ + + +
415  if self.compareFits :
+ +
417  if self.plotVertex : BookHistos.plotVertexHistos(self.hvtx,'NEW')
+
418  if self.plotMomentum : BookHistos.plotMomentumHistos(self.hmom, 'NEW')
+
419 
+
420  #=======================================
+
421  self.PrintStat()
+
def plotCompareFitHistos
Definition: BookHistos.py:171
+ + + + + +
def plotMomentumHistos
Definition: BookHistos.py:87
+ + + + + + + + +
def plotMCTrackHitCorrelation
Definition: BookHistos.py:229
+
def plotVertexHistos
Definition: BookHistos.py:312
+ + + + + + + + + + + + + + +
def bookVertexHistos
Definition: BookHistos.py:280
+
def plotMFieldHistos
Definition: BookHistos.py:38
+ + + +
def bookMFieldHistos
Definition: BookHistos.py:21
+
def bookTrackingHistos
Definition: BookHistos.py:206
+
For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMC...
Definition: MCTrackInfo.py:10
+
def bookCompareFitHistos
Definition: BookHistos.py:149
+ + + +
def bookMomentumHistos
Definition: BookHistos.py:67
+
+ + + + diff --git a/Katerina/doc/html/MCTrackInfo_8py.html b/Katerina/doc/html/MCTrackInfo_8py.html new file mode 100644 index 0000000..9ab68f6 --- /dev/null +++ b/Katerina/doc/html/MCTrackInfo_8py.html @@ -0,0 +1,74 @@ + + + + + + +Python: MCTrackInfo.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
MCTrackInfo.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + + +

+Classes

class  MCTrackInfo.MCTrackInfo
 For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+. More...
 
+ + + +

+Namespaces

 MCTrackInfo
 
+
+ + + + diff --git a/Katerina/doc/html/MCTrackInfo_8py_source.html b/Katerina/doc/html/MCTrackInfo_8py_source.html new file mode 100644 index 0000000..bf4443d --- /dev/null +++ b/Katerina/doc/html/MCTrackInfo_8py_source.html @@ -0,0 +1,337 @@ + + + + + + +Python: MCTrackInfo.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
MCTrackInfo.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 import RecoSettings
+
5 ########################################################################
+
6 ## For a single event stores HNL, its decay products and several other tracks (if requested)
+
7 # from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)\n
+
8 #
+
9 #
+
10 class MCTrackInfo(object):
+
11  """ More description here"""
+
12  def __init__(self, tree, debug=0):
+
13  ## root tree to be read.
+
14  self.__tree = tree
+
15  ## debug level [0,3].
+
16  self.__debug = debug
+
17  ## z of the last full acceptance plane (to be used in #checkEllipticAcc), must be set later.
+
18  self.__zAcc = 3380*u.cm
+
19  ## event weight. Read in #readEvent as weight of HNL.
+
20  self.__weight = 0
+
21  ## HNL decay vertex coordinates (TVector3). Assigned in #readEvent()
+
22  self.__HNLdecayCoord = None
+
23  ## MCTrID (index of the track in MCtrack list) for \b HNL \b daughter products.
+
24  self.__decayProdTrID = []
+
25  ## Production vertices of several stored products (\b not \b only HNL daughter) as {MCTrID : TVector3}.
+
26  self.__productVertex = {}
+
27  ## Momentum of several stored products (\b not \b only HNL daughter) as {MCTrID : TVector3}. Correspond to $__productVertex.
+
28  self.__productMoment = {}
+
29  ## Charge of several stored products (\b not \b only HNL daughter) as {MCTrID : value}. Correspond to $__productVertex.
+
30  self.__productCharge = {}
+
31  ## Basic information on the particle (pdg, mother pdg,... to be added - z decay!)
+
32  self.__productInfo = {}
+
33 
+
34 
+
35 
+
36 
+
37 
+
38  ########################################################################
+
39  ##\brief clears all dictionaries and lists. To be called inside #readEvent.
+
40  def __clean(self):
+
41  self.__weight = 0
+
42  self.__HNLdecayCoord = None
+
43  self.__decayProdTrID = []
+
44  self.__productVertex.clear()
+
45  self.__productMoment.clear()
+
46  self.__productCharge.clear()
+
47  self.__productInfo.clear()
+
48 
+
49  ########################################################################
+
50  ##\brief set z of the last full acceptance plane (to be used in #checkEllipticAcc), depends on #RecoSettings. trackMinNofStations.
+
51  # \param z - the value [cm].
+
52  def setAccPlaneZ(self, z):
+
53  self.__zAcc = z
+
54 
+
55 
+
56  ########################################################################
+
57  ##\brief prints HNL decay products
+
58  def PrintHNL(self):
+
59  print type(self).__name__, " : "
+
60  print "\tdecay vertex: ", " ".join("{:10.4f}".format(self.__HNLdecayCoord(ii)) for ii in range(0,3)),
+
61  print "\n\tdecay products (trID, pdg, charge, momentum):"
+
62  for tid in self.__decayProdTrID :
+
63  print "\t", "{0:6}{1:10}{2:6.0f}".format(tid, self.__productInfo[tid]['pdg'], self.__productCharge[tid]),
+
64  print "\t", " ".join("{:10.4f}".format(self.__productMoment[tid](ii)) for ii in range(0,3))
+
65 
+
66 
+
67 
+
68  ########################################################################
+
69  ## \brief returns event weight.
+
70  # \return value of #__weight
+
71  def getEventWeight(self):
+
72  return self.__weight
+
73 
+
74 
+
75  ########################################################################
+
76  ## \brief returns \b HNL \b decay \b vertex coordinates (TVector3 #__HNLdecayCoord).
+
77  # \return TVector3 #__HNLdecayCoord
+
78  def getHNLdecayVertex(self):
+
79  return self.__HNLdecayCoord
+
80 
+
81 
+
82  ########################################################################
+
83  ## \brief returns list of MCtrIDs (index in MCTrack collection) fot \b HNL \b decay \b products.
+
84  # \return list of MCtrIDs (index in MCTrack collection) fot \b HNL \b decay \b products.
+
85  def getHNLdecayTrIDs(self):
+
86  trID = []
+
87  for tid in self.__decayProdTrID:
+
88  trID.append(tid)
+
89  return trID
+
90 
+
91 
+
92  ########################################################################
+
93  ## \brief returns list of all MCtrIDs read by #readEvent and #readTrack - \b not \b only HNL decay products.
+
94  # \return list of MCtrIDs (index in MCTrack collection) fot all tracks read by #readEvent and #readTrack.
+
95  def getTrIDs(self):
+
96  trID = []
+
97  for tid in self.__productMoment:
+
98  trID.append(tid)
+
99  return trID
+
100 
+
101 
+
102  ########################################################################
+
103  ## \brief returns charge of a particle with the given trID (index in MCTrack collection). May return None.
+
104  # Tries to get charge from #__productCharge;
+
105  # if it is not available, tries to add the track calling #readTrack. If fails, returns None.
+
106  # \param trID - index of the MCTrack
+
107  # \return charge of the track or None
+
108  def getCharge(self, trID):
+
109  if ( not trID in self.__productCharge ): self.readTrack(trID)
+
110  return self.__productCharge[trID]
+
111 
+
112 
+
113 
+
114  ########################################################################
+
115  ## \brief returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection). May return None.
+
116  # Tries to get momentum from #__productMoment;
+
117  # if it is not available, tries to add the track calling #readTrack. If fails, returns None.
+
118  # \param trID - index of the MCTrack
+
119  # \return momentum of the track (TVector3) or None
+
120  def getMomentum(self, trID):
+
121  if ( not trID in self.__productMoment ): self.readTrack(trID)
+
122  return self.__productMoment[trID]
+
123 
+
124 
+
125 
+
126 
+
127  ########################################################################
+
128  ## \brief checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at #__zAcc.
+
129  # For tight cut each HNL daughter is propagated to #__zAcc (see #getTrackPropagation)
+
130  # and checked if it in the acceptance (see #RecoSettings .checkEllipticAcc). Also checks HNL decay vertex.
+
131  # \param tight - if true, not only HNL vertex but also propagated tracks are checked.
+
132  # \return True if the vertex (and both tracks, if tight cut) are in the acceptance.
+
133  def checkEllipticAcc(self, tight=True):
+ +
135  if ( not ok ) : return False
+
136  if ( tight ) :
+
137  for tid in self.__decayProdTrID :
+
138  v3 = self.getTrackPropagation(tid, self.__zAcc)
+
139  ok = ( ok and RecoSettings.checkEllipticAcc(v3) )
+
140  if ( not ok ) : break
+
141  return ok
+
142 
+
143 
+
144 
+
145 
+
146  ########################################################################
+
147  ## \brief for Tracker Performance studies. Returns -1, 0, 1 depending on vertex topology.
+
148  # defines direction in y: 0 if both momY the same direction, -1 if (negative up, positive down).
+
149  # \return 0 if both momY the same direction, -1 if (negative up, positive down).
+
150  def checkVertexUpDown(self):
+
151  theCase = 0 # undefined
+
152  if ( (not self.__productVertex) or (len(self.__decayProdTrID)<2) ): return theCase
+
153  tid1 = self.__decayProdTrID[0]
+
154  tid2 = self.__decayProdTrID[1]
+
155  if ( self.__productMoment[tid1].Y()*self.__productMoment[tid2].Y() >=0 ): return theCase
+
156 
+
157  theCase = self.__productCharge[tid1]*self.__productMoment[tid1].Y()/abs(self.__productMoment[tid1].Y())
+
158 
+
159  return theCase
+
160 
+
161 
+
162  ########################################################################
+
163  ## \brief for Tracker Performance studies. Returns TVector3.
+
164  # Linear propagation of a given track to a plane (0,0,z) perendicular to Z-axis.
+
165  # \param trID - track index (MCtrID).
+
166  # \param z - coordinate of the plane.
+
167  # \return coordinates of the point of track crossing the given plalne (TVector3).
+
168  def getTrackPropagation(self, trID, z):
+
169  if ( not trID in self.__productMoment ): self.readTrack(trID)
+
170  xy=[0.,0.]
+
171  for ii in [0,1]:
+
172  xy[ii] = self.__productVertex[trID][ii]+self.__productMoment[trID][ii]/self.__productMoment[trID][2]*(z-self.__productVertex[trID][2])
+
173  vec3 = ROOT.TVector3(xy[0],xy[1],z)
+
174  return vec3
+
175 
+
176 
+
177 
+
178 
+
179  ########################################################################
+
180  ## \brief reads one additional track with trID from MCTrack collection. Returns 1 if success, 0 otherwise.
+
181  # fills #__productVertex, #__productMoment, #__productCharge dictionaries.
+
182  # \param trID - track index (MCtrID).
+
183  # \return 1 if successful, 0 if trID is not found and the dictionaries are not modified.
+
184  def readTrack(self, trID):
+
185  x = None
+
186  try:
+
187  x=self.__tree.MCTrack[trID]
+
188  except:
+
189  pass
+
190  if (not b) : return 0
+
191 
+
192  vec3 = ROOT.TVector3(x.GetPx(),x.GetPy(),x.GetPz())
+
193  self.__productMoment[trID] = vec3
+
194  vec3 = ROOT.TVector3(x.GetStartX(),x.GetStartY(),x.GetStartZ())
+
195  self.__productVertex[trID] = vec3
+
196  self.__productCharge[trID] = RecoSettings.chargePDG(x.GetPdgCode())
+
197  self.__productInfo[trID] ={}
+
198  self.__productInfo[trID]['pdg'] = x.GetPdgCode()
+
199  mid = x.GetMotherId()
+
200  if(mid>=0) : self.__productInfo[trID]['mpdg'] = self.__tree.MCTrack[mid].GetPdgCode()
+
201  else : self.__productInfo[trID]['mpdg'] = 0
+
202  if( self.__debug>0 ):
+
203  print "additional MC track for trID", trID
+
204  print "\tpdgid/charge/mother: ", x.GetPdgCode(), self.__productCharge[trID], mid, "(pdf=",self.__productInfo[trID]['mpdg'], ")"
+
205  print "\torigin: ", self.__productVertex[trID].X(), self.__productVertex[trID].Y(), self.__productVertex[trID].Z()
+
206  print "\tmomentum: ", self.__productMoment[trID].X(), self.__productMoment[trID].Y(), self.__productMoment[trID].Z()
+
207  return 1
+
208 
+
209 
+
210 
+
211 
+
212 
+
213  ########################################################################
+
214  ## \brief reads \b HNL \b decay \b products from MCTrack collection (\b two at the moment!). Returns number of daughters.
+
215  # Fills #__HNLdecayCoord and #__productVertex, #__productMoment, #__productCharge dictionaries for \b HNL \b daughters.
+
216  # \return number of daughters (loop stops at daughter==2 at the moment!).
+
217  def readEvent(self):
+
218  self.__clean()
+
219  if (self.__debug>0 ):
+
220  print "sTree.MCTrack", self.__tree.MCTrack, "size:", len(self.__tree.MCTrack)
+
221  daughter = 0
+
222  tid = 0
+
223  #/home/kkuzn/SHIP/ShipSoft/tmp/FairShip/shipdata/ShipMCTrack.h
+
224  for x in self.__tree.MCTrack:
+
225  if daughter>1:
+
226  break
+
227  mid = x.GetMotherId()
+
228  Z = x.GetStartZ()
+
229  if( Z>5000 ): Z=5000
+
230  if mid==0: # #NB# here I suppose HNL is record #1 always!
+
231  self.__weight = x.GetWeight()
+
232  if self.__debug>0: print "HNL\t\t", tid,"\t", x.GetStartX(), x.GetStartY(), x.GetStartZ(), "\t\t", x.GetPx(), x.GetPy(), x.GetPz()
+
233  elif( mid==1 ): # HNL decay products
+
234  self.__decayProdTrID.append(tid)
+
235  vec3 = ROOT.TVector3(x.GetPx(),x.GetPy(),x.GetPz())
+
236  self.__productMoment[tid] = vec3
+
237  vec3 = ROOT.TVector3(x.GetStartX(),x.GetStartY(),x.GetStartZ())
+
238  self.__productVertex[tid] = vec3
+
239  self.__productCharge[tid] = RecoSettings.chargePDG(x.GetPdgCode())
+
240  self.__productInfo[tid] ={}
+
241  self.__productInfo[tid]['pdg'] = x.GetPdgCode()
+
242  self.__productInfo[tid]['mpdg'] = self.__tree.MCTrack[mid].GetPdgCode()
+
243  if( self.__debug>0 ): print x.GetPdgCode(), "\t\t", tid,"\t", x.GetStartX(), x.GetStartY(), x.GetStartZ(), "\t\t", x.GetPx(), x.GetPy(), x.GetPz()
+
244  if daughter<1:
+
245  self.__HNLdecayCoord = ROOT.TVector3(x.GetStartX(), x.GetStartY(), x.GetStartZ())
+
246  else:
+
247  if self.__HNLdecayCoord.Z()!=x.GetStartZ():
+
248  self.__HNLdecayCoord.SetXYZ(0,0,-8899)
+
249  daughter+=1
+
250  tid+=1
+
251 
+
252  return daughter
+
253 
+
def setAccPlaneZ
set z of the last full acceptance plane (to be used in checkEllipticAcc), depends on RecoSettings...
Definition: MCTrackInfo.py:52
+
__HNLdecayCoord
HNL decay vertex coordinates (TVector3).
Definition: MCTrackInfo.py:22
+
def readEvent
reads HNL decay products from MCTrack collection (two at the moment!).
Definition: MCTrackInfo.py:217
+
__productCharge
Charge of several stored products (not only HNL daughter) as {MCTrID : value}.
Definition: MCTrackInfo.py:30
+
__decayProdTrID
MCTrID (index of the track in MCtrack list) for HNL daughter products.
Definition: MCTrackInfo.py:24
+ +
def getCharge
returns charge of a particle with the given trID (index in MCTrack collection).
Definition: MCTrackInfo.py:108
+
def getTrIDs
returns list of all MCtrIDs read by readEvent and readTrack - not only HNL decay products.
Definition: MCTrackInfo.py:95
+
__zAcc
z of the last full acceptance plane (to be used in checkEllipticAcc), must be set later...
Definition: MCTrackInfo.py:18
+
def getHNLdecayTrIDs
returns list of MCtrIDs (index in MCTrack collection) fot HNL decay products.
Definition: MCTrackInfo.py:85
+
__productInfo
Basic information on the particle (pdg, mother pdg,...
Definition: MCTrackInfo.py:32
+
__weight
event weight.
Definition: MCTrackInfo.py:20
+
def getMomentum
returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection).
Definition: MCTrackInfo.py:120
+
def getTrackPropagation
for Tracker Performance studies.
Definition: MCTrackInfo.py:168
+
def checkEllipticAcc
checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at...
Definition: MCTrackInfo.py:133
+
def __clean
clears all dictionaries and lists.
Definition: MCTrackInfo.py:40
+
__productMoment
Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}.
Definition: MCTrackInfo.py:28
+
def getHNLdecayVertex
returns HNL decay vertex coordinates (TVector3 __HNLdecayCoord).
Definition: MCTrackInfo.py:78
+
def getEventWeight
returns event weight.
Definition: MCTrackInfo.py:71
+
def PrintHNL
prints HNL decay products
Definition: MCTrackInfo.py:58
+
def readTrack
reads one additional track with trID from MCTrack collection.
Definition: MCTrackInfo.py:184
+
__debug
debug level [0,3].
Definition: MCTrackInfo.py:16
+
def checkVertexUpDown
for Tracker Performance studies.
Definition: MCTrackInfo.py:150
+
__tree
root tree to be read.
Definition: MCTrackInfo.py:14
+ +
For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMC...
Definition: MCTrackInfo.py:10
+
__productVertex
Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}...
Definition: MCTrackInfo.py:26
+
def checkEllipticAcc
Definition: RecoSettings.py:21
+
+ + + + diff --git a/Katerina/doc/html/RecoSettings_8py.html b/Katerina/doc/html/RecoSettings_8py.html new file mode 100644 index 0000000..907889f --- /dev/null +++ b/Katerina/doc/html/RecoSettings_8py.html @@ -0,0 +1,93 @@ + + + + + + +Python: RecoSettings.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
RecoSettings.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Namespaces

 RecoSettings
 
+ + + + + +

+Functions

def RecoSettings.chargePDG
 
def RecoSettings.checkEllipticAcc
 
+ + + + + + + + + + + + + + + + +

+Variables

int RecoSettings.trackMinNofHits = 25
 min number of hits to produce a track More...
 
int RecoSettings.trackMinNofStations = 3
 
int RecoSettings.chi2CutOff = 4
 
float RecoSettings.dy = 10.0
 
int RecoSettings.VertexMaxZcut = 2500
 
int RecoSettings.VertexExtrSteps = 5
 
tuple RecoSettings.PDG = ROOT.TDatabasePDG.Instance()
 
+
+ + + + diff --git a/Katerina/doc/html/RecoSettings_8py_source.html b/Katerina/doc/html/RecoSettings_8py_source.html new file mode 100644 index 0000000..ff1248e --- /dev/null +++ b/Katerina/doc/html/RecoSettings_8py_source.html @@ -0,0 +1,81 @@ + + + + + + +Python: RecoSettings.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
RecoSettings.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 """
+
5 Parameter settings for reconstruction
+
6 """
+
7 
+
8 ## min number of hits to produce a track
+
9 trackMinNofHits = 25
+
10 trackMinNofStations = 3
+
11 chi2CutOff = 4.
+
12 dy = 10.0
+
13 VertexMaxZcut = 2500*u.cm
+
14 VertexExtrSteps = 5
+
15 PDG = ROOT.TDatabasePDG.Instance()
+
16 
+
17 def chargePDG(pdg):
+
18  if not PDG.GetParticle(pdg): return
+
19  return PDG.GetParticle(pdg).Charge()/(3.)
+
20 
+ +
22  Rsq = (vec.X()/(2.45*u.m) )**2 + (vec.Y()/((dy/2.-0.05)*u.m) )**2
+
23  return ( Rsq<1 )
+ +
def checkEllipticAcc
Definition: RecoSettings.py:21
+
+ + + + diff --git a/Katerina/doc/html/StrawHits_8py.html b/Katerina/doc/html/StrawHits_8py.html new file mode 100644 index 0000000..d2e477e --- /dev/null +++ b/Katerina/doc/html/StrawHits_8py.html @@ -0,0 +1,72 @@ + + + + + + +Python: StrawHits.py File Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
StrawHits.py File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  StrawHits.StrawHits
 
+ + + +

+Namespaces

 StrawHits
 
+
+ + + + diff --git a/Katerina/doc/html/StrawHits_8py_source.html b/Katerina/doc/html/StrawHits_8py_source.html new file mode 100644 index 0000000..faec5e5 --- /dev/null +++ b/Katerina/doc/html/StrawHits_8py_source.html @@ -0,0 +1,600 @@ + + + + + + +Python: StrawHits.py Source File + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
StrawHits.py
+
+
+Go to the documentation of this file.
1 import ROOT,os,sys,getopt
+
2 import rootUtils as ut
+
3 import shipunit as u
+
4 from pythia8_conf import addHNLtoROOT
+
5 from array import array
+
6 
+
7 import RecoSettings
+
8 from FitTrackInfo import FitTrackInfo
+
9 
+
10 
+
11 ########################################################################
+
12 class StrawHits(object):
+
13  """StrawHit class"""
+
14  def __init__(self, tree, modules, resolution, debug=0, mhistdict=None, ship_geo=None):
+
15  ## root tree to be read.
+
16  self.__tree = tree
+
17  ## geometry description modules.
+
18  self.__modules = modules
+
19  ## debug level [0,3]
+
20  self.__debug = debug
+
21  ## hit resolition
+
22  self.__resolution = resolution
+
23  ## {MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position. Created if MCtrackID>0.
+
24  self.__trackHits = {}
+
25  ##
+
26  self.__oldSmearedHits ={}
+
27  ## {MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit.
+
28  ## Created for tracks with more than #RecoSettings .trackMinNofHits hits.
+
29  self.__trackEdgeHits = {}
+
30  ## {MCtrackID : number of hits at Z<0 (veto tracker)}.
+
31  self.__vetoHits = {}
+
32  ## {MCtrackID: number of crossed stations (exclude veto tracker)}.
+
33  self.__nStations = {}
+
34  ## root random engent for hit smearing (see #__hitSmear).
+
35  self.__random = ROOT.TRandom()
+
36  ROOT.gRandom.SetSeed(13)
+
37  #fitter = ROOT.genfit.KalmanFitter()
+
38  #fitter = ROOT.genfit.KalmanFitterRefTrack()
+
39  self.__fitter = ROOT.genfit.DAF()
+
40  # refitted traks
+
41  self.__reFitTracks = FitTrackInfo(tree=None, debug = self.__debug)
+
42  self.__docaEval = []
+
43 
+
44  if (mhistdict and ship_geo) :
+
45  fm = ROOT.genfit.FieldManager.getInstance()
+
46  # copy from python/shipDet_conf.py
+
47  sbf = ROOT.ShipBellField("wilfried", ship_geo.Bfield.max,ship_geo.Bfield.z,2,ship_geo.Yheight/2.*u.m )
+
48  for i in range (0,300):
+
49  z = 1000. + i*10
+
50  pvec3 = ROOT.TVector3(0,0,z)
+
51  fx = ROOT.Double(0)
+
52  fy = ROOT.Double(0)
+
53  fz = ROOT.Double(0)
+
54  #fvec3f = fm.getField().get(pvec3)
+
55  fm.getField().get(0,0,z,fx,fy,fz)
+
56  fvec3f = ROOT.TVector3(fx,fy,fz)
+
57 
+
58  fvec3s = ROOT.TVector3( sbf.GetBx(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBy(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBz(pvec3.X(),pvec3.Y(),pvec3.Z()))
+
59 
+
60  #print z, " ".join("{:10.4f}".format(fvec3f(ii)) for ii in range(0,3)),
+
61  #print "\t", " ".join("{:10.4f}".format(fvec3s(ii)) for ii in range(0,3))
+
62  mhistdict['magZfit'].Fill(z,fvec3f.Mag())
+
63  mhistdict['magZsim'].Fill(z,fvec3s.Mag())
+
64 
+
65  zdict = {1:2500., 2:2800., 3:3000.}
+
66  for zi in zdict:
+
67  for xi in range (-30, 30):
+
68  for yi in range (-30,30):
+
69  x = xi*10.
+
70  y = yi*10.
+
71  pvec3 = ROOT.TVector3(x, y, zdict[zi])
+
72  fx = ROOT.Double(0)
+
73  fy = ROOT.Double(0)
+
74  fz = ROOT.Double(0)
+
75  #fvec3f = fm.getField().get(pvec3)
+
76  fm.getField().get(x,y,zdict[zi],fx,fy,fz)
+
77  fvec3f = ROOT.TVector3(fx,fy,fz)
+
78 
+
79  fvec3s = ROOT.TVector3( sbf.GetBx(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBy(pvec3.X(),pvec3.Y(),pvec3.Z()),sbf.GetBz(pvec3.X(),pvec3.Y(),pvec3.Z()))
+
80  #print x, " ", y, " ", zdict[zi],
+
81  #print "\t", " ".join("{:10.4f}".format(fvec3f(ii)) for ii in range(0,3)),
+
82  #print "\t", " ".join("{:10.4f}".format(fvec3s(ii)) for ii in range(0,3))
+
83  mhistdict['magXY'+str(zi)+"fit"].Fill(x, y,fvec3f.Mag())
+
84  mhistdict['magXY'+str(zi)+"sim"].Fill(x, y,fvec3s.Mag())
+
85 ########################################################################
+
86 
+
87 
+
88  ## \brief to be called for each new event (called in #readEvent())
+
89  # cleans all dictionaries (#__trackHits, #__trackEdgeHits, #__vetoHits, #__nStations).
+
90  def __clean(self):
+
91  self.__trackHits.clear()
+
92  self.__oldSmearedHits.clear()
+
93  self.__trackEdgeHits.clear()
+
94  self.__vetoHits.clear()
+
95  self.__nStations.clear()
+
96  self.__docaEval = []
+
97 ########################################################################
+
98 
+
99 
+
100  ## \brief returns list of keys #__trackEdgeHits (MCtrackIDs>0 with more than #RecoSettings .trackMinNofHits hits).
+
101  # \return list of MCtrackIDs of "good" tracks.
+
102  def getTrIDs(self):
+
103  trID = []
+
104  for tid in self.__trackEdgeHits:
+
105  trID.append(tid)
+
106  return trID
+
107 ########################################################################
+
108 
+
109 
+
110  ## \brief returns list of keys #__trackHits (MCtrackIDs>0.
+
111  # \return list of MCtrackIDs of MC assigned tracks.
+
112  def getTrIDsALL(self):
+
113  trID = []
+
114  for tid in self.__trackEdgeHits:
+
115  trID.append(tid)
+
116  return trID
+
117 ########################################################################
+
118 
+
119 
+
120  ## \brief returns list of keys #__reFitTracks.
+
121  # \return list of MCtrackIDs of "good" tracks.
+
122  def getReFitTrIDs(self):
+
123  return self.__reFitTracks.getTrIDs()
+
124 ########################################################################
+
125 
+
126 
+
127  def getReFitChi2Ndf(self,tid):
+
128  return self.__reFitTracks.getChi2Ndf(tid)
+
129 ########################################################################
+
130 
+
131 
+
132  def getReFitNdf(self,tid):
+
133  return self.__reFitTracks.getNdf(tid)
+
134 
+
135 
+
136 
+
137 ########################################################################
+
138  ## \brief returns vertex (if number of tracks!=2 will return None!).
+
139  # \return new vertex (if number of tracks!=2 will return None!).
+
140  def getReFitVertex(self):
+
141  return self.__reFitTracks.getVertex()
+
142 ########################################################################
+
143 
+
144 
+
145 
+
146 ########################################################################
+
147  ## \brief returns doca's of each extrapolation steps (size is defined in #RecoSettings .VertexExtrSteps).
+
148  # \return new vertex (if number of tracks!=2 will return None!).
+
149  def getStepDoca(self, step):
+
150  if ( step>RecoSettings.VertexExtrSteps or (not self.__reFitTracks.Vertex) ) : return None
+
151  return self.__docaEval[step]
+
152 ########################################################################
+
153 
+
154 
+
155  ## \brief returns vertex (if number of tracks!=2 will return None!).
+
156  # \return new vertex (if number of tracks!=2 will return None!).
+
157  def getReFitPosDirPval(self, tid):
+
158  return self.__reFitTracks.getPosDirPval(tid)
+
159 ########################################################################
+
160 
+
161 
+
162  ## \brief returns number of hits in proper tracker stations (Z>0) calculated from #__trackHits and #__vetoHits.
+
163  # \param tid - MCtrackID.
+
164  # \return number of hits in proper tracker stations (Z>0).
+
165  def getNofPHits(self, tid):
+
166  return len(self.__trackHits[tid]) - self.__vetoHits[tid]
+
167 ########################################################################
+
168 
+
169 
+
170  ## \brief returns TVector3 of a tracker entry hit (Z>0) from #__trackEdgeHits.
+
171  # \param tid - MCtrackID.
+
172  # \return position of a tracker entry hit (Z>0) from #__trackEdgeHits.
+
173  def getStartHit(self, tid):
+
174  return self.__trackEdgeHits[tid]['entry']
+
175 ########################################################################
+
176 
+
177 
+
178  ## \brief returns number of hits with Z<0 of #__trackHits.
+
179  # \param tid - MCtrackID.
+
180  # \return number of hits with Z<0 of #__trackHits.
+
181  def checkVetoHits(self, tid):
+
182  vh = 0
+
183  if tid in self.__vetoHits:
+
184  vh = self.__vetoHits[tid]
+
185  return vh
+
186 ########################################################################
+
187 
+
188 
+
189  def PrintNewTracks(self):
+
190  print "new Fits: ",
+
191  self.__reFitTracks.Print()
+
192 ########################################################################
+
193 
+
194 
+
195  def compareFitTracks(self, tid, theFitTracks):
+
196  pos, direct, pval = theFitTracks.getPosDirPval(tid)
+
197  return self.__reFitTracks.compareTracks(tid, pos, direct, pval)
+
198 
+
199 ########################################################################
+
200  ## \brief returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.
+
201  # \param tid - MCtrackID.
+
202  # \param hid - hit index of #__trackHits
+
203  # \param new - to generate new smearing (True) or get from SmearedHits (det.position still recalculated!)
+
204  # \return a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.
+
205  def __hitSmear(self,tid,hid, new=False):
+
206  top = ROOT.TVector3()
+
207  bot = ROOT.TVector3()
+
208  dw = self.__trackHits[tid][hid]['dw']
+
209  detID = self.__trackHits[tid][hid]['det']
+
210 
+
211  self.__modules["Strawtubes"].StrawEndPoints(detID,bot,top)
+
212 
+
213  if( new ):
+
214  smear = abs(self.__random.Gaus(dw, self.__resolution))
+
215  else:
+
216  smear = self.__trackHits[tid][hid]['smdw']
+
217  smearedHit = {'xtop':top.x(),'ytop':top.y(),'z':top.z(),'xbot':bot.x(),'ybot':bot.y(),'z':bot.z(),'dist':smear}
+
218 
+
219  if(self.__debug>2):
+
220  print "\tsmear :", "".join("{:8.2f}".format(self.__trackHits[tid][hid]['pos'](ii)) for ii in range(0,3)),
+
221  print "{:6.2f}".format(dw),
+
222  print "\t(xt,xb, yt, yb, z, dw) : ",
+
223  for x in ['xtop','xbot', 'ytop','ybot','z', 'dist']:
+
224  print "".join("{:8.2f}".format(smearedHit[x])),
+
225  print ""
+
226  return smearedHit
+
227 ########################################################################
+
228 
+
229 
+
230  ## \brief to be called per each event. Fills #__trackHits, #__trackEdgeHits, #__vetoHits, #__nStations.
+
231  # \return number of "good" tracks (size of #__trackEdgeHits)
+
232  def readEvent(self):
+
233  self.__clean()
+
234  toSort = [] # list of MCtrackID which has unsorted hits (I saw also hits from different tracks assigned to the same MCtrackID)
+
235  stationList = {} # {MCtrackID:[stations]}
+
236 
+
237  # loop over all hits and fill __trackHits[MCtrackID]
+
238  hindx = -1
+
239  for ahit in self.__tree.strawtubesPoint:
+
240  detID = ahit.GetDetectorID()
+
241  trID = ahit.GetTrackID()
+
242 
+
243  # get old smearing
+
244  hindx +=1
+
245  origSmHit = self.__tree.SmearedHits.At(hindx)
+
246  if( (abs(ahit.GetZ()-origSmHit[3])>0.8) or (abs(ahit.dist2Wire()-origSmHit[7])>0.2) ):
+
247  print "problem getting smeared his, but do not change anything"
+
248  print "=>", ahit.GetZ(), origSmHit[3], ahit.dist2Wire(), origSmHit[7]
+
249  # m = array('d',[i,sm['xtop'],sm['ytop'],sm['z'],sm['xbot'],sm['ybot'],sm['z'],sm['dist']])
+
250 
+
251  #=>
+
252  if(trID<0): continue # these are hits not assigned to MC track because low E cut
+
253 
+
254  if (not self.__trackHits.has_key(trID)):
+
255  self.__trackHits[trID] = []
+
256  stationList[trID] = []
+
257 
+
258  hinfo = {}
+
259  hinfo['pos'] = ROOT.TVector3(ahit.GetX(), ahit.GetY(), ahit.GetZ())
+
260  hinfo['det'] = ahit.GetDetectorID()
+
261  hinfo['dw'] = ahit.dist2Wire()
+
262  hinfo['smdw'] = origSmHit[7]
+
263  self.__trackHits[trID].append(hinfo)
+
264 
+
265  lastIndx = len(self.__trackHits[trID])-1
+
266  if( self.__trackHits[trID][lastIndx]['pos'].Z() < self.__trackHits[trID][lastIndx-1]['pos'].Z() ):
+
267  if( not trID in toSort):
+
268  toSort.append(trID)
+
269  if(self.__debug>0): print "StrawHitsEntry: wrong order of hits for track ", trID
+
270 
+
271  station = int(ahit.GetDetectorID()/10000000)
+
272  if station > 4 : continue
+
273  if ( not station in stationList[trID]) : stationList[trID].append(station)
+
274 
+
275  # sort
+
276  for trID in toSort:
+
277  if(self.__debug>0): print "StrawHitsEntry: will sort hits for track ", trID
+
278  if(self.__debug>2):
+
279  print "\t\thits to be sorted"
+
280  for hinfo in self.__trackHits[trID]:
+
281  vec3 = hinfo['pos']
+
282  print "\t\t\t\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw']
+
283  self.__trackHits[trID].sort(key=lambda x: x['pos'].Z(), reverse=False)
+
284  if(self.__debug>2):
+
285  print "\t\thits after sorting"
+
286  for hinfo in self.__trackHits[trID]:
+
287  vec3 = hinfo['pos']
+
288  print "\t\t\t\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw']
+
289 
+
290  # fill self.__nStations
+
291  for trID in self.__trackHits:
+
292  self.__nStations[trID] = len(stationList[trID])
+
293  if(self.__debug>0):
+
294  print "Number of crossed stations (trID:n)", trID, " : ", self.__nStations[trID]
+
295 
+
296  # find entry and exit positions
+
297  for trID in self.__trackHits:
+
298  if(self.__debug>1):
+
299  print "hits for trID ", trID
+
300  for hinfo in self.__trackHits[trID]:
+
301  vec3 = hinfo['pos']
+
302  print "\t", vec3.X(), "\t", vec3.Y(), "\t", vec3.Z(), hinfo['dw']
+
303  if(self.__debug>0): print "start/stop position for hits of track ", trID
+
304  #find number of vetoTracker hits
+
305  firstHit = 0
+
306  nHits = len(self.__trackHits[trID])
+
307  while( firstHit<nHits and (self.__trackHits[trID][firstHit]['pos'].Z()<0) ):
+
308  firstHit+=1
+
309 
+
310  # =>
+
311  # the EdgeHits are filled only if nHits(stations1-4)>25
+
312  if( (firstHit<nHits) and ((nHits-firstHit)>RecoSettings.trackMinNofHits) ):
+
313  self.__trackEdgeHits[trID] = {}
+
314  self.__trackEdgeHits[trID]['entry'] = self.__trackHits[trID][firstHit]['pos']
+
315  self.__trackEdgeHits[trID]['exit'] = self.__trackHits[trID][-1]['pos']
+
316  self.__vetoHits[trID] = firstHit
+
317  if(self.__debug>0):
+
318  for pos in self.__trackEdgeHits[trID]:
+
319  vec3 = self.__trackEdgeHits[trID][pos]
+
320  print "\t", pos, vec3.X(), "\t", vec3.Y(), "\t", vec3.Z()
+
321  elif( self.__debug>0): print "not set due to small number of hits"
+
322 
+
323  return len(self.__trackEdgeHits)
+
324 ########################################################################
+
325 
+
326 
+
327 
+
328 
+
329 
+
330  def __getIniDir(self,trID):
+
331  v1 = self.__trackEdgeHits[trID]['entry']
+
332  i2 = self.__vetoHits[trID]+1
+
333  if( len(self.__trackHits[trID])>i2 ):
+
334  v2 = self.__trackHits[trID][i2]['pos']
+
335  dv = v2-v1
+
336  else:
+
337  dv = ROOT.TVector3(0., 0., 1.)
+
338  if(self.__debug>0):
+
339  print "trying to get initial direction having just one hit, will set (0,0,1)"
+
340  return dv*(1./dv.Mag())
+
341 
+
342 
+
343  def __prepareIniPosMomCov(self, tid, original=True):
+
344  if ( original ) :
+
345  pos = ROOT.TVector3(0, 0, 0)
+
346  mom = ROOT.TVector3(0,0,3.*u.GeV)
+
347  cov = ROOT.TMatrixDSym(6)
+
348  resolution = self.__resolution
+
349  for i in range(3): cov[i][i] = resolution*resolution
+
350  cov[0][0]=resolution*resolution*100.
+
351  nM = self.getNofPHits(tid)
+
352  for i in range(3,6): cov[i][i] = ROOT.TMath.pow(resolution / nM / ROOT.TMath.sqrt(3), 2)
+
353  else:
+
354  pos = self.__trackEdgeHits[tid]['entry']
+
355  mom = self.__getIniDir(tid)
+
356  cov = ROOT.TMatrixDSym(6)
+
357  resolution = self.__resolution
+
358  for i in range(3): cov[i][i] = resolution*resolution
+
359  cov[0][0]=resolution*resolution*100.
+
360  nM = self.getNofPHits(tid)
+
361  for i in range(3,6): cov[i][i] = ROOT.TMath.pow(resolution / nM / ROOT.TMath.sqrt(3), 2)
+
362  return pos, mom, cov
+
363 ########################################################################
+
364 
+
365 
+
366 
+
367  def __prepareWireMeasurements(self, tid, fTrack):
+
368  #WireMeasurement::WireMeasurement(const TVectorD& rawHitCoords,
+
369  # const TMatrixDSym& rawHitCov,
+
370  # int detId,
+
371  # int hitId,
+
372  # genfit::TrackPoint* trackPoint)
+
373  # per each proper hit TMP ??? does it make sense to do for tracks with __vetoHits>0???
+
374  #self.__measurements4fit[trID] = []
+
375  for hindx in range (self.__vetoHits[tid], len(self.__trackHits[tid])):
+
376  sm = self.__hitSmear(tid,hindx)
+
377  mVector = ROOT.TVectorD(7,array('d',[sm['xtop'],sm['ytop'],sm['z'],sm['xbot'],sm['ybot'],sm['z'],sm['dist']]))
+
378  #self.__measurements4fit[trID].push_back(mVector)
+
379 
+
380  hitCov = ROOT.TMatrixDSym(7)
+
381  hitCov[6][6] = self.__resolution*self.__resolution
+
382 
+
383  tp = ROOT.genfit.TrackPoint(fTrack) # note how the point is told which track it belongs to
+
384  measurement = ROOT.genfit.WireMeasurement(mVector,hitCov,1,6,tp) # the measurement is told which trackpoint it belongs to
+
385  # print measurement.getMaxDistance()
+
386  measurement.setMaxDistance(0.5*u.cm)
+
387  #measurement.setLeftRightResolution(-1)
+
388  tp.addRawMeasurement(measurement) # package measurement in the TrackPoint
+
389  if(self.__debug>2):
+
390  tp.Print()
+
391  fTrack.insertPoint(tp) # add point to Track
+
392 
+
393 
+
394 
+
395 
+
396 
+
397 
+
398 ########################################################################
+
399  def FitTracks(self, old=True):
+
400 
+
401  self.__reFitTracks.clean()
+
402 
+
403  fitTrack = {}
+
404  #self.__measurements4fit = {}
+
405  nTrack = -1
+
406 
+
407 
+
408  for trID in self.__trackEdgeHits : # these are already tracks with large number of hits
+
409  #print "track entry", self.__trackEdgeHits[tid]['entry'].
+
410  #print "mfield: ", ROOT
+
411 
+
412  # minimal requirements on number of crossed stations
+
413  if ( self.__nStations<RecoSettings.trackMinNofStations): continue
+
414 
+
415  pdg = self.__tree.MCTrack[trID].GetPdgCode()
+
416 
+
417  # remove unknown or neutral particles
+
418  charge = RecoSettings.chargePDG(pdg)
+
419  if( (not charge) or (charge==0) ):
+
420  print "StrawHits.FitTracks for TrID ", trID, "finds charge of track of ", charge, " and does nothing."
+
421  continue
+
422 
+
423  posM, momM, covM = self.__prepareIniPosMomCov(trID,old)
+
424 
+
425  rep = ROOT.genfit.RKTrackRep(pdg)
+
426  stateSmeared = ROOT.genfit.MeasuredStateOnPlane(rep)
+
427  rep.setPosMomCov(stateSmeared, posM, momM, covM)
+
428 
+
429  seedState = ROOT.TVectorD(6)
+
430  seedCov = ROOT.TMatrixDSym(6)
+
431  rep.get6DStateCov(stateSmeared, seedState, seedCov)
+
432 
+
433  fitTrack[trID] = ROOT.genfit.Track(rep, seedState, seedCov)
+
434  ROOT.SetOwnership(fitTrack[trID], False)
+
435 
+
436  if(self.__debug>2): print "preparing measurements for track ID", trID
+
437  self.__prepareWireMeasurements(trID, fitTrack[trID])
+
438 
+
439 
+
440  if not fitTrack[trID].checkConsistency():
+
441  print 'Problem with track before fit, not consistent',self.fitTrack[atrack]
+
442  continue
+
443  try: self.__fitter.processTrack(fitTrack[trID]) # processTrackWithRep(fitTrack[atrack],rep,True)
+
444  except:
+
445  print "genfit failed to fit track"
+
446  continue
+
447  if not fitTrack[trID].checkConsistency():
+
448  print 'Problem with track after fit, not consistent',self.fitTrack[atrack]
+
449  continue
+
450 
+
451  stat = fitTrack[trID].getFitStatus()
+
452  if not stat.isFitConverged() : continue
+
453  f = fitTrack[trID].getFittedState()
+
454 
+
455  #if(self.__debug>0):
+
456  #print "for track ", trID,
+
457  #print " pos:", " ".join("{:10.4f}".format(f.getPos()(ii)) for ii in range(0,3)),
+
458  #print " mom:", " ".join("{:10.4f}".format(f.getMom()(ii)) for ii in range(0,3))
+
459  self.__reFitTracks.addNewTrack(trID, f.getPos(), f.getDir(), f.getMomMag(),
+
460  stat.getNdf(), stat.getChi2())
+
461 
+
462 
+
463 
+
464 
+
465  newFitTrIDs = self.__reFitTracks.getTrIDs()
+
466  twoTracks = ( len(newFitTrIDs)==2 )
+
467  theStep = 0
+
468  self.__docaEval = []
+
469  if (twoTracks) :
+
470  self.__reFitTracks.createVertex(newFitTrIDs[0], newFitTrIDs[1], flag=0) # original
+
471  iniDoca = self.__reFitTracks.Doca
+
472  iniY = self.__reFitTracks.Vertex.Y()
+
473  while ( theStep<RecoSettings.VertexExtrSteps and twoTracks):
+
474  flag = 1
+
475  newFitTrIDs = self.__reFitTracks.getTrIDs()
+
476  #if(self.__debug>1):
+
477  print "==>vertex ", theStep, " ", self.__reFitTracks.Doca
+
478  self.__reFitTracks.Vertex.Print()
+
479  self.__docaEval.append(self.__reFitTracks.Doca)
+
480  for tid in fitTrack :
+
481  try:
+
482  state = fitTrack[tid].getFittedState()
+
483  except:
+
484  print "can't get fittedState"
+
485  flag = -1
+
486  vPosEx = ROOT.TVector3(0,0,0)
+
487  vMomEx = ROOT.TVector3(0,0,0)
+
488  try :
+
489  state.extrapolateToPoint(self.__reFitTracks.Vertex)
+
490  except :
+
491  flag = -1
+
492  print "track exctrapolation failed!tid: ", tid
+
493  if (flag > 0 ) : #
+
494  status = fitTrack[tid].getFitStatus()
+
495  #print "extr track ", tid,
+
496  #print " pos:", " ".join("{:10.4f}".format(state.getPos()(ii)) for ii in range(0,3)),
+
497  #print " mom:", " ".join("{:10.4f}".format(state.getMom()(ii)) for ii in range(0,3))
+
498  self.__reFitTracks.addNewTrack(trID, state.getPos(), state.getDir(), state.getMomMag(),
+
499  status.getNdf(), status.getChi2(), verb=False)
+
500  # FIX temporary
+
501  self.__reFitTracks.createVertex(newFitTrIDs[0], newFitTrIDs[1], flag)
+
502  self.__reFitTracks.Vertex.SetY(iniY)
+
503  theStep+=1
+
504  twoTacks = ( len(self.__reFitTracks.getTrIDs())==2 )
+
505  return len(newFitTrIDs)
+
506 
+
507 
+ +
def readEvent
to be called per each event.
Definition: StrawHits.py:232
+ + +
def getNofPHits
returns number of hits in proper tracker stations (Z&gt;0) calculated from __trackHits and __vetoHits...
Definition: StrawHits.py:165
+ +
def getReFitPosDirPval
returns vertex (if number of tracks!=2 will return None!).
Definition: StrawHits.py:157
+
__trackHits
{MCtrackID : [{&#39;pos&#39;:TVector3, &#39;det&#39;:detID, &#39;dw&#39;:distance to wire, &#39;smdw&#39;: smeared dw} where [TVector...
Definition: StrawHits.py:24
+ +
def getReFitTrIDs
returns list of keys __reFitTracks.
Definition: StrawHits.py:122
+
def getTrIDsALL
returns list of keys __trackHits (MCtrackIDs&gt;0.
Definition: StrawHits.py:112
+
__resolution
hit resolition
Definition: StrawHits.py:22
+ + + + + +
__trackEdgeHits
{MCtrackID : {X : TVector3}} where x=&#39;entry&#39; or &#39;exit&#39;, TVector3 coordinates of last or first hit...
Definition: StrawHits.py:28
+
def getStartHit
returns TVector3 of a tracker entry hit (Z&gt;0) from __trackEdgeHits.
Definition: StrawHits.py:173
+
def __clean
to be called for each new event (called in readEvent()) cleans all dictionaries (__trackHits, __trackEdgeHits, __vetoHits, __nStations).
Definition: StrawHits.py:90
+ + + +
__random
root random engent for hit smearing (see __hitSmear).
Definition: StrawHits.py:34
+
def getTrIDs
returns list of keys __trackEdgeHits (MCtrackIDs&gt;0 with more than RecoSettings .trackMinNofHits hits)...
Definition: StrawHits.py:102
+
def getStepDoca
returns doca&#39;s of each extrapolation steps (size is defined in RecoSettings .VertexExtrSteps).
Definition: StrawHits.py:149
+
__modules
geometry description modules.
Definition: StrawHits.py:18
+
def __prepareWireMeasurements
Definition: StrawHits.py:367
+
def __hitSmear
returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.
Definition: StrawHits.py:205
+
__debug
debug level [0,3]
Definition: StrawHits.py:20
+
def getReFitVertex
returns vertex (if number of tracks!=2 will return None!).
Definition: StrawHits.py:140
+
__nStations
{MCtrackID: number of crossed stations (exclude veto tracker)}.
Definition: StrawHits.py:32
+
__vetoHits
{MCtrackID : number of hits at Z&lt;0 (veto tracker)}.
Definition: StrawHits.py:30
+ +
__tree
root tree to be read.
Definition: StrawHits.py:16
+
def checkVetoHits
returns number of hits with Z&lt;0 of __trackHits.
Definition: StrawHits.py:181
+ +
+ + + + diff --git a/Katerina/doc/html/annotated.html b/Katerina/doc/html/annotated.html new file mode 100644 index 0000000..f12e3a1 --- /dev/null +++ b/Katerina/doc/html/annotated.html @@ -0,0 +1,75 @@ + + + + + + +Python: Class List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+
[detail level 12]
+ + + + + + + + + + + +
oNAnalyseThat
oNBookHistos
oNFitTrackInfo
|\CFitTrackInfo
oNLoopAnalyse
|\CLoopAnalyse
oNMCTrackInfo
|\CMCTrackInfoFor a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+
oNRecoSettings
\NStrawHits
 \CStrawHits
+
+
+ + + + diff --git a/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo-members.html b/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo-members.html new file mode 100644 index 0000000..4df90cd --- /dev/null +++ b/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo-members.html @@ -0,0 +1,91 @@ + + + + + + +Python: Member List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+
FitTrackInfo.FitTrackInfo Member List
+
+ + + + + diff --git a/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo.html b/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo.html new file mode 100644 index 0000000..8dc9776 --- /dev/null +++ b/Katerina/doc/html/classFitTrackInfo_1_1FitTrackInfo.html @@ -0,0 +1,753 @@ + + + + + + +Python: FitTrackInfo.FitTrackInfo Class Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+ +
+
FitTrackInfo.FitTrackInfo Class Reference
+
+
+
+Inheritance diagram for FitTrackInfo.FitTrackInfo:
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __init__
 
def clean
 
def Print
 
def getTrIDs
 returns list of keys __info . More...
 
def getNtracks
 
def getChi2Ndf
 
def getNdf
 
def compareTracks
 
def getPosDirPval
 
def getVertex
 
def getDoca
 
def myVertex2
 
def readEvent
 
def createVertex
 
def addNewTrack
 
+ + + + + + + + + + + + + + + + + + + +

+Public Attributes

 tree
 
 debug
 
 count
 
 Momentum
 
 Direction
 
 Position
 
 Vertex
 
 Doca
 
 vertexEFlag
 
+ + + +

+Private Attributes

 __info
 
+

Detailed Description

+
+

Definition at line 5 of file FitTrackInfo.py.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.__init__ ( self,
 tree,
 debug = 0 
)
+
+ +

Definition at line 7 of file FitTrackInfo.py.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.addNewTrack ( self,
 mcTrID,
 position,
 direction,
 Pval,
 ndf,
 chi2,
 verb = True 
)
+
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.clean ( self)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.compareTracks ( self,
 tid,
 Pos,
 Dir,
 Pval 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.createVertex ( self,
 tid1,
 tid2,
 flag = 0 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.getChi2Ndf ( self,
 tid 
)
+
+ +

Definition at line 48 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.__info.

+ +
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.getDoca ( self)
+
+ +

Definition at line 69 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.Doca.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.getNdf ( self,
 tid 
)
+
+ +

Definition at line 51 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.__info.

+ +
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.getNtracks ( self)
+
+ +

Definition at line 45 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.__info.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.getPosDirPval ( self,
 tid 
)
+
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.getTrIDs ( self)
+
+ +

returns list of keys __info .

+
Returns
list of MCtrackIDs of fitted tracks.
+ +

Definition at line 39 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.__info.

+ +
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.getVertex ( self)
+
+ +

Definition at line 66 of file FitTrackInfo.py.

+ +

References FitTrackInfo.FitTrackInfo.Vertex.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def FitTrackInfo.FitTrackInfo.myVertex2 ( self,
 t1,
 t2 
)
+
+
+ +
+
+ + + + + + + + +
def FitTrackInfo.FitTrackInfo.Print ( self)
+
+
+ + +

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
FitTrackInfo.FitTrackInfo.__info
+
+private
+
+ +

Definition at line 14 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.count
+
+ +

Definition at line 10 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.debug
+
+ +

Definition at line 9 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.Direction
+
+ +

Definition at line 12 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.Doca
+
+ +

Definition at line 16 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.Momentum
+
+ +

Definition at line 11 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.Position
+
+ +

Definition at line 13 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.tree
+
+ +

Definition at line 8 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.Vertex
+
+ +

Definition at line 15 of file FitTrackInfo.py.

+ +
+
+ +
+
+ + + + +
FitTrackInfo.FitTrackInfo.vertexEFlag
+
+ +

Definition at line 18 of file FitTrackInfo.py.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse-members.html b/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse-members.html new file mode 100644 index 0000000..a983e47 --- /dev/null +++ b/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse-members.html @@ -0,0 +1,96 @@ + + + + + + +Python: Member List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+
LoopAnalyse.LoopAnalyse Member List
+
+ + + + + diff --git a/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse.html b/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse.html new file mode 100644 index 0000000..a221826 --- /dev/null +++ b/Katerina/doc/html/classLoopAnalyse_1_1LoopAnalyse.html @@ -0,0 +1,793 @@ + + + + + + +Python: LoopAnalyse.LoopAnalyse Class Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+ +
+
LoopAnalyse.LoopAnalyse Class Reference
+
+
+
+Inheritance diagram for LoopAnalyse.LoopAnalyse:
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __init__
 
def createGeom
 
def CleanStat
 
def writeHistos
 
def hitMCtrackCorellations
 
def fitMCvertexCorellations
 
def doCompareFits
 
def doPlotMomentum
 
def PrintStat
 
def Loop
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Attributes

 tree
 
 debug
 
 modules
 
 ShipGeo
 
 run
 
 stat
 
 hmagnet
 
 htrck
 
 hvtx
 
 hmom
 
 hcmfits
 
 plotField
 
 plotTracking
 
 plotVertex
 
 plotVertexCh
 
 plotMomentum
 
 compareFits
 
 MCTracks
 
 StrHits
 
 FitTracks
 
+

Detailed Description

+
+

Definition at line 19 of file LoopAnalyse.py.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.__init__ ( self,
 tree,
 pref,
 geoFile,
 debug = 0,
 plotField = False,
 plotTracking = False,
 plotVertex = False,
 plotVertexDetailed = False,
 plotMomentum = False,
 compareFits = False 
)
+
+ +

Definition at line 26 of file LoopAnalyse.py.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + + + + +
def LoopAnalyse.LoopAnalyse.CleanStat ( self)
+
+ +

Definition at line 99 of file LoopAnalyse.py.

+ +

References LoopAnalyse.LoopAnalyse.stat.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.createGeom ( self,
 pref,
 geoFile 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.doCompareFits ( self,
 oldStyle = True,
 ellCut = False,
 weight = 1 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.doPlotMomentum ( self,
 weight,
 old = True 
)
+
+ +

Definition at line 238 of file LoopAnalyse.py.

+ +

References LoopAnalyse.LoopAnalyse.hmom.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.fitMCvertexCorellations ( self,
 weight = 1,
 old = True,
 cut = False,
 detailed = False 
)
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def LoopAnalyse.LoopAnalyse.hitMCtrackCorellations ( self,
 weight = 1 
)
+
+
+ + + +
+
+ + + + + + + + +
def LoopAnalyse.LoopAnalyse.PrintStat ( self)
+
+ +

Definition at line 293 of file LoopAnalyse.py.

+ +

References LoopAnalyse.LoopAnalyse.stat.

+ +
+
+ +
+
+ + + + + + + + +
def LoopAnalyse.LoopAnalyse.writeHistos ( self)
+
+ +

Definition at line 109 of file LoopAnalyse.py.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.compareFits
+
+ +

Definition at line 47 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.debug
+
+ +

Definition at line 28 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.FitTracks
+
+ +

Definition at line 75 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.hcmfits
+
+ +

Definition at line 41 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.hmagnet
+
+ +

Definition at line 37 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.hmom
+
+ +

Definition at line 40 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.htrck
+
+ +

Definition at line 38 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.hvtx
+
+ +

Definition at line 39 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.MCTracks
+
+ +

Definition at line 73 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.modules
+
+ +

Definition at line 30 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.plotField
+
+ +

Definition at line 42 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.plotMomentum
+
+ +

Definition at line 46 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.plotTracking
+
+ +

Definition at line 43 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.plotVertex
+
+ +

Definition at line 44 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.plotVertexCh
+
+ +

Definition at line 45 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.run
+
+ +

Definition at line 32 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.ShipGeo
+
+ +

Definition at line 31 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.stat
+
+ +

Definition at line 35 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.StrHits
+
+ +

Definition at line 74 of file LoopAnalyse.py.

+ +
+
+ +
+
+ + + + +
LoopAnalyse.LoopAnalyse.tree
+
+ +

Definition at line 27 of file LoopAnalyse.py.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo-members.html b/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo-members.html new file mode 100644 index 0000000..d6c9c1c --- /dev/null +++ b/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo-members.html @@ -0,0 +1,91 @@ + + + + + + +Python: Member List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+
MCTrackInfo.MCTrackInfo Member List
+
+ + + + + diff --git a/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo.html b/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo.html new file mode 100644 index 0000000..de3c4ca --- /dev/null +++ b/Katerina/doc/html/classMCTrackInfo_1_1MCTrackInfo.html @@ -0,0 +1,893 @@ + + + + + + +Python: MCTrackInfo.MCTrackInfo Class Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+ +
+
MCTrackInfo.MCTrackInfo Class Reference
+
+
+ +

For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+. + More...

+
+Inheritance diagram for MCTrackInfo.MCTrackInfo:
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __init__
 
def setAccPlaneZ
 set z of the last full acceptance plane (to be used in checkEllipticAcc), depends on RecoSettings. More...
 
def PrintHNL
 prints HNL decay products More...
 
def getEventWeight
 returns event weight. More...
 
def getHNLdecayVertex
 returns HNL decay vertex coordinates (TVector3 __HNLdecayCoord). More...
 
def getHNLdecayTrIDs
 returns list of MCtrIDs (index in MCTrack collection) fot HNL decay products. More...
 
def getTrIDs
 returns list of all MCtrIDs read by readEvent and readTrack - not only HNL decay products. More...
 
def getCharge
 returns charge of a particle with the given trID (index in MCTrack collection). More...
 
def getMomentum
 returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection). More...
 
def checkEllipticAcc
 checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at __zAcc. More...
 
def checkVertexUpDown
 for Tracker Performance studies. More...
 
def getTrackPropagation
 for Tracker Performance studies. More...
 
def readTrack
 reads one additional track with trID from MCTrack collection. More...
 
def readEvent
 reads HNL decay products from MCTrack collection (two at the moment!). More...
 
+ + + + +

+Private Member Functions

def __clean
 clears all dictionaries and lists. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Attributes

 __tree
 root tree to be read. More...
 
 __debug
 debug level [0,3]. More...
 
 __zAcc
 z of the last full acceptance plane (to be used in checkEllipticAcc), must be set later. More...
 
 __weight
 event weight. More...
 
 __HNLdecayCoord
 HNL decay vertex coordinates (TVector3). More...
 
 __decayProdTrID
 MCTrID (index of the track in MCtrack list) for HNL daughter products. More...
 
 __productVertex
 Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}. More...
 
 __productMoment
 Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}. More...
 
 __productCharge
 Charge of several stored products (not only HNL daughter) as {MCTrID : value}. More...
 
 __productInfo
 Basic information on the particle (pdg, mother pdg,... More...
 
+

Detailed Description

+

For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+.

+
More description here
+

Definition at line 10 of file MCTrackInfo.py.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.__init__ ( self,
 tree,
 debug = 0 
)
+
+ +

Definition at line 12 of file MCTrackInfo.py.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.__clean ( self)
+
+private
+
+ +

clears all dictionaries and lists.

+

To be called inside readEvent.

+ +

Definition at line 40 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, and MCTrackInfo.MCTrackInfo.__weight.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.checkEllipticAcc ( self,
 tight = True 
)
+
+ +

checks if HNL decay vertex (and both HNL daughter tracks, if tight cut) are in elliptic acceptance at __zAcc.

+

For tight cut each HNL daughter is propagated to __zAcc (see getTrackPropagation) and checked if it in the acceptance (see RecoSettings .checkEllipticAcc). Also checks HNL decay vertex.

+
Parameters
+ + +
tight- if true, not only HNL vertex but also propagated tracks are checked.
+
+
+
Returns
True if the vertex (and both tracks, if tight cut) are in the acceptance.
+ +

Definition at line 133 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, MCTrackInfo.MCTrackInfo.__zAcc, RecoSettings.checkEllipticAcc(), and MCTrackInfo.MCTrackInfo.getTrackPropagation().

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.checkVertexUpDown ( self)
+
+ +

for Tracker Performance studies.

+

Returns -1, 0, 1 depending on vertex topology. defines direction in y: 0 if both momY the same direction, -1 if (negative up, positive down).

+
Returns
0 if both momY the same direction, -1 if (negative up, positive down).
+ +

Definition at line 150 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__decayProdTrID, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productMoment, and MCTrackInfo.MCTrackInfo.__productVertex.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.getCharge ( self,
 trID 
)
+
+ +

returns charge of a particle with the given trID (index in MCTrack collection).

+

May return None. Tries to get charge from __productCharge; if it is not available, tries to add the track calling readTrack. If fails, returns None.

+
Parameters
+ + +
trID- index of the MCTrack
+
+
+
Returns
charge of the track or None
+ +

Definition at line 108 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__productCharge, and MCTrackInfo.MCTrackInfo.readTrack().

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.getEventWeight ( self)
+
+ +

returns event weight.

+
Returns
value of __weight
+ +

Definition at line 71 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__weight.

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.getHNLdecayTrIDs ( self)
+
+ +

returns list of MCtrIDs (index in MCTrack collection) fot HNL decay products.

+
Returns
list of MCtrIDs (index in MCTrack collection) fot HNL decay products.
+ +

Definition at line 85 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__decayProdTrID.

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.getHNLdecayVertex ( self)
+
+ +

returns HNL decay vertex coordinates (TVector3 __HNLdecayCoord).

+
Returns
TVector3 __HNLdecayCoord
+ +

Definition at line 78 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__HNLdecayCoord.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.getMomentum ( self,
 trID 
)
+
+ +

returns momentum (TVector3) for a particle with the given trID (index in MCTrack collection).

+

May return None. Tries to get momentum from __productMoment; if it is not available, tries to add the track calling readTrack. If fails, returns None.

+
Parameters
+ + +
trID- index of the MCTrack
+
+
+
Returns
momentum of the track (TVector3) or None
+ +

Definition at line 120 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__productMoment, and MCTrackInfo.MCTrackInfo.readTrack().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.getTrackPropagation ( self,
 trID,
 z 
)
+
+ +

for Tracker Performance studies.

+

Returns TVector3. Linear propagation of a given track to a plane (0,0,z) perendicular to Z-axis.

+
Parameters
+ + + +
trID- track index (MCtrID).
z- coordinate of the plane.
+
+
+
Returns
coordinates of the point of track crossing the given plalne (TVector3).
+ +

Definition at line 168 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, and MCTrackInfo.MCTrackInfo.readTrack().

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.getTrIDs ( self)
+
+ +

returns list of all MCtrIDs read by readEvent and readTrack - not only HNL decay products.

+
Returns
list of MCtrIDs (index in MCTrack collection) fot all tracks read by readEvent and readTrack.
+ +

Definition at line 95 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__productMoment.

+ +
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.PrintHNL ( self)
+
+
+ +
+
+ + + + + + + + +
def MCTrackInfo.MCTrackInfo.readEvent ( self)
+
+ +

reads HNL decay products from MCTrack collection (two at the moment!).

+

Returns number of daughters. Fills __HNLdecayCoord and __productVertex, __productMoment, __productCharge dictionaries for HNL daughters.

+
Returns
number of daughters (loop stops at daughter==2 at the moment!).
+ +

Definition at line 217 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__clean(), MCTrackInfo.MCTrackInfo.__debug, MCTrackInfo.MCTrackInfo.__HNLdecayCoord, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productInfo, MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, MCTrackInfo.MCTrackInfo.__weight, and RecoSettings.chargePDG().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.readTrack ( self,
 trID 
)
+
+ +

reads one additional track with trID from MCTrack collection.

+

Returns 1 if success, 0 otherwise. fills __productVertex, __productMoment, __productCharge dictionaries.

+
Parameters
+ + +
trID- track index (MCtrID).
+
+
+
Returns
1 if successful, 0 if trID is not found and the dictionaries are not modified.
+ +

Definition at line 184 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__debug, MCTrackInfo.MCTrackInfo.__productCharge, MCTrackInfo.MCTrackInfo.__productInfo, MCTrackInfo.MCTrackInfo.__productMoment, MCTrackInfo.MCTrackInfo.__productVertex, and RecoSettings.chargePDG().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def MCTrackInfo.MCTrackInfo.setAccPlaneZ ( self,
 z 
)
+
+ +

set z of the last full acceptance plane (to be used in checkEllipticAcc), depends on RecoSettings.

+

trackMinNofStations.

+
Parameters
+ + +
z- the value [cm].
+
+
+ +

Definition at line 52 of file MCTrackInfo.py.

+ +

References MCTrackInfo.MCTrackInfo.__zAcc.

+ +
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__debug
+
+private
+
+ +

debug level [0,3].

+ +

Definition at line 16 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__decayProdTrID
+
+private
+
+ +

MCTrID (index of the track in MCtrack list) for HNL daughter products.

+ +

Definition at line 24 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__HNLdecayCoord
+
+private
+
+ +

HNL decay vertex coordinates (TVector3).

+

Assigned in readEvent()

+ +

Definition at line 22 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__productCharge
+
+private
+
+ +

Charge of several stored products (not only HNL daughter) as {MCTrID : value}.

+

Correspond to $__productVertex.

+ +

Definition at line 30 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__productInfo
+
+private
+
+ +

Basic information on the particle (pdg, mother pdg,...

+

to be added - z decay!)

+ +

Definition at line 32 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__productMoment
+
+private
+
+ +

Momentum of several stored products (not only HNL daughter) as {MCTrID : TVector3}.

+

Correspond to $__productVertex.

+ +

Definition at line 28 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__productVertex
+
+private
+
+ +

Production vertices of several stored products (not only HNL daughter) as {MCTrID : TVector3}.

+ +

Definition at line 26 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__tree
+
+private
+
+ +

root tree to be read.

+ +

Definition at line 14 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__weight
+
+private
+
+ +

event weight.

+

Read in readEvent as weight of HNL.

+ +

Definition at line 20 of file MCTrackInfo.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
MCTrackInfo.MCTrackInfo.__zAcc
+
+private
+
+ +

z of the last full acceptance plane (to be used in checkEllipticAcc), must be set later.

+ +

Definition at line 18 of file MCTrackInfo.py.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/Katerina/doc/html/classStrawHits_1_1StrawHits-members.html b/Katerina/doc/html/classStrawHits_1_1StrawHits-members.html new file mode 100644 index 0000000..83c8b56 --- /dev/null +++ b/Katerina/doc/html/classStrawHits_1_1StrawHits-members.html @@ -0,0 +1,100 @@ + + + + + + +Python: Member List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+
StrawHits.StrawHits Member List
+
+ + + + + diff --git a/Katerina/doc/html/classStrawHits_1_1StrawHits.html b/Katerina/doc/html/classStrawHits_1_1StrawHits.html new file mode 100644 index 0000000..1d8964a --- /dev/null +++ b/Katerina/doc/html/classStrawHits_1_1StrawHits.html @@ -0,0 +1,1196 @@ + + + + + + +Python: StrawHits.StrawHits Class Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+ +
+
StrawHits.StrawHits Class Reference
+
+
+
+Inheritance diagram for StrawHits.StrawHits:
+
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

def __init__
 
def getTrIDs
 returns list of keys __trackEdgeHits (MCtrackIDs>0 with more than RecoSettings .trackMinNofHits hits). More...
 
def getTrIDsALL
 returns list of keys __trackHits (MCtrackIDs>0. More...
 
def getReFitTrIDs
 returns list of keys __reFitTracks. More...
 
def getReFitChi2Ndf
 
def getReFitNdf
 
def getReFitVertex
 returns vertex (if number of tracks!=2 will return None!). More...
 
def getStepDoca
 returns doca's of each extrapolation steps (size is defined in RecoSettings .VertexExtrSteps). More...
 
def getReFitPosDirPval
 returns vertex (if number of tracks!=2 will return None!). More...
 
def getNofPHits
 returns number of hits in proper tracker stations (Z>0) calculated from __trackHits and __vetoHits. More...
 
def getStartHit
 returns TVector3 of a tracker entry hit (Z>0) from __trackEdgeHits. More...
 
def checkVetoHits
 returns number of hits with Z<0 of __trackHits. More...
 
def PrintNewTracks
 
def compareFitTracks
 
def readEvent
 to be called per each event. More...
 
def FitTracks
 
+ + + + + + + + + + + + + +

+Private Member Functions

def __clean
 to be called for each new event (called in readEvent()) cleans all dictionaries (__trackHits, __trackEdgeHits, __vetoHits, __nStations). More...
 
def __hitSmear
 returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit. More...
 
def __getIniDir
 
def __prepareIniPosMomCov
 
def __prepareWireMeasurements
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Private Attributes

 __tree
 root tree to be read. More...
 
 __modules
 geometry description modules. More...
 
 __debug
 debug level [0,3] More...
 
 __resolution
 hit resolition More...
 
 __trackHits
 {MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position. More...
 
 __oldSmearedHits
 
 __trackEdgeHits
 {MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit. More...
 
 __vetoHits
 {MCtrackID : number of hits at Z<0 (veto tracker)}. More...
 
 __nStations
 {MCtrackID: number of crossed stations (exclude veto tracker)}. More...
 
 __random
 root random engent for hit smearing (see __hitSmear). More...
 
 __fitter
 
 __reFitTracks
 
 __docaEval
 
+

Detailed Description

+
StrawHit class
+

Definition at line 12 of file StrawHits.py.

+

Constructor & Destructor Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.__init__ ( self,
 tree,
 modules,
 resolution,
 debug = 0,
 mhistdict = None,
 ship_geo = None 
)
+
+ +

Definition at line 14 of file StrawHits.py.

+ +
+
+

Member Function Documentation

+ +
+
+ + + + + +
+ + + + + + + + +
def StrawHits.StrawHits.__clean ( self)
+
+private
+
+ +

to be called for each new event (called in readEvent()) cleans all dictionaries (__trackHits, __trackEdgeHits, __vetoHits, __nStations).

+ +

Definition at line 90 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__docaEval.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.__getIniDir ( self,
 trID 
)
+
+private
+
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.__hitSmear ( self,
 tid,
 hid,
 new = False 
)
+
+private
+
+ +

returns a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.

+
Parameters
+ + + + +
tid- MCtrackID.
hid- hit index of __trackHits
new- to generate new smearing (True) or get from SmearedHits (det.position still recalculated!)
+
+
+
Returns
a dictionary {xtop, ytop, z, ybot, ybot, z, dist} for a smeared hit.
+ +

Definition at line 205 of file StrawHits.py.

+ +

References MCTrackInfo.MCTrackInfo.__debug, StrawHits.StrawHits.__debug, StrawHits.StrawHits.__modules, StrawHits.StrawHits.__resolution, and StrawHits.StrawHits.__trackHits.

+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.__prepareIniPosMomCov ( self,
 tid,
 original = True 
)
+
+private
+
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.__prepareWireMeasurements ( self,
 tid,
 fTrack 
)
+
+private
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.checkVetoHits ( self,
 tid 
)
+
+ +

returns number of hits with Z<0 of __trackHits.

+
Parameters
+ + +
tid- MCtrackID.
+
+
+
Returns
number of hits with Z<0 of __trackHits.
+ +

Definition at line 181 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__vetoHits.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.compareFitTracks ( self,
 tid,
 theFitTracks 
)
+
+ +

Definition at line 195 of file StrawHits.py.

+ +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getNofPHits ( self,
 tid 
)
+
+ +

returns number of hits in proper tracker stations (Z>0) calculated from __trackHits and __vetoHits.

+
Parameters
+ + +
tid- MCtrackID.
+
+
+
Returns
number of hits in proper tracker stations (Z>0).
+ +

Definition at line 165 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__trackHits, and StrawHits.StrawHits.__vetoHits.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getReFitChi2Ndf ( self,
 tid 
)
+
+ +

Definition at line 127 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getReFitNdf ( self,
 tid 
)
+
+ +

Definition at line 132 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getReFitPosDirPval ( self,
 tid 
)
+
+ +

returns vertex (if number of tracks!=2 will return None!).

+
Returns
new vertex (if number of tracks!=2 will return None!).
+ +

Definition at line 157 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.getReFitTrIDs ( self)
+
+ +

returns list of keys __reFitTracks.

+
Returns
list of MCtrackIDs of "good" tracks.
+ +

Definition at line 122 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.getReFitVertex ( self)
+
+ +

returns vertex (if number of tracks!=2 will return None!).

+
Returns
new vertex (if number of tracks!=2 will return None!).
+ +

Definition at line 140 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getStartHit ( self,
 tid 
)
+
+ +

returns TVector3 of a tracker entry hit (Z>0) from __trackEdgeHits.

+
Parameters
+ + +
tid- MCtrackID.
+
+
+
Returns
position of a tracker entry hit (Z>0) from __trackEdgeHits.
+ +

Definition at line 173 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__trackEdgeHits.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def StrawHits.StrawHits.getStepDoca ( self,
 step 
)
+
+ +

returns doca's of each extrapolation steps (size is defined in RecoSettings .VertexExtrSteps).

+
Returns
new vertex (if number of tracks!=2 will return None!).
+ +

Definition at line 149 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__docaEval.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.getTrIDs ( self)
+
+ +

returns list of keys __trackEdgeHits (MCtrackIDs>0 with more than RecoSettings .trackMinNofHits hits).

+
Returns
list of MCtrackIDs of "good" tracks.
+ +

Definition at line 102 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__trackEdgeHits.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.getTrIDsALL ( self)
+
+ +

returns list of keys __trackHits (MCtrackIDs>0.

+
Returns
list of MCtrackIDs of MC assigned tracks.
+ +

Definition at line 112 of file StrawHits.py.

+ +

References StrawHits.StrawHits.__trackEdgeHits.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.PrintNewTracks ( self)
+
+ +

Definition at line 189 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + + + + +
def StrawHits.StrawHits.readEvent ( self)
+
+
+

Member Data Documentation

+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__debug
+
+private
+
+ +

debug level [0,3]

+ +

Definition at line 20 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__docaEval
+
+private
+
+ +

Definition at line 41 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__fitter
+
+private
+
+ +

Definition at line 38 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__modules
+
+private
+
+ +

geometry description modules.

+ +

Definition at line 18 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__nStations
+
+private
+
+ +

{MCtrackID: number of crossed stations (exclude veto tracker)}.

+ +

Definition at line 32 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__oldSmearedHits
+
+private
+
+ +

Definition at line 25 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__random
+
+private
+
+ +

root random engent for hit smearing (see __hitSmear).

+ +

Definition at line 34 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__reFitTracks
+
+private
+
+ +

Definition at line 40 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__resolution
+
+private
+
+ +

hit resolition

+ +

Definition at line 22 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__trackEdgeHits
+
+private
+
+ +

{MCtrackID : {X : TVector3}} where x='entry' or 'exit', TVector3 coordinates of last or first hit.

+

Created for tracks with more than RecoSettings .trackMinNofHits hits.

+ +

Definition at line 28 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__trackHits
+
+private
+
+ +

{MCtrackID : [{'pos':TVector3, 'det':detID, 'dw':distance to wire, 'smdw': smeared dw} where [TVector3] list of each hit position.

+

Created if MCtrackID>0.

+ +

Definition at line 24 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__tree
+
+private
+
+ +

root tree to be read.

+ +

Definition at line 16 of file StrawHits.py.

+ +
+
+ +
+
+ + + + + +
+ + + + +
StrawHits.StrawHits.__vetoHits
+
+private
+
+ +

{MCtrackID : number of hits at Z<0 (veto tracker)}.

+ +

Definition at line 30 of file StrawHits.py.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/Katerina/doc/html/classes.html b/Katerina/doc/html/classes.html new file mode 100644 index 0000000..e1de091 --- /dev/null +++ b/Katerina/doc/html/classes.html @@ -0,0 +1,71 @@ + + + + + + +Python: Class Index + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
Class Index
+
+
+
F | L | M | S
+ + + + + +
  F  
+
  L  
+
  M  
+
  S  
+
FitTrackInfo (FitTrackInfo)   LoopAnalyse (LoopAnalyse)   MCTrackInfo (MCTrackInfo)   StrawHits (StrawHits)   
+
F | L | M | S
+
+ + + + diff --git a/Katerina/doc/html/doxygen.css b/Katerina/doc/html/doxygen.css new file mode 100644 index 0000000..4699e69 --- /dev/null +++ b/Katerina/doc/html/doxygen.css @@ -0,0 +1,1357 @@ +/* The standard CSS for doxygen 1.8.5 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0px; + margin: 0px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view when not used as main index */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + diff --git a/Katerina/doc/html/dynsections.js b/Katerina/doc/html/dynsections.js new file mode 100644 index 0000000..2f15470 --- /dev/null +++ b/Katerina/doc/html/dynsections.js @@ -0,0 +1,104 @@ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} +function toggleLevel(level) +{ + $('table.directory tr').each(function(){ + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + +Python: File List + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
File List
+
+
+
Here is a list of all files with brief descriptions:
+
+ + + + diff --git a/Katerina/doc/html/functions.html b/Katerina/doc/html/functions.html new file mode 100644 index 0000000..353fa50 --- /dev/null +++ b/Katerina/doc/html/functions.html @@ -0,0 +1,457 @@ + + + + + + +Python: Class Members + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + + +
+
+
Here is a list of all class members with links to the classes they belong to:
+ +

- _ -

+ + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+ + +

- w -

+
+ + + + diff --git a/Katerina/doc/html/functions_func.html b/Katerina/doc/html/functions_func.html new file mode 100644 index 0000000..caa8054 --- /dev/null +++ b/Katerina/doc/html/functions_func.html @@ -0,0 +1,298 @@ + + + + + + +Python: Class Members - Functions + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + + +
+
+  + +

- _ -

+ + +

- a -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- h -

+ + +

- l -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- w -

+
+ + + + diff --git a/Katerina/doc/html/functions_vars.html b/Katerina/doc/html/functions_vars.html new file mode 100644 index 0000000..bd6be90 --- /dev/null +++ b/Katerina/doc/html/functions_vars.html @@ -0,0 +1,272 @@ + + + + + + +Python: Class Members - Variables + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + + +
+
+  + +

- _ -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- h -

+ + +

- m -

+ + +

- p -

+ + +

- r -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+
+ + + + diff --git a/Katerina/doc/html/hierarchy.html b/Katerina/doc/html/hierarchy.html new file mode 100644 index 0000000..7f3ec42 --- /dev/null +++ b/Katerina/doc/html/hierarchy.html @@ -0,0 +1,69 @@ + + + + + + +Python: Class Hierarchy + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
Class Hierarchy
+
+
+
This inheritance list is sorted roughly, but not completely, alphabetically:
+
[detail level 12]
+ + + + + +
\Cobject
 oCFitTrackInfo.FitTrackInfo
 oCLoopAnalyse.LoopAnalyse
 oCMCTrackInfo.MCTrackInfoFor a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+
 \CStrawHits.StrawHits
+
+
+ + + + diff --git a/Katerina/doc/html/index.html b/Katerina/doc/html/index.html new file mode 100644 index 0000000..7e99a3d --- /dev/null +++ b/Katerina/doc/html/index.html @@ -0,0 +1,51 @@ + + + + + + +Python: Main Page + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + +
+
+
+
Python Documentation
+
+
+
+ + + + diff --git a/Katerina/doc/html/jquery.js b/Katerina/doc/html/jquery.js new file mode 100644 index 0000000..6aa2e4c --- /dev/null +++ b/Katerina/doc/html/jquery.js @@ -0,0 +1,39 @@ +/*! + * jQuery JavaScript Library v1.7.1 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Mon Nov 21 21:11:03 2011 -0500 + */ +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
t
";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * More information: http://sizzlejs.com/ + */ +(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1 +},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},ac=a(av); +ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
","
"]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length; +if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b +})}})(window); +/*! + PowerTip - v1.2.0 - 2013-04-03 + http://stevenbenner.github.com/jquery-powertip/ + Copyright (c) 2013 Steven Benner (http://stevenbenner.com/). + Released under MIT license. + https://raw.github.com/stevenbenner/jquery-powertip/master/LICENSE.txt +*/ +(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}}(function(k){var A=k(document),s=k(window),w=k("body");var n="displayController",e="hasActiveHover",d="forcedOpen",u="hasMouseMove",f="mouseOnToPopup",g="originalTitle",y="powertip",o="powertipjq",l="powertiptarget",E=180/Math.PI;var c={isTipOpen:false,isFixedTipOpen:false,isClosing:false,tipOpenImminent:false,activeHover:null,currentX:0,currentY:0,previousX:0,previousY:0,desyncTimeout:null,mouseTrackingActive:false,delayInProgress:false,windowWidth:0,windowHeight:0,scrollTop:0,scrollLeft:0};var p={none:0,top:1,bottom:2,left:4,right:8};k.fn.powerTip=function(F,N){if(!this.length){return this}if(k.type(F)==="string"&&k.powerTip[F]){return k.powerTip[F].call(this,this,N)}var O=k.extend({},k.fn.powerTip.defaults,F),G=new x(O);h();this.each(function M(){var R=k(this),Q=R.data(y),P=R.data(o),T=R.data(l),S;if(R.data(n)){k.powerTip.destroy(R)}S=R.attr("title");if(!Q&&!T&&!P&&S){R.data(y,S);R.data(g,S);R.removeAttr("title")}R.data(n,new t(R,O,G))});if(!O.manual){this.on({"mouseenter.powertip":function J(P){k.powerTip.show(this,P)},"mouseleave.powertip":function L(){k.powerTip.hide(this)},"focus.powertip":function K(){k.powerTip.show(this)},"blur.powertip":function H(){k.powerTip.hide(this,true)},"keydown.powertip":function I(P){if(P.keyCode===27){k.powerTip.hide(this,true)}}})}return this};k.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false};k.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};k.powerTip={show:function z(F,G){if(G){i(G);c.previousX=G.pageX;c.previousY=G.pageY;k(F).data(n).show()}else{k(F).first().data(n).show(true,true)}return F},reposition:function r(F){k(F).first().data(n).resetPosition();return F},hide:function D(G,F){if(G){k(G).first().data(n).hide(F)}else{if(c.activeHover){c.activeHover.data(n).hide(true)}}return G},destroy:function C(G){k(G).off(".powertip").each(function F(){var I=k(this),H=[g,n,e,d];if(I.data(g)){I.attr("title",I.data(g));H.push(y)}I.removeData(H)});return G}};k.powerTip.showTip=k.powerTip.show;k.powerTip.closeTip=k.powerTip.hide;function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bottom="auto";F.set=function(H,G){if(k.isNumeric(G)){F[H]=Math.round(G)}}}function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c.tipOpenImminent=true;J=setTimeout(function O(){J=null;I()},N.intentPollInterval)}else{if(Q){K.data(d,true)}F.showTip(K)}}}function G(P){M();c.tipOpenImminent=false;if(K.data(e)){K.data(d,false);if(!P){c.delayInProgress=true;J=setTimeout(function O(){J=null;F.hideTip(K);c.delayInProgress=false},N.closeDelay)}else{F.hideTip(K)}}}function I(){var Q=Math.abs(c.previousX-c.currentX),O=Math.abs(c.previousY-c.currentY),P=Q+O;if(P",{id:Q.popupId});if(w.length===0){w=k("body")}w.append(O)}if(Q.followMouse){if(!O.data(u)){A.on("mousemove",M);s.on("scroll",M);O.data(u,true)}}if(Q.mouseOnToPopup){O.on({mouseenter:function L(){if(O.data(f)){if(c.activeHover){c.activeHover.data(n).cancel()}}},mouseleave:function N(){if(c.activeHover){c.activeHover.data(n).hide()}}})}function I(S){S.data(e,true);O.queue(function R(T){H(S);T()})}function H(S){var U;if(!S.data(e)){return}if(c.isTipOpen){if(!c.isClosing){K(c.activeHover)}O.delay(100).queue(function R(V){H(S);V()});return}S.trigger("powerTipPreRender");U=B(S);if(U){O.empty().append(U)}else{return}S.trigger("powerTipRender");c.activeHover=S;c.isTipOpen=true;O.data(f,Q.mouseOnToPopup);if(!Q.followMouse){G(S);c.isFixedTipOpen=true}else{M()}O.fadeIn(Q.fadeInTime,function T(){if(!c.desyncTimeout){c.desyncTimeout=setInterval(J,500)}S.trigger("powerTipOpen")})}function K(R){c.isClosing=true;c.activeHover=null;c.isTipOpen=false;c.desyncTimeout=clearInterval(c.desyncTimeout);R.data(e,false);R.data(d,false);O.fadeOut(Q.fadeOutTime,function S(){var T=new b();c.isClosing=false;c.isFixedTipOpen=false;O.removeClass();T.set("top",c.currentY+Q.offset);T.set("left",c.currentX+Q.offset);O.css(T);R.trigger("powerTipClose")})}function M(){if(!c.isFixedTipOpen&&(c.isTipOpen||(c.tipOpenImminent&&O.data(u)))){var R=O.outerWidth(),V=O.outerHeight(),U=new b(),S,T;U.set("top",c.currentY+Q.offset);U.set("left",c.currentX+Q.offset);S=m(U,R,V);if(S!==p.none){T=a(S);if(T===1){if(S===p.right){U.set("left",c.windowWidth-R)}else{if(S===p.bottom){U.set("top",c.scrollTop+c.windowHeight-V)}}}else{U.set("left",c.currentX-R-Q.offset);U.set("top",c.currentY-V-Q.offset)}}O.css(U)}}function G(S){var R,T;if(Q.smartPlacement){R=k.fn.powerTip.smartPlacementLists[Q.placement];k.each(R,function(U,W){var V=m(F(S,W),O.outerWidth(),O.outerHeight());T=W;if(V===p.none){return false}})}else{F(S,Q.placement);T=Q.placement}O.addClass(T)}function F(U,T){var R=0,S,W,V=new b();V.set("top",0);V.set("left",0);O.css(V);do{S=O.outerWidth();W=O.outerHeight();V=P.compute(U,T,S,W,Q.offset);O.css(V)}while(++R<=5&&(S!==O.outerWidth()||W!==O.outerHeight()));return V}function J(){var R=false;if(c.isTipOpen&&!c.isClosing&&!c.delayInProgress){if(c.activeHover.data(e)===false||c.activeHover.is(":disabled")){R=true}else{if(!v(c.activeHover)&&!c.activeHover.is(":focus")&&!c.activeHover.data(d)){if(O.data(f)){if(!v(O)){R=true}}else{R=true}}}if(R){K(c.activeHover)}}}this.showTip=I;this.hideTip=K;this.resetPosition=G}function q(F){return window.SVGElement&&F[0] instanceof SVGElement}function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(function H(){c.scrollLeft=s.scrollLeft();c.scrollTop=s.scrollTop();c.windowWidth=s.width();c.windowHeight=s.height()});A.on("mousemove",i);s.on({resize:function G(){c.windowWidth=s.width();c.windowHeight=s.height()},scroll:function F(){var I=s.scrollLeft(),J=s.scrollTop();if(I!==c.scrollLeft){c.currentX+=I-c.scrollLeft;c.scrollLeft=I}if(J!==c.scrollTop){c.currentY+=J-c.scrollTop;c.scrollTop=J}}})}}function i(F){c.currentX=F.pageX;c.currentY=F.pageY}function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-J.left,G=J.bottom-J.top;return c.currentX>=H.left&&c.currentX<=H.left+I&&c.currentY>=H.top&&c.currentY<=H.top+G}function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isFunction(G)){G=G.call(I[0])}J=G}else{if(F){if(k.isFunction(F)){F=F.call(I[0])}if(F.length>0){J=F.clone(true,true)}}else{if(K){H=k("#"+K);if(H.length>0){J=H.html()}}}}return J}function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=J+c.windowWidth,H=p.none;if(M.topI||Math.abs(M.bottom-c.windowHeight)>I){H|=p.bottom}if(M.leftF){H|=p.left}if(M.left+L>F||M.right + + + + + +Python: AnalyseThat Namespace Reference + + + + + + +
+
+
+ + + + + +
+
Python +
+
+ + + + + + +
+ +
+
AnalyseThat Namespace Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

int chi2CutOff = 4
 
tuple PDG = ROOT.TDatabasePDG.Instance()
 
 inputFile = None
 
 geoFile = None
 
 dy = None
 
int nEvents = 99999
 
 fiducialCut = False
 
int measCut = 25
 
tuple tmp = inputFile.split('.')
 
tuple f = ROOT.TFile(inputFile)
 
 sTree = f.cbmsim
 
tuple la
 
+

Variable Documentation

+ +
+
+ + + + +
int AnalyseThat.chi2CutOff = 4
+
+ +

Definition at line 6 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.dy = None
+
+ +

Definition at line 10 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.f = ROOT.TFile(inputFile)
+
+ +

Definition at line 44 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
AnalyseThat.fiducialCut = False
+
+ +

Definition at line 12 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.geoFile = None
+
+ +

Definition at line 9 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
string AnalyseThat.inputFile = None
+
+ +

Definition at line 8 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.la
+
+Initial value:
1 = LoopAnalyse(sTree, dy, geoFile, debug=0,
+
2  plotField = False,
+
3  plotTracking = False,
+
4  plotVertex = True,
+
5  plotVertexDetailed = False,
+
6  plotMomentum = True,
+
7  compareFits = True)
+ +
+

Definition at line 50 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
int AnalyseThat.measCut = 25
+
+ +

Definition at line 13 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.nEvents = 99999
+
+ +

Definition at line 11 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.PDG = ROOT.TDatabasePDG.Instance()
+
+ +

Definition at line 7 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
AnalyseThat.sTree = f.cbmsim
+
+ +

Definition at line 45 of file AnalyseThat.py.

+ +
+
+ +
+
+ + + + +
tuple AnalyseThat.tmp = inputFile.split('.')
+
+ +

Definition at line 33 of file AnalyseThat.py.

+ +
+
+
+ + + + diff --git a/Katerina/doc/html/namespaceBookHistos.html b/Katerina/doc/html/namespaceBookHistos.html new file mode 100644 index 0000000..1cb39d1 --- /dev/null +++ b/Katerina/doc/html/namespaceBookHistos.html @@ -0,0 +1,350 @@ + + + + + + +Python: BookHistos Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
BookHistos Namespace Reference
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

def SetGrid
 
def SetAxis
 
def bookMFieldHistos
 
def plotMFieldHistos
 
def bookMomentumHistos
 
def plotMomentumHistos
 
def bookCompareFitHistos
 
def plotCompareFitHistos
 
def bookTrackingHistos
 
def plotMCTrackHitCorrelation
 
def bookVertexHistos
 
def plotVertexHistos
 
+

Function Documentation

+ +
+
+ + + + + + + + +
def BookHistos.bookCompareFitHistos ( h)
+
+ +

Definition at line 149 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.bookMFieldHistos ( h)
+
+ +

Definition at line 21 of file BookHistos.py.

+ +

References SetAxis().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def BookHistos.bookMomentumHistos ( h,
 prefix = "" 
)
+
+ +

Definition at line 67 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.bookTrackingHistos ( h)
+
+ +

Definition at line 206 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def BookHistos.bookVertexHistos ( h,
 prefix = "" 
)
+
+ +

Definition at line 280 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.plotCompareFitHistos ( h)
+
+ +

Definition at line 171 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.plotMCTrackHitCorrelation ( h)
+
+ +

Definition at line 229 of file BookHistos.py.

+ +

References SetGrid().

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.plotMFieldHistos ( h)
+
+ +

Definition at line 38 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def BookHistos.plotMomentumHistos ( h,
 prefix = "" 
)
+
+ +

Definition at line 87 of file BookHistos.py.

+ +

References SetAxis().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
def BookHistos.plotVertexHistos ( h,
 prefix = "" 
)
+
+ +

Definition at line 312 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.SetAxis ( histo)
+
+ +

Definition at line 9 of file BookHistos.py.

+ +
+
+ +
+
+ + + + + + + + +
def BookHistos.SetGrid ( pad)
+
+ +

Definition at line 5 of file BookHistos.py.

+ +
+
+
+ + + + diff --git a/Katerina/doc/html/namespaceFitTrackInfo.html b/Katerina/doc/html/namespaceFitTrackInfo.html new file mode 100644 index 0000000..3c7c26b --- /dev/null +++ b/Katerina/doc/html/namespaceFitTrackInfo.html @@ -0,0 +1,65 @@ + + + + + + +Python: FitTrackInfo Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
FitTrackInfo Namespace Reference
+
+
+ + + + +

+Classes

class  FitTrackInfo
 
+
+ + + + diff --git a/Katerina/doc/html/namespaceLoopAnalyse.html b/Katerina/doc/html/namespaceLoopAnalyse.html new file mode 100644 index 0000000..a4fb8d4 --- /dev/null +++ b/Katerina/doc/html/namespaceLoopAnalyse.html @@ -0,0 +1,65 @@ + + + + + + +Python: LoopAnalyse Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
LoopAnalyse Namespace Reference
+
+
+ + + + +

+Classes

class  LoopAnalyse
 
+
+ + + + diff --git a/Katerina/doc/html/namespaceMCTrackInfo.html b/Katerina/doc/html/namespaceMCTrackInfo.html new file mode 100644 index 0000000..94bbf10 --- /dev/null +++ b/Katerina/doc/html/namespaceMCTrackInfo.html @@ -0,0 +1,67 @@ + + + + + + +Python: MCTrackInfo Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
MCTrackInfo Namespace Reference
+
+
+ + + + + +

+Classes

class  MCTrackInfo
 For a single event stores HNL, its decay products and several other tracks (if requested) from ShipMCTracks collection of a MCtrack branch (see $FAIRSHIP/shipdata/ShipMCTrack.h)
+. More...
 
+
+ + + + diff --git a/Katerina/doc/html/namespaceRecoSettings.html b/Katerina/doc/html/namespaceRecoSettings.html new file mode 100644 index 0000000..8539c3f --- /dev/null +++ b/Katerina/doc/html/namespaceRecoSettings.html @@ -0,0 +1,224 @@ + + + + + + +Python: RecoSettings Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
RecoSettings Namespace Reference
+
+
+ + + + + + +

+Functions

def chargePDG
 
def checkEllipticAcc
 
+ + + + + + + + + + + + + + + + +

+Variables

int trackMinNofHits = 25
 min number of hits to produce a track More...
 
int trackMinNofStations = 3
 
int chi2CutOff = 4
 
float dy = 10.0
 
int VertexMaxZcut = 2500
 
int VertexExtrSteps = 5
 
tuple PDG = ROOT.TDatabasePDG.Instance()
 
+

Function Documentation

+ +
+
+ + + + + + + + +
def RecoSettings.chargePDG ( pdg)
+
+ +

Definition at line 17 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + + + + + +
def RecoSettings.checkEllipticAcc ( vec)
+
+ +

Definition at line 21 of file RecoSettings.py.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
int RecoSettings.chi2CutOff = 4
+
+ +

Definition at line 11 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
float RecoSettings.dy = 10.0
+
+ +

Definition at line 12 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
tuple RecoSettings.PDG = ROOT.TDatabasePDG.Instance()
+
+ +

Definition at line 15 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
int RecoSettings.trackMinNofHits = 25
+
+ +

min number of hits to produce a track

+ +

Definition at line 9 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
int RecoSettings.trackMinNofStations = 3
+
+ +

Definition at line 10 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
int RecoSettings.VertexExtrSteps = 5
+
+ +

Definition at line 14 of file RecoSettings.py.

+ +
+
+ +
+
+ + + + +
int RecoSettings.VertexMaxZcut = 2500
+
+ +

Definition at line 13 of file RecoSettings.py.

+ +
+
+
+ + + + diff --git a/Katerina/doc/html/namespaceStrawHits.html b/Katerina/doc/html/namespaceStrawHits.html new file mode 100644 index 0000000..f1ee37d --- /dev/null +++ b/Katerina/doc/html/namespaceStrawHits.html @@ -0,0 +1,65 @@ + + + + + + +Python: StrawHits Namespace Reference + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+ +
+
StrawHits Namespace Reference
+
+
+ + + + +

+Classes

class  StrawHits
 
+
+ + + + diff --git a/Katerina/doc/html/namespacemembers.html b/Katerina/doc/html/namespacemembers.html new file mode 100644 index 0000000..103b198 --- /dev/null +++ b/Katerina/doc/html/namespacemembers.html @@ -0,0 +1,222 @@ + + + + + + +Python: Package Functions + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + + +
+
+
Here is a list of all namespace members with links to the namespace documentation for each member:
+ +

- b -

+ + +

- c -

+ + +

- d -

+ + +

- f -

+ + +

- g -

+ + +

- i -

+ + +

- l -

+ + +

- m -

+ + +

- n -

+ + +

- p -

+ + +

- s -

+ + +

- t -

+ + +

- v -

+
+ + + + diff --git a/Katerina/doc/html/namespacemembers_func.html b/Katerina/doc/html/namespacemembers_func.html new file mode 100644 index 0000000..0cbdb37 --- /dev/null +++ b/Katerina/doc/html/namespacemembers_func.html @@ -0,0 +1,104 @@ + + + + + + +Python: Package Functions + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+ + + + diff --git a/Katerina/doc/html/namespacemembers_vars.html b/Katerina/doc/html/namespacemembers_vars.html new file mode 100644 index 0000000..6e1d368 --- /dev/null +++ b/Katerina/doc/html/namespacemembers_vars.html @@ -0,0 +1,113 @@ + + + + + + +Python: Package Functions + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + + +
+
+
+ + + + diff --git a/Katerina/doc/html/namespaces.html b/Katerina/doc/html/namespaces.html new file mode 100644 index 0000000..2011666 --- /dev/null +++ b/Katerina/doc/html/namespaces.html @@ -0,0 +1,68 @@ + + + + + + +Python: Packages + + + + + + +
+
+ + + + + + +
+
Python +
+
+
+ + + + +
+
+
+
Packages
+
+
+
Here are the packages with brief descriptions (if available):
+
+ + + + diff --git a/Katerina/doc/html/tabs.css b/Katerina/doc/html/tabs.css new file mode 100644 index 0000000..9cf578f --- /dev/null +++ b/Katerina/doc/html/tabs.css @@ -0,0 +1,60 @@ +.tabs, .tabs2, .tabs3 { + background-image: url('tab_b.png'); + width: 100%; + z-index: 101; + font-size: 13px; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; +} + +.tabs2 { + font-size: 10px; +} +.tabs3 { + font-size: 9px; +} + +.tablist { + margin: 0; + padding: 0; + display: table; +} + +.tablist li { + float: left; + display: table-cell; + background-image: url('tab_b.png'); + line-height: 36px; + list-style: none; +} + +.tablist a { + display: block; + padding: 0 20px; + font-weight: bold; + background-image:url('tab_s.png'); + background-repeat:no-repeat; + background-position:right; + color: #283A5D; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; + outline: none; +} + +.tabs3 .tablist a { + padding: 0 10px; +} + +.tablist a:hover { + background-image: url('tab_h.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + text-decoration: none; +} + +.tablist li.current a { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} diff --git a/Katerina/doxy_test_config b/Katerina/doxy_test_config new file mode 100644 index 0000000..1bef9f5 --- /dev/null +++ b/Katerina/doxy_test_config @@ -0,0 +1,13 @@ +PROJECT_NAME = "Python" +OUTPUT_DIRECTORY = doc +GENERATE_LATEX = NO +GENERATE_MAN = NO +GENERATE_RTF = NO +OPTIMIZE_OUTPUT_JAVA = YES +QUIET = YES +JAVADOC_AUTOBRIEF = YES +SEARCHENGINE = NO +EXTRACT_ALL = YES # for x-references +EXTRACT_PRIVATE = YES +SOURCE_BROWSER = YES +REFERENCES_RELATION=YES