CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
MuonTemplate Class Reference

#include <MuonTemplate.h>

Inheritance diagram for MuonTemplate:
GlobalCondition

Classes

struct  CorrelationParameter
 
struct  ObjectParameter
 
struct  Window
 

Public Member Functions

const CorrelationParametercorrelationParameter () const
 
 MuonTemplate ()
 
 MuonTemplate (const std::string &)
 
 MuonTemplate (const std::string &, const l1t::GtConditionType &)
 
 MuonTemplate (const MuonTemplate &)
 
const std::vector< ObjectParameter > * objectParameter () const
 
MuonTemplateoperator= (const MuonTemplate &)
 
void print (std::ostream &myCout) const override
 print the condition More...
 
void setConditionParameter (const std::vector< ObjectParameter > &objParameter, const CorrelationParameter &corrParameter)
 set functions More...
 
 ~MuonTemplate () override
 
- Public Member Functions inherited from GlobalCondition
const l1t::GtConditionCategorycondCategory () const
 get / set the category of the condition More...
 
const int & condChipNr () const
 get / set the condition-chip number the condition is located on More...
 
const bool condGEq () const
 get / set condition GEq flag More...
 
const std::string & condName () const
 get / set condition name More...
 
const int & condRelativeBx () const
 get / set the condition relative bx More...
 
const l1t::GtConditionTypecondType () const
 get / set the type of the condition (1s, etc) More...
 
const bool corr () const
 
const bool corrThree () const
 get logic flag for three-body conditions, trigger objects are muons More...
 
 GlobalCondition ()
 
 GlobalCondition (const std::string &)
 constructor from condition name More...
 
 GlobalCondition (const std::string &, const l1t::GtConditionCategory &, const l1t::GtConditionType &)
 constructor from condition name, category and type More...
 
const int nrObjects () const
 get number of trigger objects More...
 
const std::vector< l1t::GlobalObject > & objectType () const
 get / set the trigger object type(s) in the condition More...
 
void setCondCategory (const l1t::GtConditionCategory &cCategory)
 
void setCondChipNr (const int &cChipNr)
 
void setCondGEq (const bool &cGEq)
 
void setCondName (const std::string &cName)
 
void setCondRelativeBx (const int &cRelativeBx)
 
void setCondType (const l1t::GtConditionType &cType)
 
void setObjectType (const std::vector< l1t::GlobalObject > &objType)
 
const bool wsc () const
 
virtual ~GlobalCondition ()
 destructor More...
 

Private Member Functions

void copy (const MuonTemplate &cp)
 copy function for copy constructor and operator= More...
 

Private Attributes

CorrelationParameter m_correlationParameter
 
std::vector< ObjectParameterm_objectParameter
 variables containing the parameters More...
 

Friends

std::ostream & operator<< (std::ostream &, const MuonTemplate &)
 output stream operator More...
 

Additional Inherited Members

- Protected Attributes inherited from GlobalCondition
l1t::GtConditionCategory m_condCategory
 the category of the condition More...
 
int m_condChipNr
 condition is located on condition chip m_condChipNr More...
 
bool m_condGEq = false
 the operator used for the condition (>=, =): true for >= More...
 
std::string m_condName
 the name of the condition More...
 
int m_condRelativeBx
 
l1t::GtConditionType m_condType
 the type of the condition (1s, etc) More...
 
std::vector< l1t::GlobalObjectm_objectType
 the trigger object type(s) More...
 

Detailed Description

Description: L1 Global Trigger muon template.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

features: Vladimir Rekovic

Description: L1 Global Trigger muon template.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna Vladimir Rekovic - extend for indexing Rick Cavanaugh - extend for displaced muons

$Date$ $Revision$

Definition at line 37 of file MuonTemplate.h.

Constructor & Destructor Documentation

◆ MuonTemplate() [1/4]

MuonTemplate::MuonTemplate ( )

Definition at line 34 of file MuonTemplate.cc.

References l1t::CondMuon, and GlobalCondition::m_condCategory.

l1t::GtConditionCategory m_condCategory
the category of the condition

◆ MuonTemplate() [2/4]

MuonTemplate::MuonTemplate ( const std::string &  cName)

Definition at line 36 of file MuonTemplate.cc.

References l1t::CondMuon, and GlobalCondition::m_condCategory.

l1t::GtConditionCategory m_condCategory
the category of the condition

◆ MuonTemplate() [3/4]

MuonTemplate::MuonTemplate ( const std::string &  cName,
const l1t::GtConditionType cType 
)

Definition at line 38 of file MuonTemplate.cc.

References l1t::gtMu, m_objectParameter, GlobalCondition::m_objectType, and GlobalCondition::nrObjects().

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 }
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:139
const int nrObjects() const
get number of trigger objects
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)

◆ MuonTemplate() [4/4]

MuonTemplate::MuonTemplate ( const MuonTemplate cp)

Definition at line 51 of file MuonTemplate.cc.

References copy().

51 : GlobalCondition(cp.m_condName) { copy(cp); }
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=

◆ ~MuonTemplate()

MuonTemplate::~MuonTemplate ( )
override

Definition at line 54 of file MuonTemplate.cc.

54  {
55  // empty now
56 }

Member Function Documentation

◆ copy()

void MuonTemplate::copy ( const MuonTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 137 of file MuonTemplate.cc.

References GlobalCondition::m_condCategory, GlobalCondition::m_condChipNr, GlobalCondition::m_condGEq, GlobalCondition::m_condName, GlobalCondition::m_condRelativeBx, GlobalCondition::m_condType, m_correlationParameter, m_objectParameter, and GlobalCondition::m_objectType.

Referenced by MuonTemplate(), and operator=().

137  {
138  m_condName = cp.condName();
139  m_condCategory = cp.condCategory();
140  m_condType = cp.condType();
141  m_objectType = cp.objectType();
142  m_condGEq = cp.condGEq();
143  m_condChipNr = cp.condChipNr();
144  m_condRelativeBx = cp.condRelativeBx();
145 
146  m_objectParameter = *(cp.objectParameter());
147  m_correlationParameter = *(cp.correlationParameter());
148 }
bool m_condGEq
the operator used for the condition (>=, =): true for >=
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:139
std::string m_condName
the name of the condition
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:140
l1t::GtConditionType m_condType
the type of the condition (1s, etc)

◆ correlationParameter()

const CorrelationParameter* MuonTemplate::correlationParameter ( ) const
inline

Definition at line 121 of file MuonTemplate.h.

References m_correlationParameter.

121 { return &m_correlationParameter; }
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:140

◆ objectParameter()

const std::vector<ObjectParameter>* MuonTemplate::objectParameter ( ) const
inline

Definition at line 119 of file MuonTemplate.h.

References m_objectParameter.

119 { return &m_objectParameter; }
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:139

◆ operator=()

MuonTemplate & MuonTemplate::operator= ( const MuonTemplate cp)

Definition at line 59 of file MuonTemplate.cc.

References copy().

59  {
60  copy(cp);
61  return *this;
62 }
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=

◆ print()

void MuonTemplate::print ( std::ostream &  myCout) const
overridevirtual

print the condition

Reimplemented from GlobalCondition.

Definition at line 71 of file MuonTemplate.cc.

References MuonTemplate::CorrelationParameter::chargeCorrelation, TauDecayModes::dec, MuonTemplate::CorrelationParameter::deltaEtaRange, MuonTemplate::CorrelationParameter::deltaPhiMaxbits, MuonTemplate::CorrelationParameter::deltaPhiRange0Word, MuonTemplate::CorrelationParameter::deltaPhiRange1Word, mps_fire::i, GlobalCondition::m_condType, m_correlationParameter, m_objectParameter, GlobalCondition::nrObjects(), GlobalCondition::print(), l1t::Type1s, svgfig::window(), and GlobalCondition::wsc().

Referenced by l1t::TriggerMenuParser::parseMuon(), and l1t::TriggerMenuParser::parseMuonCorr().

71  {
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 << " phiWindow1Lower =" << std::hex << m_objectParameter[i].phiWindow1Lower << std::endl;
95  myCout << " phiWindow1Upper =" << std::hex << m_objectParameter[i].phiWindow1Upper << std::endl;
96  myCout << " phiWindow2Lower =" << std::hex << m_objectParameter[i].phiWindow2Lower << std::endl;
97  myCout << " phiWindow2Upper =" << std::hex << m_objectParameter[i].phiWindow2Upper << std::endl;
98 
99  size_t etaWindowIndex = 1;
100  for (const auto& window : m_objectParameter[i].etaWindows) {
101  myCout << " etaWindows[" << etaWindowIndex << "].lower =" << std::hex << window.lower << std::endl;
102  myCout << " etaWindows[" << etaWindowIndex << "].upper =" << std::hex << window.upper << std::endl;
103  ++etaWindowIndex;
104  }
105  }
106 
107  if (wsc()) {
108  myCout << " Correlation parameters "
109  << "[ hex ]" << std::endl;
110 
111  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
112 
113  myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl;
114  myCout << " deltaPhiRange1Word = " << std::hex << m_correlationParameter.deltaPhiRange1Word << std::endl;
115  myCout << " deltaPhiRange0Word = " << std::hex << m_correlationParameter.deltaPhiRange0Word << std::endl;
116  myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl;
117  } else {
118  if (m_condType == l1t::Type1s) {
119  myCout << " Correlation parameters "
120  << "[ hex ]" << std::endl;
121 
122  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << " (charge sign) "
123  << std::endl;
124 
125  } else {
126  myCout << "\n Correlation parameters "
127  << "[ hex ]" << std::endl;
128 
129  myCout << " chargeCorrelation = " << std::hex << m_correlationParameter.chargeCorrelation << std::endl;
130  }
131  }
132 
133  // reset to decimal output
134  myCout << std::dec << std::endl;
135 }
const bool wsc() const
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:139
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
Definition: svgfig.py:643
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:102
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:103
const int nrObjects() const
get number of trigger objects
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:140
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
virtual void print(std::ostream &myCout) const
print condition

◆ setConditionParameter()

void MuonTemplate::setConditionParameter ( const std::vector< ObjectParameter > &  objParameter,
const CorrelationParameter corrParameter 
)

set functions

Definition at line 65 of file MuonTemplate.cc.

References m_correlationParameter, and m_objectParameter.

Referenced by l1t::TriggerMenuParser::parseMuon(), and l1t::TriggerMenuParser::parseMuonCorr().

66  {
67  m_objectParameter = objParameter;
68  m_correlationParameter = corrParameter;
69 }
std::vector< ObjectParameter > m_objectParameter
variables containing the parameters
Definition: MuonTemplate.h:139
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:140

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const MuonTemplate result 
)
friend

output stream operator

Definition at line 151 of file MuonTemplate.cc.

151  {
152  result.print(os);
153  return os;
154 }

Member Data Documentation

◆ m_correlationParameter

CorrelationParameter MuonTemplate::m_correlationParameter
private

Definition at line 140 of file MuonTemplate.h.

Referenced by copy(), correlationParameter(), print(), and setConditionParameter().

◆ m_objectParameter

std::vector<ObjectParameter> MuonTemplate::m_objectParameter
private

variables containing the parameters

Definition at line 139 of file MuonTemplate.h.

Referenced by copy(), MuonTemplate(), objectParameter(), print(), and setConditionParameter().