CMS 3D CMS Logo

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();
142  m_condCategory = cp.condCategory();
143  m_condType = cp.condType();
144  m_objectType = cp.objectType();
145  m_condGEq = cp.condGEq();
146  m_condChipNr = cp.condChipNr();
147  m_condRelativeBx = cp.condRelativeBx();
148 
149  m_objectParameter = *(cp.objectParameter());
150  m_correlationParameter = *(cp.correlationParameter());
151 }
152 
153 // output stream operator
154 std::ostream& operator<<(std::ostream& os, const MuonTemplate& result) {
155  result.print(os);
156  return os;
157 }
MuonTemplate::~MuonTemplate
~MuonTemplate() override
Definition: MuonTemplate.cc:54
mps_fire.i
i
Definition: mps_fire.py:428
MuonTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: MuonTemplate.cc:65
MuonTemplate::m_objectParameter
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:131
GlobalCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalCondition.cc:166
MuonTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:132
CondMuon
Definition: L1GtDefinitions.h:28
MuonTemplate::copy
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=
Definition: MuonTemplate.cc:140
MuonTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: MuonTemplate.cc:71
hgcal_conditions::parameters
Definition: HGCConditions.h:86
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:126
MuonTemplate::MuonTemplate
MuonTemplate()
Definition: MuonTemplate.cc:34
MuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:94
operator<<
std::ostream & operator<<(std::ostream &os, const MuonTemplate &result)
Definition: MuonTemplate.cc:154
MuonTemplate.h
l1t::GtConditionType
GtConditionType
Definition: GlobalDefinitions.h:49
MuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: MuonTemplate.h:101
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:138
MuonTemplate
Definition: MuonTemplate.h:33
GlobalCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GlobalCondition.h:123
MuonTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: MuonTemplate.h:98
GlobalCondition::m_condCategory
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GlobalCondition.h:111
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GlobalCondition::m_objectType
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
Definition: GlobalCondition.h:117
l1t::gtMu
Definition: GlobalObject.h:17
l1t
delete x;
Definition: CaloConfig.h:22
l1t::Type1s
Definition: GlobalDefinitions.h:51
GlobalCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: GlobalCondition.h:120
GlobalCondition::m_condName
std::string m_condName
the name of the condition
Definition: GlobalCondition.h:108
MuonTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: MuonTemplate.h:91
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
MuonTemplate::operator=
MuonTemplate & operator=(const MuonTemplate &)
Definition: MuonTemplate.cc:59
MuonTemplate::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:95
l1t::CondMuon
Definition: GlobalDefinitions.h:95
MuonTemplate::CorrelationParameter
Definition: MuonTemplate.h:90
mps_fire.result
result
Definition: mps_fire.py:311
GlobalCondition
Definition: GlobalCondition.h:34
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143