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

Remove option to run on single GEM pads; Simplify CSC trigger configuration #31631

Merged
merged 6 commits into from
Nov 24, 2020
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
4 changes: 3 additions & 1 deletion DataFormats/L1TMuon/interface/CSCConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ class CSCConstants {
// An MPC receives up to 18 LCTs from 9 CSCs in the trigger sector
MAX_LCTS_PER_MPC = 18,
// Reference BX for LCTs in simulation and firmware
LCT_CENTRAL_BX = 8
LCT_CENTRAL_BX = 8,
// Offset between the ALCT and CLCT central BX in simulation
ALCT_CLCT_OFFSET = 1
};
};

Expand Down
1 change: 0 additions & 1 deletion L1Trigger/CSCTriggerPrimitives/BuildFile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<use name="FWCore/Utilities"/>
<use name="Geometry/CSCGeometry"/>
<use name="Geometry/GEMGeometry"/>
<use name="Geometry/CSCGeometry"/>
<export>
<lib name="1"/>
</export>
2 changes: 1 addition & 1 deletion L1Trigger/CSCTriggerPrimitives/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The `test/` directory contains python configuration to test the CSC local trigge

The configuration for the CSC local trigger is `cscTriggerPrimitiveDigis_cfi`. By default it is integrated into the standard L1 sequence which can be found [here](https://github.com/cms-sw/cmssw/blob/master/L1Trigger/L1TMuon/python/simDigis_cff.py#L15-L20). When emulating ALCTs/CLCTs/LCTs on simulated wire and comparator digis, the inputs are `"simMuonCSCDigis:MuonCSCWireDigi"` and `"simMuonCSCDigis:MuonCSCComparatorDigi"` respectively. When re-emulating ALCTs/CLCTs/LCTs from unpacked wire and comparator digis - from real LHC data, or GIF++ test-beam data - the inputs are `"muonCSCDigis:MuonCSCWireDigi"` and `"muonCSCDigis:MuonCSCComparatorDigi"` respectively. The configuration of the CSC local trigger as part of the standard L1 sequence on data can be found [here](https://github.com/cms-sw/cmssw/blob/master/L1Trigger/Configuration/python/ValL1Emulator_cff.py#L88-L96).

Besides the input collections, the configuration has parameter sets for the ALCT processors (`alctParam`), CLCT processors (`clctParam`), GEM copad processors (`copadParam`), TMBs (`tmbParam`) and MPCs (`mpcRun2`). A parameter set for common settings is also available (`commonParam`). Parameter sets for upgraded versions of algorithms (more suited for high-luminosity conditions than older versions) are given a label `SLHC` typically. Through the `eras` formalism the upgrades can be switched on.
Besides the input collections, the configuration has parameter sets for the ALCT processors (`alctParam`), CLCT processors (`clctParam`), GEM copad processors (`copadParam`), TMBs (`tmbParam`) and MPCs (`mpcRun2`). A parameter set for common settings is also available (`commonParam`). Parameter sets for upgraded versions of algorithms (more suited for high-luminosity conditions than older versions) are given a label `Phase2` typically. Through the `eras` formalism the upgrades can be switched on.

The Run-2 era (`run2_common`) customizes the default algorithm for updates carried out during Long Shutdown 1. The main difference between Run-1 and Run-2 for the trigger is the unganging of strips in the ME1a subdetector.

Expand Down
14 changes: 7 additions & 7 deletions L1Trigger/CSCTriggerPrimitives/interface/CSCAnodeLCTProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,26 +132,26 @@ class CSCAnodeLCTProcessor : public CSCBaseboard {
unsigned int nplanes_hit_pattern, nplanes_hit_accel_pattern;
unsigned int trig_mode, accel_mode, l1a_window_width;

/** SLHC: hit persistency length */
/** Phase2: hit persistency length */
unsigned int hit_persist;

/** SLHC: separate handle for early time bins */
/** Phase2: separate handle for early time bins */
int early_tbins;

/** SLHC: delta BX time depth for ghostCancellationLogic */
/** Phase2: delta BX time depth for ghostCancellationLogic */
int ghost_cancellation_bx_depth;

/** SLHC: whether to consider ALCT candidates' qualities
/** Phase2: whether to consider ALCT candidates' qualities
while doing ghostCancellationLogic on +-1 wire groups */
bool ghost_cancellation_side_quality;

/** SLHC: deadtime clocks after pretrigger (extra in addition to drift_delay) */
/** Phase2: deadtime clocks after pretrigger (extra in addition to drift_delay) */
unsigned int pretrig_extra_deadtime;

/** SLHC: whether to use corrected_bx instead of pretrigger BX */
/** Phase2: whether to use corrected_bx instead of pretrigger BX */
bool use_corrected_bx;

/** SLHC: whether to use narrow pattern mask for the rings close to the beam */
/** Phase2: whether to use narrow pattern mask for the rings close to the beam */
bool narrow_mask_r1;

/** Default values of configuration parameters. */
Expand Down
28 changes: 10 additions & 18 deletions L1Trigger/CSCTriggerPrimitives/interface/CSCBaseboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class CSCBaseboard {
// is this an ME11 chamber?
bool isME11_;
bool isME21_;
bool isME31_;
bool isME41_;

// CSCDetId for this chamber
CSCDetId cscId_;
Expand Down Expand Up @@ -79,35 +81,25 @@ class CSCBaseboard {
// chamber name, e.g. ME+1/1/9
std::string theCSCName_;

/** Flag for SLHC studies. */
bool isSLHC_;
bool enableAlctSLHC_;
/** Flag for Phase2 studies. */
bool runPhase2_;
bool enableAlctPhase2_;

/** SLHC: special configuration parameters for ME1a treatment */
/** Phase2: special configuration parameters for ME1a treatment */
bool disableME1a_, gangedME1a_;

// shift the BX from 7 to 8
// the unpacked real data CLCTs have central BX at bin 7
// however in simulation the central BX is bin 8
// to make a proper comparison with ALCTs we need
// CLCT and ALCT to have the central BX in the same bin
// this shift does not affect the readout of the CLCTs
// emulated CLCTs put in the event should be centered at bin 7 (as in data)
unsigned int alctClctOffset_;

/** SLHC: run the upgrade for the Phase-II ME1/1 integrated local trigger */
/** Phase2: run the upgrade for the Phase-II ME1/1 integrated local trigger */
bool runME11ILT_;

/** SLHC: run the upgrade for the Phase-II ME2/1 integrated local trigger */
/** Phase2: run the upgrade for the Phase-II ME2/1 integrated local trigger */
bool runME21ILT_;

/** SLHC: run the upgrade local trigger (without GEMs) */
/** Phase2: run the upgrade local trigger (without GEMs) */
bool runME11Up_;
bool runME21Up_;
bool runME31Up_;
bool runME41Up_;

bool use_run3_patterns_;
bool use_comparator_codes_;
bool runCCLUT_;
};
#endif
12 changes: 3 additions & 9 deletions L1Trigger/CSCTriggerPrimitives/interface/CSCGEMMotherboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ class CSCGEMMotherboard : public CSCUpgradeMotherboard {

using CSCUpgradeMotherboard::readoutLCTs;

// run TMB with GEM pads as input
using CSCUpgradeMotherboard::run;
virtual void run(const CSCWireDigiCollection* wiredc,
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiCollection* gemPads) = 0;

// run TMB with GEM pad clusters as input
virtual void run(const CSCWireDigiCollection* wiredc,
Expand Down Expand Up @@ -184,8 +180,9 @@ class CSCGEMMotherboard : public CSCUpgradeMotherboard {
const CSCALCTDigi& alct, const CSCCLCTDigi& clct, const GEMPadDigi& gem1, const GEMCoPadDigi& gem2, int i) const;

// get the pads/copads from the digi collection and store in handy containers
void retrieveGEMPads(const GEMPadDigiCollection* pads, unsigned id);
void retrieveGEMCoPads();
void processGEMClusters(const GEMPadDigiClusterCollection* pads);
void processGEMPads(const GEMPadDigiCollection* pads);
void processGEMCoPads();

enum LCT_QualityRun3 {
INVALID = 0,
Expand Down Expand Up @@ -234,9 +231,6 @@ class CSCGEMMotherboard : public CSCUpgradeMotherboard {
bool promoteALCTGEMquality_;
bool promoteCLCTGEMquality_;

// LCT ghostbusting
bool doLCTGhostBustingWithGEMs_;

private:
template <class T>
const matchesBX<T>& getPads() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ class CSCGEMMotherboardME11 : public CSCGEMMotherboard {
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiClusterCollection* gemPads) override;

void run(const CSCWireDigiCollection* wiredc,
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiCollection* gemPads) override;

/* readout the LCTs in ME1a or ME1b */
std::vector<CSCCorrelatedLCTDigi> readoutLCTs1a() const;
std::vector<CSCCorrelatedLCTDigi> readoutLCTs1b() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ class CSCGEMMotherboardME21 : public CSCGEMMotherboard {
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiClusterCollection* gemPads) override;

void run(const CSCWireDigiCollection* wiredc,
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiCollection* gemPads) override;

/* readout the two best LCTs in this CSC */
std::vector<CSCCorrelatedLCTDigi> readoutLCTs() const override;

Expand Down
8 changes: 4 additions & 4 deletions L1Trigger/CSCTriggerPrimitives/interface/CSCMotherboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ class CSCMotherboard : public CSCBaseboard {
unsigned int alct_trig_enable, clct_trig_enable, match_trig_enable;
unsigned int match_trig_window_size, tmb_l1a_window_size;

/** SLHC: whether to not reuse ALCTs that were used by previous matching CLCTs */
/** Phase2: whether to not reuse ALCTs that were used by previous matching CLCTs */
bool drop_used_alcts;

/** SLHC: whether to not reuse CLCTs that were used by previous matching ALCTs */
/** Phase2: whether to not reuse CLCTs that were used by previous matching ALCTs */
bool drop_used_clcts;

/** SLHC: separate handle for early time bins */
/** Phase2: separate handle for early time bins */
int early_tbins;

/** SLHC: whether to readout only the earliest two LCTs in readout window */
/** Phase2: whether to readout only the earliest two LCTs in readout window */
bool readout_earliest_2;

/** if true: use regular CLCT-to-ALCT matching in TMB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "DataFormats/CSCDigi/interface/CSCCLCTPreTriggerDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
#include "DataFormats/CSCDigi/interface/CSCCLCTPreTriggerCollection.h"
#include "DataFormats/GEMDigi/interface/GEMPadDigiCollection.h"
#include "DataFormats/GEMDigi/interface/GEMPadDigiClusterCollection.h"
#include "DataFormats/GEMDigi/interface/GEMCoPadDigiCollection.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand Down Expand Up @@ -67,7 +66,6 @@ class CSCTriggerPrimitivesBuilder {
void build(const CSCBadChambers* badChambers,
const CSCWireDigiCollection* wiredc,
const CSCComparatorDigiCollection* compdc,
const GEMPadDigiCollection* gemPads,
const GEMPadDigiClusterCollection* gemPadClusters,
CSCALCTDigiCollection& oc_alct,
CSCALCTDigiCollection& oc_alct_all,
Expand Down Expand Up @@ -109,30 +107,27 @@ class CSCTriggerPrimitivesBuilder {
/// a flag whether to skip chambers from the bad chambers map
bool checkBadChambers_;

/** SLHC: special configuration parameters for ME11 treatment. */
bool isSLHC_;
/** Phase2: special configuration parameters for ME11 treatment. */
bool runPhase2_;

/** SLHC: special switch for disabling ME42 */
/** Phase2: special switch for disabling ME42 */
bool disableME1a_;

/** SLHC: special switch for disabling ME42 */
/** Phase2: special switch for disabling ME42 */
bool disableME42_;

/** SLHC: individual switches */
/** Phase2: individual switches */
bool runME11Up_;
bool runME21Up_;
bool runME31Up_;
bool runME41Up_;

/** SLHC: special switch for the upgrade ME1/1 TMB */
/** Phase2: special switch for the upgrade ME1/1 TMB */
bool runME11ILT_;

/** SLHC: special switch for the upgrade ME2/1 TMB */
/** Phase2: special switch for the upgrade ME2/1 TMB */
bool runME21ILT_;

/** SLHC: special switch to use gem clusters */
bool useClusters_;

/** Pointers to TMB processors for all possible chambers. */
std::unique_ptr<CSCMotherboard> tmb_[MAX_ENDCAPS][MAX_STATIONS][MAX_SECTORS][MAX_SUBSECTORS][MAX_CHAMBERS];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ class CSCUpgradeCathodeLCTProcessor : public CSCCathodeLCTProcessor {
/** VK: whether to use corrected_bx instead of pretrigger BX */
bool use_corrected_bx;

//--------------- Functions for SLHC studies ----------------
//--------------- Functions for Phase2 studies ----------------
std::vector<CSCCLCTDigi> findLCTs(
const std::vector<int> halfstrip[CSCConstants::NUM_LAYERS][CSCConstants::NUM_HALF_STRIPS_7CFEBS]) override;

/* SLHC version, Check all half-strip pattern envelopes simultaneously, on every clock cycle, for a matching pattern */
/* Phase2 version, Check all half-strip pattern envelopes simultaneously, on every clock cycle, for a matching pattern */
bool preTrigger(const PulseArray pulse, const int start_bx, int& first_bx) override;
};

Expand Down
6 changes: 3 additions & 3 deletions L1Trigger/CSCTriggerPrimitives/interface/LCTQualityControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ class LCTQualityControl : public CSCBaseboard {
unsigned get_csc_max_eightstrip(int station, int ring) const;

// slope values
std::pair<int, int> get_csc_clct_min_max_slope(bool isRun3, bool runCCLUT = false) const;
std::pair<int, int> get_csc_clct_min_max_slope() const;

// CLCT min, max CFEB numbers
std::pair<unsigned, unsigned> get_csc_min_max_cfeb(int station, int ring) const;

// CSC min, max pattern
std::pair<unsigned, unsigned> get_csc_min_max_pattern(bool isRun3) const;
std::pair<unsigned, unsigned> get_csc_lct_min_max_pattern(bool isRun3) const;
std::pair<unsigned, unsigned> get_csc_lct_min_max_pattern() const;

// CSC max quality
unsigned get_csc_alct_max_quality(int station, int ring, bool isRun3) const;
unsigned get_csc_alct_max_quality(int station, int ring, bool runGEMCSC) const;
unsigned get_csc_clct_max_quality() const;
unsigned get_csc_lct_max_quality() const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS

wireDigiProducer_ = conf.getParameter<edm::InputTag>("CSCWireDigiProducer");
compDigiProducer_ = conf.getParameter<edm::InputTag>("CSCComparatorDigiProducer");
gemPadDigiProducer_ = conf.getParameter<edm::InputTag>("GEMPadDigiProducer");
gemPadDigiClusterProducer_ = conf.getParameter<edm::InputTag>("GEMPadDigiClusterProducer");

checkBadChambers_ = conf.getParameter<bool>("checkBadChambers");
Expand All @@ -53,7 +52,6 @@ CSCTriggerPrimitivesProducer::CSCTriggerPrimitivesProducer(const edm::ParameterS

wire_token_ = consumes<CSCWireDigiCollection>(wireDigiProducer_);
comp_token_ = consumes<CSCComparatorDigiCollection>(compDigiProducer_);
gem_pad_token_ = consumes<GEMPadDigiCollection>(gemPadDigiProducer_);
gem_pad_cluster_token_ = consumes<GEMPadDigiClusterCollection>(gemPadDigiClusterProducer_);
cscToken_ = esConsumes<CSCGeometry, MuonGeometryRecord>();
gemToken_ = esConsumes<GEMGeometry, MuonGeometryRecord>();
Expand Down Expand Up @@ -122,14 +120,6 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev, const edm::EventSetup
ev.getByToken(comp_token_, compDigis);
ev.getByToken(wire_token_, wireDigis);

// input GEM pad collection for upgrade scenarios
const GEMPadDigiCollection* gemPads = nullptr;
if (!gemPadDigiProducer_.label().empty()) {
edm::Handle<GEMPadDigiCollection> gemPadDigis;
ev.getByToken(gem_pad_token_, gemPadDigis);
gemPads = gemPadDigis.product();
}

// input GEM pad cluster collection for upgrade scenarios
const GEMPadDigiClusterCollection* gemPadClusters = nullptr;
if (!gemPadDigiClusterProducer_.label().empty()) {
Expand Down Expand Up @@ -169,7 +159,6 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev, const edm::EventSetup
builder_->build(temp,
wireDigis.product(),
compDigis.product(),
gemPads,
gemPadClusters,
*oc_alct,
*oc_alct_all,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ class CSCTriggerPrimitivesProducer : public edm::one::EDProducer<> {
// input tags for input collections
edm::InputTag compDigiProducer_;
edm::InputTag wireDigiProducer_;
edm::InputTag gemPadDigiProducer_;
edm::InputTag gemPadDigiClusterProducer_;

// tokens
edm::EDGetTokenT<CSCComparatorDigiCollection> comp_token_;
edm::EDGetTokenT<CSCWireDigiCollection> wire_token_;
edm::EDGetTokenT<GEMPadDigiCollection> gem_pad_token_;
edm::EDGetTokenT<GEMPadDigiClusterCollection> gem_pad_cluster_token_;
edm::ESGetToken<CSCGeometry, MuonGeometryRecord> cscToken_;
edm::ESGetToken<GEMGeometry, MuonGeometryRecord> gemToken_;
Expand Down
Loading