Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L1T uGT: Three body invariant mass for muons #33911

Merged
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
110 changes: 110 additions & 0 deletions L1Trigger/L1TGlobal/interface/CorrThreeBodyCondition.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#ifndef L1Trigger_L1TGlobal_CorrThreeBodyCondition_h
#define L1Trigger_L1TGlobal_CorrThreeBodyCondition_h

/**
* \class CorrThreeBodyCondition
*
* Description: L1 Global Trigger three-body correlation conditions:
* evaluation of a three-body correlation condition (= three-muon invariant mass)
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Elisa Fontanesi - Boston University
* CorrCondition and CorrWithOverlapRemovalCondition classes used as a starting point
*
*/

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

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

// forward declarations
class GlobalCondition;
class CorrelationThreeBodyTemplate;

namespace l1t {

class L1Candidate;

class GlobalBoard;

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

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

);

// copy constructor
CorrThreeBodyCondition(const CorrThreeBodyCondition&);

// destructor
~CorrThreeBodyCondition() override;

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

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 Condition
inline const CorrelationThreeBodyTemplate* gtCorrelationThreeBodyTemplate() const {
return m_gtCorrelationThreeBodyTemplate;
}

void setGtCorrelationThreeBodyTemplate(const CorrelationThreeBodyTemplate*);

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

void setuGtB(const GlobalBoard*);

void setScales(const GlobalScales*);

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

/// load candidates
const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const;

/// function to check a single object if it matches a condition
const bool checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const;

private:
/// pointer to a CorrelationThreeBodyTemplate
const CorrelationThreeBodyTemplate* m_gtCorrelationThreeBodyTemplate;

// pointer to subconditions
const GlobalCondition* m_gtCond0;
const GlobalCondition* m_gtCond1;
const GlobalCondition* m_gtCond2;

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

const GlobalScales* m_gtScales;
};

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

/**
* \class CorrelationThreeBodyTemplate
*
*
* Description: L1 Global Trigger three-body correlation template:
* include invariant mass calculation for three-muon events
*
* Implementation:
* <TODO: enter implementation details>
*
* \author: Elisa Fontanesi - Boston University
* Starting from CorrelationTemplate.h written by 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"
#include "L1Trigger/L1TGlobal/interface/GlobalDefinitions.h"

// forward declarations

// class declaration
class CorrelationThreeBodyTemplate : public GlobalCondition {
public:
/// constructor(s)
/// default
CorrelationThreeBodyTemplate();

/// from condition name
CorrelationThreeBodyTemplate(const std::string&);

/// from condition name, the category of first, second, and third subcondition,
/// the index of first, second, third subcondition in the cor* vector
CorrelationThreeBodyTemplate(const std::string&,
const l1t::GtConditionCategory&,
const l1t::GtConditionCategory&,
const l1t::GtConditionCategory&,
const int,
const int,
const int);

/// copy constructor
CorrelationThreeBodyTemplate(const CorrelationThreeBodyTemplate&);

/// destructor
~CorrelationThreeBodyTemplate() override;

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

public:
/// typedef for correlation three-body parameters
struct CorrelationThreeBodyParameter {
//Cut values in hardware
long long minEtaCutValue;
long long maxEtaCutValue;
unsigned int precEtaCut;

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

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

int corrCutType;
};

public:
/// get / set the category of the three subconditions
inline const l1t::GtConditionCategory cond0Category() const { return m_cond0Category; }
inline const l1t::GtConditionCategory cond1Category() const { return m_cond1Category; }
inline const l1t::GtConditionCategory cond2Category() const { return m_cond2Category; }

void setCond0Category(const l1t::GtConditionCategory&);
void setCond1Category(const l1t::GtConditionCategory&);
void setCond2Category(const l1t::GtConditionCategory&);

/// get / set the index of the three subconditions in the cor* vector from menu
inline const int cond0Index() const { return m_cond0Index; }
inline const int cond1Index() const { return m_cond1Index; }
inline const int cond2Index() const { return m_cond2Index; }

void setCond0Index(const int&);
void setCond1Index(const int&);
void setCond2Index(const int&);

/// get / set correlation parameters
inline const CorrelationThreeBodyParameter* correlationThreeBodyParameter() const {
return &m_correlationThreeBodyParameter;
}
void setCorrelationThreeBodyParameter(const CorrelationThreeBodyParameter& corrThreeBodyParameter);

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

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

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

private:
l1t::GtConditionCategory m_cond0Category;
l1t::GtConditionCategory m_cond1Category;
l1t::GtConditionCategory m_cond2Category;
int m_cond0Index;
int m_cond1Index;
int m_cond2Index;
CorrelationThreeBodyParameter m_correlationThreeBodyParameter;
};

#endif
4 changes: 4 additions & 0 deletions L1Trigger/L1TGlobal/interface/GlobalCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* <TODO: enter implementation details>
*
* \author: Brian Winer, OSU Vasile Mihai Ghete - HEPHY Vienna
* Elisa Fontanesi - extended for three-body correlation conditions
*
* $Date$
* $Revision$
Expand Down Expand Up @@ -93,6 +94,9 @@ class GlobalCondition {
/// and with spatial correlations
const bool corr() const;

/// get logic flag for three-body conditions, trigger objects are muons
const bool corrThree() const;

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

Expand Down
4 changes: 3 additions & 1 deletion L1Trigger/L1TGlobal/interface/GlobalDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
*
* \author: Vladimir Rekovic, Brian Winer, OSU Vasile Mihai Ghete - HEPHY Vienna
* Elisa Fontanesi - extended for three-body correlation conditions
*
* $Date$
* $Revision$
Expand Down Expand Up @@ -96,7 +97,8 @@ namespace l1t {
CondEnergySum,
CondCorrelation,
CondExternal,
CondCorrelationWithOverlapRemoval
CondCorrelationWithOverlapRemoval,
CondCorrelationThreeBody
};

struct GtConditionCategoryStringToEnum {
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 @@ -12,6 +12,7 @@
*
* \author: Vasile Mihai Ghete - HEPHY Vienna
* Vladimir Rekovic - extend for overlap removal
* Elisa Fontanesi - extended for three-body correlation conditions
*
* $Date$
* $Revision$
Expand All @@ -35,6 +36,7 @@
#include "L1Trigger/L1TGlobal/interface/EnergySumTemplate.h"
#include "L1Trigger/L1TGlobal/interface/ExternalTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationThreeBodyTemplate.h"
#include "L1Trigger/L1TGlobal/interface/CorrelationWithOverlapRemovalTemplate.h"

// forward declarations
Expand All @@ -55,6 +57,7 @@ class TriggerMenu {
const std::vector<std::vector<EnergySumTemplate> >&,
const std::vector<std::vector<ExternalTemplate> >&,
const std::vector<std::vector<CorrelationTemplate> >&,
const std::vector<std::vector<CorrelationThreeBodyTemplate> >&,
const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >&,
const std::vector<std::vector<MuonTemplate> >&,
const std::vector<std::vector<CaloTemplate> >&,
Expand Down Expand Up @@ -131,6 +134,13 @@ class TriggerMenu {

void setVecCorrelationTemplate(const std::vector<std::vector<CorrelationTemplate> >&);

//
inline const std::vector<std::vector<CorrelationThreeBodyTemplate> >& vecCorrelationThreeBodyTemplate() const {
return m_vecCorrelationThreeBodyTemplate;
}

void setVecCorrelationThreeBodyTemplate(const std::vector<std::vector<CorrelationThreeBodyTemplate> >&);

//
inline const std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> >&
vecCorrelationWithOverlapRemovalTemplate() const {
Expand Down Expand Up @@ -214,6 +224,7 @@ class TriggerMenu {
std::vector<std::vector<ExternalTemplate> > m_vecExternalTemplate;

std::vector<std::vector<CorrelationTemplate> > m_vecCorrelationTemplate;
std::vector<std::vector<CorrelationThreeBodyTemplate> > m_vecCorrelationThreeBodyTemplate;
std::vector<std::vector<CorrelationWithOverlapRemovalTemplate> > m_vecCorrelationWithOverlapRemovalTemplate;
std::vector<std::vector<MuonTemplate> > m_corMuonTemplate;
std::vector<std::vector<CaloTemplate> > m_corCaloTemplate;
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// L1TGlobalProducer.cc
//author: Brian Winer - Ohio State
// Vladimir Rekovic - extend for overlap removal
// Elisa Fontanesi - extended for three-body correlation conditions

#include "L1Trigger/L1TGlobal/plugins/L1TGlobalProducer.h"

Expand Down Expand Up @@ -333,6 +334,7 @@ void L1TGlobalProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSet
gtParser.vecEnergySumTemplate(),
gtParser.vecExternalTemplate(),
gtParser.vecCorrelationTemplate(),
gtParser.vecCorrelationThreeBodyTemplate(),
gtParser.vecCorrelationWithOverlapRemovalTemplate(),
gtParser.corMuonTemplate(),
gtParser.corCaloTemplate(),
Expand Down
Loading