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 }
L1GtMuonTemplate::operator=
L1GtMuonTemplate & operator=(const L1GtMuonTemplate &)
Definition: L1GtMuonTemplate.cc:60
L1GtCondition
Definition: L1GtCondition.h:35
L1GtCondition::m_condCategory
L1GtConditionCategory m_condCategory
the category of the condition
Definition: L1GtCondition.h:104
L1GtCondition::m_condType
L1GtConditionType m_condType
the type of the condition (1s, etc)
Definition: L1GtCondition.h:107
mps_fire.i
i
Definition: mps_fire.py:428
L1GtMuonTemplate::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: L1GtMuonTemplate.h:78
L1GtCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: L1GtCondition.h:113
L1GtCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: L1GtCondition.cc:62
L1GtMuonTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: L1GtMuonTemplate.h:106
L1GlobalTriggerReadoutSetupFwd.h
L1GtMuonTemplate::L1GtMuonTemplate
L1GtMuonTemplate()
Definition: L1GtMuonTemplate.cc:35
CondMuon
Definition: L1GtDefinitions.h:28
L1GtMuonTemplate::print
void print(std::ostream &myCout) const override
print the condition
Definition: L1GtMuonTemplate.cc:72
L1GtCondition::wsc
const bool wsc() const
Definition: L1GtCondition.cc:114
operator<<
std::ostream & operator<<(std::ostream &os, const L1GtMuonTemplate &result)
Definition: L1GtMuonTemplate.cc:136
L1GtMuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: L1GtMuonTemplate.h:79
L1GtMuonTemplate::copy
void copy(const L1GtMuonTemplate &cp)
copy function for copy constructor and operator=
Definition: L1GtMuonTemplate.cc:123
L1GtMuonTemplate::CorrelationParameter
Definition: L1GtMuonTemplate.h:73
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1GtConditionType
L1GtConditionType
Definition: L1GtDefinitions.h:4
L1GtMuonTemplate.h
L1GtFwd.h
L1GtMuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: L1GtMuonTemplate.h:77
L1GtMuonTemplate::m_objectParameter
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: L1GtMuonTemplate.h:105
L1GtCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: L1GtCondition.h:116
L1GtMuonTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: L1GtMuonTemplate.h:74
Mu
Definition: L1GtObject.h:29
Type1s
Definition: L1GtDefinitions.h:6
L1GtCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: L1GtCondition.cc:133
L1GtMuonTemplate::CorrelationParameter::deltaEtaRange
unsigned long long deltaEtaRange
Definition: L1GtMuonTemplate.h:75
L1GtMuonTemplate::setConditionParameter
void setConditionParameter(const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
set functions
Definition: L1GtMuonTemplate.cc:66
L1GtCondition::m_objectType
std::vector< L1GtObject > m_objectType
the trigger object type(s)
Definition: L1GtCondition.h:110
mps_fire.result
result
Definition: mps_fire.py:311
L1GtMuonTemplate::~L1GtMuonTemplate
~L1GtMuonTemplate() override
Definition: L1GtMuonTemplate.cc:55
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
L1GtCondition::m_condName
std::string m_condName
the name of the condition
Definition: L1GtCondition.h:101
L1GtMuonTemplate
Definition: L1GtMuonTemplate.h:34