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
 
 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$

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 35 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 37 of file MuonTemplate.cc.

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 }

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

◆ MuonTemplate() [4/4]

MuonTemplate::MuonTemplate ( const MuonTemplate cp)

Definition at line 50 of file MuonTemplate.cc.

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

References copy(), and CommonMethods::cp().

◆ ~MuonTemplate()

MuonTemplate::~MuonTemplate ( )
override

Definition at line 53 of file MuonTemplate.cc.

53  {
54  // empty now
55 }

Member Function Documentation

◆ copy()

void MuonTemplate::copy ( const MuonTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 136 of file MuonTemplate.cc.

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

References CommonMethods::cp(), 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 108 of file MuonTemplate.h.

108 { return &m_correlationParameter; }

References m_correlationParameter.

◆ objectParameter()

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

Definition at line 106 of file MuonTemplate.h.

106 { return &m_objectParameter; }

References m_objectParameter.

◆ operator=()

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

Definition at line 58 of file MuonTemplate.cc.

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

References copy(), and CommonMethods::cp().

◆ print()

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

print the condition

Reimplemented from GlobalCondition.

Definition at line 70 of file MuonTemplate.cc.

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

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 64 of file MuonTemplate.cc.

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

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 150 of file MuonTemplate.cc.

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

Member Data Documentation

◆ m_correlationParameter

CorrelationParameter MuonTemplate::m_correlationParameter
private

Definition at line 127 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 126 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:126
GlobalCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalCondition.cc:156
MuonTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: MuonTemplate.h:127
MuonTemplate::copy
void copy(const MuonTemplate &cp)
copy function for copy constructor and operator=
Definition: MuonTemplate.cc:136
GlobalCondition::m_condRelativeBx
int m_condRelativeBx
Definition: GlobalCondition.h:122
MuonTemplate::CorrelationParameter::deltaPhiRange0Word
unsigned long long deltaPhiRange0Word
Definition: MuonTemplate.h:89
MuonTemplate::CorrelationParameter::deltaPhiMaxbits
unsigned int deltaPhiMaxbits
Definition: MuonTemplate.h:96
GlobalCondition::wsc
const bool wsc() const
Definition: GlobalCondition.cc:137
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:93
GlobalCondition::m_condCategory
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GlobalCondition.h:107
GlobalCondition::GlobalCondition
GlobalCondition()
Definition: GlobalCondition.cc:28
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::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:86
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::CorrelationParameter::deltaPhiRange1Word
unsigned long long deltaPhiRange1Word
Definition: MuonTemplate.h:90
l1t::CondMuon
Definition: GlobalDefinitions.h:94
mps_fire.result
result
Definition: mps_fire.py:311
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143