CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
Phase2L1TGMTStubProducer Class Reference
Inheritance diagram for Phase2L1TGMTStubProducer:
edm::stream::EDProducer<>

Public Member Functions

 Phase2L1TGMTStubProducer (const edm::ParameterSet &)
 
 ~Phase2L1TGMTStubProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void beginStream (edm::StreamID) override
 
l1t::MuonStub convertToHybrid (const l1t::MuonStub &stub)
 
void endStream () override
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

L1TPhase2GMTBarrelStubProcessorprocBarrel_
 
L1TPhase2GMTEndcapStubProcessorprocEndcap_
 
edm::EDGetTokenT< MuonDigiCollection< CSCDetId, CSCCorrelatedLCTDigi > > srcCSC_
 
edm::EDGetTokenT< L1Phase2MuDTPhContainersrcDT_
 
edm::EDGetTokenT< L1MuDTChambThContainersrcDTTheta_
 
edm::EDGetTokenT< RPCDigiCollectionsrcRPC_
 
L1TMuon::GeometryTranslatortranslator_
 
int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 22 of file Phase2L1TGMTStubProducer.cc.

Constructor & Destructor Documentation

◆ Phase2L1TGMTStubProducer()

Phase2L1TGMTStubProducer::Phase2L1TGMTStubProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 45 of file Phase2L1TGMTStubProducer.cc.

References translator_.

46  : srcCSC_(
48  srcDT_(consumes<L1Phase2MuDTPhContainer>(iConfig.getParameter<edm::InputTag>("srcDT"))),
49  srcDTTheta_(consumes<L1MuDTChambThContainer>(iConfig.getParameter<edm::InputTag>("srcDTTheta"))),
50  srcRPC_(consumes<RPCDigiCollection>(iConfig.getParameter<edm::InputTag>("srcRPC"))),
53  verbose_(iConfig.getParameter<int>("verbose")) {
54  produces<l1t::MuonStubCollection>("kmtf");
55  produces<l1t::MuonStubCollection>("tps");
56  edm::ConsumesCollector consumesColl(consumesCollector());
57  translator_ = new L1TMuon::GeometryTranslator(consumesColl);
58 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< RPCDigiCollection > srcRPC_
L1TMuon::GeometryTranslator * translator_
edm::EDGetTokenT< MuonDigiCollection< CSCDetId, CSCCorrelatedLCTDigi > > srcCSC_
L1TPhase2GMTEndcapStubProcessor * procEndcap_
L1TMuon::GeometryTranslator GeometryTranslator
Definition: Common.h:30
L1TPhase2GMTBarrelStubProcessor * procBarrel_
edm::EDGetTokenT< L1MuDTChambThContainer > srcDTTheta_
edm::EDGetTokenT< L1Phase2MuDTPhContainer > srcDT_
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...

◆ ~Phase2L1TGMTStubProducer()

Phase2L1TGMTStubProducer::~Phase2L1TGMTStubProducer ( )
override

Definition at line 60 of file Phase2L1TGMTStubProducer.cc.

References procBarrel_, procEndcap_, and translator_.

60  {
61  // do anything here that needs to be done at destruction time
62  // (e.g. close files, deallocate resources etc.)
63  if (procEndcap_ != nullptr)
64  delete procEndcap_;
65  if (procBarrel_ != nullptr)
66  delete procBarrel_;
67  if (translator_ != nullptr)
68  delete translator_;
69 }
L1TMuon::GeometryTranslator * translator_
L1TPhase2GMTEndcapStubProcessor * procEndcap_
L1TPhase2GMTBarrelStubProcessor * procBarrel_

Member Function Documentation

◆ beginStream()

void Phase2L1TGMTStubProducer::beginStream ( edm::StreamID  )
overrideprivate

Definition at line 130 of file Phase2L1TGMTStubProducer.cc.

130 {}

◆ convertToHybrid()

l1t::MuonStub Phase2L1TGMTStubProducer::convertToHybrid ( const l1t::MuonStub stub)
private

Definition at line 75 of file Phase2L1TGMTStubProducer.cc.

References l1t::MuonStub::bxNum(), l1t::MuonStub::coord1(), l1t::MuonStub::coord2(), l1t::MuonStub::depthRegion(), l1t::MuonStub::eta1(), l1t::MuonStub::eta2(), l1t::MuonStub::etaQuality(), l1t::MuonStub::etaRegion(), KalmanFilterFormats_cfi::hybrid, l1t::MuonStub::id(), l1t::MuonStub::offline_coord1(), l1t::MuonStub::offline_coord2(), l1t::MuonStub::offline_eta1(), l1t::MuonStub::offline_eta2(), l1t::MuonStub::phiRegion(), l1t::MuonStub::tfLayer(), and l1t::MuonStub::type().

Referenced by produce().

75  {
77  stub.phiRegion(),
78  stub.depthRegion(),
79  stub.tfLayer(),
80  stub.coord1() / 256, //for track matching was 1024
81  stub.coord2() / 256, //for track matching was 1024
82  stub.id(),
83  stub.bxNum(),
84  0x3, //for track matching
85  stub.eta1(),
86  stub.eta2(),
87  stub.etaQuality(),
88  stub.type());
89  hybrid.setOfflineQuantities(stub.offline_coord1(), stub.offline_coord2(), stub.offline_eta1(), stub.offline_eta2());
90  return hybrid;
91 }
double offline_eta1() const
Definition: MuonStub.h:120
double offline_eta2() const
Definition: MuonStub.h:121
double offline_coord1() const
Definition: MuonStub.h:118
int coord1() const
return phi
Definition: MuonStub.h:75
int etaRegion() const
return wheel
Definition: MuonStub.h:67
int id() const
return tag (second TS tag)
Definition: MuonStub.h:81
int depthRegion() const
return station
Definition: MuonStub.h:71
int coord2() const
return phib
Definition: MuonStub.h:77
int eta1() const
return eta
Definition: MuonStub.h:108
int etaQuality() const
return first eta quality
Definition: MuonStub.h:111
int eta2() const
Definition: MuonStub.h:109
int phiRegion() const
return sector
Definition: MuonStub.h:69
double offline_coord2() const
Definition: MuonStub.h:119
int type() const
Definition: MuonStub.h:113
uint tfLayer() const
return track finder layer
Definition: MuonStub.h:73
int bxNum() const
return bunch crossing
Definition: MuonStub.h:105

◆ endStream()

void Phase2L1TGMTStubProducer::endStream ( )
overrideprivate

Definition at line 133 of file Phase2L1TGMTStubProducer.cc.

133 {}

◆ fillDescriptions()

void Phase2L1TGMTStubProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 135 of file Phase2L1TGMTStubProducer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

135  {
136  // gmtStubs
138  desc.add<int>("verbose", 0);
139  desc.add<edm::InputTag>("srcCSC", edm::InputTag("simCscTriggerPrimitiveDigis"));
140  desc.add<edm::InputTag>("srcDT", edm::InputTag("dtTriggerPhase2PrimitiveDigis"));
141  desc.add<edm::InputTag>("srcDTTheta", edm::InputTag("simDtTriggerPrimitiveDigis"));
142  desc.add<edm::InputTag>("srcRPC", edm::InputTag("simMuonRPCDigis"));
143  {
145  psd0.add<unsigned int>("verbose", 0);
146  psd0.add<int>("minBX", 0);
147  psd0.add<int>("maxBX", 0);
148  psd0.add<double>("coord1LSB", 0.02453124992);
149  psd0.add<double>("eta1LSB", 0.024586688);
150  psd0.add<double>("coord2LSB", 0.02453124992);
151  psd0.add<double>("eta2LSB", 0.024586688);
152  psd0.add<double>("phiMatch", 0.05);
153  psd0.add<double>("etaMatch", 0.1);
154  desc.add<edm::ParameterSetDescription>("Endcap", psd0);
155  }
156  {
158  psd0.add<int>("verbose", 0);
159  psd0.add<int>("minPhiQuality", 0);
160  psd0.add<int>("minThetaQuality", 0);
161  psd0.add<int>("minBX", 0);
162  psd0.add<int>("maxBX", 0);
163  psd0.add<double>("phiLSB", 0.02453124992);
164  psd0.add<int>("phiBDivider", 16);
165  psd0.add<double>("etaLSB", 0.024586688);
166  psd0.add<std::vector<int>>(
167  "eta_1",
168  {
169  -46, -45, -43, -41, -39, -37, -35, -30, -28, -26, -23, -20, -18, -15, -9, -6, -3, -1,
170  1, 3, 6, 9, 15, 18, 20, 23, 26, 28, 30, 35, 37, 39, 41, 43, 45, 1503,
171  });
172  psd0.add<std::vector<int>>(
173  "eta_2",
174  {
175  -41, -39, -38, -36, -34, -32, -30, -26, -24, -22, -20, -18, -15, -13, -8, -5, -3, -1,
176  1, 3, 5, 8, 13, 15, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 39, 1334,
177  });
178  psd0.add<std::vector<int>>(
179  "eta_3",
180  {
181  -35, -34, -32, -31, -29, -27, -26, -22, -20, -19, -17, -15, -13, -11, -6, -4, -2, -1,
182  1, 2, 4, 6, 11, 13, 15, 17, 19, 20, 22, 26, 27, 29, 31, 32, 34, 1148,
183  });
184  psd0.add<std::vector<int>>("coarseEta_1",
185  {
186  0,
187  23,
188  41,
189  });
190  psd0.add<std::vector<int>>("coarseEta_2",
191  {
192  0,
193  20,
194  36,
195  });
196  psd0.add<std::vector<int>>("coarseEta_3",
197  {
198  0,
199  17,
200  31,
201  });
202  psd0.add<std::vector<int>>("coarseEta_4",
203  {
204  0,
205  14,
206  27,
207  });
208  psd0.add<std::vector<int>>("phiOffset",
209  {
210  1,
211  0,
212  0,
213  0,
214  });
215  desc.add<edm::ParameterSetDescription>("Barrel", psd0);
216  }
217  descriptions.add("gmtStubs", desc);
218 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void Phase2L1TGMTStubProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 94 of file Phase2L1TGMTStubProducer.cc.

References L1TMuon::GeometryTranslator::checkAndUpdateGeometry(), convertToHybrid(), iEvent, L1TPhase2GMTBarrelStubProcessor::makeStubs(), L1TPhase2GMTEndcapStubProcessor::makeStubs(), procBarrel_, procEndcap_, edm::Handle< T >::product(), srcCSC_, srcDT_, srcDTTheta_, srcRPC_, SimL1Emulator_cff::stubs, and translator_.

94  {
95  using namespace edm;
97 
99  iEvent.getByToken(srcCSC_, cscDigis);
100 
101  Handle<RPCDigiCollection> rpcDigis;
102  iEvent.getByToken(srcRPC_, rpcDigis);
103 
105  iEvent.getByToken(srcDT_, dtDigis);
106 
107  Handle<L1MuDTChambThContainer> dtThetaDigis;
108  iEvent.getByToken(srcDTTheta_, dtThetaDigis);
109 
110  //Generate a unique stub ID
112  l1t::MuonStubCollection stubsKMTF;
113 
114  l1t::MuonStubCollection stubsEndcap = procEndcap_->makeStubs(*cscDigis, *rpcDigis, translator_, iSetup);
115  for (auto& stub : stubsEndcap) {
116  stubs.push_back(stub);
117  }
118  l1t::MuonStubCollection stubsBarrel = procBarrel_->makeStubs(dtDigis.product(), dtThetaDigis.product());
119  for (auto& stub : stubsBarrel) {
120  //convert to Hybrid
121  stubs.push_back(convertToHybrid(stub));
122  stubsKMTF.push_back(stub);
123  }
124 
125  iEvent.put(std::make_unique<l1t::MuonStubCollection>(stubs), "tps");
126  iEvent.put(std::make_unique<l1t::MuonStubCollection>(stubsKMTF), "kmtf");
127 }
edm::EDGetTokenT< RPCDigiCollection > srcRPC_
L1TMuon::GeometryTranslator * translator_
edm::EDGetTokenT< MuonDigiCollection< CSCDetId, CSCCorrelatedLCTDigi > > srcCSC_
T const * product() const
Definition: Handle.h:70
L1TPhase2GMTEndcapStubProcessor * procEndcap_
l1t::MuonStubCollection makeStubs(const MuonDigiCollection< CSCDetId, CSCCorrelatedLCTDigi > &csc, const MuonDigiCollection< RPCDetId, RPCDigi > &rpc, const L1TMuon::GeometryTranslator *t, const edm::EventSetup &iSetup)
l1t::MuonStub convertToHybrid(const l1t::MuonStub &stub)
int iEvent
Definition: GenABIO.cc:224
void checkAndUpdateGeometry(const edm::EventSetup &)
std::vector< MuonStub > MuonStubCollection
Definition: MuonStub.h:40
l1t::MuonStubCollection makeStubs(const L1Phase2MuDTPhContainer *, const L1MuDTChambThContainer *)
L1TPhase2GMTBarrelStubProcessor * procBarrel_
edm::EDGetTokenT< L1MuDTChambThContainer > srcDTTheta_
edm::EDGetTokenT< L1Phase2MuDTPhContainer > srcDT_
HLT enums.

Member Data Documentation

◆ procBarrel_

L1TPhase2GMTBarrelStubProcessor* Phase2L1TGMTStubProducer::procBarrel_
private

Definition at line 40 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce(), and ~Phase2L1TGMTStubProducer().

◆ procEndcap_

L1TPhase2GMTEndcapStubProcessor* Phase2L1TGMTStubProducer::procEndcap_
private

Definition at line 39 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce(), and ~Phase2L1TGMTStubProducer().

◆ srcCSC_

edm::EDGetTokenT<MuonDigiCollection<CSCDetId, CSCCorrelatedLCTDigi> > Phase2L1TGMTStubProducer::srcCSC_
private

Definition at line 34 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce().

◆ srcDT_

edm::EDGetTokenT<L1Phase2MuDTPhContainer> Phase2L1TGMTStubProducer::srcDT_
private

Definition at line 35 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce().

◆ srcDTTheta_

edm::EDGetTokenT<L1MuDTChambThContainer> Phase2L1TGMTStubProducer::srcDTTheta_
private

Definition at line 36 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce().

◆ srcRPC_

edm::EDGetTokenT<RPCDigiCollection> Phase2L1TGMTStubProducer::srcRPC_
private

Definition at line 37 of file Phase2L1TGMTStubProducer.cc.

Referenced by produce().

◆ translator_

L1TMuon::GeometryTranslator* Phase2L1TGMTStubProducer::translator_
private

◆ verbose_

int Phase2L1TGMTStubProducer::verbose_
private

Definition at line 42 of file Phase2L1TGMTStubProducer.cc.