ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TLACondition Class Reference

#include <TLACondition.h>

Inheritance diagram for TLACondition:
Collaboration diagram for TLACondition:

Public Member Functions

 TLACondition (const std::vector< double > &etaMins, const std::vector< double > &etaMaxs, const std::vector< double > &ystarMins, const std::vector< double > &ystarMaxs, const std::vector< double > &massMins, const std::vector< double > &massMaxs)
 
 TLACondition (double etaMin, double etaMax, double ystarMin, double ystarMax, double massMin, double massMax)
 
 ~TLACondition () override
 
bool isSatisfied (const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
 
std::string toString () const override
 
virtual unsigned int capacity () const override
 

Private Attributes

double m_etaMin
 
double m_etaMax
 
double m_ystarMin
 
double m_ystarMax
 
double m_massMin
 
double m_massMax
 

Static Private Attributes

static const unsigned int s_capacity {1}
 

Detailed Description

Definition at line 23 of file TLACondition.h.

Constructor & Destructor Documentation

◆ TLACondition() [1/2]

TLACondition::TLACondition ( const std::vector< double > &  etaMins,
const std::vector< double > &  etaMaxs,
const std::vector< double > &  ystarMins,
const std::vector< double > &  ystarMaxs,
const std::vector< double > &  massMins,
const std::vector< double > &  massMaxs 
)

Definition at line 13 of file TLACondition.cxx.

18  {
19  m_etaMin = etaMins[0];
20  m_etaMax = etaMaxs[0];
21 
22  m_ystarMin = 0.;
24 
25  m_massMin = 0.;
27 
28  if (!ystarMins.empty()){
29  m_ystarMin = ystarMins[0];
30  }
31 
32 
33  if (!ystarMaxs.empty()){
34  m_ystarMax = ystarMaxs[0];
35  }
36 
37  if (!massMins.empty()){
38  m_massMin = massMins[0];
39  }
40 
41  if (!massMaxs.empty()){
42  m_massMax = massMaxs[0];
43  }
44 
45 }

◆ TLACondition() [2/2]

TLACondition::TLACondition ( double  etaMin,
double  etaMax,
double  ystarMin,
double  ystarMax,
double  massMin,
double  massMax 
)

Definition at line 47 of file TLACondition.cxx.

52  :
54  m_ystarMin(ystarMin), m_ystarMax(ystarMax),
55  m_massMin(massMin),m_massMax(massMax){
56 }

◆ ~TLACondition()

TLACondition::~TLACondition ( )
inlineoverride

Definition at line 39 of file TLACondition.h.

39 {}

Member Function Documentation

◆ capacity()

virtual unsigned int TLACondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 45 of file TLACondition.h.

45 {return s_capacity;}

◆ isSatisfied()

bool TLACondition::isSatisfied ( const HypoJetVector ips,
const std::unique_ptr< ITrigJetHypoInfoCollector > &   
) const
overridevirtual

Implements ICondition.

Definition at line 58 of file TLACondition.cxx.

59  {
60  if(ips.size() != 2){
61  std::stringstream ss;
62  ss << "TLA::isSatisfied must see exactly 2 particles, but recieved "
63  << ips.size()
64  << '\n';
65 
66  throw std::runtime_error(ss.str());
67  }
68 
69  auto p4_0 = ips[0]->p4();
70  auto p4_1 = ips[1]->p4();
71  auto mass = (p4_0 + p4_1).M();
72  auto eta0 = ips[0]->eta();
73  auto eta1 = ips[1]->eta();
74  auto rap0 = ips[0]->rapidity();
75  auto rap1 = ips[1]->rapidity();
76  auto ystar = 0.5*std::abs(rap0 - rap1);
77 
78 
79  return
80  m_etaMin <= eta0 and
81  m_etaMin <= eta1 and
82  m_etaMax > eta0 and
83  m_etaMax > eta1 and
84  m_ystarMin <= ystar and
85  m_ystarMax > ystar and
86  m_massMin <= mass and
87  m_massMax > mass;
88 }

◆ toString()

std::string TLACondition::toString ( ) const
overridevirtual

Implements ICondition.

Definition at line 90 of file TLACondition.cxx.

90  {
91  std::stringstream ss;
92  ss << "TLACondition: etaMin "
93  << m_etaMin
94  << " etaMax "
95  << m_etaMax
96  << " ystar min: "
97  << m_ystarMin
98  << " ystar max: "
99  << m_ystarMax
100  << " mass min: "
101  << m_massMin
102  << " mass max: "
103  << m_massMax
104  <<'\n';
105 
106  return ss.str();
107 }

Member Data Documentation

◆ m_etaMax

double TLACondition::m_etaMax
private

Definition at line 49 of file TLACondition.h.

◆ m_etaMin

double TLACondition::m_etaMin
private

Definition at line 48 of file TLACondition.h.

◆ m_massMax

double TLACondition::m_massMax
private

Definition at line 53 of file TLACondition.h.

◆ m_massMin

double TLACondition::m_massMin
private

Definition at line 52 of file TLACondition.h.

◆ m_ystarMax

double TLACondition::m_ystarMax
private

Definition at line 51 of file TLACondition.h.

◆ m_ystarMin

double TLACondition::m_ystarMin
private

Definition at line 50 of file TLACondition.h.

◆ s_capacity

const unsigned int TLACondition::s_capacity {1}
staticprivate

Definition at line 55 of file TLACondition.h.


The documentation for this class was generated from the following files:
max
#define max(a, b)
Definition: cfImp.cxx:41
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
TLACondition::m_massMin
double m_massMin
Definition: TLACondition.h:52
xAOD::etaMax
etaMax
Definition: HIEventShape_v2.cxx:46
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
TLACondition::m_massMax
double m_massMax
Definition: TLACondition.h:53
TLACondition::m_ystarMin
double m_ystarMin
Definition: TLACondition.h:50
TLACondition::s_capacity
static const unsigned int s_capacity
Definition: TLACondition.h:55
TLACondition::m_etaMin
double m_etaMin
Definition: TLACondition.h:48
TLACondition::m_etaMax
double m_etaMax
Definition: TLACondition.h:49
LArCellBinning.etaMin
etaMin
Definition: LArCellBinning.py:84
TLACondition::m_ystarMax
double m_ystarMax
Definition: TLACondition.h:51