Skip to content

Instantly share code, notes, and snippets.

View jmduarte's full-sized avatar

Javier Duarte jmduarte

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmduarte
jmduarte / test_L1METML_CMSSW.py
Created January 23, 2024 19:12
test_L1METML_CMSSW.py
import ROOT
from DataFormats.FWLite import Events, Handle
import numpy as np
events = Events('test.root')
handle_pf = Handle('vector<l1t::EtSum>')
handle_ml = Handle('vector<l1t::EtSum>')
handle_gen = Handle('vector<reco::GenMET>')
label_pf = 'l1tMETPFProducer'
label_ml = 'l1tMETMLProducer'

A3D3 Mentoring Program

The Equity & Career Committee is launching a mentoring program for A3D3 members. It pairs interested students/postdocs with postdocs/faculty members within the institute. The program is designed to encourage and support younger scientists through a mentoring relationship that begins in November/December and continues through August. Each mentoring relationship is developed through one-on-one meetings that each pair plans.

Start:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from tensorflow.keras.layers import Input, Concatenate
from tensorflow.keras.models import Model
import hls4ml
def createModel(shape=(3, 3, 2)):
x = x_in = Input(shape)
xy = Concatenate(axis=1)([x[...,:1], x[...,1:]])
model = Model(inputs=x_in, outputs=xy)
return model
llp_values = []
for a in range(int(eventNum)):
tree.GetEntry(a)
# grab the LLP pt for each event
for b in range(len(tree.gen)):
if (tree.gen[b][1] == 1000006) or ((tree.gen[b][1] == -1000006)):
llp_pt = tree.gen[b][0].Pt()
# initialize pass triggger boolean to false
pass_trigger = False
for c in range(len(eventjets[a])):
@jmduarte
jmduarte / MetEfficVal.py
Last active July 25, 2023 21:39
MetEfficVal
def MetEfficVal(EVal_bins):
inFileName = args.inFileName
inFile = r.TFile.Open(inFileName, 'READ')
tree = inFile.Get('ntuple0/objects')
ver = inFile.Get('ntuple0/objects/vz')
eventNum = tree.GetEntries()
met_values = []
tree.GetEntry(0)
ver = tree.pup
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.