Skip to content

Commit

Permalink
Merge pull request PFCal-dev#91 from jaimeleonh/AM_12_3_X_integration…
Browse files Browse the repository at this point in the history
…_fix

Fixes in the RPC integrator + remove unused includes
  • Loading branch information
jaimeleonh authored Apr 1, 2022
2 parents 497cebd + 6d431ba commit 1bee309
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 18 deletions.
3 changes: 1 addition & 2 deletions L1Trigger/DTTriggerPhase2/interface/GlobalCoordsObtainer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef L1Trigger_DTTriggerPhase2_GlobalCoordsObtainer_h
#define L1Trigger_DTTriggerPhase2_GlobalCoordsObtainer_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
Expand Down Expand Up @@ -77,4 +76,4 @@ class GlobalCoordsObtainer {
std::map<uint32_t, lut_group> luts;
};

#endif
#endif
1 change: 0 additions & 1 deletion L1Trigger/DTTriggerPhase2/interface/MPFilter.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef Phase2L1Trigger_DTTrigger_MPFilter_h
#define Phase2L1Trigger_DTTrigger_MPFilter_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down
1 change: 0 additions & 1 deletion L1Trigger/DTTriggerPhase2/interface/MotherGrouping.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef Phase2L1Trigger_DTTrigger_MotherGrouping_h
#define Phase2L1Trigger_DTTrigger_MotherGrouping_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down
1 change: 0 additions & 1 deletion L1Trigger/DTTriggerPhase2/interface/MuonPathAnalyzer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef Phase2L1Trigger_DTTrigger_MuonPathAnalyzer_h
#define Phase2L1Trigger_DTTrigger_MuonPathAnalyzer_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Utilities/interface/ESGetToken.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/FrameworkfwdMostUsed.h"
Expand Down
3 changes: 0 additions & 3 deletions L1Trigger/DTTriggerPhase2/interface/RPCIntegrator.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef Phase2L1Trigger_DTTrigger_RPCIntegrator_h
#define Phase2L1Trigger_DTTrigger_RPCIntegrator_h

#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down Expand Up @@ -93,8 +92,6 @@ class RPCIntegrator {
edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomH_;
edm::ESGetToken<RPCGeometry, MuonGeometryRecord> rpcGeomH_;

static constexpr double m_dt_phi_granularity_ = (65536. / 0.8); // 65536 different values per 0.8 radian
static constexpr double m_dt_phiB_granularity_ = (2048. / 1.4); // 2048. different values per 1.4 radian
// Constant geometry values
//R[stat][layer] - radius of rpc station/layer from center of CMS
static constexpr double R_[2][2] = {{410.0, 444.8}, {492.7, 527.3}};
Expand Down
1 change: 0 additions & 1 deletion L1Trigger/DTTriggerPhase2/plugins/CalibratedDigis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "CalibMuon/DTDigiSync/interface/DTTTrigBaseSync.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/ESHandle.h"

#include "CalibMuon/DTDigiSync/interface/DTTTrigSyncFactory.h"

Expand Down
5 changes: 0 additions & 5 deletions L1Trigger/DTTriggerPhase2/plugins/DTTrigPhase2Prod.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class DTTrigPhase2Prod : public edm::stream::EDProducer<> {
int scenario_;
int df_extended_;
int max_index_;
// std::string geometry_tag_;

// ParameterSet
edm::EDGetTokenT<DTDigiCollection> dtDigisToken_;
Expand Down Expand Up @@ -193,10 +192,6 @@ DTTrigPhase2Prod::DTTrigPhase2Prod(const ParameterSet& pset)
// Choosing grouping scheme:
algo_ = pset.getParameter<int>("algo");

// Local to global coordinates approach
// geometry_tag_ =
// dtGeomToken_ = consumes<>(pset.getUntrackedParameter<std::string>("geometry_tag", ""));

edm::ConsumesCollector consumesColl(consumesCollector());
globalcoordsobtainer_ = std::make_shared<GlobalCoordsObtainer>(pset);
globalcoordsobtainer_->generate_luts();
Expand Down
6 changes: 3 additions & 3 deletions L1Trigger/DTTriggerPhase2/src/RPCIntegrator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ RPCMetaprimitive* RPCIntegrator::matchDTwithRPC(metaPrimitive* dt_metaprimitive)
// just a trick to apply the phi window cut on what could be accessed to fine tune it
int delta_phi =
(int)round((phi_DT_MP_conv(rpc_mp_it->global_position.phi(), rpc_det_id.sector()) - dt_metaprimitive->phi) *
m_dt_phiB_granularity_);
cmsdt::PHIBRES_CONV);
if (std::abs(delta_phi) < min_dPhi && std::abs(delta_phi) < m_phi_window_) {
min_dPhi = std::abs(delta_phi);
bestMatch_rpcRecHit = &*rpc_mp_it;
Expand All @@ -200,7 +200,7 @@ L1Phase2MuDTPhDigi RPCIntegrator::createL1Phase2MuDTPhDigi(
int rpc_station = rpcDetId.station();
int rpc_layer = rpcDetId.layer();
int rpc_trigger_phi = phiInDTTPFormat(rpc_global_phi, rpcDetId.sector());
int rpc_trigger_phiB = (phiB == -10000) ? phiB : (int)round(phiB * m_dt_phiB_granularity_);
int rpc_trigger_phiB = (phiB == -10000) ? phiB : (int)round(phiB * cmsdt::PHIBRES_CONV);
int rpc_quality = -1; // dummy for rpc
int rpc_index = 0; // dummy for rpc
return L1Phase2MuDTPhDigi(rpc_bx,
Expand Down Expand Up @@ -233,7 +233,7 @@ double RPCIntegrator::phiBending(RPCMetaprimitive* rpc_hit_1, RPCMetaprimitive*

int RPCIntegrator::phiInDTTPFormat(double rpc_global_phi, int rpcSector) {
double rpc_localDT_phi;
rpc_localDT_phi = phi_DT_MP_conv(rpc_global_phi, rpcSector) * m_dt_phi_granularity_;
rpc_localDT_phi = phi_DT_MP_conv(rpc_global_phi, rpcSector) * cmsdt::PHIBRES_CONV;
return (int)round(rpc_localDT_phi);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
process.dtTriggerPhase2PrimitiveDigis.algo = 0 ## initial grouping
process.dtTriggerPhase2PrimitiveDigis.df_extended = 0


# COMPARISON WITH FW
# process.dtTriggerPhase2PrimitiveDigis.useBX_correlation = True
# process.dtTriggerPhase2PrimitiveDigis.dBX_correlate_TP = 1
Expand Down

0 comments on commit 1bee309

Please sign in to comment.