6#ifndef RINGERSELECTORTOOLS_PROCEDURES_RINGERDISCRIMINATIONWRAPPER_H
7#define RINGERSELECTORTOOLS_PROCEDURES_RINGERDISCRIMINATIONWRAPPER_H
9#define RINGER_PROCEDURE_INCLUDE
11#undef RINGER_PROCEDURE_INCLUDE
15#define RINGER_DISCRIMINATOR_WRAPPER_INCLUDE
19#undef RINGER_DISCRIMINATOR_WRAPPER_INCLUDE
22#include "RingerSelectorTools/ExtraDescriptionPatterns.h"
35class IRingerProcedureWrapper< Discrimination::IDiscriminator > :
36 virtual public IRedirectMsgStream,
37 virtual public IRingerProcedureWrapperBase
43 typedef typename std::vector< IRingerProcedureWrapper* > WrapperCollection;
47#ifndef RINGER_STANDALONE
58 const DepVarStruct &depVar,
60 const TrackPatternsHolder *trackPat,
61 std::vector<float> &output)
const = 0;
66 virtual void setRawConfCol(
72 virtual void getRawConfCol(
83 virtual const Ringer::ExtraDescriptionPatterns& getExtraDescriptionPatterns()
const = 0;
98 const DepVarStruct &depVar,
99 const std::vector<float> &input,
100 std::vector<float> &output)
const = 0;
106 virtual const char* name()
const final override {
110 static constexpr const char* wrapName =
"RingerDiscriminatorWrapper";
115 virtual bool hasPP()
const = 0;
120 static void writeCol(
const WrapperCollection &discrWrapperCol,
121 const char *fileName);
127 static void read(WrapperCollection &discrWrapperCol,
128 const char* fileName);
132 IRingerProcedureWrapper(){;}
139typedef IRingerProcedureWrapper< Discrimination::IDiscriminator >
151template <
class procedure_t,
164 public RedirectMsgStream
167 (std::is_base_of<VariableDependency,procedure_t>::value),
168 "RingerProcedureWrapper procedure_t type must have IVariableDependecy inheritance.");
185 typedef typename std::vector<
187 std::vector < procedure_t* > >
195 typedef typename std::vector<
196 std::vector< Ringer::PreProcessing::Norm::ExtraPatternsNorm* >
235#ifndef RINGER_STANDALONE
248 const TrackPatternsHolder *trackPat,
249 std::vector<float> &output)
const override final;
264 const std::vector<float> &input,
265 std::vector<float> &output)
const override final;
270#ifndef RINGER_STANDALONE
279 ppWrapper->setRawConfCol( crRawConfCol );
350 void write(TDirectory *baseDir,
const char *idxStr =
"")
const override final;
428#ifndef RINGER_STANDALONE
443#ifndef INCLUDE_HEADER_ONLY
virtual void setRawConfCol(const xAOD::RingSetConf::RawConfCollection *crRawConfCol) final override
Other utilities:
virtual void setMsgStream(MsgStream *msg) const override
Overloads the setMsgStream from RedirectMsgStream.
virtual SegmentationType getSegType() const override final
Get segmentation type for this pre-processor.
std::vector< std::vector< Ringer::PreProcessing::Norm::ExtraPatternsNorm * > > ExtraPatternsNormCollection
Extra patterns normalization vector.
void checkDiscrCol() const
Check if discriminators interface collection is in good status (Throws otherwise)
virtual void getRawConfCol(const xAOD::RingSetConf::RawConfCollection *&crRawConfCol) const override final
Get the holden CaloRings raw configuration collection.
virtual bool empty() const override
Returns whether holden interface collection is empty.
unsigned m_nRings
contains the total number of rings in the vectorized representation
void setExtraDescriptionPatterns(const Ringer::ExtraDescriptionPatterns &extraPat)
Get extra description patterns being used.
virtual void execute(const DepVarStruct &depVar, const xAOD::CaloRings *clrings, const TrackPatternsHolder *trackPat, std::vector< float > &output) const override final
Main methods:
ExtraDescriptionPatterns m_extraDescriptionPatterns
contains a pointer into the CaloRings configuration
DiscrDepProcCollection m_discrCol
holden discriminator collection:
static RingerProcedureWrapper * read(TDirectory *configDir, unsigned version)
Read collection from TDirectory.
procedure_t * m_discr
hold pointer to first collection position:
virtual bool hasPP() const override
Returns whether it has pre-processing Collection Wrapper.
std::vector< std::vector< std::vector< procedure_t * > > > DiscrDepProcCollection
RingerProcedureWrapper for Discrimination procedures typedefs:
void releaseMemory() override final
Release all holden pointer memory.
EtaDependency etaDep() const override final
Returns eta dependecy for this wrapper.
std::string fullName() const override final
Get full wrapper name.
void checkExtraPatNorm() const
Check if exra pattern is in good status (Throws otherwise)
virtual const Ringer::ExtraDescriptionPatterns & getExtraDescriptionPatterns() const override final
Get extra description patterns being used.
void setExtraDescriptionNorms(const ExtraPatternsNormCollection &extraNorms)
Get extra description patterns being used.
void checkPPWrapperCol() const
Private methods.
static std::string staticFullName()
Get full wrapper name, static method.
ExtraPatternsNormCollection m_extraDescriptionNorms
Hold the normalization to be used by each bin to the extra patterns.
void write(TDirectory *baseDir, const char *idxStr="") const override final
Write collection to TDirectory.
const IPreProcWrapperCollection m_ppWrapperCol
Properties.
virtual void execute(const DepVarStruct &depVar, const std::vector< float > &input, std::vector< float > &output) const override final
void print(MSG::Level lvl=MSG::DEBUG) const override final
Print wrapper content.
RingerProcedureWrapper(const DiscrDepProcCollection &discrDepCol)
Ctors:
ExtraPatternsNormCollection & getExtraDescriptionNorms()
Get extra description patterns being used.
RingerProcedureWrapper(const IPreProcWrapperCollection &ppCol, const DiscrDepProcCollection &discrDepCol)
Build RProc Wrapper with all functionallities.
EtDependency etDep() const override final
Returns et dependecy for this wrapper.
const xAOD::RingSetConf::RawConfCollection * m_rsRawConfCol
contains a pointer into the CaloRings configuration
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
static unsigned totalNumberOfRings(const RawConfCollection &clRingsConf)
Get the totalNumber of Rings contained in this configuration:
Namespace dedicated for Ringer utilities.
EtaDependency
Specify eta position dependency.
IPreProcWrapper::WrapperCollection IPreProcWrapperCollection
Facilitate access into Threshold Wrappers collection.
EtDependency
Specify et position dependency.
SegmentationType
the possible procedure longitudinal segmentation types.
IDiscrWrapper::WrapperCollection IDiscrWrapperCollection
Facilitate access into Discrimination Wrappers.
IRingerProcedureWrapper< Discrimination::IDiscriminator > IDiscrWrapper
Facilitate access into Discrimination Wrappers.
CaloRings_v1 CaloRings
Definition of the current "CaloRings version".
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)