ATLAS Offline Software
JetThresholdValue.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include <iostream>
8 
9 using namespace std;
10 using namespace TrigConf;
11 
14 {}
15 
18  return new JetThresholdValue(*this);
19 }
20 
21 int
23  int count = static_cast<int>(m_Ptcut * caloInfo().globalJetScale() );
24  if (count > fgCaloJetOff) {
26  }
27  return count;
28 }
29 
33  return m_WindowSize;
34 
35  if (window() == caloInfo().jetWindowSizeLarge() ) {
36  return JetWindowSize::LARGE;
37  } else if (window() == caloInfo().jetWindowSizeSmall() ) {
38  return JetWindowSize::SMALL;
39  } else {
40  return JetWindowSize::UNDEF;
41  }
42 }
43 
44 std::string
47  if(ws == JetWindowSize::LARGE)
48  return "LARGE";
49  if(ws == JetWindowSize::SMALL)
50  return "SMALL";
51  if(ws == JetWindowSize::NONE)
52  return "NONE";
53  return "UNDEF";
54 }
55 
56 
57 
58 // prints the DBMucptiConfig object
59 void
60 TrigConf::JetThresholdValue::print(const std::string& indent, unsigned int /*detail*/) const {
61  cout << indent << "--------------------" << endl;
62  cout << indent << "JetThresholdValue: " << endl;
63  cout << indent << "\t id: " << id() << endl;
64  cout << indent << "\t Name: " << name() << endl;
65  cout << indent << "\t Version: " << version() << endl;
66  cout << indent << "\t Type: " << m_Type << endl;
67  cout << indent << "\t Priority: " << m_Priority << endl;
68  cout << indent << "\t ptcut: " << m_Ptcut
69  << " count=" << thresholdValueCount() << endl;
70  cout << indent << "\t window: " << m_Window << endl;
71  cout << indent << "\t phi_min: " << m_PhiMin << endl;
72  cout << indent << "\t phi_max: " << m_PhiMax << endl;
73  cout << indent << "\t eta_min: " << m_EtaMin << endl;
74  cout << indent << "\t eta_max: " << m_EtaMax << endl;
75 }
76 
77 void
78 TrigConf::JetThresholdValue::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
79  indent(xmlfile, indentLevel, indentWidth)
80  << "<TriggerThresholdValue"
81  << " em_isolation=\"63\""
82  << " etamin=\"" << m_EtaMin << "\""
83  << " etamax=\"" << m_EtaMax << "\""
84  << " had_isolation=\"63\""
85  << " had_veto=\"63\""
86  << " name=\"" << name() << "\""
87  << " phimin=\"" << m_PhiMin << "\""
88  << " phimax=\"" << m_PhiMax << "\""
89  << " priority=\"" << m_Priority << "\""
90  << " thresholdval=\"" << m_Ptcut << "\""
91  << " type=\"" << m_Type << "\""
92  << " window=\"" << m_Window << "\""
93  << " windowSize=\"" << windowSizeAsString() << "\"" << "/>"
94  << endl;
95 }
TrigConf::TriggerThresholdValue
Definition: TriggerThresholdValue.h:22
TrigConf::JetThresholdValue::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: JetThresholdValue.cxx:60
TrigConf::JetThresholdValue::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const override
Definition: JetThresholdValue.cxx:78
TrigConf::JetThresholdValue::windowSizeAsString
std::string windowSizeAsString() const
Definition: JetThresholdValue.cxx:45
TrigConf::JetWindowSize::Size
Size
Definition: TriggerThresholdValue.h:17
TrigConf::JetThresholdValue::windowSize
virtual JetWindowSize::Size windowSize() const override
Definition: JetThresholdValue.cxx:31
TrigConf::JetThresholdValue::JetThresholdValue
JetThresholdValue()
Definition: JetThresholdValue.cxx:12
TrigConf::JetWindowSize::UNDEF
@ UNDEF
Definition: TriggerThresholdValue.h:17
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
TrigConf::TriggerThresholdValue::m_WindowSize
JetWindowSize::Size m_WindowSize
Definition: TriggerThresholdValue.h:80
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:18
TrigConf::JetWindowSize::NONE
@ NONE
Definition: TriggerThresholdValue.h:17
TrigConf::JetThresholdValue::createCopy
virtual TriggerThresholdValue * createCopy() const override
Definition: JetThresholdValue.cxx:17
CaloInfo.h
TrigConf::TriggerThresholdValue::fgCaloJetOff
static const int fgCaloJetOff
Definition: TriggerThresholdValue.h:25
TrigConf::JetWindowSize::LARGE
@ LARGE
Definition: TriggerThresholdValue.h:17
JetThresholdValue.h
TrigConf::JetWindowSize::SMALL
@ SMALL
Definition: TriggerThresholdValue.h:17
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigConf::CaloInfo::globalJetScale
float globalJetScale() const
Definition: CaloInfo.h:44
get_generator_info.version
version
Definition: get_generator_info.py:33
TrigConf::JetThresholdValue
Definition: JetThresholdValue.h:12
TrigConf::TriggerThresholdValue::caloInfo
const CaloInfo & caloInfo() const
Definition: TriggerThresholdValue.cxx:35
TrigConf::JetThresholdValue::thresholdValueCount
virtual int thresholdValueCount() const override
Definition: JetThresholdValue.cxx:22
TrigConf::TriggerThresholdValue::m_Ptcut
float m_Ptcut
Definition: TriggerThresholdValue.h:77
TrigConf::TriggerThresholdValue::window
unsigned int window() const
Definition: TriggerThresholdValue.h:49