CMS 3D CMS Logo

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
 

Public Member Functions

const CorrelationParametercorrelationParameter () const
 
 MuonTemplate ()
 
 MuonTemplate (const MuonTemplate &)
 
 MuonTemplate (const std::string &)
 
 MuonTemplate (const std::string &, const l1t::GtConditionType &)
 
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
 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 Vladimir Rekovic - extend for indexing

$Date$ $Revision$

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 33 of file MuonTemplate.h.

Constructor & Destructor Documentation

◆ MuonTemplate() [1/4]

MuonTemplate::MuonTemplate ( )

◆ MuonTemplate() [2/4]

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

Definition at line 36 of file MuonTemplate.cc.

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

◆ MuonTemplate() [3/4]

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

Definition at line 38 of file MuonTemplate.cc.

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 }

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

◆ MuonTemplate() [4/4]

MuonTemplate::MuonTemplate ( const MuonTemplate cp)

Definition at line 51 of file MuonTemplate.cc.

51 : GlobalCondition(cp.m_condName) { copy(cp); }

References copy().

◆ ~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 140 of file MuonTemplate.cc.

140  {
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 }

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=().

◆ correlationParameter()

const CorrelationParameter* MuonTemplate::correlationParameter ( ) const
inline

Definition at line 113 of file MuonTemplate.h.

113 { return &m_correlationParameter; }

References m_correlationParameter.

◆ objectParameter()

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

Definition at line 111 of file MuonTemplate.h.

111 { return &m_objectParameter; }

References m_objectParameter.

◆ operator=()

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

Definition at line 59 of file MuonTemplate.cc.

59  {
60  copy(cp);
61  return *this;
62 }

References copy().

◆ print()

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

print the condition

Reimplemented from GlobalCondition.

Definition at line 71 of file MuonTemplate.cc.

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 << " 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 }

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, and GlobalCondition::wsc().

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

◆ setConditionParameter()

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

set functions

Definition at line 65 of file MuonTemplate.cc.

66  {
67  m_objectParameter = objParameter;
68  m_correlationParameter = corrParameter;
69 }

References m_correlationParameter, and m_objectParameter.

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

Friends And Related Function Documentation

◆ operator<<

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

output stream operator

Definition at line 154 of file MuonTemplate.cc.

154  {
155  result.print(os);
156  return os;
157 }

Member Data Documentation

◆ m_correlationParameter

CorrelationParameter MuonTemplate::m_correlationParameter
private

Definition at line 132 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 131 of file MuonTemplate.h.

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

mps_fire.i
i
Definition: mps_fire.py:428
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
MuonTemplate::copy
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=
Definition: MuonTemplate.cc:140
hgcal_conditions::parameters
Definition: HGCConditions.h:86
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:126
MuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:94
MuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: MuonTemplate.h:101
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:138
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
GlobalCondition::GlobalCondition
GlobalCondition()
Definition: GlobalCondition.cc:29
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::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::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:95
l1t::CondMuon
Definition: GlobalDefinitions.h:95
mps_fire.result
result
Definition: mps_fire.py:311
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143