67 #ifndef RPCLayerNumber 68 #define RPCLayerNumber 12 71 #ifndef BarrelLayerNumber 72 #define BarrelLayerNumber 6 75 #ifndef EachEndcapLayerNumber 76 #define EachEndcapLayerNumber 3 94 void endJob()
override;
130 Finder.configure(iConfig);
131 recHitFinder.configure(iConfig);
132 CosmicrecHitFinder.configure(iConfig);
133 LayerFinder.configure(iConfig);
134 Overlapper.configure(iConfig);
136 produces<TrajectorySeedCollection>(
"goodSeeds");
137 produces<TrajectorySeedCollection>(
"candidateSeeds");
156 cout << endl <<
"[RPCSeedGenerator] --> Constructor called" << endl;
162 cout <<
"[RPCSeedGenerator] --> Destructor called" << endl;
164 if (muonMeasurements)
165 delete muonMeasurements;
175 goodweightedSeeds.clear();
176 candidateweightedSeeds.clear();
179 auto goodCollection = std::make_unique<TrajectorySeedCollection>();
180 auto candidateCollection = std::make_unique<TrajectorySeedCollection>();
187 vector<const DetLayer*> RPCBarrelLayers = muonLayers->barrelRPCLayers();
188 const DetLayer* RB4L = RPCBarrelLayers[5];
189 const DetLayer* RB3L = RPCBarrelLayers[4];
190 const DetLayer* RB22L = RPCBarrelLayers[3];
191 const DetLayer* RB21L = RPCBarrelLayers[2];
192 const DetLayer* RB12L = RPCBarrelLayers[1];
193 const DetLayer* RB11L = RPCBarrelLayers[0];
194 vector<const DetLayer*> RPCEndcapLayers = muonLayers->endcapRPCLayers();
195 const DetLayer* REM3L = RPCEndcapLayers[0];
196 const DetLayer* REM2L = RPCEndcapLayers[1];
197 const DetLayer* REM1L = RPCEndcapLayers[2];
198 const DetLayer* REP1L = RPCEndcapLayers[3];
199 const DetLayer* REP2L = RPCEndcapLayers[4];
200 const DetLayer* REP3L = RPCEndcapLayers[5];
204 recHitsRPC[0] = muonMeasurements->recHits(RB11L,
iEvent);
205 recHitsRPC[1] = muonMeasurements->recHits(RB12L,
iEvent);
206 recHitsRPC[2] = muonMeasurements->recHits(RB21L,
iEvent);
207 recHitsRPC[3] = muonMeasurements->recHits(RB22L,
iEvent);
208 recHitsRPC[4] = muonMeasurements->recHits(RB3L,
iEvent);
209 recHitsRPC[5] = muonMeasurements->recHits(RB4L,
iEvent);
210 recHitsRPC[6] = muonMeasurements->recHits(REM1L,
iEvent);
211 recHitsRPC[7] = muonMeasurements->recHits(REM2L,
iEvent);
212 recHitsRPC[8] = muonMeasurements->recHits(REM3L,
iEvent);
213 recHitsRPC[9] = muonMeasurements->recHits(REP1L,
iEvent);
214 recHitsRPC[10] = muonMeasurements->recHits(REP2L,
iEvent);
215 recHitsRPC[11] = muonMeasurements->recHits(REP3L,
iEvent);
218 cout <<
"RB1in " << recHitsRPC[0].size() <<
" recHits" << endl;
219 cout <<
"RB1out " << recHitsRPC[1].size() <<
" recHits" << endl;
220 cout <<
"RB2in " << recHitsRPC[2].size() <<
" recHits" << endl;
221 cout <<
"RB2out " << recHitsRPC[3].size() <<
" recHits" << endl;
222 cout <<
"RB3 " << recHitsRPC[4].size() <<
" recHits" << endl;
223 cout <<
"RB4 " << recHitsRPC[5].size() <<
" recHits" << endl;
224 cout <<
"REM1 " << recHitsRPC[6].size() <<
" recHits" << endl;
225 cout <<
"REM2 " << recHitsRPC[7].size() <<
" recHits" << endl;
226 cout <<
"REM3 " << recHitsRPC[8].size() <<
" recHits" << endl;
227 cout <<
"REP1 " << recHitsRPC[9].size() <<
" recHits" << endl;
228 cout <<
"REP2 " << recHitsRPC[10].size() <<
" recHits" << endl;
229 cout <<
"REP3 " << recHitsRPC[11].size() <<
" recHits" << endl;
232 recHitFinder.setInput(recHitsRPC);
233 CosmicrecHitFinder.setInput(recHitsRPC);
234 LayerFinder.setInput(recHitsRPC);
237 Finder.setEventSetup(iSetup);
244 for (vector<weightedTrajectorySeed>::iterator weightedseed = goodweightedSeeds.begin();
245 weightedseed != goodweightedSeeds.end();
247 goodCollection->push_back((*weightedseed).first);
248 for (vector<weightedTrajectorySeed>::iterator weightedseed = candidateweightedSeeds.begin();
249 weightedseed != candidateweightedSeeds.end();
251 candidateCollection->push_back((*weightedseed).first);
258 recHitFinder.unsetInput();
259 CosmicrecHitFinder.unsetInput();
260 LayerFinder.unsetInput();
265 cout <<
"set link and Geometry EventSetup of RPCSeedFinder, RPCSeedrecHitFinder, RPCCosmicSeedrecHitFinder, " 266 "RPCSeedLayerFinder and RPCSeedOverlapper" 269 Finder.setOutput(&goodweightedSeeds, &candidateweightedSeeds);
270 recHitFinder.setOutput(&
Finder);
271 CosmicrecHitFinder.setOutput(&
Finder);
272 LayerFinder.setOutput(&recHitFinder, &CosmicrecHitFinder);
279 CosmicrecHitFinder.setEdge(*rpcGeometry);
280 Overlapper.setGeometry(*rpcGeometry);
281 Overlapper.setIO(&goodweightedSeeds, &candidateweightedSeeds);
edm::InputTag theRPCRecHits
T getParameter(std::string const &) const
RPCCosmicSeedrecHitFinder CosmicrecHitFinder
RPCSeedrecHitFinder recHitFinder
#define DEFINE_FWK_MODULE(type)
~RPCSeedGenerator() override
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
void beginRun(const edm::Run &, const edm::EventSetup &iSetup) override
std::shared_ptr< MuonTransientTrackingRecHit > MuonRecHitPointer
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::pair< TrajectorySeed, double > weightedTrajectorySeed
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
MuonDetLayerMeasurements * muonMeasurements
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
RPCSeedOverlapper Overlapper
RPCSeedGenerator(const edm::ParameterSet &iConfig)
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::shared_ptr< MuonTransientTrackingRecHit const > ConstMuonRecHitPointer
std::vector< weightedTrajectorySeed > goodweightedSeeds
std::vector< weightedTrajectorySeed > candidateweightedSeeds
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer
std::vector< MuonRecHitPointer > MuonRecHitContainer
RPCSeedLayerFinder LayerFinder