ATLAS Offline Software
Loading...
Searching...
No Matches
LArXTalkWeight Class Reference

#include <LArXTalkWeight.h>

Collaboration diagram for LArXTalkWeight:

Public Member Functions

 LArXTalkWeight (const std::vector< float > &vec, const float factor, const std::vector< int > &table)
float get_xtalk (const int eta) const
float get_xtalk (const int region, const int eta) const

Private Attributes

std::vector< float > m_vector
std::vector< int > m_table

Detailed Description

Definition at line 10 of file LArXTalkWeight.h.

Constructor & Destructor Documentation

◆ LArXTalkWeight()

LArXTalkWeight::LArXTalkWeight ( const std::vector< float > & vec,
const float factor,
const std::vector< int > & table )

Definition at line 8 of file LArXTalkWeight.cxx.

8 {
9 m_vector.insert(m_vector.end(),vec.begin(),vec.end() );
10 bool factor1;
11 if ( std::abs(factor-1.0) < 0.001 ) factor1=true;
12 else factor1=false;
13
14 if ( !factor1 ) for(auto& el : m_vector) el*=factor;
15 m_table.insert(m_table.end(), table.begin(), table.end() );
16}
std::vector< size_t > vec
std::vector< float > m_vector
std::vector< int > m_table

Member Function Documentation

◆ get_xtalk() [1/2]

float LArXTalkWeight::get_xtalk ( const int eta) const
inline

Definition at line 20 of file LArXTalkWeight.h.

20 {
21 return m_vector.at(eta);
22}
Scalar eta() const
pseudorapidity method

◆ get_xtalk() [2/2]

float LArXTalkWeight::get_xtalk ( const int region,
const int eta ) const
inline

Definition at line 23 of file LArXTalkWeight.h.

23 {
24 if ( m_table.empty() ) return 0.;
25 const int eta2 = eta+m_table.at(region);
26 return m_vector.at(eta2);
27}

Member Data Documentation

◆ m_table

std::vector<int> LArXTalkWeight::m_table
private

Definition at line 17 of file LArXTalkWeight.h.

◆ m_vector

std::vector<float> LArXTalkWeight::m_vector
private

Definition at line 16 of file LArXTalkWeight.h.


The documentation for this class was generated from the following files: