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 std::string &)
 from condition name More...
 
 CorrelationTemplate (const std::string &, const l1t::GtConditionCategory &, const l1t::GtConditionCategory &, const int, const int)
 
 CorrelationTemplate (const CorrelationTemplate &)
 copy constructor More...
 
CorrelationTemplateoperator= (const CorrelationTemplate &)
 assign operator More...
 
virtual void print (std::ostream &myCout) const
 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)
 
virtual ~CorrelationTemplate ()
 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 36 of file CorrelationTemplate.h.

Constructor & Destructor Documentation

CorrelationTemplate::CorrelationTemplate ( )

constructor(s) default

Definition at line 34 of file CorrelationTemplate.cc.

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.

35  : GlobalCondition()
36 {
37 
40  m_condChipNr = -1;
41 
42  // there are in fact two objects
43  int nObjects = nrObjects();
44 
45  if (nObjects > 0) {
46  m_objectType.reserve(nObjects);
47  }
48 
51  m_cond0Index = -1;
52  m_cond1Index = -1;
53 
54 }
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionCategory m_cond1Category
l1t::GtConditionCategory m_cond0Category
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
CorrelationTemplate::CorrelationTemplate ( const std::string &  cName)

from condition name

Definition at line 57 of file CorrelationTemplate.cc.

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.

58  : GlobalCondition(cName)
59 {
60 
63  m_condChipNr = -1;
64 
65  // there are in fact two objects
66  int nObjects = nrObjects();
67 
68  if (nObjects > 0) {
69  m_objectType.reserve(nObjects);
70  }
71 
74  m_cond0Index = -1;
75  m_cond1Index = -1;
76 
77 }
const int nrObjects() const
get number of trigger objects
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionCategory m_cond1Category
l1t::GtConditionCategory m_cond0Category
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
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 82 of file CorrelationTemplate.cc.

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

86  :
87  GlobalCondition(cName),
88  m_cond0Category(cond0Cat),
89  m_cond1Category(cond1Cat),
91  m_cond1Index(cond1index)
92 
93 {
94 
97  m_condChipNr = -1;
98 
99  // there are in fact two objects
100  int nObjects = nrObjects();
101 
102  if (nObjects> 0) {
103  m_objectType.resize(nObjects);
104  }
105 }
const int nrObjects() const
get number of trigger objects
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
l1t::GtConditionCategory m_cond1Category
l1t::GtConditionCategory m_cond0Category
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
CorrelationTemplate::CorrelationTemplate ( const CorrelationTemplate cp)

copy constructor

Definition at line 108 of file CorrelationTemplate.cc.

References copy().

110 {
111  copy(cp);
112 }
void copy(const CorrelationTemplate &cp)
copy function for copy constructor and operator=
std::string m_condName
the name of the condition
CorrelationTemplate::~CorrelationTemplate ( )
virtual

destructor

Definition at line 115 of file CorrelationTemplate.cc.

116 {
117  // empty now
118 }

Member Function Documentation

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

get / set the category of the two sub-conditions

Definition at line 98 of file CorrelationTemplate.h.

References m_cond0Category.

Referenced by copy(), l1t::CorrCondition::evaluateCondition(), and l1t::GlobalBoard::runGTL().

98  {
99  return m_cond0Category;
100  }
l1t::GtConditionCategory m_cond0Category
const int CorrelationTemplate::cond0Index ( ) const
inline

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

Definition at line 110 of file CorrelationTemplate.h.

References m_cond0Index.

Referenced by copy(), and l1t::GlobalBoard::runGTL().

110  {
111  return m_cond0Index;
112  }
const l1t::GtConditionCategory CorrelationTemplate::cond1Category ( ) const
inline

Definition at line 102 of file CorrelationTemplate.h.

References m_cond1Category, setCond0Category(), and setCond1Category().

Referenced by copy(), l1t::CorrCondition::evaluateCondition(), and l1t::GlobalBoard::runGTL().

102  {
103  return m_cond1Category;
104  }
l1t::GtConditionCategory m_cond1Category
const int CorrelationTemplate::cond1Index ( ) const
inline

Definition at line 114 of file CorrelationTemplate.h.

References m_cond1Index, setCond0Index(), and setCond1Index().

Referenced by copy(), and l1t::GlobalBoard::runGTL().

114  {
115  return m_cond1Index;
116  }
void CorrelationTemplate::copy ( const CorrelationTemplate cp)
private

copy function for copy constructor and operator=

Definition at line 195 of file CorrelationTemplate.cc.

References cond0Category(), cond0Index(), cond1Category(), cond1Index(), GlobalCondition::condCategory(), GlobalCondition::condChipNr(), GlobalCondition::condGEq(), GlobalCondition::condName(), GlobalCondition::condType(), correlationParameter(), 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, GlobalCondition::m_objectType, and GlobalCondition::objectType().

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

196 {
197 
198  m_condName = cp.condName();
200  m_condType = cp.condType();
201  m_objectType = cp.objectType();
202  m_condGEq = cp.condGEq();
203  m_condChipNr = cp.condChipNr();
204 
207  m_cond0Index = cp.cond0Index();
208  m_cond1Index = cp.cond1Index();
209 
211 
212 }
CorrelationParameter m_correlationParameter
const l1t::GtConditionCategory cond0Category() const
get / set the category of the two sub-conditions
bool m_condGEq
the operator used for the condition (>=, =): true for >=
const bool condGEq() const
get / set condition GEq flag
const l1t::GtConditionCategory & condCategory() const
get / set the category of the condition
const l1t::GtConditionType & condType() const
get / set the type of the condition (1s, etc)
const l1t::GtConditionCategory cond1Category() const
const std::vector< l1t::GlobalObject > & objectType() const
get / set the trigger object type(s) in the condition
const int cond0Index() const
get / set the index of the two sub-conditions in the cor* vector from menu
const int cond1Index() const
std::string m_condName
the name of the condition
const int & condChipNr() const
get / set the condition-chip number the condition is located on
int m_condChipNr
condition is located on condition chip m_condChipNr
l1t::GtConditionCategory m_condCategory
the category of the condition
const std::string & condName() const
get / set condition name
l1t::GtConditionCategory m_cond1Category
l1t::GtConditionCategory m_cond0Category
const CorrelationParameter * correlationParameter() const
get / set correlation parameters
std::vector< l1t::GlobalObject > m_objectType
the trigger object type(s)
l1t::GtConditionType m_condType
the type of the condition (1s, etc)
const CorrelationParameter* CorrelationTemplate::correlationParameter ( ) const
inline

get / set correlation parameters

Definition at line 123 of file CorrelationTemplate.h.

References copy(), SimDataFormats::CaloAnalysis::cp, m_correlationParameter, operator<<, print(), and setCorrelationParameter().

Referenced by copy(), and l1t::CorrCondition::evaluateCondition().

124  {
125  return &m_correlationParameter;
126  }
CorrelationParameter m_correlationParameter
CorrelationTemplate & CorrelationTemplate::operator= ( const CorrelationTemplate cp)

assign operator

Definition at line 121 of file CorrelationTemplate.cc.

References copy().

122 {
123 
124  copy(cp);
125  return *this;
126 }
void copy(const CorrelationTemplate &cp)
copy function for copy constructor and operator=
void CorrelationTemplate::print ( std::ostream &  myCout) const
virtual

print the condition

Reimplemented from GlobalCondition.

Definition at line 160 of file CorrelationTemplate.cc.

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::minDRCutValue, CorrelationTemplate::CorrelationParameter::minEtaCutValue, CorrelationTemplate::CorrelationParameter::minMassCutValue, CorrelationTemplate::CorrelationParameter::minPhiCutValue, CorrelationTemplate::CorrelationParameter::precDRCut, CorrelationTemplate::CorrelationParameter::precEtaCut, CorrelationTemplate::CorrelationParameter::precMassCut, CorrelationTemplate::CorrelationParameter::precPhiCut, and GlobalCondition::print().

Referenced by correlationParameter(), operator<<(), l1t::TriggerMenuParser::parseCorrelation(), and l1t::CorrCondition::print().

161 {
162 
163  myCout << "\n CorrelationTemplate print..." << std::endl;
164 
165  GlobalCondition::print(myCout);
166 
167  myCout << "\n First sub-condition category: " << m_cond0Category << std::endl;
168  myCout << " Second sub-condition category: " << m_cond1Category << std::endl;
169 
170  myCout << "\n First sub-condition index: " << m_cond0Index << std::endl;
171  myCout << " Second sub-condition index: " << m_cond1Index << std::endl;
172 
173  myCout << "\n Correlation parameters " << "[ hex ]" << std::endl;
174 
175  myCout << " Cut Type: " << m_correlationParameter.corrCutType << std::endl;
176  myCout << " minEtaCutValue = " << std::dec << m_correlationParameter.minEtaCutValue << std::endl;
177  myCout << " maxEtaCutValue = " << std::dec << m_correlationParameter.maxEtaCutValue << std::endl;
178  myCout << " precEtaCut = " << std::dec << m_correlationParameter.precEtaCut << std::endl;
179  myCout << " minPhiCutValue = " << std::dec << m_correlationParameter.minPhiCutValue << std::endl;
180  myCout << " maxPhiCutValue = " << std::dec << m_correlationParameter.maxPhiCutValue << std::endl;
181  myCout << " precPhiCut = " << std::dec << m_correlationParameter.precPhiCut << std::endl;
182  myCout << " minDRCutValue = " << std::dec << m_correlationParameter.minDRCutValue << std::endl;
183  myCout << " maxDRCutValue = " << std::dec << m_correlationParameter.maxDRCutValue << std::endl;
184  myCout << " precDRCut = " << std::dec << m_correlationParameter.precDRCut << std::endl;
185  myCout << " minMassCutValue = " << std::dec << m_correlationParameter.minMassCutValue<< std::endl;
186  myCout << " maxMassCutValue = " << std::dec << m_correlationParameter.maxMassCutValue<< std::endl;
187  myCout << " precMassCut = " << std::dec << m_correlationParameter.precMassCut << std::endl;
188 
189  myCout << " chargeCorrelation = " << std::dec << m_correlationParameter.chargeCorrelation << std::endl;
190 
191  // reset to decimal output
192  myCout << std::dec << std::endl;
193 }
CorrelationParameter m_correlationParameter
l1t::GtConditionCategory m_cond1Category
l1t::GtConditionCategory m_cond0Category
virtual void print(std::ostream &myCout) const
print condition
void CorrelationTemplate::setCond0Category ( const l1t::GtConditionCategory condCateg)

Definition at line 129 of file CorrelationTemplate.cc.

References m_cond0Category.

Referenced by cond1Category(), and l1t::TriggerMenuParser::parseCorrelation().

130  {
131 
132  m_cond0Category = condCateg;
133 }
l1t::GtConditionCategory m_cond0Category
void CorrelationTemplate::setCond0Index ( const int &  condIndex)

Definition at line 143 of file CorrelationTemplate.cc.

References m_cond0Index.

Referenced by cond1Index(), and l1t::TriggerMenuParser::parseCorrelation().

143  {
144  m_cond0Index = condIndex;
145 }
void CorrelationTemplate::setCond1Category ( const l1t::GtConditionCategory condCateg)

Definition at line 135 of file CorrelationTemplate.cc.

References m_cond1Category.

Referenced by cond1Category(), and l1t::TriggerMenuParser::parseCorrelation().

136  {
137 
138  m_cond1Category = condCateg;
139 }
l1t::GtConditionCategory m_cond1Category
void CorrelationTemplate::setCond1Index ( const int &  condIndex)

Definition at line 147 of file CorrelationTemplate.cc.

References m_cond1Index.

Referenced by cond1Index(), and l1t::TriggerMenuParser::parseCorrelation().

147  {
148  m_cond1Index = condIndex;
149 }
void CorrelationTemplate::setCorrelationParameter ( const CorrelationParameter corrParameter)

Definition at line 153 of file CorrelationTemplate.cc.

References m_correlationParameter.

Referenced by correlationParameter(), and l1t::TriggerMenuParser::parseCorrelation().

154  {
155 
156  m_correlationParameter = corrParameter;
157 
158 }
CorrelationParameter m_correlationParameter

Friends And Related Function Documentation

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

output stream operator

Definition at line 215 of file CorrelationTemplate.cc.

Referenced by correlationParameter().

216 {
217  result.print(os);
218  return os;
219 
220 }
virtual void print(std::ostream &myCout) const
print the condition

Member Data Documentation

l1t::GtConditionCategory CorrelationTemplate::m_cond0Category
private
int CorrelationTemplate::m_cond0Index
private

Definition at line 148 of file CorrelationTemplate.h.

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

l1t::GtConditionCategory CorrelationTemplate::m_cond1Category
private
int CorrelationTemplate::m_cond1Index
private

Definition at line 149 of file CorrelationTemplate.h.

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

CorrelationParameter CorrelationTemplate::m_correlationParameter
private

Definition at line 150 of file CorrelationTemplate.h.

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