ATLAS Offline Software
Loading...
Searching...
No Matches
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;}
static const unsigned int 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}
static Double_t ss
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...

◆ 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.

47{4};

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