CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonTemplate.cc
Go to the documentation of this file.
1 
19 // this class header
21 
22 // system include files
23 
24 #include <iostream>
25 #include <iomanip>
26 
27 // user include files
28 
29 // base class
30 
31 // forward declarations
32 
33 // constructors
35 
37 
39  : GlobalCondition(cName, l1t::CondMuon, cType) {
40  int nObjects = nrObjects();
41 
42  if (nObjects > 0) {
43  m_objectParameter.reserve(nObjects);
44 
45  m_objectType.reserve(nObjects);
46  m_objectType.assign(nObjects, l1t::gtMu);
47  }
48 }
49 
50 // copy constructor
52 
53 // destructor
55  // empty now
56 }
57 
58 // assign operator
60  copy(cp);
61  return *this;
62 }
63 
64 // setConditionParameter - set the parameters of the condition
65 void MuonTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
66  const CorrelationParameter& corrParameter) {
67  m_objectParameter = objParameter;
68  m_correlationParameter = corrParameter;
69 }
70 
71 void MuonTemplate::print(std::ostream& myCout) const {
72  myCout << "\n MuonTemplate print..." << std::endl;
73 
74  GlobalCondition::print(myCout);
75 
76  int nObjects = nrObjects();
77 
78  for (int i = 0; i < nObjects; i++) {
79  myCout << std::endl;
80  myCout << " Template for object " << i << " [ hex ]" << std::endl;
81  myCout << " ptHighThreshold = " << std::hex << m_objectParameter[i].ptHighThreshold << std::endl;
82  myCout << " ptLowThreshold = " << std::hex << m_objectParameter[i].ptLowThreshold << std::endl;
83  myCout << " uptHighCut = " << std::hex << m_objectParameter[i].unconstrainedPtHigh << std::endl;
84  myCout << " uptLowCut = " << std::hex << m_objectParameter[i].unconstrainedPtLow << std::endl;
85  myCout << " indexHigh = " << std::hex << m_objectParameter[i].indexHigh << std::endl;
86  myCout << " indexLow = " << std::hex << m_objectParameter[i].indexLow << std::endl;
87  myCout << " enableMip = " << std::hex << m_objectParameter[i].enableMip << std::endl;
88  myCout << " enableIso = " << std::hex << m_objectParameter[i].enableIso << std::endl;
89  myCout << " requestIso = " << std::hex << m_objectParameter[i].requestIso << std::endl;
90  myCout << " charge =" << std::dec << m_objectParameter[i].charge << std::endl;
91  myCout << " qualityLUT = " << std::hex << m_objectParameter[i].qualityLUT << std::endl;
92  myCout << " isolationLUT = " << std::hex << m_objectParameter[i].isolationLUT << std::endl;
93  myCout << " impactParameterLUT= " << std::hex << m_objectParameter[i].impactParameterLUT << std::endl;
94  // myCout << " etaRange = "
95  // << std::hex << m_objectParameter[i].etaRange << std::endl;
96  // myCout << " phiHigh = "
97  // << std::hex << m_objectParameter[i].phiHigh << std::endl;
98  // myCout << " phiLow = "
99  // << std::hex << m_objectParameter[i].phiLow << std::endl;
100  myCout << " phiWindow1Lower =" << std::hex << m_objectParameter[i].phiWindow1Lower << std::endl;
101  myCout << " phiWindow1Upper =" << std::hex << m_objectParameter[i].phiWindow1Upper << std::endl;
102  myCout << " phiWindow2Lower =" << std::hex << m_objectParameter[i].phiWindow2Lower << std::endl;
103  myCout << " phiWindow2Upper =" << std::hex << m_objectParameter[i].phiWindow2Upper << std::endl;
104  myCout << " etaWindow1Lower =" << std::hex << m_objectParameter[i].etaWindow1Lower << std::endl;
105  myCout << " etaWindow1Upper =" << std::hex << m_objectParameter[i].etaWindow1Upper << std::endl;
106  myCout << " etaWindow2Lower =" << std::hex << m_objectParameter[i].etaWindow2Lower << std::endl;
107  myCout << " etaWindow2Upper =" << std::hex << m_objectParameter[i].etaWindow2Upper << std::endl;
108  }
109 
110  if (wsc()) {
111  myCout << " Correlation parameters "
112  << "[ hex ]" << std::endl;
113 
114  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
115 
116  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
117  myCout << " deltaPhiRange1Word = " << std::hex << m_correlationParameter.deltaPhiRange1Word << std::endl;
118  myCout << " deltaPhiRange0Word = " << std::hex << m_correlationParameter.deltaPhiRange0Word << std::endl;
119  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
120  } else {
121  if (m_condType == l1t::Type1s) {
122  myCout << " Correlation parameters "
123  << "[ hex ]" << std::endl;
124 
125  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << " (charge sign) "
126  << std::endl;
127 
128  } else {
129  myCout << "\n Correlation parameters "
130  << "[ hex ]" << std::endl;
131 
132  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
133  }
134  }
135 
136  // reset to decimal output
137  myCout << std::dec << std::endl;
138 }
139 
141  m_condName = cp.condName();
143  m_condType = cp.condType();
144  m_objectType = cp.objectType();
145  m_condGEq = cp.condGEq();
146  m_condChipNr = cp.condChipNr();
148 
151 }
152 
153 // output stream operator
154 std::ostream& operator<<(std::ostream& os, const MuonTemplate& result) {
155  result.print(os);
156  return os;
157 }
const int nrObjects() const
get number of trigger objects
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=
MuonTemplate & operator=(const MuonTemplate &)
Definition: MuonTemplate.cc:59
bool m_condGEq
the operator used for the condition (&gt;=, =): true for &gt;=
const bool wsc() const
const bool condGEq() const
get / set condition GEq flag
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
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)
tuple result
Definition: mps_fire.py:311
void print(std::ostream &myCout) const override
print the condition
Definition: MuonTemplate.cc:71
const int & condRelativeBx() const
get / set the condition relative bx
const std::vector< ObjectParameter > * objectParameter() const
Definition: MuonTemplate.h:111
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:131
std::string m_condName
the name of the condition
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:94
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
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:95
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: MuonTemplate.cc:65
unsigned long long deltaEtaRange
Definition: MuonTemplate.h:98
const CorrelationParameter * correlationParameter() const
Definition: MuonTemplate.h:113
~MuonTemplate() override
Definition: MuonTemplate.cc:54
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:132
l1t::GtConditionType m_condType
the type of the condition (1s, etc)