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

#include <QjetMassCondition.h>

Inheritance diagram for QjetMassCondition:
Collaboration diagram for QjetMassCondition:

Public Member Functions

 QjetMassCondition (double massMin, double massMax)
 
bool isSatisfied (const HypoJetVector &, const std::unique_ptr< ITrigJetHypoInfoCollector > &) const override
 
std::string toString () const override
 
virtual unsigned int capacity () const override
 

Private Member Functions

bool passJetCuts (pHypoJet, pHypoJet) const
 
bool passQjetMassCuts (pHypoJet, pHypoJet) const
 

Private Attributes

double m_min
 
double m_max
 

Static Private Attributes

static const unsigned int s_capacity {4}
 

Detailed Description

Definition at line 26 of file QjetMassCondition.h.

Constructor & Destructor Documentation

◆ QjetMassCondition()

QjetMassCondition::QjetMassCondition ( double  massMin,
double  massMax 
)

Definition at line 13 of file QjetMassCondition.cxx.

14  :m_min(massMin),
15  m_max(massMax){
16  }

Member Function Documentation

◆ capacity()

virtual unsigned int QjetMassCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 36 of file QjetMassCondition.h.

36 {return s_capacity;}

◆ isSatisfied()

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

Implements ICondition.

Definition at line 20 of file QjetMassCondition.cxx.

21  {
22 
23  if(ips.size() != 4){
24  std::stringstream ss;
25  ss << "QjetMassCondition::isSatisfied must see exactly 4 particles, but received "
26  << ips.size()
27  << '\n';
28 
29  throw std::runtime_error(ss.str());
30  }
31 
32  auto j0 = ips[0];
33  auto j1 = ips[1];
34  auto j2 = ips[2];
35  auto j3 = ips[3];
36 
37  auto rj0 = j0 -> p4();
38  auto rj1 = j1 -> p4();
39  auto rj2 = j2 -> p4();
40  auto rj3 = j3 -> p4();
41 
42  auto mass = (rj0 + rj1 + rj2 + rj3).M();
43 
44  bool pass = mass >= m_min and mass < m_max;
45 
46  if(collector){
47  std::stringstream ss0;
48  const void* address = static_cast<const void*>(this);
49  ss0 << "QjetMassCondition: (" << address << ") "
50  << mass << " " << std::boolalpha << pass << " jet group: \n";
51 
52  std::stringstream ss1;
53 
54  for(const auto& ip : ips){
55  address = static_cast<const void*>(ip.get());
56  ss1 << " " << address << " eta " << ip->eta()
57  << " e " << ip->e() << " et: " << ip->et() << '\n';
58  }
59  ss1 << '\n';
60  collector -> collect(ss0.str(), ss1.str());
61  }
62  return pass;
63 
64 }

◆ passJetCuts()

bool QjetMassCondition::passJetCuts ( pHypoJet  ,
pHypoJet   
) const
private

◆ passQjetMassCuts()

bool QjetMassCondition::passQjetMassCuts ( pHypoJet  ,
pHypoJet   
) const
private

◆ toString()

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

Implements ICondition.

Definition at line 66 of file QjetMassCondition.cxx.

66  {
67 
68 
69  std::stringstream ss;
70  const void* address = static_cast<const void*>(this);
71  ss << "QjetMassCondition: (" << address << ") Capacity: " << s_capacity
72 
73  << " mass min: " << m_min
74  << " mass max: " << m_max <<'\n';
75 
76  return ss.str();
77 }

Member Data Documentation

◆ m_max

double QjetMassCondition::m_max
private

Definition at line 45 of file QjetMassCondition.h.

◆ m_min

double QjetMassCondition::m_min
private

Definition at line 44 of file QjetMassCondition.h.

◆ s_capacity

const unsigned int QjetMassCondition::s_capacity {4}
staticprivate

Definition at line 47 of file QjetMassCondition.h.


The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
QjetMassCondition::m_min
double m_min
Definition: QjetMassCondition.h:44
doubleTestComp.j1
j1
Definition: doubleTestComp.py:21
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
QjetMassCondition::s_capacity
static const unsigned int s_capacity
Definition: QjetMassCondition.h:47
Trig::FeatureAccessImpl::collect
void collect(const HLT::TriggerElement *te, std::vector< Trig::Feature< T > > &data, const std::string &label, unsigned int condition, const std::string &teName, const HLT::TrigNavStructure *navstructure)
actual feature acceess implementation It has (thanks to the ClassTraits) functionality to flatten con...
Definition: FeatureCollectAthena.h:299
QjetMassCondition::m_max
double m_max
Definition: QjetMassCondition.h:45
doubleTestComp.j2
j2
Definition: doubleTestComp.py:22