CMS 3D CMS Logo

CaloTemplate.cc
Go to the documentation of this file.
1 
18 // this class header
20 
21 // system include files
22 
23 #include <iostream>
24 #include <iomanip>
25 
26 // user include files
27 
28 // base class
29 
30 
31 // forward declarations
32 
33 // constructors
35  : GlobalCondition()
36 {
37 
39 
40 }
41 
43  : GlobalCondition(cName)
44 {
45 
47 
48 }
49 
51  : GlobalCondition(cName, l1t::CondCalo, cType)
52 {
53 
54  int nObjects = nrObjects();
55 
56  if (nObjects > 0) {
57  m_objectParameter.reserve(nObjects);
58 
59  m_objectType.reserve(nObjects);
60  }
61 
62 }
63 
64 // copy constructor
67 {
68  copy(cp);
69 }
70 
71 // destructor
73 {
74  // empty now
75 }
76 
77 // assign operator
79 {
80 
81  copy(cp);
82  return *this;
83 }
84 
85 
86 // setConditionParameter - set the parameters of the condition
88  const std::vector<ObjectParameter>& objParameter,
89  const CorrelationParameter& corrParameter)
90 {
91 
92  m_objectParameter = objParameter;
93  m_correlationParameter = corrParameter;
94 
95 }
96 
97 void CaloTemplate::print(std::ostream& myCout) const
98 {
99 
100  myCout << "\n CaloTemplate print..." << std::endl;
101 
102  GlobalCondition::print(myCout);
103 
104  int nObjects = nrObjects();
105 
106  for (int i = 0; i < nObjects; i++) {
107  myCout << std::endl;
108  myCout << " Template for object " << i << " [ hex ]" << std::endl;
109  myCout << " etThreshold = "
110  << std::hex << m_objectParameter[i].etLowThreshold << " " << m_objectParameter[i].etHighThreshold << std::endl;
111  myCout << " indexLow = "
112  << std::hex << m_objectParameter[i].indexLow << std::endl;
113  myCout << " indexHigh = "
114  << std::hex << m_objectParameter[i].indexHigh << std::endl;
115  myCout << " etaRange = "
116  << std::hex << m_objectParameter[i].etaRange << std::endl;
117  myCout << " phiRange = "
118  << std::hex << m_objectParameter[i].phiRange << std::endl;
119  myCout << " isolationLUT = "
120  << std::hex << m_objectParameter[i].isolationLUT << std::endl;
121  myCout << " qualityLUT = "
122  << std::hex << m_objectParameter[i].qualityLUT << std::endl;
123  }
124 
125  if ( wsc() ) {
126 
127  myCout << " Correlation parameters " << "[ hex ]" << std::endl;
128 
129  myCout << " deltaEtaRange = "
130  << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
131  myCout << " deltaPhiRange = "
132  << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
133  myCout << " deltaPhiMaxbits = "
134  << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
135  }
136 
137  // reset to decimal output
138  myCout << std::dec << std::endl;
139 }
140 
142 {
143 
144  m_condName = cp.condName();
146  m_condType = cp.condType();
147  m_objectType = cp.objectType();
148  m_condGEq = cp.condGEq();
149  m_condChipNr = cp.condChipNr();
151 
154 
155 }
156 
157 // output stream operator
158 std::ostream& operator<<(std::ostream& os, const CaloTemplate& result)
159 {
160  result.print(os);
161  return os;
162 
163 }
164 
165 
166 
const int nrObjects() const
get number of trigger objects
const std::vector< ObjectParameter > * objectParameter() const
Definition: CaloTemplate.h:102
CorrelationParameter m_correlationParameter
Definition: CaloTemplate.h:134
unsigned long long deltaEtaRange
Definition: CaloTemplate.h:86
bool m_condGEq
the operator used for the condition (>=, =): true for >=
unsigned long long deltaPhiRange
Definition: CaloTemplate.h:88
const bool wsc() const
const bool condGEq() const
get / set condition GEq flag
delete x;
Definition: CaloConfig.h:22
void print(std::ostream &myCout) const override
print the condition
Definition: CaloTemplate.cc:97
void copy(const CaloTemplate &cp)
copy function for copy constructor and operator=
const l1t::GtConditionCategory & condCategory() const
get / set the category of the condition
const l1t::GtConditionType & condType() const
get / set the type of the condition (1s, etc)
friend std::ostream & operator<<(std::ostream &, const CaloTemplate &)
output stream operator
const int & condRelativeBx() const
get / set the condition relative bx
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: CaloTemplate.h:133
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
CaloTemplate & operator=(const CaloTemplate &)
Definition: CaloTemplate.cc:78
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:87
std::string m_condName
the name of the condition
const int & condChipNr() const
get / set the condition-chip number the condition is located on
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
const std::string & condName() const
get / set condition name
virtual void print(std::ostream &myCout) const
print condition
typedef for correlation parameters
Definition: CaloTemplate.h:84
~CaloTemplate() override
Definition: CaloTemplate.cc:72
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
const CorrelationParameter * correlationParameter() const
Definition: CaloTemplate.h:107
l1t::GtConditionType m_condType
the type of the condition (1s, etc)