Skip to content

Commit

Permalink
Merge pull request #19155 from cms-l1t-offline/pr92x-L1T_uGT-MT-and-d…
Browse files Browse the repository at this point in the history
…iObjectPt

Pr92x L1T uGT emulation M_T and diObjectPT
  • Loading branch information
cmsbuild committed Jun 13, 2017
2 parents e83a14c + 26f2b1a commit d338db1
Show file tree
Hide file tree
Showing 21 changed files with 1,774 additions and 1,311 deletions.
2 changes: 1 addition & 1 deletion CondFormats/L1TObjects/interface/L1TUtmAlgorithm.h
Expand Up @@ -39,7 +39,7 @@ class L1TUtmAlgorithm
// ctor
L1TUtmAlgorithm()
: name_(), expression_(), expression_in_condition_(), rpn_vector_(),
index_(), module_id_(), module_index_() { };
index_(), module_id_(), module_index_(), version(0) { };

// dtor
virtual ~L1TUtmAlgorithm() { };
Expand Down
5 changes: 3 additions & 2 deletions CondFormats/L1TObjects/interface/L1TUtmBin.h
Expand Up @@ -39,12 +39,13 @@ class L1TUtmBin
L1TUtmBin()
: hw_index(std::numeric_limits<unsigned int>::max()),
minimum(std::numeric_limits<double>::min()),
maximum(std::numeric_limits<double>::max()) { };
maximum(std::numeric_limits<double>::max()),
version(0) { };

L1TUtmBin(const unsigned int id,
const double min,
const double max)
: hw_index(id), minimum(min), maximum(max) { };
: hw_index(id), minimum(min), maximum(max), version(0) { };

// dtor
virtual ~L1TUtmBin() { };
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/L1TObjects/interface/L1TUtmCondition.h
Expand Up @@ -43,7 +43,7 @@ class L1TUtmCondition
// ctor
L1TUtmCondition()
: name_(), type_(-9999),
objects_(), cuts_() { };
objects_(), cuts_(), version(0) { };

// dtor
virtual ~L1TUtmCondition() { };
Expand Down
26 changes: 16 additions & 10 deletions CondFormats/L1TObjects/interface/L1TUtmCut.h
Expand Up @@ -39,38 +39,41 @@ class L1TUtmCut
// ctor
L1TUtmCut()
: name_(), object_type_(), cut_type_(),
minimum_(), maximum_(), data_() { };
minimum_(), maximum_(), data_(), key_(), version(0) { };

// dtor
virtual ~L1TUtmCut() { };


/** set cut name */
void setName(const std::string& x) { name_ = x; };
void setName(const std::string& name) { name_ = name; };

/** set object type */
void setObjectType(const int x) { object_type_ = x; };
void setObjectType(const int type) { object_type_ = type; };

/** set cut type */
void setCutType(const int x) { cut_type_ = x; };
void setCutType(const int type) { cut_type_ = type; };

/** set minimum value of cut range (double) */
void setMinimum(const double x) { minimum_.value = x; };
void setMinimumValue(const double value) { minimum_.value = value; };

/** set minimum value of cut range (HW index) */
void setMinimum(const unsigned int x) { minimum_.index = x; };
void setMinimumIndex(const unsigned int index) { minimum_.index = index; };

/** set minimum value of cut range (L1TUtmCutValue struct) */
void setMinimum(const L1TUtmCutValue& x) { minimum_ = x; };
void setMinimum(const L1TUtmCutValue& minimum) { minimum_ = minimum; };

/** set maximum value of cut range (double) */
void setMaximum(const double x) { maximum_.value = x; };
void setMaximumValue(const double value) { maximum_.value = value; };

/** set maximum value of cut range (HW index) */
void setMaximum(const unsigned int x) { maximum_.index = x; };
void setMaximumIndex(const unsigned int index) { maximum_.index = index; };

/** set maximum value of cut range (L1TUtmCutValue struct) */
void setMaximum(const L1TUtmCutValue& x) { maximum_ = x; };
void setMaximum(const L1TUtmCutValue& maximum) { maximum_ = maximum; };

/** set precision for cut value calculations */
void setPrecision(const unsigned int precision) { setMaximumIndex(precision); setMinimumIndex(precision); }; // HACK

/** get cut name */
const std::string& getName() const { return name_; };
Expand Down Expand Up @@ -105,6 +108,9 @@ class L1TUtmCut
/** get key */
const std::string& getKey() const { return key_; };

/** get precision */
const unsigned int getPrecision() const { return getMinimumIndex(); }; // HACK


protected:
std::string name_; /**< name of cut */
Expand Down
3 changes: 2 additions & 1 deletion CondFormats/L1TObjects/interface/L1TUtmCutValue.h
Expand Up @@ -37,7 +37,8 @@ struct L1TUtmCutValue
// ctor
L1TUtmCutValue()
: value(std::numeric_limits<double>::max()),
index(std::numeric_limits<unsigned int>::max()) { };
index(std::numeric_limits<unsigned int>::max()),
version(0) { };

double value; /**< cut value */
unsigned int index; /**< HW index for the cut value */
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/L1TObjects/interface/L1TUtmObject.h
Expand Up @@ -40,7 +40,7 @@ class L1TUtmObject
L1TUtmObject()
: name_(), type_(), comparison_operator_(), bx_offset_(), threshold_(),
ext_signal_name_(), ext_channel_id_(std::numeric_limits<unsigned int>::max()),
cuts_() { };
cuts_(), version(0) { };

// dtor
virtual ~L1TUtmObject() { };
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/L1TObjects/interface/L1TUtmScale.h
Expand Up @@ -42,7 +42,7 @@ class L1TUtmScale
// ctor
L1TUtmScale()
: name_(), object_(), type_(), minimum_(), maximum_(),
step_(), n_bits_(), bins_() { };
step_(), n_bits_(), bins_(), version(0) { };

// dtor
virtual ~L1TUtmScale() { };
Expand Down
16 changes: 8 additions & 8 deletions CondFormats/L1TObjects/interface/L1TUtmTriggerMenu.h
Expand Up @@ -3,13 +3,11 @@
// DIRECT EDITS MIGHT BE LOST.
//
/**
* @author Takashi Matsushita
* Created: 12 Mar 2015
* @author Bernhard Arnold
* Takashi Matsushita
* @date: 2015-03-12
*/

/** @file */
/** @todo nope */

#ifndef tmEventSetup_L1TUtmTriggerMenu_hh
#define tmEventSetup_L1TUtmTriggerMenu_hh

Expand Down Expand Up @@ -44,7 +42,7 @@ class L1TUtmTriggerMenu
L1TUtmTriggerMenu()
: algorithm_map_(), condition_map_(), scale_map_(),
external_map_(), token_to_condition_(), name_(), version_(), comment_(),
datetime_(), uuid_firmware_(), scale_set_name_(), n_modules_(0), version(0) { };
datetime_(), uuid_firmware_(), scale_set_name_(), n_modules_(), version(0) { };

// dtor
virtual ~L1TUtmTriggerMenu() { };
Expand Down Expand Up @@ -92,7 +90,8 @@ class L1TUtmTriggerMenu
*/
const std::string& getDatetime() const { return datetime_; };

/** get UUID of firmware created by the menu

/** get UUID of firmware generated by VHDL producer
*
* @return UUID
*/
Expand Down Expand Up @@ -134,7 +133,8 @@ class L1TUtmTriggerMenu
*/
void setDatetime(const std::string& x) { datetime_ = x; };

/** set UUID of firmware created by the menu

/** set UUID of firmware generated by VHDL producer
*
* @param x [in] UUID
*/
Expand Down
46 changes: 25 additions & 21 deletions L1Trigger/L1TGlobal/interface/CorrelationTemplate.h
Expand Up @@ -66,28 +66,32 @@ class CorrelationTemplate : public GlobalCondition
/// typedef for correlation parameters
struct CorrelationParameter
{

//Cut values in hardware
long long minEtaCutValue;
long long maxEtaCutValue;
unsigned int precEtaCut;

long long minPhiCutValue;
long long maxPhiCutValue;
unsigned int precPhiCut;

long long minDRCutValue;
long long maxDRCutValue;
unsigned int precDRCut;

long long minMassCutValue;
long long maxMassCutValue;
unsigned int precMassCut;

//Requirement on charge of legs (currently only Mu-Mu).
unsigned int chargeCorrelation;

int corrCutType;
//Cut values in hardware
long long minEtaCutValue;
long long maxEtaCutValue;
unsigned int precEtaCut;

long long minPhiCutValue;
long long maxPhiCutValue;
unsigned int precPhiCut;

long long minDRCutValue;
long long maxDRCutValue;
unsigned int precDRCut;

long long minMassCutValue;
long long maxMassCutValue;
unsigned int precMassCut;

long long minTBPTCutValue;
long long maxTBPTCutValue;
unsigned int precTBPTCut;

//Requirement on charge of legs (currently only Mu-Mu).
unsigned int chargeCorrelation;

int corrCutType;

};

Expand Down
Expand Up @@ -49,7 +49,7 @@ class CorrelationWithOverlapRemovalTemplate : public GlobalCondition
/// second sub-condition, the category of third sub-condition, the index of first sub-condition in the cor* vector,
/// the index of second sub-condition in the cor* vector, the index of second sub-condition in the cor* vector
CorrelationWithOverlapRemovalTemplate(const std::string&,
const l1t::GtConditionCategory&, const l1t::GtConditionCategory&, const l1t::GtConditionCategory&,
const l1t::GtConditionCategory&, const l1t::GtConditionCategory&, const l1t::GtConditionCategory&,
const int, const int, const int);

/// copy constructor
Expand All @@ -66,37 +66,42 @@ class CorrelationWithOverlapRemovalTemplate : public GlobalCondition
/// typedef for correlation parameters
struct CorrelationWithOverlapRemovalParameter
{

// Cut values in hardware
long long minEtaCutValue;
long long maxEtaCutValue;
long long maxEtaCutValue;
unsigned int precEtaCut;

long long minPhiCutValue;
long long maxPhiCutValue;
long long maxPhiCutValue;
unsigned int precPhiCut;

long long minDRCutValue;
long long maxDRCutValue;
unsigned int precDRCut;

unsigned int precDRCut;

long long minMassCutValue;
long long maxMassCutValue;
unsigned int precMassCut;
unsigned int precMassCut;

long long minTBPTCutValue;
long long maxTBPTCutValue;
unsigned int precTBPTCut;

long long minOverlapRemovalEtaCutValue;
long long maxOverlapRemovalEtaCutValue;
long long maxOverlapRemovalEtaCutValue;
unsigned int precOverlapRemovalEtaCut;

long long minOverlapRemovalPhiCutValue;
long long maxOverlapRemovalPhiCutValue;
long long maxOverlapRemovalPhiCutValue;
unsigned int precOverlapRemovalPhiCut;

long long minOverlapRemovalDRCutValue;
long long maxOverlapRemovalDRCutValue;
unsigned int precOverlapRemovalDRCut;
unsigned int precOverlapRemovalDRCut;

//Requirement on charge of legs (currently only Mu-Mu).
//Requirement on charge of legs (currently only Mu-Mu).
unsigned int chargeCorrelation;

int corrCutType;
Expand Down

0 comments on commit d338db1

Please sign in to comment.