|
ATLAS Offline Software
|
Go to the documentation of this file.
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"
23 #include <type_traits>
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";
139 typedef IRingerProcedureWrapper< Discrimination::IDiscriminator >
151 template <
class procedure_t,
164 public RedirectMsgStream
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* >
208 m_discrCol(discrDepCol),
210 m_rsRawConfCol(nullptr),
222 m_ppWrapperCol(ppCol),
223 m_discrCol(discrDepCol),
225 m_rsRawConfCol(nullptr),
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
278 for (
auto &ppWrapper : m_ppWrapperCol ) {
279 ppWrapper->setRawConfCol( crRawConfCol );
281 m_rsRawConfCol = crRawConfCol;
291 crRawConfCol = m_rsRawConfCol;
300 return m_extraDescriptionPatterns;
308 m_extraDescriptionPatterns = extraPat;
320 m_extraDescriptionNorms = extraNorms;
335 virtual bool empty()
const override {
return m_discrCol.empty();}
340 virtual bool hasPP()
const override {
return !m_ppWrapperCol.empty();}
350 void write(TDirectory *baseDir,
const char *idxStr =
"")
const override final;
376 static std::
string staticFullName();
424 ExtraDescriptionPatterns m_extraDescriptionPatterns;
426 procedure_t *m_discr;
428 #ifndef RINGER_STANDALONE
441 #endif // RINGERSELECTORTOOLS_PROCEDURES_RINGERDISCRIMINATIONWRAPPER_H
443 #ifndef INCLUDE_HEADER_ONLY // Use to avoid circular includes
445 #endif // INCLUDE_HEADER_ONLY
IovVectorMap_t read(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
virtual SegmentationType getSegType() const override final
Get segmentation type for this pre-processor.
virtual void execute(const DepVarStruct &depVar, const xAOD::CaloRings *clrings, const TrackPatternsHolder *trackPat, std::vector< float > &output) const =0
Main methods:
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
virtual bool empty() const override
Returns whether holden interface collection is empty.
virtual const Ringer::ExtraDescriptionPatterns & getExtraDescriptionPatterns() const override final
Get extra description patterns being used.
static void read(WrapperCollection &discrWrapperCol, const char *fileName)
Read all discriminator on file at the path and append them to IPreProcWrapperCollection.
IRingerProcedureWrapper()
IRingerProcedureWrapper< Discrimination::IDiscriminator > IDiscrWrapper
Facilitate access into Discrimination Wrappers.
virtual void setRawConfCol(const xAOD::RingSetConf::RawConfCollection *crRawConfCol)=0
Set the holden CaloRings raw configuration collection.
std::vector< IRingerProcedureWrapper * > WrapperCollection
Collection type of Discriminators Wrappers.
void setExtraDescriptionPatterns(const Ringer::ExtraDescriptionPatterns &extraPat)
Get extra description patterns being used.
std::vector< std::vector< std::vector< procedure_t * > > > DiscrDepProcCollection
RingerProcedureWrapper for Discrimination procedures typedefs:
virtual void execute(const DepVarStruct &depVar, const std::vector< float > &input, std::vector< float > &output) const override final
bool const RAWDATA *ch2 const
SegmentationType
the possible procedure longitudinal segmentation types.
IPreProcWrapper::WrapperCollection IPreProcWrapperCollection
Facilitate access into Threshold Wrappers collection.
RingerProcedureWrapper(const DiscrDepProcCollection &discrDepCol)
Ctors:
std::vector< std::vector< Ringer::PreProcessing::Norm::ExtraPatternsNorm * > > ExtraPatternsNormCollection
Extra patterns normalization vector.
virtual void execute(const DepVarStruct &depVar, const std::vector< float > &input, std::vector< float > &output) const =0
unsigned m_nRings
contains the total number of rings in the vectorized representation
virtual void execute(const DepVarStruct &depVar, const xAOD::CaloRings *clrings, const TrackPatternsHolder *trackPat, std::vector< float > &output) const override final
Main methods:
EtDependency
Specify et position dependency.
virtual const char * name() const final override
Returns this wrapper name.
Class summarizing the particle interaction throughout the Calorimeter (its shower shape).
virtual void getRawConfCol(const xAOD::RingSetConf::RawConfCollection *&crRawConfCol) const override final
Get the holden CaloRings raw configuration collection.
IDiscrWrapper::WrapperCollection IDiscrWrapperCollection
Facilitate access into Discrimination Wrappers.
virtual void setMsgStream(MsgStream *msg) const override
Overloads the setMsgStream from RedirectMsgStream.
RingerProcedureWrapper(const IPreProcWrapperCollection &ppCol, const DiscrDepProcCollection &discrDepCol)
Build RProc Wrapper with all functionallities.
void setExtraDescriptionNorms(const ExtraPatternsNormCollection &extraNorms)
Get extra description patterns being used.
EtDependency etDep() const override final
Returns et dependecy for this wrapper.
virtual const Ringer::ExtraDescriptionPatterns & getExtraDescriptionPatterns() const =0
Get extra description patterns being used.
virtual SegmentationType getSegType() const =0
Get segmentation type for this pre-processing.
EtaDependency
Specify eta position dependency.
virtual bool hasPP() const override
Returns whether it has pre-processing Collection Wrapper.
virtual bool hasPP() const =0
Returns whether it has Pre-Processing Collection Wrapper.
Used as base for all IRingerProcedureWrapper template specializations.
static void writeCol(const WrapperCollection &discrWrapperCol, const char *fileName)
Write all wrappers on discrWrapperCol to TDirectory.
void releaseMemory() override final
Release all holden pointer memory.
ExtraPatternsNormCollection & getExtraDescriptionNorms()
Get extra description patterns being used.
virtual void getRawConfCol(const xAOD::RingSetConf::RawConfCollection *&crRawConfCol) const =0
Get the holden CaloRings raw configuration collection.
void write(TDirectory *baseDir, const char *idxStr="") const override final
Write collection to TDirectory.
Specialization for Discriminator procedure.
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
static unsigned totalNumberOfRings(const RawConfCollection &clRingsConf)
Get the totalNumber of Rings contained in this configuration:
virtual void setRawConfCol(const xAOD::RingSetConf::RawConfCollection *crRawConfCol) final override
Other utilities:
Specialization for Discriminator procedure.
Namespace dedicated for Ringer utilities.