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

#include <JVTCondition.h>

Inheritance diagram for JVTCondition:
Collaboration diagram for JVTCondition:

Public Member Functions

 JVTCondition (double workingPoint)
 
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_workingPoint
 
double m_maxEta = 2.5
 
double m_maxPt = 60
 

Static Private Attributes

static const unsigned int s_capacity {1}
 

Detailed Description

Definition at line 24 of file JVTCondition.h.

Constructor & Destructor Documentation

◆ JVTCondition()

JVTCondition::JVTCondition ( double  workingPoint)

Definition at line 13 of file JVTCondition.cxx.

13  :
14  m_workingPoint(workingPoint) {
15 }

Member Function Documentation

◆ capacity()

virtual unsigned int JVTCondition::capacity ( ) const
inlineoverridevirtual

Implements ICondition.

Definition at line 32 of file JVTCondition.h.

32 {return s_capacity;}

◆ isSatisfied()

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

Implements ICondition.

Definition at line 18 of file JVTCondition.cxx.

18  {
19 
20  if(ips.size() != 1){
21  std::stringstream ss;
22  ss << "Dijet::isSatisfied must see exactly 1 particle, but received "
23  << ips.size()
24  << '\n';
25  throw std::runtime_error(ss.str());
26  }
27 
28  auto jet = ips[0];
29 
30  // The conditions for each jet are: JVT>JVTwp or |eta|>2.5 or pT>60
31  auto pt = jet->pt() * 0.001; // MeV -> GeV
32  float detEta = 0;
33  if(!(jet->getAttribute("DetectorEta",detEta))){
34  throw std::runtime_error("JVT condition cannot retrieve variable 'DetectorEta', 'DetectorEta' does not exist");
35  }
36  auto absdetEta = std::abs(detEta);
37  bool jvtApplicable = (absdetEta<m_maxEta and pt<m_maxPt) ? true : false;
38  bool pass = false;
39  float jvt = -1.;
40  if(!jvtApplicable){ // jvt not applicable
41  pass = true;
42  } else { // jvt applicable
43  if(!(jet->getAttribute("Jvt",jvt))){
44  throw std::runtime_error("JVT condition cannot retrieve variable 'Jvt', 'Jvt' does not exist");
45  }
46 
47  pass = (jvt>m_workingPoint) ? true : false;
48  }
49 
50  if(collector){
51  std::stringstream ss0;
52  const void* address = static_cast<const void*>(this);
53  ss0 << "JVTCondition: (" << address
54  << ") jvt " << jvt
55  << " pt " << pt
56  << " absdetEta " << absdetEta
57  << " pass: " <<std::boolalpha << pass << " jet group: \n";
58 
59  std::stringstream ss1;
60 
61  for(const auto& ip : ips){
62  address = static_cast<const void*>(ip.get());
63  ss1 << " " << address << " " << ip->eta() << " pt " << ip->pt() << '\n';
64  }
65  ss1 << '\n';
66  collector -> collect(ss0.str(), ss1.str());
67  }
68  return pass;
69 
70 }

◆ toString()

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

Implements ICondition.

Definition at line 72 of file JVTCondition.cxx.

72  {
73 
74  std::stringstream ss;
75  const void* address = static_cast<const void*>(this);
76  ss << "JVTCondition: (" << address << ") Capacity: " << s_capacity
77  << " workingPoint: " << m_workingPoint << '\n';
78 
79  return ss.str();
80 }

Member Data Documentation

◆ m_maxEta

double JVTCondition::m_maxEta = 2.5
private

Definition at line 37 of file JVTCondition.h.

◆ m_maxPt

double JVTCondition::m_maxPt = 60
private

Definition at line 38 of file JVTCondition.h.

◆ m_workingPoint

double JVTCondition::m_workingPoint
private

Definition at line 36 of file JVTCondition.h.

◆ s_capacity

const unsigned int JVTCondition::s_capacity {1}
staticprivate

Definition at line 40 of file JVTCondition.h.


The documentation for this class was generated from the following files:
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
test_pyathena.pt
pt
Definition: test_pyathena.py:11
JVTCondition::m_maxPt
double m_maxPt
Definition: JVTCondition.h:38
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
JVTCondition::s_capacity
static const unsigned int s_capacity
Definition: JVTCondition.h:40
JVTCondition::m_maxEta
double m_maxEta
Definition: JVTCondition.h:37
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
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
JVTCondition::m_workingPoint
double m_workingPoint
Definition: JVTCondition.h:36