ATLAS Offline Software
TriggerThresholdValue.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
8 
9 #include <iostream>
10 
11 using namespace std;
12 using namespace TrigConf;
13 
14 // Internal variable (thread-safe, because set during initialize)
15 static TrigConf::CaloInfo fgCaloInfo ATLAS_THREAD_SAFE;
16 static const TrigConf::CaloInfo* fgCaloInfoPointer ATLAS_THREAD_SAFE = 0;
17 
18 const int TriggerThresholdValue::fgCaloClusterOff = 0xff; // 255
19 const int TriggerThresholdValue::fgCaloJetOff = 0x3ff; // 1023
20 const int TriggerThresholdValue::fgCaloEtSumOff = 0x7fff; // 16383
21 const int TriggerThresholdValue::fgCaloEtMissOff = 0x7fff; // 2895
22 const int TriggerThresholdValue::fgCaloJetEtOff = 0x33e6; // 13286
23 const int TriggerThresholdValue::fgCaloIsolationOff = 0x3f; // 63
24 
25 
26 
27 // Static stuffs
28 void
29 TriggerThresholdValue::setCaloInfo(const CaloInfo& ci) {
30  fgCaloInfo = ci;
31  fgCaloInfoPointer = &fgCaloInfo;
32 }
33 
34 const CaloInfo &
35 TriggerThresholdValue::caloInfo() const {
36  return fgCaloInfo;
37 }
38 
39 
40 float
42  if (fgCaloInfoPointer)
43  return fgCaloInfoPointer->globalScale();
44  return 1.0;
45 }
46 
47 float
49  float x = caloGlobalScaleCountToGeV();
50  if (x == 0)
51  return 1.0;
52  else
53  return 1.0/x;
54 }
55 
56 float
58  return caloGlobalScale();
59 }
60 
61 // constructors
63  : L1DataBaseclass()
64  , m_Type("")
65  , m_Ptcut(0.0)
66  , m_Priority(0.0)
67  , m_Window(0)
68  , m_WindowSize( JetWindowSize::NONE )
69  , m_PhiMin(0)
70  , m_PhiMax(64)
71  , m_EtaMin(-49)
72  , m_EtaMax(49)
73 {}
74 
75 int
77  return (int) ptcut(); // overriden in Cluster/JetThresholdValue
78 }
79 
80 bool
82  return ( eta >= etamin() && eta <= etamax() &&
83  phi >= phimin() && phi <= phimax());
84 }
85 
86 void
87 TrigConf::TriggerThresholdValue::print(const std::string& indent, unsigned int /*detail*/) const {
88  cout << indent << "-----------------------" << endl;
89  cout << indent << "TriggerThresholdValue: " << endl;
90  cout << indent << "\t id: " << id() << endl;
91  cout << indent << "\t Name: " << name() << endl;
92  cout << indent << "\t Version: " << version() << endl;
93  cout << indent << "\t Priority: " << m_Priority << endl;
94  cout << indent << "\t Type: " << m_Type << endl;
95  cout << indent << "\t ptcut: " << m_Ptcut << endl;
96 }
97 
98 void
99 TrigConf::TriggerThresholdValue::writeXML(std::ostream & xmlfile, int indentLevel, int indentWidth) const {
100  indent(xmlfile, indentLevel, indentWidth)
101  << "<TriggerThresholdValue " << m_Type << " NOT IMPLEMENTED/>"
102  << endl;
103 }
104 
105 
NONE
@ NONE
Definition: sTGCenumeration.h:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
TrigConf::TriggerThresholdValue::caloGlobalScaleCountToGeV
static float caloGlobalScaleCountToGeV()
Definition: TriggerThresholdValue.cxx:57
TrigConf::TriggerThresholdValue::caloGlobalScaleGeVToCount
static float caloGlobalScaleGeVToCount()
Definition: TriggerThresholdValue.cxx:48
TrigConf::TriggerThresholdValue::caloGlobalScale
static float caloGlobalScale()
Definition: TriggerThresholdValue.cxx:41
x
#define x
Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.ptcut
float ptcut
Definition: Pythia8_A14_NNPDF23LO_forMGHT_EvtGen.py:9
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::CaloInfo
Definition: CaloInfo.h:35
CaloInfo.h
TriggerThresholdValue.h
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
get_generator_info.version
version
Definition: get_generator_info.py:33
TrigConf::TriggerThresholdValue::contains
bool contains(float eta, float phi) const
Definition: TriggerThresholdValue.cxx:81
TrigConf::TriggerThresholdValue::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override=0
Definition: TriggerThresholdValue.cxx:87
TrigConf::L1DataBaseclass
Definition: L1DataBaseclass.h:22
TrigConf::TriggerThresholdValue::TriggerThresholdValue
TriggerThresholdValue()
Definition: TriggerThresholdValue.cxx:62
TrigConf::TriggerThresholdValue::thresholdValueCount
virtual int thresholdValueCount() const
Definition: TriggerThresholdValue.cxx:76
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
LArCellBinning.etamin
etamin
Definition: LArCellBinning.py:137
checker_macros.h
Define macros for attributes used to control the static checker.
TrigConf::TriggerThresholdValue::writeXML
virtual void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition: TriggerThresholdValue.cxx:99