#include <MVAWriter.h>
Public Member Functions | |
MVAWriter (art::ProducesCollector &collector, const char *name="") | |
void | setOutput (FVector_ID id, size_t key, std::array< float, N > const &values) |
void | setOutput (FVector_ID id, size_t key, std::array< double, N > const &values) |
void | setOutput (FVector_ID id, size_t key, std::vector< float > const &values) |
void | setOutput (FVector_ID id, size_t key, std::vector< double > const &values) |
void | addOutput (FVector_ID id, std::array< float, N > const &values) |
void | addOutput (FVector_ID id, std::array< double, N > const &values) |
void | addOutput (FVector_ID id, std::vector< float > const &values) |
void | addOutput (FVector_ID id, std::vector< double > const &values) |
template<class T > | |
std::array< float, N > | getOutput (std::vector< art::Ptr< T > > const &items) const |
template<class T > | |
std::array< float, N > | getOutput (std::vector< art::Ptr< T > > const &items, std::vector< float > const &weights) const |
template<class T > | |
std::array< float, N > | getOutput (std::vector< art::Ptr< T > > const &items, std::function< float(T const &)> fweight) const |
template<class T > | |
std::array< float, N > | getOutput (std::vector< art::Ptr< T > > const &items, std::function< float(art::Ptr< T > const &)> fweight) const |
template<class T > | |
std::array< float, N > | getOutput (size_t key) const |
Get copy of the MVA output vector for the type T, at index "key". More... | |
template<class T > | |
std::array< float, N > | getOutput (art::Ptr< T > const &item) const |
Get copy of the MVA output vector for the type T, idicated with art::Ptr::key(). More... | |
![]() | |
FVectorWriter (art::ProducesCollector &collector, const char *name="") | |
template<class T > | |
void | produces_using () |
template<class T > | |
FVector_ID | initOutputs (std::string const &dataTag, size_t dataSize, std::vector< std::string > const &names=std::vector< std::string >(N,"")) |
template<class T > | |
FVector_ID | initOutputs (art::InputTag const &dataTag, size_t dataSize, std::vector< std::string > const &names=std::vector< std::string >(N,"")) |
void | setVector (FVector_ID id, size_t key, std::array< float, N > const &values) |
void | setVector (FVector_ID id, size_t key, std::array< double, N > const &values) |
void | setVector (FVector_ID id, size_t key, std::vector< float > const &values) |
void | setVector (FVector_ID id, size_t key, std::vector< double > const &values) |
template<class T > | |
FVector_ID | initOutputs (art::InputTag const &dataTag, std::vector< std::string > const &names=std::vector< std::string >(N,"")) |
template<class T > | |
FVector_ID | initOutputs (std::vector< std::string > const &names=std::vector< std::string >(N,"")) |
void | addVector (FVector_ID id, std::array< float, N > const &values) |
void | addVector (FVector_ID id, std::array< double, N > const &values) |
void | addVector (FVector_ID id, std::vector< float > const &values) |
void | addVector (FVector_ID id, std::vector< double > const &values) |
void | setDataTag (FVector_ID id, art::InputTag const &dataTag) |
Set tag of associated data products in case it was not ready at the initialization time. More... | |
void | saveOutputs (art::Event &evt) |
Check consistency and save all the results in the event. More... | |
size_t | size (FVector_ID id) const |
Get the number of contained feature vectors. More... | |
size_t | length () const |
Get the length of a single feature vector. More... | |
template<class T > | |
std::array< float, N > | getVector (size_t key) const |
Get copy of the feature vector for the type T, at index "key". More... | |
template<class T > | |
std::array< float, N > | getVector (art::Ptr< T > const &item) const |
Get copy of the feature vector for the type T, idicated with art::Ptr::key(). More... | |
template<class T > | |
anab::FVector_ID | getProductID () const |
template<class T > | |
anab::FVector_ID | initOutputs (std::string const &dataTag, size_t dataSize, std::vector< std::string > const &names) |
Additional Inherited Members | |
![]() | |
template<class T > | |
FVector_ID | getProductID () const |
![]() | |
std::string | getProductName (std::type_info const &ti) const |
size_t | getProductHash (std::type_info const &ti) const |
![]() | |
template<class T , size_t N> | |
std::array< float, N > | pAccumulate (std::vector< art::Ptr< T > > const &items, std::vector< FeatureVector< N > > const &outs) const |
template<class T , size_t N> | |
std::array< float, N > | pAccumulate (std::vector< art::Ptr< T > > const &items, std::vector< float > const &weights, std::vector< FeatureVector< N > > const &outs) const |
template<class T , size_t N> | |
std::array< float, N > | pAccumulate (std::vector< art::Ptr< T > > const &items, std::function< float(T const &)> fweight, std::vector< FeatureVector< N > > const &outs) const |
template<class T , size_t N> | |
std::array< float, N > | pAccumulate (std::vector< art::Ptr< T > > const &items, std::function< float(art::Ptr< T > const &)> fweight, std::vector< FeatureVector< N > > const &outs) const |
template<class T , size_t N> | |
std::array< float, N > | pAccumulate (std::vector< art::Ptr< T > > const &items, std::vector< FeatureVector< N > > const &outs, std::array< char, N > const &mask) const |
![]() | |
std::vector< std::unique_ptr< std::vector< anab::FeatureVector< N > > > > | fVectors |
Helper for registering in the art::EDProducer all data products needed for N-output MVA results: keep MVADescriptions<N> for all types T in one collection while separate instance names are used for the MVA output value collections for each type T. Use one instance of this class per one MVA model, applied to one or more types.
Definition at line 162 of file MVAWriter.h.
|
inline |
Name provided to the constructor is used as an instance name for MVADescription<N> and FeatureVector<N> (for which it is combined with the processed data product names). Good idea is to use the name as an indication of what MVA model was used on the data (like eg. "emtrack" for outputs from a model distinguishing EM from track-like hits and clusters). The name is used as an instance name for the MVADescription data product which lets you to save multiple MVA results from a single art module.
Definition at line 171 of file MVAWriter.h.
|
inline |
Definition at line 180 of file MVAWriter.h.
|
inline |
Definition at line 181 of file MVAWriter.h.
|
inline |
Definition at line 182 of file MVAWriter.h.
|
inline |
Definition at line 183 of file MVAWriter.h.
|
inline |
Get MVA results accumulated over the vector of items (eg. over hits associated to a cluster). NOTE: MVA outputs for these items has to be added to the MVAWriter first!
Definition at line 189 of file MVAWriter.h.
|
inline |
Get MVA results accumulated with provided weights over the vector of items (eg. over clusters associated to a track, weighted by the cluster size; or over hits associated to a cluster, weighted by the hit area). NOTE: MVA outputs for these items has to be added to the MVAWriter first!
Definition at line 197 of file MVAWriter.h.
|
inline |
Get MVA results accumulated with provided weighting function over the vector of items (eg. over clusters associated to a track, weighted by the cluster size; or over hits associated to a cluster, weighted by the hit area). NOTE: MVA outputs for these items has to be added to the MVAWriter first!
Definition at line 206 of file MVAWriter.h.
|
inline |
Definition at line 211 of file MVAWriter.h.
|
inline |
Get copy of the MVA output vector for the type T, at index "key".
Definition at line 217 of file MVAWriter.h.
|
inline |
Get copy of the MVA output vector for the type T, idicated with art::Ptr::key().
Definition at line 221 of file MVAWriter.h.
|
inline |
Definition at line 175 of file MVAWriter.h.
|
inline |
Definition at line 176 of file MVAWriter.h.
|
inline |
Definition at line 177 of file MVAWriter.h.
|
inline |
Definition at line 178 of file MVAWriter.h.