21 template<
typename ATYPE,
typename HTYPE>
31 template<
typename ATYPE1,
typename ATYPE2,
typename HTYPE>
41#define scale1 this->m_toGeV1
42#define scale2 this->m_toGeV2
61 for(
const T& v :
vec ) this->
m_h->Fill( v *
scale1, weight );
84 template<
typename T,
typename HTYPE>
86 AttvsAttFiller(
const std::string & att1,
const std::string & att2 , HTYPE*
h,
bool gev1,
bool gev2) :
AccessorAndHisto2<T,T, HTYPE>(att1,att2,
h, gev1, gev2) {}
93 template<
typename T,
typename HTYPE>
95 AttvsVecAttIndexFiller(
const std::string & att1,
const std::string & att2 , HTYPE*
h,
size_t index ,
bool gev1,
bool gev2,
bool swapAxis=
false) :
AccessorAndHisto2<
std::
vector<T>,T, HTYPE>(att1,att2,
h, gev1, gev2) ,
m_index(
index),
m_swap(swapAxis){}
131 static const std::map< std::string , Supported > m( { {
"int",
Int}, {
"float",
Float}, {
"vector<float>",
VectFloat}, {
"vector<int>",
VectInt}, } );
132 auto itr = m.find( n );
133 return ( itr != m.end() ? itr->second :
Unknown );
186 return StatusCode::FAILURE;
190 ATH_MSG_ERROR(
"Differing number of attributes names and types ");
191 return StatusCode::FAILURE;
196 return StatusCode::SUCCESS;
272 if(swapAxis) att1.swap(att2);
305 if (cont.
empty() )
return 0;
323 h->SetTitle(
h->GetTitle()+s);
std::vector< size_t > vec
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool empty() const noexcept
Returns true if the collection is empty.
virtual void renameAndRegister(TH1 *h, const std::string &subD="", Interval_t ityp=useToolInterval)
Rename an histo according to the tool's path.
Interval_t
Redefinition of fill intervals as in ManagedMonitorToolBase.
T * bookHisto(T *h, Interval_t ityp=useToolInterval)
register the histo h in this group (if h!=NULL). The histo name is changed if m_prefixedHistoName==tr...
virtual int fillHistosFromJet(const xAOD::Jet &j, float weight)
virtual int fillHistosFromContainer(const xAOD::JetContainer &cont, float weight)
virtual int buildHistos()
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
ToolHandle< HistoDefinitionTool > m_histoDef
virtual ~JetAttributeHisto()
JetAttributeHisto(const std::string &t)
std::vector< std::string > m_attTypes
std::vector< bool > m_attGeV
virtual void renameAndRegister(TH1 *h, const std::string &subD="", Interval_t i=all)
Rename an histo according to the tool's path. redefine here to take m_selectedIndex into account.
jet::HistoFiller * m_histoFiller
std::vector< std::string > m_attNames
JetHistoBase(const std::string &t)
virtual StatusCode initialize()
Dummy implementation of the initialisation function.
virtual int fillHistosFromContainer(const xAOD::JetContainer &cont, float weight)
SG::Accessor< T, ALLOC > Accessor
virtual bool isValid(const xAOD::Jet &)
virtual ~HistoFiller()=default
virtual void fill(const xAOD::Jet &, float)
SG::AuxElement::Accessor< T > Accessor
Jet_v1 Jet
Definition of the current "jet version".
JetContainer_v1 JetContainer
Definition of the current "jet container version".
AccessorAndHisto2(const std::string &att1, const std::string &att2, HTYPE *h, bool gev1, bool gev2)
Accessor< ATYPE2 > m_accessor2
AccessorAndHisto(const std::string &attname, HTYPE *h, bool gev)
Accessor< ATYPE > m_accessor
virtual bool isValid(const xAOD::Jet &j)
AttFiller(const std::string &attname, TH1F *h, bool gev1)
virtual void fill(const xAOD::Jet &j, float weight)
static Supported fromString(const std::string &n)
static Supported fromString(const std::string &n1, const std::string &n2)
virtual void fill(const xAOD::Jet &j, float weight)
AttvsAttFiller(const std::string &att1, const std::string &att2, HTYPE *h, bool gev1, bool gev2)
virtual bool isValid(const xAOD::Jet &j)
AttvsVecAttIndexFiller(const std::string &att1, const std::string &att2, HTYPE *h, size_t index, bool gev1, bool gev2, bool swapAxis=false)
virtual void fill(const xAOD::Jet &j, float weight)
virtual bool isValid(const xAOD::Jet &j)
virtual void fill(const xAOD::Jet &j, float weight)
VecAttFiller(const std::string &attname, TH1F *h, bool gev1)
virtual bool isValid(const xAOD::Jet &j)
virtual void fill(const xAOD::Jet &j, float weight)
virtual bool isValid(const xAOD::Jet &j)
VecAttIndexFiller(const std::string &attname, TH1F *h, size_t index, bool gev1)