CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
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>();
55  edm::ConsumesCollector consumesColl(consumesCollector());
56  translator_ = new L1TMuon::GeometryTranslator(consumesColl);
57 }
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 59 of file Phase2L1TGMTStubProducer.cc.

References procBarrel_, procEndcap_, and translator_.

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

Member Function Documentation

◆ beginStream()

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

Definition at line 145 of file Phase2L1TGMTStubProducer.cc.

145 {}

◆ endStream()

void Phase2L1TGMTStubProducer::endStream ( )
overrideprivate

Definition at line 148 of file Phase2L1TGMTStubProducer.cc.

148 {}

◆ fillDescriptions()

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

Definition at line 150 of file Phase2L1TGMTStubProducer.cc.

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

150  {
151  // gmtStubs
153  desc.add<int>("verbose", 0);
154  desc.add<edm::InputTag>("srcCSC", edm::InputTag("simCscTriggerPrimitiveDigis"));
155  desc.add<edm::InputTag>("srcDT", edm::InputTag("dtTriggerPhase2PrimitiveDigis"));
156  desc.add<edm::InputTag>("srcDTTheta", edm::InputTag("simDtTriggerPrimitiveDigis"));
157  desc.add<edm::InputTag>("srcRPC", edm::InputTag("simMuonRPCDigis"));
158  {
160  psd0.add<unsigned int>("verbose", 0);
161  psd0.add<int>("minBX", 0);
162  psd0.add<int>("maxBX", 0);
163  psd0.add<double>("coord1LSB", 0.02453124992);
164  psd0.add<double>("eta1LSB", 0.024586688);
165  psd0.add<double>("coord2LSB", 0.02453124992);
166  psd0.add<double>("eta2LSB", 0.024586688);
167  psd0.add<double>("phiMatch", 0.05);
168  psd0.add<double>("etaMatch", 0.1);
169  desc.add<edm::ParameterSetDescription>("Endcap", psd0);
170  }
171  {
173  psd0.add<int>("verbose", 0);
174  psd0.add<int>("minPhiQuality", 0);
175  psd0.add<int>("minThetaQuality", 0);
176  psd0.add<int>("minBX", 0);
177  psd0.add<int>("maxBX", 0);
178  psd0.add<double>("phiLSB", 0.02453124992);
179  psd0.add<int>("phiBDivider", 16);
180  psd0.add<double>("etaLSB", 0.024586688);
181  psd0.add<std::vector<int>>(
182  "eta_1",
183  {
184  -46, -45, -43, -41, -39, -37, -35, -30, -28, -26, -23, -20, -18, -15, -9, -6, -3, -1,
185  1, 3, 6, 9, 15, 18, 20, 23, 26, 28, 30, 35, 37, 39, 41, 43, 45, 1503,
186  });
187  psd0.add<std::vector<int>>(
188  "eta_2",
189  {
190  -41, -39, -38, -36, -34, -32, -30, -26, -24, -22, -20, -18, -15, -13, -8, -5, -3, -1,
191  1, 3, 5, 8, 13, 15, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 39, 1334,
192  });
193  psd0.add<std::vector<int>>(
194  "eta_3",
195  {
196  -35, -34, -32, -31, -29, -27, -26, -22, -20, -19, -17, -15, -13, -11, -6, -4, -2, -1,
197  1, 2, 4, 6, 11, 13, 15, 17, 19, 20, 22, 26, 27, 29, 31, 32, 34, 1148,
198  });
199  psd0.add<std::vector<int>>("coarseEta_1",
200  {
201  0,
202  23,
203  41,
204  });
205  psd0.add<std::vector<int>>("coarseEta_2",
206  {
207  0,
208  20,
209  36,
210  });
211  psd0.add<std::vector<int>>("coarseEta_3",
212  {
213  0,
214  17,
215  31,
216  });
217  psd0.add<std::vector<int>>("coarseEta_4",
218  {
219  0,
220  14,
221  27,
222  });
223  psd0.add<std::vector<int>>("phiOffset",
224  {
225  1,
226  0,
227  0,
228  0,
229  });
230  desc.add<edm::ParameterSetDescription>("Barrel", psd0);
231  }
232  descriptions.add("gmtStubs", desc);
233 }
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 75 of file Phase2L1TGMTStubProducer.cc.

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

75  {
76  using namespace edm;
78 
80  iEvent.getByToken(srcCSC_, cscDigis);
81 
83  iEvent.getByToken(srcRPC_, rpcDigis);
84 
86  iEvent.getByToken(srcDT_, dtDigis);
87 
88  Handle<L1MuDTChambThContainer> dtThetaDigis;
89  iEvent.getByToken(srcDTTheta_, dtThetaDigis);
90 
91  //Generate a unique stub ID
93 
94  uint count0 = 0;
95  uint count1 = 0;
96  uint count2 = 0;
97  uint count3 = 0;
98  uint count4 = 0;
99 
100  l1t::MuonStubCollection stubsEndcap = procEndcap_->makeStubs(*cscDigis, *rpcDigis, translator_, iSetup);
101  for (auto& stub : stubsEndcap) {
102  if (stub.tfLayer() == 0) {
103  stub.setID(count0);
104  count0++;
105  } else if (stub.tfLayer() == 1) {
106  stub.setID(count1);
107  count1++;
108  } else if (stub.tfLayer() == 2) {
109  stub.setID(count2);
110  count2++;
111  } else if (stub.tfLayer() == 3) {
112  stub.setID(count3);
113  count3++;
114  } else {
115  stub.setID(count4);
116  count4++;
117  }
118  stubs.push_back(stub);
119  }
120  l1t::MuonStubCollection stubsBarrel = procBarrel_->makeStubs(dtDigis.product(), dtThetaDigis.product());
121  for (auto& stub : stubsBarrel) {
122  if (stub.tfLayer() == 0) {
123  stub.setID(count0);
124  count0++;
125  } else if (stub.tfLayer() == 1) {
126  stub.setID(count1);
127  count1++;
128  } else if (stub.tfLayer() == 2) {
129  stub.setID(count2);
130  count2++;
131  } else if (stub.tfLayer() == 3) {
132  stub.setID(count3);
133  count3++;
134  } else {
135  stub.setID(count4);
136  count4++;
137  }
138  stubs.push_back(stub);
139  }
140 
141  iEvent.put(std::make_unique<l1t::MuonStubCollection>(stubs));
142 }
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)
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.