class EventInfo(TreeModel): runnumber = IntCol() evtnumber = IntCol() lumiblock = IntCol() npv = IntCol() mu = FloatCol() chain_EF_tau20_medium1 = IntCol() chain_EF_tauNoCut = IntCol() chain_L2_tauNoCut = IntCol() chain_L1_TAU8 = IntCol() chain_L1_TAU11I = IntCol() chain_L2_tau18Ti_loose2_e18vh_medium1 = IntCol(-1111) @classmethod def set(cls, this, other): this.runnumber = other.RunNumber this.evtnumber = other.EventNumber this.lumiblock = other.lbn this.npv = other.evt_calcVars_numGoodVertices this.mu = other.averageIntPerXing this.chain_EF_tau20_medium1 = other.EF_tau20_medium1 this.chain_EF_tauNoCut = other.EF_tauNoCut this.chain_L2_tauNoCut = other.L2_tauNoCut this.chain_L1_TAU8 = other.L1_TAU8 this.chain_L1_TAU11I = other.L1_TAU11I
class TrueTau(FourMomentum): nProng = IntCol(default=-1111) nPi0 = IntCol(default=-1111) charge = IntCol(default=-1111) vis_pt = FloatCol(default=-1111.) vis_p = FloatCol(default=-1111.) vis_et = FloatCol(default=-1111.) vis_e = FloatCol(default=-1111.) vis_eta = FloatCol(default=-1111.) vis_phi = FloatCol(default=-1111.) vis_m = FloatCol(default=-1111.) @classmethod def set(cls, this, other): FourMomentum.set(this, other) this.nProng = other.nProng this.nPi0 = other.nPi0 this.charge = other.charge this.vis_pt = other.fourvect_vis.Pt() this.vis_p = other.fourvect_vis.P() this.vis_et = other.fourvect_vis.Et() this.vis_e = other.fourvect_vis.E() this.vis_m = other.fourvect_vis.M() with ignore_warning: this.vis_eta = other.fourvect_vis.Eta() this.vis_phi = other.fourvect_vis.Phi()
class Tau(FourMomentum, MatchedObject): """ A tau is a matchable four-momentum with a number of tracks and a charge """ numtrack = IntCol() charge = IntCol()
class EventModel(TreeModel): runnumber = IntCol() evtnumber = IntCol() weight = FloatCol() hadhad = IntCol() # 1 or 0 lephad = IntCol() # 1 or 0 leplep = IntCol() # 1 or 0
class rEvent(TreeModel): id = IntCol() xhits = stl.vector("float") yhits = stl.vector("float") nHits = IntCol() nTracks = IntCol() nGoodTracks = IntCol()
class TrueTau(FourMomentum + FourMomentum.prefix('full_')): nProng = IntCol(default=-1111) nPi0 = IntCol(default=-1111) charge = IntCol() flavor = CharCol() pdgId = IntCol(default=-1111) index = IntCol() eta_centrality = FloatCol() collinear_momentum_fraction= FloatCol() @classmethod def set_full(cls, this, other): if isinstance(other, TLorentzVector): vect = other else: vect = other.fourvect this.full_pt = vect.Pt() this.full_p = vect.P() this.full_et = vect.Et() this.full_e = vect.E() this.full_m = vect.M() with ignore_warning: this.full_phi = vect.Phi() this.full_eta = vect.Eta()
class TrueJetBlock(TrueJet.prefix('jet1_') + TrueJet.prefix('jet2_')): dEta_jet1_jet2 = FloatCol(default = -9999) eta_product_jets = FloatCol(default = -9999) eta_product_jets_boosted = FloatCol(default = -9999) mass_jet1_jet2 = FloatCol(default = -9999) jet_beta = Vector3 numJets = IntCol() nonisolatedjet=IntCol() #num_true_jets_no_overlap =IntCol() @classmethod def set(cls, tree, jet1, jet2): if jet1 is not None: tree.jet1.index = jet1.index FourMomentum.set(tree.jet1, jet1) if jet2 is not None: tree.jet2.index = jet2.index FourMomentum.set(tree.jet2, jet2) tree.dEta_jet1_jet2 = abs(jet1.eta - jet2.eta) tree.eta_product_jets = jet1.eta * jet2.eta tree.eta_product_jets_boosted = (jet1.fourvect_boosted.Eta() * jet2.fourvect_boosted.Eta()) tree.mass_jet1_jet2 = (jet1.fourvect + jet2.fourvect).M()
class Event(TreeModel): data = FloatCol() forecast = FloatCol() #FloatArrayCol(mulmax) year = IntCol() month = IntCol() day = IntCol() hour = IntCol()
class OpDet(TreeModel): eventid = IntCol() id = IntCol() NTDC = IntCol() NS_PER_TDC = FloatCol() adc = FloatArrayCol(GPUDaqUBooNE.NTDC) q = FloatCol() t = FloatCol()
class Track(FourMomentum): d0 = FloatCol(default=-1111.) z0 = FloatCol(default=-1111.) nBLHits = IntCol(default=-1111) nPixHits = IntCol(default=-1111) nSCTHits = IntCol(default=-1111) nTRTHits = IntCol(default=-1111) nHits = IntCol(default=-1111)
class Event(TreeModel): # def __init__(self): iEvents = IntCol() nFinalParticles = IntCol() # num_vals = IntCol() px = DoubleArrayCol(ARRAY_LENGTH) py = DoubleArrayCol(ARRAY_LENGTH) pz = DoubleArrayCol(ARRAY_LENGTH) energy = DoubleArrayCol(ARRAY_LENGTH)
class RecoTau(FourMomentum + CaloTau + TrackTau + CaloTrackTau + ClusterBasedTau): index = IntCol(default=-1) BDTloose = FloatCol(default=-1111.) BDTmedium = FloatCol(default=-1111.) BDTtight = FloatCol(default=-1111.) index_matched_true = IntCol(default=-1) index_matched_EF = IntCol(default=-1) index_matched_L1 = IntCol(default=-1)
class CaloTau(TreeModel): PSSFraction = FloatCol(-1111.) nStrip = IntCol(-1111) nEffStripCells = FloatCol(-1111.) corrCentFrac = FloatCol(-1111.) centFrac = FloatCol(-1111.) isolFrac = FloatCol(-1111.) EMRadius = FloatCol(-1111.) HadRadius = FloatCol(-1111.) EMEnergy = FloatCol(-1111.) HadEnergy = FloatCol(-1111.) CaloRadius = FloatCol(-1111.) stripWidth2 = FloatCol(-1111.) numTopoClusters = IntCol(-1111) numEffTopoClusters = FloatCol(-1111.) topoInvMass = FloatCol(-1111.) effTopoInvMass = FloatCol(-1111.) topoMeanDeltaR = FloatCol(-1111.) effTopoMeanDeltaR = FloatCol(-1111.) lead2ClusterEOverAllClusterE = FloatCol(-1111.) lead3ClusterEOverAllClusterE = FloatCol(-1111.) EMFractionAtEMScale = FloatCol(-1111.) HADFractionAtEMScale = FloatCol(-1111.) @classmethod def set(cls, this, other): this.PSSFraction = other.calcVars_PSSFraction this.nStrip = other.seedCalo_nStrip this.corrCentFrac = other.calcVars_corrCentFrac this.centFrac = other.seedCalo_centFrac this.isolFrac = other.seedCalo_isolFrac this.EMRadius = other.seedCalo_EMRadius this.HadRadius = other.seedCalo_hadRadius this.EMEnergy = other.seedCalo_etEMAtEMScale this.HadEnergy = other.seedCalo_etHadAtEMScale this.CaloRadius = (this.EMRadius * this.EMEnergy + this.HadRadius * this.HadEnergy) this.stripWidth2 = other.seedCalo_stripWidth2 this.numTopoClusters = other.numTopoClusters this.numEffTopoClusters = other.numEffTopoClusters this.topoInvMass = other.topoInvMass this.effTopoInvMass = other.effTopoInvMass this.topoMeanDeltaR = other.topoMeanDeltaR this.effTopoMeanDeltaR = other.effTopoMeanDeltaR this.lead2ClusterEOverAllClusterE = other.seedCalo_lead2ClusterEOverAllClusterE this.lead3ClusterEOverAllClusterE = other.seedCalo_lead3ClusterEOverAllClusterE this.EMFractionAtEMScale = other.calcVars_EMFractionAtEMScale seedCalo_et = other.seedCalo_etEMAtEMScale + other.seedCalo_etHadAtEMScale this.HADFractionAtEMScale = 0 if seedCalo_et == 0 else other.seedCalo_etHadAtEMScale / ( seedCalo_et)
class Event(TreeModel): nevents = IntCol() npv = IntCol() n_AK8 = IntCol() n_Higgs = IntCol() n_Top = IntCol() n_AK8MatchedToHiggs = IntCol() n_AK8MatchedToTop = IntCol() m_tH = IntCol() m_W = FloatArrayCol(10, length_name="n_Top") m_Top = FloatArrayCol(10, length_name="n_Top") m_Higgs = FloatArrayCol(10, length_name="n_Higgs") pt_AK8 = FloatArrayCol(10, length_name='n_AK8') eta_AK8 = FloatArrayCol(10, length_name='n_AK8') phi_AK8 = FloatArrayCol(10, length_name='n_AK8') e_AK8 = FloatArrayCol(10, length_name='n_AK8') pt_Higgs = FloatArrayCol(10, length_name='n_Higgs') eta_Higgs = FloatArrayCol(10, length_name='n_Higgs') phi_Higgs = FloatArrayCol(10, length_name='n_Higgs') e_Higgs = FloatArrayCol(10, length_name='n_Higgs') pt_Top = FloatArrayCol(10, length_name='n_Top') eta_Top = FloatArrayCol(10, length_name='n_Top') phi_Top = FloatArrayCol(10, length_name='n_Top') e_Top = FloatArrayCol(10, length_name='n_Top') pt_W = FloatArrayCol(10, length_name='n_Top') eta_W = FloatArrayCol(10, length_name='n_Top') phi_W = FloatArrayCol(10, length_name='n_Top') e_W = FloatArrayCol(10, length_name='n_Top') pt_MatchedHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') eta_MatchedHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') phi_MatchedHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') e_MatchedHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') m_MatchedHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') pt_MatchedTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') eta_MatchedTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') phi_MatchedTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') e_MatchedTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') m_MatchedTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') pt_AK8MatchedToHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') eta_AK8MatchedToHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') phi_AK8MatchedToHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') e_AK8MatchedToHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') m_AK8MatchedToHiggs = FloatArrayCol(10, length_name='n_AK8MatchedToHiggs') pt_AK8MatchedToTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') eta_AK8MatchedToTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') phi_AK8MatchedToTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') e_AK8MatchedToTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop') m_AK8MatchedToTop = FloatArrayCol(10, length_name='n_AK8MatchedToTop')
class GenTree(TreeModel): p_NuGen = FloatCol() pt_NuGen = FloatCol() phi_NuGen = FloatCol() eta_NuGen = FloatCol() theta_NuGen = FloatCol() px_NuGen = FloatCol() py_NuGen = FloatCol() pz_NuGen = FloatCol() vx_NuGen = FloatCol() vy_NuGen = FloatCol() vz_NuGen = FloatCol() vx_SecGen = FloatCol() vy_SecGen = FloatCol() vz_SecGen = FloatCol() vx_PVReco = FloatCol() vy_PVReco = FloatCol() vz_PVReco = FloatCol() vx_SecReco = FloatCol() vy_SecReco = FloatCol() vz_SecReco = FloatCol() dx_SecReco = FloatCol() dy_SecReco = FloatCol() dz_SecReco = FloatCol() d3D_SecReco = FloatCol() vx_SecReco_T = FloatCol() vy_SecReco_T = FloatCol() vz_SecReco_T = FloatCol() dx_SecReco_T = FloatCol() dy_SecReco_T = FloatCol() dz_SecReco_T = FloatCol() d3D_SecReco_T = FloatCol() num_looseMuons = IntCol() num_tightMuons = IntCol() num_promptMuons = IntCol() num_muonsLoose_noPrompt = IntCol() num_muonsTight_noPrompt = IntCol() dist_allVtx = FloatCol() muon_vtx_dxy = FloatCol() muon_vtx_dz = FloatCol() muonT_vtx_dxy = FloatCol() muonT_vtx_dz = FloatCol() muonPrompt_pt = FloatCol() muonPrompt_px = FloatCol() muonPrompt_py = FloatCol() muonPrompt_pz = FloatCol() muonPrompt_eta = FloatCol()
class EmbeddingModel(TreeModel): # embedding corrections embedding_reco_unfold = FloatCol(default=1.) embedding_trigger_weight = FloatCol(default=1.) embedding_dimuon_mass = FloatCol() embedding_isolation = IntCol() embedding_spin_weight = FloatCol(default=1.)
class GenTree(TreeModel): p_NuGen = FloatCol() pt_NuGen = FloatCol() phi_NuGen = FloatCol() eta_NuGen = FloatCol() theta_NuGen = FloatCol() px_NuGen = FloatCol() py_NuGen = FloatCol() pz_NuGen = FloatCol() vx_NuGen = FloatCol() vy_NuGen = FloatCol() vz_NuGen = FloatCol() deltaR_HNL = FloatCol() #jet_HNL_p = FloatCol() jet_HNL_pt = FloatCol() jet_HNL_eta = FloatCol() jet_HNL_phi = FloatCol() deltaR_muon = FloatCol() #jet_muon_p = FloatCol() jet_muon_pt = FloatCol() jet_muon_eta = FloatCol() jet_muon_phi = FloatCol() frac_HNLjet = FloatCol() frac_muonjet = FloatCol() numbOfDaughters = IntCol()
class rTrack(TreeModel): id = IntCol() event_id = IntCol() hit_indices = stl.vector("int") residuals = stl.vector("float") lincoords = stl.vector("float") color = IntCol() length = FloatCol() rho = FloatCol() theta = FloatCol() x0 = FloatCol() y0 = FloatCol() x1 = FloatCol() y1 = FloatCol() nHits = IntCol() R2 = FloatCol() is_good = IntCol()
class Event(Jet.prefix('jet1_'), Jet.prefix('jet2_'), Tau.prefix('tau1_'), Tau.prefix('tau2_')): """ An event is composed of two jets and two taus an event number and some missing transverse energy """ eventnumber = IntCol() missingET = Vector2
class Event(TreeModel): # properties of particle "a" a_x = FloatCol() a_y = FloatCol() a_z = FloatCol() # properties of particle "b" b_x = FloatCol() b_y = FloatCol() b_z = FloatCol() # a collection of particles col_x = stl.vector("float") col_y = stl.vector("float") col_z = stl.vector("float") col_n = IntCol() # a TLorentzVector p = LorentzVector i = IntCol()
class Event(TreeModel): s = CharCol() string = CharArrayCol(5) x = FloatCol() y = FloatCol() z = FloatCol() f = FloatArrayCol(5) i = IntCol()
class Event(TreeModel): # derived variables mass_MMC = FloatCol() mass_transverse_met_lep = FloatCol() mass_vis = FloatCol() pt_h = FloatCol() deltaeta_jet_jet = FloatCol() mass_jet_jet = FloatCol() prodeta_jet_jet = FloatCol() deltar_tau_lep = FloatCol() pt_tot = FloatCol() sum_pt = FloatCol() pt_ratio_lep_tau = FloatCol() met_phi_centrality = FloatCol() lep_eta_centrality = FloatCol() # tau variables tau_pt = FloatCol() tau_eta = FloatCol() tau_phi = FloatCol() # lepton variables lep_pt = FloatCol() lep_eta = FloatCol() lep_phi = FloatCol() # met variables met = FloatCol() met_phi = FloatCol() met_sumet = FloatCol() # other jet_num = IntCol() jet_leading_pt = FloatCol() jet_leading_eta = FloatCol() jet_leading_phi = FloatCol() jet_subleading_pt = FloatCol() jet_subleading_eta = FloatCol() jet_subleading_phi = FloatCol() jet_all_pt = FloatCol() Htautau = IntCol()
class TrackTau(TreeModel): numTrack = IntCol(default=-1111) nWideTrk = IntCol(default=-1111) nOtherTrk = IntCol(default=-1111) ipSigLeadTrk = FloatCol(-1111.) trFlightPathSig = FloatCol(-1111.) massTrkSys = FloatCol(-1111.) dRmax = FloatCol(-1111.) @classmethod def set(cls, this, other): this.numTrack = other.numTrack this.nWideTrk = other.seedCalo_nWideTrk this.nOtherTrk = other.otherTrk_n this.ipSigLeadTrk = other.ipSigLeadTrk this.trFlightPathSig = other.trFlightPathSig this.massTrkSys = other.massTrkSys this.dRmax = other.seedCalo_dRmax
class EcalVetoEvent(TreeModel): evtNum = IntCol() pnWeight = FloatCol() trigPass = BoolCol() nReadoutHits = IntCol() summedDet = FloatCol() summedTightIso = FloatCol() maxCellDep = FloatCol() showerRMS = FloatCol() xStd = FloatCol() yStd = FloatCol() avgLayerHit = FloatCol() stdLayerHit = FloatCol() deepestLayerHit = IntCol() discValue = FloatCol() recoilPx = FloatCol() recoilPy = FloatCol() recoilPz = FloatCol() recoilX = FloatCol() recoilY = FloatCol() fiducial = BoolCol() hcalenergy = FloatCol() leadhadpid = IntCol() leadhadke = FloatCol() leadhadthetaz = FloatCol() nelectrons = IntCol() ele0P = FloatArrayCol(3) ele1P = FloatArrayCol(3) ele0PosSP = FloatArrayCol(3) ele1PosSP = FloatArrayCol(3) trigEnergy = FloatCol() ele0TotalEnergies = FloatArrayCol(34) ele1TotalEnergies = FloatArrayCol(34) photonTotalEnergies = FloatArrayCol(34) overlapTotalEnergies = FloatArrayCol(34) overlapPlusPhotonTotalEnergies = FloatArrayCol(34) outsideTotalEnergies = FloatArrayCol(34) outsideTotalNHits = FloatArrayCol(34) outsideMinusPhotonTotalEnergies = FloatArrayCol(34) outsideMinusPhotonTotalNHits = FloatArrayCol(34) outsideXmeans = FloatArrayCol(34) outsideYmeans = FloatArrayCol(34) outsideXstds = FloatArrayCol(34) outsideYstds = FloatArrayCol(34)
class Event(TreeModel): s = CharCol() string = CharArrayCol(5) x = FloatCol() y = FloatCol() z = FloatCol() f = FloatArrayCol(5) num_vals = IntCol() # variable-length array vals = FloatArrayCol(5, length_name='num_vals')
class TrueTau(FourMomentum + FourMomentum.prefix('vis_')): nProng = IntCol(default=-1111) nPi0 = IntCol(default=-1111) charge = IntCol() @classmethod def set_vis(cls, this, other): if isinstance(other, TLorentzVector): vect = other else: vect = other.fourvect this.vis_pt = vect.Pt() this.vis_p = vect.P() this.vis_et = vect.Et() this.vis_e = vect.E() this.vis_m = vect.M() with ignore_warning: this.vis_phi = vect.Phi() this.vis_eta = vect.Eta()
class HitEvent(TreeModel): # Integers for number of fit, and number of event fitNum = IntCol() eventNum = IntCol() # Doubles for fitted and true alignment for this fit fittedAlignment = DoubleCol() trueAlignment = DoubleCol() # Doubles for track parameters fittedTrackGrad = DoubleCol() fittedTrackInt = DoubleCol() trueTrackGrad = DoubleCol() trueTrackInt = DoubleCol() # Doubles for true and fitted hit distances trueHitDistance = DoubleCol() fittedHitDistance = DoubleCol() # Indexes for position of wire hit moduleNum = IntCol() planeNum = IntCol() layerNum = IntCol() wireNum = IntCol()
class ClusterBasedTau(TreeModel): pi0BDTPrimary = FloatCol(-1111.) pi0BDTSecondary = FloatCol(-1111.) pi0_ptratio = FloatCol(-1111.) pi0_vistau_m = FloatCol(-1111.) pi0_n = IntCol(-1111) clbased_pt = FloatCol(-1111.) @classmethod def set(cls, this, other): this.pi0BDTPrimary = other.calcVars_pi0BDTPrimaryScore this.pi0BDTSecondary = other.calcVars_pi0BDTSecondaryScore this.pi0_ptratio = other.pi0_vistau_pt / other.pt this.pi0_vistau_m = other.pi0_vistau_m this.pi0_n = other.pi0_n this.clbased_pt = other.fourvect_clbased.Pt()
class PhotonData(TreeModel): end_x = FloatCol() end_y = FloatCol() end_z = FloatCol() reflect_diffuse = IntCol() reflect_specular = IntCol() bulk_scatter = IntCol() bulk_absorb = IntCol() surface_detect = IntCol() surface_absorb = IntCol() surface_reemit = IntCol() def reset(self): self.reflect_diffuse = 0 self.reflect_specular = 0 self.bulk_scatter = 0 self.bulk_absorb = 0 self.surface_detect = 0 self.surface_absorb = 0 self.surface_reemit = 0
class Event(TreeModel): x = stl.vector('TLorentzVector') i = IntCol()