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"
36 virtual public IRedirectMsgStream,
47#ifndef RINGER_STANDALONE
60 const TrackPatternsHolder *trackPat,
61 std::vector<float> &output)
const = 0;
99 const std::vector<float> &input,
100 std::vector<float> &output)
const = 0;
110 static constexpr const char*
wrapName =
"RingerDiscriminatorWrapper";
121 const char *fileName);
128 const char* fileName);
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
Used as base for all IRingerProcedureWrapper template specializations.
virtual SegmentationType getSegType() const =0
Get segmentation type for this pre-processing.
std::vector< IRingerProcedureWrapper * > WrapperCollection
Collection type of Discriminators Wrappers.
virtual bool hasPP() const =0
Returns whether it has Pre-Processing Collection Wrapper.
static constexpr const char * wrapName
virtual void execute(const DepVarStruct &depVar, const std::vector< float > &input, std::vector< float > &output) const =0
static void writeCol(const WrapperCollection &discrWrapperCol, const char *fileName)
Write all wrappers on discrWrapperCol to TDirectory.
virtual const char * name() const final override
Returns this wrapper name.
virtual void execute(const DepVarStruct &depVar, const xAOD::CaloRings *clrings, const TrackPatternsHolder *trackPat, std::vector< float > &output) const =0
Main methods:
virtual const Ringer::ExtraDescriptionPatterns & getExtraDescriptionPatterns() const =0
Get extra description patterns being used.
virtual void setRawConfCol(const xAOD::RingSetConf::RawConfCollection *crRawConfCol)=0
Set the holden CaloRings raw configuration collection.
virtual void getRawConfCol(const xAOD::RingSetConf::RawConfCollection *&crRawConfCol) const =0
Get the holden CaloRings raw configuration collection.
static void read(WrapperCollection &discrWrapperCol, const char *fileName)
Read all discriminator on file at the path and append them to IPreProcWrapperCollection.
IRingerProcedureWrapper()
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 Discrimination utilities.
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".