69 #ifndef RPCLayerNumber 70 #define RPCLayerNumber 12 73 #ifndef BarrelLayerNumber 74 #define BarrelLayerNumber 6 77 #ifndef EachEndcapLayerNumber 78 #define EachEndcapLayerNumber 3 96 void endJob()
override;
135 Finder.configure(iConfig);
136 recHitFinder.configure(iConfig);
137 CosmicrecHitFinder.configure(iConfig);
138 LayerFinder.configure(iConfig);
139 Overlapper.configure(iConfig);
141 produces<TrajectorySeedCollection>(
"goodSeeds");
142 produces<TrajectorySeedCollection>(
"candidateSeeds");
150 muonMeasurements =
new MuonDetLayerMeasurements (
edm::InputTag(),
edm::InputTag(), theRPCRecHits,
edm::InputTag(),
edm::InputTag(),iC,
false,
false,
true,
false,
false);
153 cout << endl <<
"[RPCSeedGenerator] --> Constructor called" << endl;
161 cout <<
"[RPCSeedGenerator] --> Destructor called" << endl;
163 if( muonMeasurements )
164 delete muonMeasurements;
177 goodweightedSeeds.clear();
178 candidateweightedSeeds.clear();
181 auto goodCollection = std::make_unique<TrajectorySeedCollection>();
182 auto candidateCollection = std::make_unique<TrajectorySeedCollection>();
189 vector<const DetLayer*> RPCBarrelLayers = muonLayers->barrelRPCLayers();
190 const DetLayer* RB4L = RPCBarrelLayers[5];
191 const DetLayer* RB3L = RPCBarrelLayers[4];
192 const DetLayer* RB22L = RPCBarrelLayers[3];
193 const DetLayer* RB21L = RPCBarrelLayers[2];
194 const DetLayer* RB12L = RPCBarrelLayers[1];
195 const DetLayer* RB11L = RPCBarrelLayers[0];
196 vector<const DetLayer*> RPCEndcapLayers = muonLayers->endcapRPCLayers();
197 const DetLayer* REM3L = RPCEndcapLayers[0];
198 const DetLayer* REM2L = RPCEndcapLayers[1];
199 const DetLayer* REM1L = RPCEndcapLayers[2];
200 const DetLayer* REP1L = RPCEndcapLayers[3];
201 const DetLayer* REP2L = RPCEndcapLayers[4];
202 const DetLayer* REP3L = RPCEndcapLayers[5];
207 recHitsRPC[0] = muonMeasurements->recHits(RB11L, iEvent);
208 recHitsRPC[1] = muonMeasurements->recHits(RB12L, iEvent);
209 recHitsRPC[2] = muonMeasurements->recHits(RB21L, iEvent);
210 recHitsRPC[3] = muonMeasurements->recHits(RB22L, iEvent);
211 recHitsRPC[4] = muonMeasurements->recHits(RB3L, iEvent);
212 recHitsRPC[5] = muonMeasurements->recHits(RB4L, iEvent);
213 recHitsRPC[6] = muonMeasurements->recHits(REM1L, iEvent);
214 recHitsRPC[7] = muonMeasurements->recHits(REM2L, iEvent);
215 recHitsRPC[8] = muonMeasurements->recHits(REM3L, iEvent);
216 recHitsRPC[9] = muonMeasurements->recHits(REP1L, iEvent);
217 recHitsRPC[10] = muonMeasurements->recHits(REP2L, iEvent);
218 recHitsRPC[11] = muonMeasurements->recHits(REP3L, iEvent);
221 cout <<
"RB1in " << recHitsRPC[0].size() <<
" recHits" << endl;
222 cout <<
"RB1out " << recHitsRPC[1].size() <<
" recHits" << endl;
223 cout <<
"RB2in " << recHitsRPC[2].size() <<
" recHits" << endl;
224 cout <<
"RB2out " << recHitsRPC[3].size() <<
" recHits" << endl;
225 cout <<
"RB3 " << recHitsRPC[4].size() <<
" recHits" << endl;
226 cout <<
"RB4 " << recHitsRPC[5].size() <<
" recHits" << endl;
227 cout <<
"REM1 " << recHitsRPC[6].size() <<
" recHits" << endl;
228 cout <<
"REM2 " << recHitsRPC[7].size() <<
" recHits" << endl;
229 cout <<
"REM3 " << recHitsRPC[8].size() <<
" recHits" << endl;
230 cout <<
"REP1 " << recHitsRPC[9].size() <<
" recHits" << endl;
231 cout <<
"REP2 " << recHitsRPC[10].size() <<
" recHits" << endl;
232 cout <<
"REP3 " << recHitsRPC[11].size() <<
" recHits" << endl;
235 recHitFinder.setInput(recHitsRPC);
236 CosmicrecHitFinder.setInput(recHitsRPC);
237 LayerFinder.setInput(recHitsRPC);
240 Finder.setEventSetup(iSetup);
247 for(vector<weightedTrajectorySeed>::iterator weightedseed = goodweightedSeeds.begin(); weightedseed != goodweightedSeeds.end(); ++weightedseed)
248 goodCollection->push_back((*weightedseed).first);
249 for(vector<weightedTrajectorySeed>::iterator weightedseed = candidateweightedSeeds.begin(); weightedseed != candidateweightedSeeds.end(); ++weightedseed)
250 candidateCollection->push_back((*weightedseed).first);
254 iEvent.
put(
std::move(candidateCollection),
"candidateSeeds");
257 recHitFinder.unsetInput();
258 CosmicrecHitFinder.unsetInput();
259 LayerFinder.unsetInput();
266 cout <<
"set link and Geometry EventSetup of RPCSeedFinder, RPCSeedrecHitFinder, RPCCosmicSeedrecHitFinder, RPCSeedLayerFinder and RPCSeedOverlapper" << endl;
268 Finder.setOutput(&goodweightedSeeds, &candidateweightedSeeds);
269 recHitFinder.setOutput(&
Finder);
270 CosmicrecHitFinder.setOutput(&
Finder);
271 LayerFinder.setOutput(&recHitFinder, &CosmicrecHitFinder);
274 CosmicrecHitFinder.setEdge(iSetup);
275 Overlapper.setEventSetup(iSetup);
276 Overlapper.setIO(&goodweightedSeeds, &candidateweightedSeeds);
281 cout <<
"All jobs completed" << endl;
T getParameter(std::string const &) const
edm::InputTag theRPCRecHits
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
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