Heavy Mass Estimator based on deep neural network
Project description
DeepHME
Heavy Mass Estimator (HME), but based on deep neural network.
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. 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'.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deephme-1.0.0.tar.gz.
File metadata
- Download URL: deephme-1.0.0.tar.gz
- Upload date:
- Size: 54.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d733f6c7e037d8ee6a3eb4aa3acd59f4b1835bc500c619b9c605498fbb8e55d
|
|
| MD5 |
164000901304b6c310daa2332d726099
|
|
| BLAKE2b-256 |
d3545c2ed7b2aaa91fa105dbff071a76ecc143bbab0469c4c539c84154869355
|
File details
Details for the file deephme-1.0.0-py3-none-any.whl.
File metadata
- Download URL: deephme-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fbba7243f942c3c7926be3234f9c54226c02bcb255bb3347495f069c9741ff8
|
|
| MD5 |
9eee7299d3402c8fe42db583c563ad57
|
|
| BLAKE2b-256 |
4ce4178f32ce4c887d8b2d7e1145f464e7665c4e38a2b886bf46a5d749dbb610
|