Skip to content

[L1T] DT Trigger Phase-2 Analytical Method (AM) v2.2 #47693

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

Merged
merged 19 commits into from
Apr 15, 2025
Merged
Show file tree
Hide file tree
Changes from 14 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
84 changes: 84 additions & 0 deletions DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//-------------------------------------------------
//
// Class L1Phase2MuDTShower
//
// Description: shower primitive data for the
// muon barrel Phase2 trigger
//
//
// Author List:
// Federica Primavera Bologna INFN
// Carlos Vico Oviedo Spain,
// Daniel Estrada Acevedo Oviedo Spain.
//
//
//--------------------------------------------------
#ifndef L1Phase2MuDTShower_H
#define L1Phase2MuDTShower_H

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------

//----------------------
// Base Class Headers --
//----------------------

//---------------
// C++ Headers --
//---------------
#include <vector>

// ---------------------
// -- Class Interface --
// ---------------------

class L1Phase2MuDTShower {
public:
// Constructors
L1Phase2MuDTShower();

L1Phase2MuDTShower(int wh, // Wheel
int sc, // Sector
int st, // Station
int sl, // Superlayer
int ndigis, // Number of digis within shower
int bx, // BX estimation
int min_wire, // Minimum wire
int max_wire, // Maximum wire
float avg_pos, // Averaged position of the shower
float avg_time, // Averaged time of the shower
const std::vector<int> wires_profile // Wires profile
);

virtual ~L1Phase2MuDTShower() {};

// Operations

int whNum() const;
int scNum() const;
int stNum() const;
int slNum() const;
int ndigis() const;
int bxNum() const;
int minWire() const;
int maxWire() const;
float avg_time() const;
float avg_pos() const;
std::vector<int> wiresProfile() const;

private:
int m_wheel;
int m_sector;
int m_station;
int m_superlayer;
int m_ndigis;
int m_bx;
int m_min_wire;
int m_max_wire;
float m_avg_pos;
float m_avg_time;
std::vector<int> m_wires_profile;
};

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
//-------------------------------------------------
//
// Class L1Phase2MuDTPhContainer
//
// Description: trigger primtive data for the
// muon barrel Phase2 trigger
//
//
// Author List: Federica Primavera Bologna INFN
//
//
//--------------------------------------------------
#ifndef L1Phase2MuDTShowerContainer_H
#define L1Phase2MuDTShowerContainer_H

//------------------------------------
// Collaborating Class Declarations --
//------------------------------------
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h"

//----------------------
// Base Class Headers --
//----------------------
#include <vector>

//---------------
// C++ Headers --
//---------------

// ---------------------
// -- Class Interface --
// ---------------------

class L1Phase2MuDTShowerContainer {
public:
typedef std::vector<L1Phase2MuDTShower> Shower_Container;
typedef Shower_Container::const_iterator Shower_iterator;

// Constructor
L1Phase2MuDTShowerContainer();

void setContainer(const Shower_Container& inputShowers);

Shower_Container const* getContainer() const;

private:
Shower_Container m_showers;
};

#endif
98 changes: 98 additions & 0 deletions DataFormats/L1DTTrackFinder/src/L1Phase2MuDTShower.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
//-------------------------------------------------
//
// Class L1MuDTChambPhDigi
//
// Description: trigger primtive data for the
// muon barrel Phase2 trigger
//
//
// Author List:
// Federica Primavera Bologna INFN
// Carlos Vico Oviedo Spain,
// Daniel Estrada Acevedo Oviedo Spain.
//
//
//--------------------------------------------------

//-----------------------
// This Class's Header --
//-----------------------
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h"

//-------------------------------
// Collaborating Class Headers --
//-------------------------------

//---------------
// C++ Headers --
//---------------

//-------------------
// Initializations --
//-------------------

//----------------
// Constructors --
//----------------
L1Phase2MuDTShower::L1Phase2MuDTShower()
: m_wheel(0),
m_sector(0),
m_station(0),
m_superlayer(0),
m_ndigis(0),
m_bx(-100),
m_min_wire(0),
m_max_wire(0),
m_avg_pos(0),
m_avg_time(0) {
m_wires_profile.resize(96, 0);
}

L1Phase2MuDTShower::L1Phase2MuDTShower(int wh,
int sc,
int st,
int sl,
int ndigis,
int bx,
int min_wire,
int max_wire,
float avg_pos,
float avg_time,
const std::vector<int> wires_profile)
: m_wheel(wh),
m_sector(sc),
m_station(st),
m_superlayer(sl),
m_ndigis(ndigis),
m_bx(bx),
m_min_wire(min_wire),
m_max_wire(max_wire),
m_avg_pos(avg_pos),
m_avg_time(avg_time),
m_wires_profile(wires_profile) {}

//--------------
// Operations --
//--------------

int L1Phase2MuDTShower::whNum() const { return m_wheel; }

int L1Phase2MuDTShower::scNum() const { return m_sector; }

int L1Phase2MuDTShower::stNum() const { return m_station; }

int L1Phase2MuDTShower::slNum() const { return m_superlayer; }

int L1Phase2MuDTShower::ndigis() const { return m_ndigis; }

int L1Phase2MuDTShower::bxNum() const { return m_bx; }

int L1Phase2MuDTShower::minWire() const { return m_min_wire; }

int L1Phase2MuDTShower::maxWire() const { return m_max_wire; }

float L1Phase2MuDTShower::avg_time() const { return m_avg_time; }

float L1Phase2MuDTShower::avg_pos() const { return m_avg_pos; }

std::vector<int> L1Phase2MuDTShower::wiresProfile() const { return m_wires_profile; }
43 changes: 43 additions & 0 deletions DataFormats/L1DTTrackFinder/src/L1Phase2MuDTShowerContainer.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
//-------------------------------------------------
//
// Class L1MuDTChambContainer
//
// Description: trigger primtive data for the
// muon barrel Phase2 trigger
//
//
// Author List: Federica Primavera Bologna INFN
//
//
//--------------------------------------------------

//-----------------------
// This Class's Header --
//-----------------------
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h"

//-------------------------------
// Collaborating Class Headers --
//-------------------------------

//---------------
// C++ Headers --
//---------------

//-------------------
// Initializations --
//-------------------

//----------------
// Constructors --
//----------------
L1Phase2MuDTShowerContainer::L1Phase2MuDTShowerContainer() {}

//--------------
// Operations --
//--------------
void L1Phase2MuDTShowerContainer::setContainer(const Shower_Container& inputShowers) { m_showers = inputShowers; }

L1Phase2MuDTShowerContainer::Shower_Container const* L1Phase2MuDTShowerContainer::getContainer() const {
return &m_showers;
}
2 changes: 2 additions & 0 deletions DataFormats/L1DTTrackFinder/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
#include <DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTPhDigi.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTPhContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTThDigi.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTThContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtPhDigi.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtPhContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtThDigi.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtThContainer.h>
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h>
#include <DataFormats/Common/interface/Wrapper.h>
22 changes: 22 additions & 0 deletions DataFormats/L1DTTrackFinder/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@
<class name="L1Phase2MuDTPhDigi" ClassVersion="3">
<version ClassVersion="3" checksum="1236020577"/>
</class>

<class name="L1Phase2MuDTShower" ClassVersion="9">
<version ClassVersion="9" checksum="448482846"/>
<version ClassVersion="8" checksum="1870162932"/>
<version ClassVersion="7" checksum="3499440359"/>
<version ClassVersion="6" checksum="1855990307"/>
<version ClassVersion="5" checksum="1887794940"/>
<version ClassVersion="4" checksum="1065075593"/>
</class>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the first time we are adding L1Phase2MuDTShower to CMSSW can we start with ClassVersion="3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask why version 3? This class was developed aside and followed a different path where previous versions were internal, or you mean deleting lines from previous versions to last v9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, I reset them to v3 to be in sync with other similar classes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for changing them to 3. It comes from the guidelines here:
https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideCreatingNewProducts#Class_versioning
where this code was developed internally; so now we would want 3 as it comes into CMSSW.


<class name="L1Phase2MuDTExtPhDigi"/>
<class name="L1Phase2MuDTThDigi"/>
<class name="L1Phase2MuDTExtThDigi"/>
Expand All @@ -28,6 +38,7 @@
<class name="std::vector<L1Phase2MuDTThDigi>"/>
<class name="std::vector<L1Phase2MuDTExtPhDigi>"/>
<class name="std::vector<L1Phase2MuDTExtThDigi>"/>
<class name="std::vector<L1Phase2MuDTShower>"/>

<class name="L1MuDTChambPhContainer" ClassVersion="10">
<version ClassVersion="10" checksum="407874824"/>
Expand All @@ -42,6 +53,11 @@
<class name="L1Phase2MuDTPhContainer" ClassVersion="3">
<version ClassVersion="3" checksum="2858706077"/>
</class>

<class name="L1Phase2MuDTShowerContainer" ClassVersion="4">
<version ClassVersion="4" checksum="9565899"/>
</class>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is the first time we are adding L1Phase2MuDTShowerContainer to CMSSW can we start with ClassVersion="3"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I ask why version 3? This class was developed aside and followed a different path where previous versions were internal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I reset them to v3 to be in sync with other similar classes


<class name="L1Phase2MuDTThContainer"/>
<class name="L1Phase2MuDTExtPhContainer"/>
<class name="L1Phase2MuDTExtThContainer"/>
Expand All @@ -55,5 +71,11 @@
<class name="edm::Wrapper<L1Phase2MuDTThContainer>" splitLevel="0"/>
<class name="edm::Wrapper<L1Phase2MuDTExtPhContainer>" splitLevel="0"/>
<class name="edm::Wrapper<L1Phase2MuDTExtThContainer>" splitLevel="0"/>
<class name="edm::Wrapper<L1Phase2MuDTShowerContainer>" splitLevel="0"/>

<class name="edm::Wrapper<std::vector<L1Phase2MuDTPhDigi> >" />
<class name="edm::Wrapper<std::vector<L1Phase2MuDTThDigi> >" />
<class name="edm::Wrapper<std::vector<L1Phase2MuDTExtPhDigi> >" />
<class name="edm::Wrapper<std::vector<L1Phase2MuDTExtThDigi> >" />

</lcgdict>
2 changes: 2 additions & 0 deletions L1Trigger/Configuration/python/SimL1Emulator_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
_phase2_siml1emulator.add(CalibratedDigis)
from L1Trigger.DTTriggerPhase2.dtTriggerPhase2PrimitiveDigis_cfi import *
_phase2_siml1emulator.add(dtTriggerPhase2PrimitiveDigis)
from L1Trigger.DTTriggerPhase2.dtTriggerPhase2Showers_cfi import *
_phase2_siml1emulator.add(dtTriggerPhase2Shower)

# HGCAL TP
# ########################################################################
Expand Down
2 changes: 2 additions & 0 deletions L1Trigger/DTTriggerPhase2/interface/MPCoincidenceFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ class MPCoincidenceFilter : public MPFilter {
std::vector<cmsdt::metaPrimitive> allMPs,
int co_option,
int co_quality,
int co_wh2option,
double shift_back);

// Private attributes
const bool debug_;
int co_option_;
int co_quality_;
int co_wh2option_;
int scenario_;
};

Expand Down
Loading