ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
jet::AttvsVecAttIndexFiller< T, HTYPE > Struct Template Reference
Inheritance diagram for jet::AttvsVecAttIndexFiller< T, HTYPE >:
Collaboration diagram for jet::AttvsVecAttIndexFiller< T, HTYPE >:

Public Member Functions

 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)
 

Protected Attributes

size_t m_index
 
bool m_swap
 
Accessor< T > m_accessor2
 
const float m_toGeV2
 
Accessor< std::vector< T > > m_accessor
 
HTYPE * m_h
 
const float m_toGeV1
 

Detailed Description

template<typename T, typename HTYPE>
struct jet::AttvsVecAttIndexFiller< T, HTYPE >

Definition at line 94 of file JetAttributeHisto.cxx.

Constructor & Destructor Documentation

◆ AttvsVecAttIndexFiller()

template<typename T , typename HTYPE >
jet::AttvsVecAttIndexFiller< T, HTYPE >::AttvsVecAttIndexFiller ( const std::string &  att1,
const std::string &  att2,
HTYPE *  h,
size_t  index,
bool  gev1,
bool  gev2,
bool  swapAxis = false 
)
inline

Definition at line 95 of file JetAttributeHisto.cxx.

95 : AccessorAndHisto2<std::vector<T>,T, HTYPE>(att1,att2,h, gev1, gev2) , m_index(index), m_swap(swapAxis){}

Member Function Documentation

◆ fill()

template<typename T , typename HTYPE >
virtual void jet::AttvsVecAttIndexFiller< T, HTYPE >::fill ( const xAOD::Jet j,
float  weight 
)
inlinevirtual

Reimplemented from jet::HistoFiller.

Definition at line 97 of file JetAttributeHisto.cxx.

97  {
98  const std::vector<T> & vec = this->m_accessor( j);
99  if( vec.size() > m_index) {
100  if( m_swap) this->m_h->Fill( this->m_accessor2(j)*scale2, vec[m_index]*scale1, weight ) ;
101  else this->m_h->Fill( vec[m_index] *scale1, this->m_accessor2(j)*scale2, weight) ;
102  }
103  }

◆ isValid()

template<typename T , typename HTYPE >
virtual bool jet::AttvsVecAttIndexFiller< T, HTYPE >::isValid ( const xAOD::Jet j)
inlinevirtual

Reimplemented from jet::HistoFiller.

Definition at line 105 of file JetAttributeHisto.cxx.

105 {return (this->m_accessor.isAvailable(j))&&(this->m_accessor2.isAvailable(j));}

Member Data Documentation

◆ m_accessor

Accessor< std::vector< T > > jet::AccessorAndHisto< std::vector< T > , HTYPE >::m_accessor
protectedinherited

Definition at line 26 of file JetAttributeHisto.cxx.

◆ m_accessor2

Accessor< T > jet::AccessorAndHisto2< std::vector< T > , T , HTYPE >::m_accessor2
protectedinherited

Definition at line 35 of file JetAttributeHisto.cxx.

◆ m_h

HTYPE* jet::AccessorAndHisto< std::vector< T > , HTYPE >::m_h
protectedinherited

Definition at line 27 of file JetAttributeHisto.cxx.

◆ m_index

template<typename T , typename HTYPE >
size_t jet::AttvsVecAttIndexFiller< T, HTYPE >::m_index
protected

Definition at line 108 of file JetAttributeHisto.cxx.

◆ m_swap

template<typename T , typename HTYPE >
bool jet::AttvsVecAttIndexFiller< T, HTYPE >::m_swap
protected

Definition at line 109 of file JetAttributeHisto.cxx.

◆ m_toGeV1

const float jet::AccessorAndHisto< std::vector< T > , HTYPE >::m_toGeV1
protectedinherited

Definition at line 28 of file JetAttributeHisto.cxx.

◆ m_toGeV2

const float jet::AccessorAndHisto2< std::vector< T > , T , HTYPE >::m_toGeV2
protectedinherited

Definition at line 36 of file JetAttributeHisto.cxx.


The documentation for this struct was generated from the following file:
scale2
#define scale2
Definition: JetAttributeHisto.cxx:42
index
Definition: index.py:1
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
jet::AttvsVecAttIndexFiller::m_index
size_t m_index
Definition: JetAttributeHisto.cxx:108
jet::AccessorAndHisto2< std::vector< T >, T, HTYPE >::m_accessor2
Accessor< T > m_accessor2
Definition: JetAttributeHisto.cxx:35
jet::AccessorAndHisto< std::vector< T >, HTYPE >::m_h
HTYPE * m_h
Definition: JetAttributeHisto.cxx:27
extractSporadic.h
list h
Definition: extractSporadic.py:97
jet::AttvsVecAttIndexFiller::m_swap
bool m_swap
Definition: JetAttributeHisto.cxx:109
jet::AccessorAndHisto2
Definition: JetAttributeHisto.cxx:32
jet::AccessorAndHisto< std::vector< T >, HTYPE >::m_accessor
Accessor< std::vector< T > > m_accessor
Definition: JetAttributeHisto.cxx:26
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
scale1
#define scale1
Definition: JetAttributeHisto.cxx:41
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35