CMS 3D CMS Logo

MuonTemplate.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::CondMuon, cType) {
39  int nObjects = nrObjects();
40 
41  if (nObjects > 0) {
42  m_objectParameter.reserve(nObjects);
43 
44  m_objectType.reserve(nObjects);
45  m_objectType.assign(nObjects, l1t::gtMu);
46  }
47 }
48 
49 // copy constructor
51 
52 // destructor
54  // empty now
55 }
56 
57 // assign operator
59  copy(cp);
60  return *this;
61 }
62 
63 // setConditionParameter - set the parameters of the condition
64 void MuonTemplate::setConditionParameter(const std::vector<ObjectParameter>& objParameter,
65  const CorrelationParameter& corrParameter) {
66  m_objectParameter = objParameter;
67  m_correlationParameter = corrParameter;
68 }
69 
70 void MuonTemplate::print(std::ostream& myCout) const {
71  myCout << "\n MuonTemplate print..." << std::endl;
72 
73  GlobalCondition::print(myCout);
74 
75  int nObjects = nrObjects();
76 
77  for (int i = 0; i < nObjects; i++) {
78  myCout << std::endl;
79  myCout << " Template for object " << i << " [ hex ]" << std::endl;
80  myCout << " ptHighThreshold = " << std::hex << m_objectParameter[i].ptHighThreshold << std::endl;
81  myCout << " ptLowThreshold = " << std::hex << m_objectParameter[i].ptLowThreshold << std::endl;
82  myCout << " indexHigh = " << std::hex << m_objectParameter[i].indexHigh << std::endl;
83  myCout << " indexLow = " << std::hex << m_objectParameter[i].indexLow << 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 << " charge =" << std::dec << m_objectParameter[i].charge << std::endl;
88  myCout << " qualityLUT = " << std::hex << m_objectParameter[i].qualityLUT << std::endl;
89  myCout << " isolationLUT = " << std::hex << m_objectParameter[i].isolationLUT << std::endl;
90  // myCout << " etaRange = "
91  // << std::hex << m_objectParameter[i].etaRange << std::endl;
92  // myCout << " phiHigh = "
93  // << std::hex << m_objectParameter[i].phiHigh << std::endl;
94  // myCout << " phiLow = "
95  // << std::hex << m_objectParameter[i].phiLow << std::endl;
96  myCout << " phiWindow1Lower =" << std::hex << m_objectParameter[i].phiWindow1Lower << std::endl;
97  myCout << " phiWindow1Upper =" << std::hex << m_objectParameter[i].phiWindow1Upper << std::endl;
98  myCout << " phiWindow2Lower =" << std::hex << m_objectParameter[i].phiWindow2Lower << std::endl;
99  myCout << " phiWindow2Upper =" << std::hex << m_objectParameter[i].phiWindow2Upper << std::endl;
100  myCout << " etaWindow1Lower =" << std::hex << m_objectParameter[i].etaWindow1Lower << std::endl;
101  myCout << " etaWindow1Upper =" << std::hex << m_objectParameter[i].etaWindow1Upper << std::endl;
102  myCout << " etaWindow2Lower =" << std::hex << m_objectParameter[i].etaWindow2Lower << std::endl;
103  myCout << " etaWindow2Upper =" << std::hex << m_objectParameter[i].etaWindow2Upper << std::endl;
104  }
105 
106  if (wsc()) {
107  myCout << " Correlation parameters "
108  << "[ hex ]" << std::endl;
109 
110  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
111 
112  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
113  myCout << " deltaPhiRange1Word = " << std::hex << m_correlationParameter.deltaPhiRange1Word << std::endl;
114  myCout << " deltaPhiRange0Word = " << std::hex << m_correlationParameter.deltaPhiRange0Word << std::endl;
115  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
116  } else {
117  if (m_condType == l1t::Type1s) {
118  myCout << " Correlation parameters "
119  << "[ hex ]" << std::endl;
120 
121  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << " (charge sign) "
122  << std::endl;
123 
124  } else {
125  myCout << "\n Correlation parameters "
126  << "[ hex ]" << std::endl;
127 
128  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
129  }
130  }
131 
132  // reset to decimal output
133  myCout << std::dec << std::endl;
134 }
135 
137  m_condName = cp.condName();
138  m_condCategory = cp.condCategory();
139  m_condType = cp.condType();
140  m_objectType = cp.objectType();
141  m_condGEq = cp.condGEq();
142  m_condChipNr = cp.condChipNr();
143  m_condRelativeBx = cp.condRelativeBx();
144 
145  m_objectParameter = *(cp.objectParameter());
146  m_correlationParameter = *(cp.correlationParameter());
147 }
148 
149 // output stream operator
150 std::ostream& operator<<(std::ostream& os, const MuonTemplate& result) {
151  result.print(os);
152  return os;
153 }
MuonTemplate::~MuonTemplate
~MuonTemplate() override
Definition: MuonTemplate.cc:53
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:64
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:156
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:136
MuonTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: MuonTemplate.cc:70
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:122
MuonTemplate::MuonTemplate
MuonTemplate()
Definition: MuonTemplate.cc:33
MuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:94
operator<<
std::ostream & operator<<(std::ostream &os, const MuonTemplate &result)
Definition: MuonTemplate.cc:150
MuonTemplate.h
l1t::GtConditionType
GtConditionType
Definition: GlobalDefinitions.h:48
MuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: MuonTemplate.h:101
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:137
MuonTemplate
Definition: MuonTemplate.h:33
GlobalCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GlobalCondition.h:119
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:107
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:113
l1t::gtMu
Definition: GlobalObject.h:17
l1t
delete x;
Definition: CaloConfig.h:22
l1t::Type1s
Definition: GlobalDefinitions.h:50
GlobalCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: GlobalCondition.h:116
GlobalCondition::m_condName
std::string m_condName
the name of the condition
Definition: GlobalCondition.h:104
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:110
GlobalCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: GlobalCondition.cc:64
MuonTemplate::operator=
MuonTemplate & operator=(const MuonTemplate &)
Definition: MuonTemplate.cc:58
MuonTemplate::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:95
l1t::CondMuon
Definition: GlobalDefinitions.h:94
MuonTemplate::CorrelationParameter
Definition: MuonTemplate.h:90
mps_fire.result
result
Definition: mps_fire.py:311
GlobalCondition
Definition: GlobalCondition.h:33
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143