Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DataFormats/L1TGlobal/interface/GlobalObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ namespace l1t {
gtCentrality6,
gtCentrality7,
gtExternal,
gtZDCP,
gtZDCM,
ObjNull
};

Expand Down
10 changes: 10 additions & 0 deletions DataFormats/L1TGlobal/src/GlobalObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ l1t::GlobalObject l1TGtObjectStringToEnum(const std::string& label) {
{"CENT6", gtCentrality6},
{"CENT7", gtCentrality7},
{"External", gtExternal},
{"ZDCP", gtZDCP},
{"ZDCM", gtZDCM},
{"ObjNull", ObjNull},
{nullptr, (GlobalObject)-1}};

Expand Down Expand Up @@ -200,6 +202,14 @@ std::string l1t::l1TGtObjectEnumToString(const GlobalObject& gtObject) {
gtObjectString = "External";
} break;

case gtZDCP: {
gtObjectString = "ZDCP";
} break;

case gtZDCM: {
gtObjectString = "ZDCM";
} break;

case ObjNull: {
gtObjectString = "ObjNull";
edm::LogInfo("L1TGlobal") << "\n ObjNull means no valid GlobalObject defined!";
Expand Down
2 changes: 2 additions & 0 deletions DataFormats/L1Trigger/interface/EtSum.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ namespace l1t {
kAsymHt,
kAsymEtHF,
kAsymHtHF,
kZDCP,
kZDCM,
kUninitialized
};

Expand Down
8 changes: 7 additions & 1 deletion L1Trigger/L1TCalorimeter/interface/CaloParamsHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ namespace l1t {
metHFPhiCalibration = 49,
layer1HCalFBUpper = 50,
layer1HCalFBLower = 51,
NUM_CALOPARAMNODES = 52
hiZDC = 52,
NUM_CALOPARAMNODES = 53
};

CaloParamsHelper() { pnode_.resize(NUM_CALOPARAMNODES); }
Expand Down Expand Up @@ -525,6 +526,11 @@ namespace l1t {
l1t::LUT const* q2LUT() const { return &pnode_[hiQ2].LUT_; }
void setQ2LUT(const l1t::LUT& lut) { pnode_[hiQ2].LUT_ = lut; }

// HI ZDC
l1t::LUT* zdcLUT() { return &pnode_[hiZDC].LUT_; }
l1t::LUT const* zdcLUT() const { return &pnode_[hiZDC].LUT_; }
void setZDCLUT(const l1t::LUT& lut) { pnode_[hiZDC].LUT_ = lut; }

// HI parameters
double etSumCentLower(unsigned centClass) const {
if (pnode_[etSumCentralityLower].dparams_.size() > centClass)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ L1TCaloStage2ParamsESProducer::L1TCaloStage2ParamsESProducer(const edm::Paramete
std::shared_ptr<LUT> q2LUT(new LUT(q2LUTStream));
m_params_helper.setQ2LUT(*q2LUT);

// HI ZDC calibration LUT for trigger
edm::FileInPath zdcLUTFile = conf.getParameter<edm::FileInPath>("zdcLUTFile");
std::ifstream zdcLUTStream(zdcLUTFile.fullPath());
std::shared_ptr<LUT> zdcLUT(new LUT(zdcLUTStream));
m_params_helper.setZDCLUT(*zdcLUT);

// Layer 1 LUT specification
m_params_helper.setLayer1ECalScaleFactors(conf.getParameter<std::vector<double>>("layer1ECalScaleFactors"));
m_params_helper.setLayer1HCalScaleFactors(conf.getParameter<std::vector<double>>("layer1HCalScaleFactors"));
Expand Down
3 changes: 2 additions & 1 deletion L1Trigger/L1TCalorimeter/python/caloParams_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
minimumBiasThresholds = cms.vint32(0, 0, 0, 0),
centralityLUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/centralityLUT_stage1.txt"),
q2LUTFile = cms.FileInPath("L1Trigger/L1TCalorimeter/data/q2LUT_stage1.txt"),

zdcLUTFile = cms.FileInPath("L1Trigger/L1TZDC/data/zdcLUT_HI_v0_1.txt"),

# HCal FB LUT
layer1HCalFBLUTUpper = cms.vuint32([
0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA, 0xBBBABBBA,
Expand Down
86 changes: 86 additions & 0 deletions L1Trigger/L1TGlobal/interface/EnergySumZdcCondition.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#ifndef L1Trigger_L1TGlobal_EnergySumZdcCondition_h
#define L1Trigger_L1TGlobal_EnergySumZdcCondition_h

/**
* \class EnergySumZdcCondition
*
*
* Description: evaluation of a CondEnergySumZdc condition.
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
*
*
*/

// system include files
#include <iosfwd>
#include <string>

// user include files
// base classes
#include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h"

// forward declarations
class GlobalCondition;
class EnergySumZdcTemplate;

namespace l1t {

class L1Candidate;

class GlobalBoard;

// class declaration
class EnergySumZdcCondition : public ConditionEvaluation {
public:
/// constructors
/// default
EnergySumZdcCondition();

/// from base template condition (from event setup usually)
EnergySumZdcCondition(const GlobalCondition*, const GlobalBoard*);

// copy constructor
EnergySumZdcCondition(const EnergySumZdcCondition&);

// destructor
~EnergySumZdcCondition() override;

// assign operator
EnergySumZdcCondition& operator=(const EnergySumZdcCondition&);

public:
/// the core function to check if the condition matches
const bool evaluateCondition(const int bxEval) const override;

/// print condition
void print(std::ostream& myCout) const override;

public:
/// get / set the pointer to a L1GtCondition
inline const EnergySumZdcTemplate* gtEnergySumZdcTemplate() const { return m_gtEnergySumZdcTemplate; }

void setGtEnergySumZdcTemplate(const EnergySumZdcTemplate*);

/// get / set the pointer to uGt GlobalBoard
inline const GlobalBoard* getuGtB() const { return m_uGtB; }

void setuGtB(const GlobalBoard*);

private:
/// copy function for copy constructor and operator=
void copy(const EnergySumZdcCondition& cp);

private:
/// pointer to a EnergySumZdcTemplate
const EnergySumZdcTemplate* m_gtEnergySumZdcTemplate;

/// pointer to uGt GlobalBoard, to be able to get the trigger objects
const GlobalBoard* m_uGtB;
};

} // namespace l1t
#endif
79 changes: 79 additions & 0 deletions L1Trigger/L1TGlobal/interface/EnergySumZdcTemplate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#ifndef L1Trigger_L1TGlobal_EnergySumZdcTemplate_h
#define L1Trigger_L1TGlobal_EnergySumZdcTemplate_h

/**
* \class EnergySumZdcTemplate
*
*
* Description: L1 Global Trigger energy-sum template.
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
*
* $Date$
* $Revision$
*
*/

// system include files
#include <string>
#include <iosfwd>

// user include files

// base class
#include "L1Trigger/L1TGlobal/interface/GlobalCondition.h"

// forward declarations

// class declaration
class EnergySumZdcTemplate : public GlobalCondition {
public:
// constructor
EnergySumZdcTemplate();

// constructor
EnergySumZdcTemplate(const std::string&);

// constructor
EnergySumZdcTemplate(const std::string&, const l1t::GtConditionType&);

// copy constructor
EnergySumZdcTemplate(const EnergySumZdcTemplate&);

// destructor
~EnergySumZdcTemplate() override;

// assign operator
EnergySumZdcTemplate& operator=(const EnergySumZdcTemplate&);

public:
struct ObjectParameter {
unsigned int etLowThreshold;
unsigned int etHighThreshold;
};

public:
inline const std::vector<ObjectParameter>* objectParameter() const { return &m_objectParameter; }

/// set functions
void setConditionParameter(const std::vector<ObjectParameter>&);

/// print the condition
void print(std::ostream& myCout) const override;

/// output stream operator
friend std::ostream& operator<<(std::ostream&, const EnergySumZdcTemplate&);

private:
/// copy function for copy constructor and operator=
void copy(const EnergySumZdcTemplate& cp);

private:
/// variables containing the parameters
std::vector<ObjectParameter> m_objectParameter;
};

#endif
12 changes: 9 additions & 3 deletions L1Trigger/L1TGlobal/interface/GlobalBoard.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ namespace l1t {
const edm::EDGetTokenT<BXVector<l1t::Tau>>&,
const edm::EDGetTokenT<BXVector<l1t::Jet>>&,
const edm::EDGetTokenT<BXVector<l1t::EtSum>>&,
const edm::EDGetTokenT<BXVector<l1t::EtSum>>&,
const bool receiveEG,
const int nrL1EG,
const bool receiveTau,
const int nrL1Tau,
const bool receiveJet,
const int nrL1Jet,
const bool receiveEtSums);
const bool receiveEtSums,
const bool receiveEtSumsZdc);

void receiveMuonObjectData(const edm::Event&,
const edm::EDGetTokenT<BXVector<l1t::Muon>>&,
Expand Down Expand Up @@ -161,10 +163,13 @@ namespace l1t {
/// pointer to Tau data list
inline const BXVector<const l1t::L1Candidate*>* getCandL1Tau() const { return m_candL1Tau; }

/// pointer to Tau data list
/// pointer to EtSum data list
inline const BXVector<const l1t::EtSum*>* getCandL1EtSum() const { return m_candL1EtSum; }

/// pointer to Tau data list
/// pointer to ZDC EtSum data list
inline const BXVector<const l1t::EtSum*>* getCandL1EtSumZdc() const { return m_candL1EtSumZdc; }

/// pointer to External data list
inline const BXVector<const GlobalExtBlk*>* getCandL1External() const { return m_candL1External; }

/* Drop individual EtSums for Now
Expand Down Expand Up @@ -226,6 +231,7 @@ namespace l1t {
BXVector<const l1t::L1Candidate*>* m_candL1Tau;
BXVector<const l1t::L1Candidate*>* m_candL1Jet;
BXVector<const l1t::EtSum*>* m_candL1EtSum;
BXVector<const l1t::EtSum*>* m_candL1EtSumZdc;
BXVector<const GlobalExtBlk*>* m_candL1External;

// BXVector<const l1t::EtSum*>* m_candETM;
Expand Down
3 changes: 3 additions & 0 deletions L1Trigger/L1TGlobal/interface/GlobalDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ namespace l1t {
TypeAsymHt,
TypeAsymEtHF,
TypeAsymHtHF,
TypeZDCP,
TypeZDCM,
GtConditionTypeInvalid = -1
};

Expand All @@ -101,6 +103,7 @@ namespace l1t {
CondCorrelationWithOverlapRemoval,
CondCorrelationThreeBody,
CondMuonShower,
CondEnergySumZdc,
GtConditionCategoryInvalid = -1
};

Expand Down
11 changes: 11 additions & 0 deletions L1Trigger/L1TGlobal/interface/TriggerMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "L1Trigger/L1TGlobal/interface/MuonShowerTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CaloTemplate.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumTemplate.h"
#include "L1Trigger/L1TGlobal/interface/EnergySumZdcTemplate.h"
#include "L1Trigger/L1TGlobal/interface/ExternalTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationThreeBodyTemplate.h"
Expand All @@ -57,6 +58,7 @@ class TriggerMenu {
const std::vector<std::vector<MuonShowerTemplate> >&,
const std::vector<std::vector<CaloTemplate> >&,
const std::vector<std::vector<EnergySumTemplate> >&,
const std::vector<std::vector<EnergySumZdcTemplate> >&,
const std::vector<std::vector<ExternalTemplate> >&,
const std::vector<std::vector<CorrelationTemplate> >&,
const std::vector<std::vector<CorrelationThreeBodyTemplate> >&,
Expand Down Expand Up @@ -130,6 +132,14 @@ class TriggerMenu {

void setVecEnergySumTemplate(const std::vector<std::vector<EnergySumTemplate> >&);

//
inline const std::vector<std::vector<EnergySumZdcTemplate> >& vecEnergySumZdcTemplate() const {
return m_vecEnergySumZdcTemplate;
}

void setVecEnergySumZdcTemplate(const std::vector<std::vector<EnergySumZdcTemplate> >&);

//
inline const std::vector<std::vector<ExternalTemplate> >& vecExternalTemplate() const {
return m_vecExternalTemplate;
}
Expand Down Expand Up @@ -230,6 +240,7 @@ class TriggerMenu {
std::vector<std::vector<MuonShowerTemplate> > m_vecMuonShowerTemplate;
std::vector<std::vector<CaloTemplate> > m_vecCaloTemplate;
std::vector<std::vector<EnergySumTemplate> > m_vecEnergySumTemplate;
std::vector<std::vector<EnergySumZdcTemplate> > m_vecEnergySumZdcTemplate;

std::vector<std::vector<ExternalTemplate> > m_vecExternalTemplate;

Expand Down
Loading