def __init__(self): super(compute_mc_weight,self).__init__() self.branches += [ branch('mc_channel_number','ru'), branch('mc_event_weight','ru'), branch('is_mc','ru'), ]
def __init__(self, min_pT=15000., cut_crack=True, collection_name='el_'): super(collect_electrons, self).__init__() self.cut_crack = cut_crack self.min_pT = min_pT self.collection_name = collection_name self.names = [ #'MET_statusWord', #'MET_wet', #'MET_wpx', #'MET_wpy', 'OQ', 'cl_E', 'cl_pt', 'cl_eta', 'cl_phi', 'tracketa', 'trackphi', 'etap', 'etas2', 'nPixHits', 'nSCTHits', 'Etcone20', 'ptcone40', 'author', 'charge', 'loosePP', 'mediumPP', 'tightPP', ] self.new_collection_names = dict( (name, branch_type) for name, branch_type in [ ('pt_corrected', 'std.vector.float'), ('E_corrected', 'std.vector.float'), ('etcone20_corrected', 'std.vector.float'), ('mediumScaleFactor', 'std.vector.float'), ('mediumScaleFactorError', 'std.vector.float'), ('tightScaleFactor', 'std.vector.float'), ('tightScaleFactorError', 'std.vector.float'), ('is_tightPP', 'std.vector.bool'), ('is_mediumPP', 'std.vector.bool'), ('is_loosePP', 'std.vector.bool'), ('passed_preselection', 'std.vector.bool'), ('passed_selection', 'std.vector.bool'), ]) for name in self.names: self.branches.append(branch(self.collection_name + name, 'r')) self.branches.append(branch(self.collection_name + 'n', 'r')) #self.branches.append(branch('random_RunNumber','r')) self.initialize_tools()
def __init__(self): super(pileup_weighting, self).__init__() self.branches.append(branch('averageIntPerXing', 'r')) self.branches.append(branch('RunNumber', 'r')) self.branches.append(branch('EventNumber', 'r')) self.branches.append(auto_branch('random_RunNumber', 'w', 'Int_t')) self.branches.append(auto_branch('weight_pileup', 'w', 'Float_t')) self.initialize_tools()
def __init__(self, min_pT=10000., collection_name='mu_staco_'): super(collect_muons, self).__init__() self.collection_name = collection_name self.min_pT = min_pT self.names = [ 'E', 'MET_statusWord', #'MET_wet', #'MET_wpx', #'MET_wpy', 'charge', 'eta', 'etcone20', 'id_qoverp', 'id_theta', 'id_z0_exPV', 'isCombinedMuon', 'isSegmentTaggedMuon', 'isStandAloneMuon', 'me_qoverp', 'me_theta', 'ms_phi', 'ms_qoverp', 'ms_theta', 'phi', 'pt', 'ptcone40', 'px', 'py', 'pz', 'loose', 'tight', 'expectBLayerHit', 'nBLHits', 'nPixHits', 'nPixelDeadSensors', 'nSCTDeadSensors', 'nSCTHits', 'nPixHoles', 'nSCTHoles', 'nTRTHits', 'nTRTOutliers', ] for name in self.names: self.branches.append(branch(self.collection_name + name, 'r')) self.branches.append(branch(self.collection_name + 'n', 'r')) self.initialize_tools()
def __init__(self): super(trigger,self).__init__() self.break_exceptions += [ trigger.trigger, ] for name in [ 'EF_mu24i_tight', 'EF_mu36_tight', 'EF_e12Tvh_medium1_mu8', 'EF_e24vhi_medium1', 'EF_e60_medium1', #'random_RunNumber', ]: self.branches.append(branch(name, 'r')) self.branches.append(auto_branch('trigger_scale_factor', 'w','Float_t')) self.branches.append(auto_branch('trigger_scale_factor_error', 'w','Float_t')) self.periods_runnumbers = { "A_":(200804,201556), "B_":(202660,205113), "CtoE_":(206248,210308), "G_":(211522,212272), "HtoL_":(212619,215643), } self.initialize_tools()
def __init__(self): super(collect_truth_jets, self).__init__() #event_function.__init__(self) self.collection_name = 'jet_antikt4truth_' self.names = [ 'pt', 'eta', 'phi', 'E', ] self.branches += [ branch(self.collection_name + name, 'r') for name in self.names ] self.branches.append(branch(self.collection_name + 'n', 'r'))
def __init__(self): super(count_primary_vertices,self).__init__() self.branches.append(branch('vxp_nTracks','r')) self.branches.append(auto_branch('nPV_2trks','w','Int_t')) self.branches.append(auto_branch('nPV_3trks','w','Int_t')) self.branches.append(auto_branch('nPV_4trks','w','Int_t'))
def __init__(self,collection_name='trk_'): super(collect_tracks,self).__init__() self.collection_name = collection_name self.names = [ 'pt', 'eta', 'phi', 'd0', 'z0_wrtPV', 'nPixHits', 'nBLHits', ] for name in self.names: self.branches.append(branch(self.collection_name+name,'r')) self.branches.append(branch(self.collection_name+'n','r'))
def __init__(self): super(preselection,self).__init__() self.break_exceptions += [ preselection.two_leptons, preselection.no_taus, preselection.one_jet, preselection.no_bad_jets, preselection.no_bad_flags, preselection.no_tile_trip, ] for name in [ 'larError', 'tileError', 'coreFlags', 'lbn', #'random_RunNumber', 'EventNumber' ]: self.branches.append(branch(name, 'r')) for name,branch_type in [ ('l1_eta','Float_t'), ('l1_phi','Float_t'), ('l1_pt','Float_t'), ('l1_E','Float_t'), ('l1_charge','Float_t'), ('l1_ptcone40','Float_t'), ('l1_etcone20','Float_t'), ('l1_passed_selection','Bool_t'), ('l1_scale_factor','Float_t'), ('l1_scale_factor_error','Float_t'), ('l2_eta','Float_t'), ('l2_phi','Float_t'), ('l2_pt','Float_t'), ('l2_E','Float_t'), ('l2_charge','Float_t'), ('l2_ptcone40','Float_t'), ('l2_etcone20','Float_t'), ('l2_passed_selection','Bool_t'), ('l2_scale_factor','Float_t'), ('l2_scale_factor_error','Float_t'), ('lepton_class','Int_t'), ('top_hfor_type','Int_t'), ]: self.branches.append(auto_branch(name,'w',branch_type)) self.initialize_tools()
def __init__(self, collection_name='tau_'): super(collect_taus, self).__init__() self.collection_name = collection_name self.names = [ 'author', 'JetBDTSigMedium', 'eta', 'phi', 'track_n', 'numTrack', #'track_eta', 'Et', 'charge', 'EleBDTMedium', 'muonVeto', ] for name in self.names: self.branches.append(branch(self.collection_name + name, 'r')) self.branches.append(branch(self.collection_name + 'n', 'r'))
def __init__(self,pdgIds=None): super(truth_tree,self).__init__() self.names = [ 'n', 'pt', 'eta', 'phi', 'm', 'charge', 'pdgId', 'parent_index', 'status', ] self.pdgIds = pdgIds self.branches += [ branch('mc_'+name,'r') for name in self.names ]
def __init__(self): super(trigger_mumu_embed,self).__init__() self.break_exceptions += [ trigger_mumu_embed.muon_event, trigger_mumu_embed.trigger, ] self.branches.append(branch('EF_mu18_tight_mu8_EFFS', 'r')) #self.branches.append(branch('random_RunNumber', 'r')) self.periods_runnumbers = { "A_":(200804,201556), "B_":(202660,205113), "CtoE_":(206248,210308), "G_":(211522,212272), "HtoL_":(212619,215643), } self.branches.append(auto_branch('trigger_scale_factor','w','Float_t')) self.branches.append(auto_branch('trigger_scale_factor','w','Float_t'))
def __init__(self): super(get_weight,self).__init__() self.branches.append(branch('mc_channel_number', 'r')) self.initialize()
def __init__(self): super(get_weight_pileup,self).__init__() self.branches.append(branch('weight_pileup', 'r'))
def __init__(self,collection_name='jet_'): super(collect_jets,self).__init__() self.collection_name = collection_name self.names = [ 'constscale_E', 'constscale_eta', 'constscale_phi', 'constscale_m', 'ActiveAreaPx', 'ActiveAreaPy', 'ActiveAreaPz', 'ActiveAreaE', 'flavor_weight_MV1', 'isBadLooseMinus', 'jvtxf', ] for name in self.names: self.branches.append(branch(self.collection_name+name,'r')) self.branches.append(branch(self.collection_name+'n','r')) self.branches.append(branch('Eventshape_rhoKt4LC','r')) self.branches.append(branch('averageIntPerXing','r')) #self.branches.append(branch('nPV_2trks','r')) self.branches.append(branch('EventNumber','r')) self.branches.append(branch('jet_antikt4truth_n','r')) self.branches.append(branch('jet_antikt4truth_pt','r')) self.branches.append(branch('jet_antikt4truth_eta','r')) self.branches.append(branch('jet_antikt4truth_phi','r')) self.branches.append(branch('jet_antikt4truth_E','r')) self.branches.append(branch('jet_flavor_truth_label','r')) self.branches.append(branch('jet_n','r')) self.branches.append(branch('jet_pt','r')) self.branches.append(branch('jet_eta','r')) self.branches.append(branch('jet_phi','r')) self.branches.append(branch('jet_E','r')) self.branches.append(branch('jet_flavor_weight_MV1','r')) for name, branch_type in [ ('jet_n','Int_t'), ('jet_passed_b_preselection','vector<bool>'), ('jet_pt','vector<float>'), ('jet_eta','vector<float>'), ('jet_phi','vector<float>'), ('jet_E','vector<float>'), ('jet_jvf','vector<float>'), ('jet_jvf_up_cut','vector<float>'), ('jet_jvf_down_cut','vector<float>'), ('jet_jes_Error_Baseline','vector<float>'), ('jet_jes_Error_Pileup','vector<float>'), ('jet_jes_Error_Closeby','vector<float>'), ('jet_jes_Error_FlvCmp','vector<float>'), ('jet_jes_Error_FlvRsp','vector<float>'), ('jet_jes_Error_Bjet','vector<float>'), ('jet_bJet_scale_factor','vector<float>'), ('jet_bJet_scale_factor_error','vector<float>'), ('jet_flavor_weight_MV1','vector<float>'), ]: self.branches.append(auto_branch(name,'w',branch_type)) #Load jet correction tools self.initialize_tools()