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 }
CaloTemplate
Definition: CaloTemplate.h:33
mps_fire.i
i
Definition: mps_fire.py:428
CaloTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: CaloTemplate.cc:63
CaloTemplate::operator=
CaloTemplate & operator=(const CaloTemplate &)
Definition: CaloTemplate.cc:57
GlobalCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalCondition.cc:166
CaloTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: CaloTemplate.cc:69
operator<<
std::ostream & operator<<(std::ostream &os, const CaloTemplate &result)
Definition: CaloTemplate.cc:116
hgcal_conditions::parameters
Definition: HGCConditions.h:86
CaloTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: CaloTemplate.h:79
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:126
l1t::CondCalo
Definition: GlobalDefinitions.h:96
l1t::GtConditionType
GtConditionType
Definition: GlobalDefinitions.h:49
CaloTemplate::CaloTemplate
CaloTemplate()
Definition: CaloTemplate.cc:33
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:138
CaloTemplate::CorrelationParameter::deltaPhiRange
unsigned long long deltaPhiRange
Definition: CaloTemplate.h:81
GlobalCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GlobalCondition.h:123
GlobalCondition::m_condCategory
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GlobalCondition.h:111
GlobalCondition::m_objectType
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
Definition: GlobalCondition.h:117
l1t
delete x;
Definition: CaloConfig.h:22
GlobalCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: GlobalCondition.h:120
CaloTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: CaloTemplate.h:113
CondCalo
Definition: L1GtDefinitions.h:29
GlobalCondition::m_condName
std::string m_condName
the name of the condition
Definition: GlobalCondition.h:108
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloTemplate.h
GlobalCondition::m_condType
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GlobalCondition.h:114
GlobalCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: GlobalCondition.cc:65
CaloTemplate::m_objectParameter
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: CaloTemplate.h:112
CaloTemplate::CorrelationParameter
typedef for correlation parameters
Definition: CaloTemplate.h:78
CaloTemplate::copy
void copy(const CaloTemplate &cp)
copy function for copy constructor and operator=
Definition: CaloTemplate.cc:102
mps_fire.result
result
Definition: mps_fire.py:311
GlobalCondition
Definition: GlobalCondition.h:34
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
CaloTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: CaloTemplate.h:82
CaloTemplate::~CaloTemplate
~CaloTemplate() override
Definition: CaloTemplate.cc:52