ATLAS Offline Software
ClusterThresholdValue.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 #include <iostream>
9 
10 using namespace std;
11 
14  m_EmIsolation(0),
15  m_HadIsolation(0),
16  m_HadVeto(0),
17  m_IsolationMask(0),
18  m_HadIsolationMask(0),
19  m_useIsolationMask(false)
20 {}
21 
24  return new ClusterThresholdValue(*this);
25 }
26 
27 int
29 
30  int count = static_cast<int>(m_EmIsolation * caloInfo().globalEmScale() );
31 
32  if (count > fgCaloIsolationOff) {
33  count = fgCaloIsolationOff;
34  }
35 
36  return count;
37 }
38 
39 int
41  int count = static_cast<int>(m_HadIsolation * caloInfo().globalEmScale() );
42  if (count > fgCaloIsolationOff) {
43  count = fgCaloIsolationOff;
44  }
45  return count;
46 }
47 
48 int
50  int count = static_cast<int>(m_HadVeto * caloInfo().globalEmScale() );
51  if (count > fgCaloIsolationOff) {
52  count = fgCaloIsolationOff;
53  }
54  return count;
55 }
56 
57 int
59 
60  int count = static_cast<int>(m_Ptcut * caloInfo().globalEmScale());
61 
62  if (count > fgCaloClusterOff) {
63  count = fgCaloClusterOff;
64  }
65 
66  return count;
67 }
68 
69 void
70 TrigConf::ClusterThresholdValue::print(const std::string& indent, unsigned int /*detail*/) const {
71  cout << indent << "-----------------------" << endl;
72  cout << indent << "ClusterThresholdValue: " << endl;
73  printNameIdV(indent);
74  cout << indent << "\t Priority: " << m_Priority << endl;
75  cout << indent << "\t Type: " << m_Type << endl;
76  cout << indent << "\t ptcut: " << m_Ptcut
77  << " count=" << thresholdValueCount() << endl;
78  cout << indent << "\t em_isolation: " << m_EmIsolation
79  << " count=" << emIsolationCount() << endl;
80  cout << indent << "\t had_isolation: " << m_HadIsolation
81  << " count=" << hadIsolationCount() << endl;
82  cout << indent << "\t had_veto: " << m_HadVeto
83  << " count=" << hadVetoCount() << endl;
84  cout << indent << "\t iso mask: " << m_IsolationMask << endl;
85  cout << indent << "\t phi_min: " << m_PhiMin << endl;
86  cout << indent << "\t phi_max: " << m_PhiMax << endl;
87  cout << indent << "\t eta_min: " << m_EtaMin << endl;
88  cout << indent << "\t eta_max: " << m_EtaMax << endl;
89 }
90 
91 void
92 TrigConf::ClusterThresholdValue::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
93  indent(xmlfile, indentLevel, indentWidth)
94  << "<TriggerThresholdValue"
95  << " em_isolation=\"" << m_EmIsolation << "\""
96  << " etamin=\"" << m_EtaMin << "\""
97  << " etamax=\"" << m_EtaMax << "\""
98  << " had_isolation=\"" << m_HadIsolation << "\""
99  << " had_veto=\"" << m_HadVeto << "\"";
100  if(useIsolationMask()) {
101  xmlfile << " isobits=\"" << TrigConf::uint2bin(m_IsolationMask, 5) << "\"";
102  }
103  xmlfile << " name=\"" << name() << "\""
104  << " phimin=\"" << m_PhiMin << "\""
105  << " phimax=\"" << m_PhiMax << "\""
106  << " priority=\"" << m_Priority << "\""
107  << " thresholdval=\"" << m_Ptcut << "\""
108  << " type=\"" << m_Type << "\""
109  << " window=\"0\"/>"
110  << endl;
111 }
112 
TrigConf::TriggerThresholdValue
Definition: TriggerThresholdValue.h:22
TrigConf::ClusterThresholdValue::thresholdValueCount
virtual int thresholdValueCount() const override
Definition: ClusterThresholdValue.cxx:58
TrigConf::ClusterThresholdValue::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition: ClusterThresholdValue.cxx:70
TrigConf::ClusterThresholdValue
Definition: ClusterThresholdValue.h:13
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
HelperFunctions.h
TrigConf::ClusterThresholdValue::ClusterThresholdValue
ClusterThresholdValue()
Definition: ClusterThresholdValue.cxx:12
TrigConf::ClusterThresholdValue::createCopy
virtual TriggerThresholdValue * createCopy() const override
Definition: ClusterThresholdValue.cxx:23
TrigConf::ClusterThresholdValue::emIsolationCount
int emIsolationCount() const
Definition: ClusterThresholdValue.cxx:28
geometry_dat_to_json.indent
indent
Definition: geometry_dat_to_json.py:36
CaloInfo.h
TrigConf::uint2bin
std::string uint2bin(uint32_t uinteger, uint16_t width)
Definition: Trigger/TrigConfiguration/TrigConfL1Data/Root/HelperFunctions.cxx:332
TrigConf::ClusterThresholdValue::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const override
Definition: ClusterThresholdValue.cxx:92
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigConf::ClusterThresholdValue::hadIsolationCount
int hadIsolationCount() const
Definition: ClusterThresholdValue.cxx:40
ClusterThresholdValue.h
TrigConf::ClusterThresholdValue::hadVetoCount
int hadVetoCount() const
Definition: ClusterThresholdValue.cxx:49