Heavy Mass Estimator (HME), but based on deep neural network. Package can be installed via
pip install DeepHME
Example of usage is located in (example.py), data file is provided in data. To instantiate DeepHME object one must provide the following named arguments to the constructor:
-
model_name: string with the name of the model to be used for inference. Currently available models are located inmodels/directory together with their training configuration files. In case of selecting model absent inmodels/an exception is thrown. -
channel: string with the channel name. Must be uppercase. Allowed options areSLandDL. In the case of illegal value an exception will be thrown. -
return_errors: boolean flag indicating whether or not to return per-event errors computed by the model. Note that at construction stage it is checked that selected model is capable of computed errors. If it is not, an exception will be thrown. It is recomnended to usepredict_quantiles3D_DL_v8for double lepton channel andpredict_quantiles3D_SL_v3for single lepton channel. Additionally, for bettter performance it is recommended to ensure that event contains at least 2 AK4 jets (in what follows referred to as jets) withpt > 20.0andeta < 2.5or at least one AK8 jet (in what follows referred to as fatjet) withpt > 200.0andeta < 2.5and two leptons withpt > 5.0for double lepton channel and at least 2 AK4 jets withpt > 20.0andeta < 2.5and at least 2 AK4 jets withpt > 20.0andeta < 5.0or least one AK8 jet withpt > 200.0andeta < 2.5and least one AK8 jet withpt > 200.0andeta < 5.0and one lepton withpt > 5.0for single lepton channel. AK4 jet candidates must satisfy$\Delta R \ge 0.4$ between AK4 jet and leptons. AK8 jet candidates must satisfy$\Delta R \ge 0.8$ between AK8 jet and leptons. Electrons must satisfyabs(Electron_dz) < 0.1 && abs(Electron_dxy) < 0.05 && Electron_sip3d <= 8 && Electron_miniPFRelIso_all < 0.4 && Electron_mvaIso_WP90 && Electron_mvaIso_WP80. Muons must satisfyabs(Muon_dz) < 0.1 && abs(Muon_dxy) < 0.05 && abs(Muon_dxy) < 0.05 && Muon_sip3d <= 8 && Muon_pfIsoId >= 1 && Muon_looseId && Muon_tightId. Object variable naming is consistent with NanoAODv12 for Run 3 2022/2023 eras. Example of initialziation is
estimator = DeepHME(model_name='predict_quantiles3D_DL_v8', channel=ch, return_errors=True)
For inference use method predict. It takes following arguments:
event_id: akward array of event idslep1_pt: akward array of lepton 1 ptlep1_eta: akward array of lepton 1 etalep1_phi: akward array of lepton 1 philep1_mass: akward array of lepton 1 phi masslep2_pt:akward array of lepton 2 ptlep2_eta: akward array of lepton 2 etalep2_phi: akward array of lepton 2 philep2_mass: akward array of lepton 2 massmet_pt: akward array of met ptmet_phi: akward array of met phijet_pt: akward array of jet ptjet_eta: akward array of jet etajet_phi: akward array of jet phijet_mass: akward array of jet massjet_btagPNetB: akward array of jet btagPNetB scoresjet_btagPNetCvB: akward array of jet btagPNetCvB scoresjet_btagPNetCvL: akward array of jet btagPNetCvL scoresjet_btagPNetCvNotB: akward array of jet btagPNetCvNotB scoresjet_btagPNetQvG: akward array of jet btagPNetQvG scoresjet_PNetRegPtRawCorr: akward array of jet PNetRegPtRawCorrjet_PNetRegPtRawCorrNeutrino: akward array of jet PNetRegPtRawCorrNeutrinojet_PNetRegPtRawRes: akward array of jet PNetRegPtRawResfatjet_pt: akward array of fatjet ptfatjet_eta: akward array of fatjet etafatjet_phi: akward array of fatjet phifatjet_mass: akward array of fatjet massfatjet_particleNet_QCD: akward array of fatjet particleNet_QCD scorefatjet_particleNet_XbbVsQCD: akward array of fatjet particleNet_XbbVsQCD scorefatjet_particleNetWithMass_QCD: akward array of fatjet particleNetWithMass_QCD scorefatjet_particleNetWithMass_HbbvsQCD: akward array of fatjet particleNetWithMass_HbbvsQCD scorefatjet_particleNet_massCorr: akward array of fatjet particleNet_massCorroutput_format: string with desired output format. Currently two output options are supported:massandp4. If set tomass, will return a numpy array of masses. If set top4, will return numpy array of shape(n_events, 8). First 4 entries ofaxis=1arepx,py,pzandEof H->VV, next for -px,py,pzandEof H->bb in this order. Defaults tomass. All arguments except foroutput_formatdefault toNone. If any of them is not provided, an excpetion will be thrown. It is only allowed to leavelep2*variables asNoneifchannelset toSL. Usage example is
mass, errors = estimator.predict(event_id=arr1,
lep1_pt=arr2,
lep1_eta=arr3,
lep1_phi=arr4,
lep1_mass=arr5,
lep2_pt=arr6,
lep2_eta=arr7,
lep2_phi=arr8,
lep2_mass=arr9,
met_pt=arr10,
met_phi=arr11,
jet_pt=arr12,
jet_eta=arr13,
jet_phi=arr14,
jet_mass=arr15,
jet_btagPNetB=arr16,
jet_btagPNetCvB=arr17,
jet_btagPNetCvL=arr18,
jet_btagPNetCvNotB=arr19,
jet_btagPNetQvG=arr20,
jet_PNetRegPtRawCorr=arr21,
jet_PNetRegPtRawCorrNeutrino=arr22,
jet_PNetRegPtRawRes=arr23,
fatjet_pt=arr24,
fatjet_eta=arr25,
fatjet_phi=arr26,
fatjet_mass=arr27,
fatjet_particleNet_QCD=arr28,
fatjet_particleNet_XbbVsQCD=arr29,
fatjet_particleNetWithMass_QCD=arr30,
fatjet_particleNetWithMass_HbbvsQCD=arr31,
fatjet_particleNet_massCorr=arr32,
output_format='mass')
For currently available models, shape of returned errors is (n_events, 1) if output_format is set to 'mass' and (n_events, 6) if it is set to 'p4'.