Interface providing feature computation from ROOT LorentzVectors for CMS RunII hh->bbtautau DNN
- cmsrel CMSSW_10_2_15
- cd CMSSW_10_2_15/src
- cmsenv
- git clone [email protected]:GilesStrong/cms_hh_proc_interface.git
- scram b -j 12
Building the tool in CMSSW will generate two executables in CMSSW_10_2_16/test/slc7_amd64_gcc700/
called: testfeatcomp
which will generate the example and test the feature computation object; and testevtproc
which will check the event processing object.
The interface consists of two objects:
FeatComp
computes features and categorical values fromROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>>
objects and other event information and returns it as a map of feature name to float value (FeatComp::process
). Ifall
is set totrue
then all features will be computed, otherwise a set of feature names can be passed torequested
, in which case only the features listed will be computed (NB the order of the returned map is not guaranteed to match the order of requested features!). The choice of whether to use CSV or Deep CSV can can be controlled usinguse_deep_csv
.EvtProc
is the main interface for processing events fromROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<float>>
objects and other event information by wrappingFeatComp
and adding additional information (EvtFeat::process
). Ifall
is set totrue
then all features will be computed, otherwise a set of feature names can be passed torequested
, in which case only the features listed will be computed and returned in the requested order. The choice of whether to use CSV or Deep CSV can can be controlled usinguse_deep_csv
. If a vector of floats is required, i.e. for passing straight to a DNN, thenEvtFeat::process_as_vec
can be called instead. Additionally,EvtFeat::process_to_vec
can be passed a vector of unique pointers to floats, which will be modified in place to the computed values; useful when processing ntuples to save the outputs.
- The enum objects
Channel
andYear
are defined infeat_comp.hh
.