CMS 3D CMS Logo

L1GtMuonTemplate.cc
Go to the documentation of this file.
1 
17 // this class header
19 
20 // system include files
21 
22 #include <iostream>
23 #include <iomanip>
24 
25 // user include files
26 
27 // base class
28 
31 
32 // forward declarations
33 
34 // constructors
36 
38 
40  : L1GtCondition(cName, CondMuon, cType) {
41  int nObjects = nrObjects();
42 
43  if (nObjects > 0) {
44  m_objectParameter.reserve(nObjects);
45 
46  m_objectType.reserve(nObjects);
47  m_objectType.assign(nObjects, Mu);
48  }
49 }
50 
51 // copy constructor
53 
54 // destructor
56  // empty now
57 }
58 
59 // assign operator
61  copy(cp);
62  return *this;
63 }
64 
65 // setConditionParameter - set the parameters of the condition
66 void L1GtMuonTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
67  const CorrelationParameter& corrParameter) {
68  m_objectParameter = objParameter;
69  m_correlationParameter = corrParameter;
70 }
71 
72 void L1GtMuonTemplate::print(std::ostream& myCout) const {
73  myCout << "\n L1GtMuonTemplate print..." << std::endl;
74 
75  L1GtCondition::print(myCout);
76 
77  int nObjects = nrObjects();
78 
79  for (int i = 0; i < nObjects; i++) {
80  myCout << std::endl;
81  myCout << " Template for object " << i << " [ hex ]" << std::endl;
82  myCout << " ptHighThreshold = " << std::hex << m_objectParameter[i].ptHighThreshold << std::endl;
83  myCout << " ptLowThreshold = " << std::hex << m_objectParameter[i].ptLowThreshold << std::endl;
84  myCout << " enableMip = " << std::hex << m_objectParameter[i].enableMip << std::endl;
85  myCout << " enableIso = " << std::hex << m_objectParameter[i].enableIso << std::endl;
86  myCout << " requestIso = " << std::hex << m_objectParameter[i].requestIso << std::endl;
87  myCout << " qualityRange = " << std::hex << m_objectParameter[i].qualityRange << std::endl;
88  myCout << " etaRange = " << std::hex << m_objectParameter[i].etaRange << std::endl;
89  myCout << " phiHigh = " << std::hex << m_objectParameter[i].phiHigh << std::endl;
90  myCout << " phiLow = " << std::hex << m_objectParameter[i].phiLow << std::endl;
91  }
92 
93  if (wsc()) {
94  myCout << " Correlation parameters "
95  << "[ hex ]" << std::endl;
96 
97  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
98 
99  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
100  myCout << " deltaPhiRange1Word = " << std::hex << m_correlationParameter.deltaPhiRange1Word << std::endl;
101  myCout << " deltaPhiRange0Word = " << std::hex << m_correlationParameter.deltaPhiRange0Word << std::endl;
102  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
103  } else {
104  if (m_condType == Type1s) {
105  myCout << " Correlation parameters "
106  << "[ hex ]" << std::endl;
107 
108  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << " (charge sign) "
109  << std::endl;
110 
111  } else {
112  myCout << "\n Correlation parameters "
113  << "[ hex ]" << std::endl;
114 
115  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
116  }
117  }
118 
119  // reset to decimal output
120  myCout << std::dec << std::endl;
121 }
122 
124  m_condName = cp.condName();
125  m_condCategory = cp.condCategory();
126  m_condType = cp.condType();
127  m_objectType = cp.objectType();
128  m_condGEq = cp.condGEq();
129  m_condChipNr = cp.condChipNr();
130 
131  m_objectParameter = *(cp.objectParameter());
132  m_correlationParameter = *(cp.correlationParameter());
133 }
134 
135 // output stream operator
136 std::ostream& operator<<(std::ostream& os, const L1GtMuonTemplate& result) {
137  result.print(os);
138  return os;
139 }
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
L1GtConditionType
Definition: L1GtObject.h:29
std::vector< L1GtObject > m_objectType
the trigger object type(s)
~L1GtMuonTemplate() override
L1GtConditionType m_condType
the type of the condition (1s, etc)
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
L1GtConditionCategory m_condCategory
the category of the condition
L1GtMuonTemplate & operator=(const L1GtMuonTemplate &)
std::string m_condName
the name of the condition
CorrelationParameter m_correlationParameter
void print(std::ostream &myCout) const override
print the condition
const bool wsc() const
void copy(const L1GtMuonTemplate &cp)
copy function for copy constructor and operator=
bool m_condGEq
the operator used for the condition (>=, =): true for >=
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr
std::ostream & operator<<(std::ostream &os, const L1GtMuonTemplate &result)
virtual void print(std::ostream &myCout) const
print condition