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 // forward declarations
31 
32 // constructors
34 
36 
38  : GlobalCondition(cName, l1t::CondCalo, cType) {
39  int nObjects = nrObjects();
40 
41  if (nObjects > 0) {
42  m_objectParameter.reserve(nObjects);
43 
44  m_objectType.reserve(nObjects);
45  }
46 }
47 
48 // copy constructor
50 
51 // destructor
53  // empty now
54 }
55 
56 // assign operator
58  copy(cp);
59  return *this;
60 }
61 
62 // setConditionParameter - set the parameters of the condition
63 void CaloTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
64  const CorrelationParameter& corrParameter) {
65  m_objectParameter = objParameter;
66  m_correlationParameter = corrParameter;
67 }
68 
69 void CaloTemplate::print(std::ostream& myCout) const {
70  myCout << "\n CaloTemplate print..." << std::endl;
71 
72  GlobalCondition::print(myCout);
73 
74  int nObjects = nrObjects();
75 
76  for (int i = 0; i < nObjects; i++) {
77  myCout << std::endl;
78  myCout << " Template for object " << i << " [ hex ]" << std::endl;
79  myCout << " etThreshold = " << std::hex << m_objectParameter[i].etLowThreshold << " "
80  << m_objectParameter[i].etHighThreshold << std::endl;
81  myCout << " indexLow = " << std::hex << m_objectParameter[i].indexLow << std::endl;
82  myCout << " indexHigh = " << std::hex << m_objectParameter[i].indexHigh << std::endl;
83  myCout << " etaRange = " << std::hex << m_objectParameter[i].etaRange << std::endl;
84  myCout << " phiRange = " << std::hex << m_objectParameter[i].phiRange << std::endl;
85  myCout << " isolationLUT = " << std::hex << m_objectParameter[i].isolationLUT << std::endl;
86  myCout << " qualityLUT = " << std::hex << m_objectParameter[i].qualityLUT << std::endl;
87  }
88 
89  if (wsc()) {
90  myCout << " Correlation parameters "
91  << "[ hex ]" << std::endl;
92 
93  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
94  myCout << " deltaPhiRange = " << std::hex << m_correlationParameter.deltaPhiRange << std::endl;
95  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
96  }
97 
98  // reset to decimal output
99  myCout << std::dec << std::endl;
100 }
101 
103  m_condName = cp.condName();
104  m_condCategory = cp.condCategory();
105  m_condType = cp.condType();
106  m_objectType = cp.objectType();
107  m_condGEq = cp.condGEq();
108  m_condChipNr = cp.condChipNr();
109  m_condRelativeBx = cp.condRelativeBx();
110 
111  m_objectParameter = *(cp.objectParameter());
112  m_correlationParameter = *(cp.correlationParameter());
113 }
114 
115 // output stream operator
116 std::ostream& operator<<(std::ostream& os, const CaloTemplate& result) {
117  result.print(os);
118  return os;
119 }
const bool wsc() const
CorrelationParameter m_correlationParameter
Definition: CaloTemplate.h:120
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
delete x;
Definition: CaloConfig.h:22
void copy(const CaloTemplate &cp)
copy function for copy constructor and operator=
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: CaloTemplate.h:119
std::ostream & operator<<(std::ostream &os, const CaloTemplate &result)
CaloTemplate & operator=(const CaloTemplate &)
Definition: CaloTemplate.cc:57
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:63
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
void print(std::ostream &myCout) const override
print the condition
Definition: CaloTemplate.cc:69
typedef for correlation parameters
Definition: CaloTemplate.h:85
~CaloTemplate() override
Definition: CaloTemplate.cc:52
const int nrObjects() const
get number of trigger objects
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
virtual void print(std::ostream &myCout) const
print condition