CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends
CorrelationTemplate Class Reference

#include <CorrelationTemplate.h>

Inheritance diagram for CorrelationTemplate:
GlobalCondition

Classes

struct  CorrelationParameter
 typedef for correlation parameters More...
 

Public Member Functions

const l1t::GtConditionCategory cond0Category () const
 get / set the category of the two sub-conditions More...
 
const int cond0Index () const
 get / set the index of the two sub-conditions in the cor* vector from menu More...
 
const l1t::GtConditionCategory cond1Category () const
 
const int cond1Index () const
 
const CorrelationParametercorrelationParameter () const
 get / set correlation parameters More...
 
 CorrelationTemplate ()
 
 CorrelationTemplate (const CorrelationTemplate &)
 copy constructor More...
 
 CorrelationTemplate (const std::string &)
 from condition name More...
 
 CorrelationTemplate (const std::string &, const l1t::GtConditionCategory &, const l1t::GtConditionCategory &, const int, const int)
 
CorrelationTemplateoperator= (const CorrelationTemplate &)
 assign operator More...
 
void print (std::ostream &myCout) const override
 print the condition More...
 
void setCond0Category (const l1t::GtConditionCategory &)
 
void setCond0Index (const int &)
 
void setCond1Category (const l1t::GtConditionCategory &)
 
void setCond1Index (const int &)
 
void setCorrelationParameter (const CorrelationParameter &corrParameter)
 
 ~CorrelationTemplate () override
 destructor More...
 
- 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 CorrelationTemplate &cp)
 copy function for copy constructor and operator= More...
 

Private Attributes

l1t::GtConditionCategory m_cond0Category
 
int m_cond0Index
 
l1t::GtConditionCategory m_cond1Category
 
int m_cond1Index
 
CorrelationParameter m_correlationParameter
 

Friends

std::ostream & operator<< (std::ostream &, const CorrelationTemplate &)
 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 correlation template. Includes spatial correlation for two objects of different type.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

$Date$ $Revision$

Definition at line 34 of file CorrelationTemplate.h.

Constructor & Destructor Documentation

◆ CorrelationTemplate() [1/4]

CorrelationTemplate::CorrelationTemplate ( )

constructor(s) default

Definition at line 34 of file CorrelationTemplate.cc.

34  : GlobalCondition() {
37  m_condChipNr = -1;
38 
39  // there are in fact two objects
40  int nObjects = nrObjects();
41 
42  if (nObjects > 0) {
43  m_objectType.reserve(nObjects);
44  }
45 
48  m_cond0Index = -1;
49  m_cond1Index = -1;
50 }

References l1t::CondCorrelation, l1t::CondNull, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, GlobalCondition::m_condCategory, GlobalCondition::m_condChipNr, GlobalCondition::m_condType, GlobalCondition::m_objectType, GlobalCondition::nrObjects(), and l1t::Type2cor.

◆ CorrelationTemplate() [2/4]

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

from condition name

Definition at line 53 of file CorrelationTemplate.cc.

53  : GlobalCondition(cName) {
56  m_condChipNr = -1;
57 
58  // there are in fact two objects
59  int nObjects = nrObjects();
60 
61  if (nObjects > 0) {
62  m_objectType.reserve(nObjects);
63  }
64 
67  m_cond0Index = -1;
68  m_cond1Index = -1;
69 }

References l1t::CondCorrelation, l1t::CondNull, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, GlobalCondition::m_condCategory, GlobalCondition::m_condChipNr, GlobalCondition::m_condType, GlobalCondition::m_objectType, GlobalCondition::nrObjects(), and l1t::Type2cor.

◆ CorrelationTemplate() [3/4]

CorrelationTemplate::CorrelationTemplate ( const std::string &  cName,
const l1t::GtConditionCategory cond0Cat,
const l1t::GtConditionCategory cond1Cat,
const int  cond0Index,
const int  cond1index 
)

from condition name, the category of first sub-condition, the category of the second sub-condition, the index of first sub-condition in the cor* vector, the index of second sub-condition in the cor* vector

Definition at line 74 of file CorrelationTemplate.cc.

79  : GlobalCondition(cName),
80  m_cond0Category(cond0Cat),
81  m_cond1Category(cond1Cat),
83  m_cond1Index(cond1index)
84 
85 {
88  m_condChipNr = -1;
89 
90  // there are in fact two objects
91  int nObjects = nrObjects();
92 
93  if (nObjects > 0) {
94  m_objectType.resize(nObjects);
95  }
96 }

References l1t::CondCorrelation, GlobalCondition::m_condCategory, GlobalCondition::m_condChipNr, GlobalCondition::m_condType, GlobalCondition::m_objectType, GlobalCondition::nrObjects(), and l1t::Type2cor.

◆ CorrelationTemplate() [4/4]

CorrelationTemplate::CorrelationTemplate ( const CorrelationTemplate cp)

copy constructor

Definition at line 99 of file CorrelationTemplate.cc.

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

References copy().

◆ ~CorrelationTemplate()

CorrelationTemplate::~CorrelationTemplate ( )
override

destructor

Definition at line 102 of file CorrelationTemplate.cc.

102  {
103  // empty now
104 }

Member Function Documentation

◆ cond0Category()

const l1t::GtConditionCategory CorrelationTemplate::cond0Category ( ) const
inline

get / set the category of the two sub-conditions

Definition at line 90 of file CorrelationTemplate.h.

90 { return m_cond0Category; }

References m_cond0Category.

Referenced by l1t::GlobalBoard::runGTL().

◆ cond0Index()

const int CorrelationTemplate::cond0Index ( ) const
inline

get / set the index of the two sub-conditions in the cor* vector from menu

Definition at line 98 of file CorrelationTemplate.h.

98 { return m_cond0Index; }

References m_cond0Index.

Referenced by l1t::GlobalBoard::runGTL().

◆ cond1Category()

const l1t::GtConditionCategory CorrelationTemplate::cond1Category ( ) const
inline

Definition at line 92 of file CorrelationTemplate.h.

92 { return m_cond1Category; }

References m_cond1Category.

Referenced by l1t::GlobalBoard::runGTL().

◆ cond1Index()

const int CorrelationTemplate::cond1Index ( ) const
inline

Definition at line 100 of file CorrelationTemplate.h.

100 { return m_cond1Index; }

References m_cond1Index.

Referenced by l1t::GlobalBoard::runGTL().

◆ copy()

void CorrelationTemplate::copy ( const CorrelationTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 164 of file CorrelationTemplate.cc.

164  {
165  m_condName = cp.condName();
166  m_condCategory = cp.condCategory();
167  m_condType = cp.condType();
168  m_objectType = cp.objectType();
169  m_condGEq = cp.condGEq();
170  m_condChipNr = cp.condChipNr();
171 
172  m_cond0Category = cp.cond0Category();
173  m_cond1Category = cp.cond1Category();
174  m_cond0Index = cp.cond0Index();
175  m_cond1Index = cp.cond1Index();
176 
177  m_correlationParameter = *(cp.correlationParameter());
178 }

References m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, GlobalCondition::m_condCategory, GlobalCondition::m_condChipNr, GlobalCondition::m_condGEq, GlobalCondition::m_condName, GlobalCondition::m_condType, m_correlationParameter, and GlobalCondition::m_objectType.

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

◆ correlationParameter()

const CorrelationParameter* CorrelationTemplate::correlationParameter ( ) const
inline

get / set correlation parameters

Definition at line 107 of file CorrelationTemplate.h.

107 { return &m_correlationParameter; }

References m_correlationParameter.

◆ operator=()

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

assign operator

Definition at line 107 of file CorrelationTemplate.cc.

107  {
108  copy(cp);
109  return *this;
110 }

References copy().

◆ print()

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

print the condition

Reimplemented from GlobalCondition.

Definition at line 127 of file CorrelationTemplate.cc.

127  {
128  myCout << "\n CorrelationTemplate print..." << std::endl;
129 
130  GlobalCondition::print(myCout);
131 
132  myCout << "\n First sub-condition category: " << m_cond0Category << std::endl;
133  myCout << " Second sub-condition category: " << m_cond1Category << std::endl;
134 
135  myCout << "\n First sub-condition index: " << m_cond0Index << std::endl;
136  myCout << " Second sub-condition index: " << m_cond1Index << std::endl;
137 
138  myCout << "\n Correlation parameters "
139  << "[ hex ]" << std::endl;
140 
141  myCout << " Cut Type: " << m_correlationParameter.corrCutType << std::endl;
142  myCout << " minEtaCutValue = " << std::dec << m_correlationParameter.minEtaCutValue << std::endl;
143  myCout << " maxEtaCutValue = " << std::dec << m_correlationParameter.maxEtaCutValue << std::endl;
144  myCout << " precEtaCut = " << std::dec << m_correlationParameter.precEtaCut << std::endl;
145  myCout << " minPhiCutValue = " << std::dec << m_correlationParameter.minPhiCutValue << std::endl;
146  myCout << " maxPhiCutValue = " << std::dec << m_correlationParameter.maxPhiCutValue << std::endl;
147  myCout << " precPhiCut = " << std::dec << m_correlationParameter.precPhiCut << std::endl;
148  myCout << " minDRCutValue = " << std::dec << m_correlationParameter.minDRCutValue << std::endl;
149  myCout << " maxDRCutValue = " << std::dec << m_correlationParameter.maxDRCutValue << std::endl;
150  myCout << " precDRCut = " << std::dec << m_correlationParameter.precDRCut << std::endl;
151  myCout << " minMassCutValue = " << std::dec << m_correlationParameter.minMassCutValue << std::endl;
152  myCout << " maxMassCutValue = " << std::dec << m_correlationParameter.maxMassCutValue << std::endl;
153  myCout << " precMassCut = " << std::dec << m_correlationParameter.precMassCut << std::endl;
154  myCout << " minTBPTCutValue = " << std::dec << m_correlationParameter.minTBPTCutValue << std::endl;
155  myCout << " maxTBPTCutValue = " << std::dec << m_correlationParameter.maxTBPTCutValue << std::endl;
156  myCout << " precTBPTCut = " << std::dec << m_correlationParameter.precTBPTCut << std::endl;
157 
158  myCout << " chargeCorrelation = " << std::dec << m_correlationParameter.chargeCorrelation << std::endl;
159 
160  // reset to decimal output
161  myCout << std::dec << std::endl;
162 }

References CorrelationTemplate::CorrelationParameter::chargeCorrelation, CorrelationTemplate::CorrelationParameter::corrCutType, TauDecayModes::dec, m_cond0Category, m_cond0Index, m_cond1Category, m_cond1Index, m_correlationParameter, CorrelationTemplate::CorrelationParameter::maxDRCutValue, CorrelationTemplate::CorrelationParameter::maxEtaCutValue, CorrelationTemplate::CorrelationParameter::maxMassCutValue, CorrelationTemplate::CorrelationParameter::maxPhiCutValue, CorrelationTemplate::CorrelationParameter::maxTBPTCutValue, CorrelationTemplate::CorrelationParameter::minDRCutValue, CorrelationTemplate::CorrelationParameter::minEtaCutValue, CorrelationTemplate::CorrelationParameter::minMassCutValue, CorrelationTemplate::CorrelationParameter::minPhiCutValue, CorrelationTemplate::CorrelationParameter::minTBPTCutValue, CorrelationTemplate::CorrelationParameter::precDRCut, CorrelationTemplate::CorrelationParameter::precEtaCut, CorrelationTemplate::CorrelationParameter::precMassCut, CorrelationTemplate::CorrelationParameter::precPhiCut, CorrelationTemplate::CorrelationParameter::precTBPTCut, and GlobalCondition::print().

Referenced by l1t::TriggerMenuParser::parseCorrelation().

◆ setCond0Category()

void CorrelationTemplate::setCond0Category ( const l1t::GtConditionCategory condCateg)

Definition at line 113 of file CorrelationTemplate.cc.

113 { m_cond0Category = condCateg; }

References m_cond0Category.

Referenced by l1t::TriggerMenuParser::parseCorrelation().

◆ setCond0Index()

void CorrelationTemplate::setCond0Index ( const int &  condIndex)

Definition at line 118 of file CorrelationTemplate.cc.

118 { m_cond0Index = condIndex; }

References m_cond0Index.

Referenced by l1t::TriggerMenuParser::parseCorrelation().

◆ setCond1Category()

void CorrelationTemplate::setCond1Category ( const l1t::GtConditionCategory condCateg)

Definition at line 115 of file CorrelationTemplate.cc.

115 { m_cond1Category = condCateg; }

References m_cond1Category.

Referenced by l1t::TriggerMenuParser::parseCorrelation().

◆ setCond1Index()

void CorrelationTemplate::setCond1Index ( const int &  condIndex)

Definition at line 120 of file CorrelationTemplate.cc.

120 { m_cond1Index = condIndex; }

References m_cond1Index.

Referenced by l1t::TriggerMenuParser::parseCorrelation().

◆ setCorrelationParameter()

void CorrelationTemplate::setCorrelationParameter ( const CorrelationParameter corrParameter)

Definition at line 123 of file CorrelationTemplate.cc.

123  {
124  m_correlationParameter = corrParameter;
125 }

References m_correlationParameter.

Referenced by l1t::TriggerMenuParser::parseCorrelation().

Friends And Related Function Documentation

◆ operator<<

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

output stream operator

Definition at line 181 of file CorrelationTemplate.cc.

181  {
182  result.print(os);
183  return os;
184 }

Member Data Documentation

◆ m_cond0Category

l1t::GtConditionCategory CorrelationTemplate::m_cond0Category
private

◆ m_cond0Index

int CorrelationTemplate::m_cond0Index
private

Definition at line 124 of file CorrelationTemplate.h.

Referenced by cond0Index(), copy(), CorrelationTemplate(), print(), and setCond0Index().

◆ m_cond1Category

l1t::GtConditionCategory CorrelationTemplate::m_cond1Category
private

◆ m_cond1Index

int CorrelationTemplate::m_cond1Index
private

Definition at line 125 of file CorrelationTemplate.h.

Referenced by cond1Index(), copy(), CorrelationTemplate(), print(), and setCond1Index().

◆ m_correlationParameter

CorrelationParameter CorrelationTemplate::m_correlationParameter
private

Definition at line 126 of file CorrelationTemplate.h.

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

CorrelationTemplate::m_cond0Index
int m_cond0Index
Definition: CorrelationTemplate.h:124
l1t::Type2cor
Definition: GlobalDefinitions.h:53
CorrelationTemplate::CorrelationParameter::maxEtaCutValue
long long maxEtaCutValue
Definition: CorrelationTemplate.h:63
CorrelationTemplate::m_cond1Index
int m_cond1Index
Definition: CorrelationTemplate.h:125
CorrelationTemplate::CorrelationParameter::precPhiCut
unsigned int precPhiCut
Definition: CorrelationTemplate.h:68
GlobalCondition::print
virtual void print(std::ostream &myCout) const
print condition
Definition: GlobalCondition.cc:156
CorrelationTemplate::CorrelationParameter::minMassCutValue
long long minMassCutValue
Definition: CorrelationTemplate.h:74
CorrelationTemplate::copy
void copy(const CorrelationTemplate &cp)
copy function for copy constructor and operator=
Definition: CorrelationTemplate.cc:164
CorrelationTemplate::CorrelationParameter::precDRCut
unsigned int precDRCut
Definition: CorrelationTemplate.h:72
CorrelationTemplate::CorrelationParameter::precMassCut
unsigned int precMassCut
Definition: CorrelationTemplate.h:76
CorrelationTemplate::CorrelationParameter::corrCutType
int corrCutType
Definition: CorrelationTemplate.h:85
hgcal_conditions::parameters
Definition: HGCConditions.h:86
CorrelationTemplate::CorrelationParameter::minTBPTCutValue
long long minTBPTCutValue
Definition: CorrelationTemplate.h:78
CorrelationTemplate::CorrelationParameter::precTBPTCut
unsigned int precTBPTCut
Definition: CorrelationTemplate.h:80
l1t::CondNull
Definition: GlobalDefinitions.h:93
CorrelationTemplate::CorrelationParameter::maxPhiCutValue
long long maxPhiCutValue
Definition: CorrelationTemplate.h:67
GlobalCondition::m_condChipNr
int m_condChipNr
condition is located on condition chip m_condChipNr
Definition: GlobalCondition.h:119
GlobalCondition::m_condCategory
l1t::GtConditionCategory m_condCategory
the category of the condition
Definition: GlobalCondition.h:107
CorrelationTemplate::CorrelationParameter::chargeCorrelation
unsigned int chargeCorrelation
Definition: CorrelationTemplate.h:83
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
CorrelationTemplate::cond0Index
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
Definition: CorrelationTemplate.h:98
CorrelationTemplate::CorrelationParameter::maxTBPTCutValue
long long maxTBPTCutValue
Definition: CorrelationTemplate.h:79
CorrelationTemplate::CorrelationParameter::minPhiCutValue
long long minPhiCutValue
Definition: CorrelationTemplate.h:66
GlobalCondition::m_condGEq
bool m_condGEq
the operator used for the condition (>=, =): true for >=
Definition: GlobalCondition.h:116
CorrelationTemplate::CorrelationParameter::minDRCutValue
long long minDRCutValue
Definition: CorrelationTemplate.h:70
GlobalCondition::m_condName
std::string m_condName
the name of the condition
Definition: GlobalCondition.h:104
GlobalCondition::nrObjects
const int nrObjects() const
get number of trigger objects
Definition: GlobalCondition.cc:64
GlobalCondition::m_condType
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
Definition: GlobalCondition.h:110
CorrelationTemplate::CorrelationParameter::maxDRCutValue
long long maxDRCutValue
Definition: CorrelationTemplate.h:71
CorrelationTemplate::m_cond0Category
l1t::GtConditionCategory m_cond0Category
Definition: CorrelationTemplate.h:122
l1t::CondCorrelation
Definition: GlobalDefinitions.h:97
CorrelationTemplate::m_cond1Category
l1t::GtConditionCategory m_cond1Category
Definition: CorrelationTemplate.h:123
CorrelationTemplate::CorrelationParameter::precEtaCut
unsigned int precEtaCut
Definition: CorrelationTemplate.h:64
mps_fire.result
result
Definition: mps_fire.py:311
CorrelationTemplate::CorrelationParameter::minEtaCutValue
long long minEtaCutValue
Definition: CorrelationTemplate.h:62
CorrelationTemplate::CorrelationParameter::maxMassCutValue
long long maxMassCutValue
Definition: CorrelationTemplate.h:75
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
CorrelationTemplate::m_correlationParameter
CorrelationParameter m_correlationParameter
Definition: CorrelationTemplate.h:126