69 #ifndef RPCLayerNumber
70 #define RPCLayerNumber 12
73 #ifndef BarrelLayerNumber
74 #define BarrelLayerNumber 6
77 #ifndef EachEndcapLayerNumber
78 #define EachEndcapLayerNumber 3
96 virtual 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");
152 cout << endl <<
"[RPCSeedGenerator] --> Constructor called" << endl;
160 cout <<
"[RPCSeedGenerator] --> Destructor called" << endl;
162 if( muonMeasurements )
163 delete muonMeasurements;
176 goodweightedSeeds.clear();
177 candidateweightedSeeds.clear();
188 vector<const DetLayer*> RPCBarrelLayers = muonLayers->barrelRPCLayers();
189 const DetLayer* RB4L = RPCBarrelLayers[5];
190 const DetLayer* RB3L = RPCBarrelLayers[4];
191 const DetLayer* RB22L = RPCBarrelLayers[3];
192 const DetLayer* RB21L = RPCBarrelLayers[2];
193 const DetLayer* RB12L = RPCBarrelLayers[1];
194 const DetLayer* RB11L = RPCBarrelLayers[0];
195 vector<const DetLayer*> RPCEndcapLayers = muonLayers->endcapRPCLayers();
196 const DetLayer* REM3L = RPCEndcapLayers[0];
197 const DetLayer* REM2L = RPCEndcapLayers[1];
198 const DetLayer* REM1L = RPCEndcapLayers[2];
199 const DetLayer* REP1L = RPCEndcapLayers[3];
200 const DetLayer* REP2L = RPCEndcapLayers[4];
201 const DetLayer* REP3L = RPCEndcapLayers[5];
206 recHitsRPC[0] = muonMeasurements->recHits(RB11L, iEvent);
207 recHitsRPC[1] = muonMeasurements->recHits(RB12L, iEvent);
208 recHitsRPC[2] = muonMeasurements->recHits(RB21L, iEvent);
209 recHitsRPC[3] = muonMeasurements->recHits(RB22L, iEvent);
210 recHitsRPC[4] = muonMeasurements->recHits(RB3L, iEvent);
211 recHitsRPC[5] = muonMeasurements->recHits(RB4L, iEvent);
212 recHitsRPC[6] = muonMeasurements->recHits(REM1L, iEvent);
213 recHitsRPC[7] = muonMeasurements->recHits(REM2L, iEvent);
214 recHitsRPC[8] = muonMeasurements->recHits(REM3L, iEvent);
215 recHitsRPC[9] = muonMeasurements->recHits(REP1L, iEvent);
216 recHitsRPC[10] = muonMeasurements->recHits(REP2L, iEvent);
217 recHitsRPC[11] = muonMeasurements->recHits(REP3L, iEvent);
220 cout <<
"RB1in " << recHitsRPC[0].size() <<
" recHits" << endl;
221 cout <<
"RB1out " << recHitsRPC[1].size() <<
" recHits" << endl;
222 cout <<
"RB2in " << recHitsRPC[2].size() <<
" recHits" << endl;
223 cout <<
"RB2out " << recHitsRPC[3].size() <<
" recHits" << endl;
224 cout <<
"RB3 " << recHitsRPC[4].size() <<
" recHits" << endl;
225 cout <<
"RB4 " << recHitsRPC[5].size() <<
" recHits" << endl;
226 cout <<
"REM1 " << recHitsRPC[6].size() <<
" recHits" << endl;
227 cout <<
"REM2 " << recHitsRPC[7].size() <<
" recHits" << endl;
228 cout <<
"REM3 " << recHitsRPC[8].size() <<
" recHits" << endl;
229 cout <<
"REP1 " << recHitsRPC[9].size() <<
" recHits" << endl;
230 cout <<
"REP2 " << recHitsRPC[10].size() <<
" recHits" << endl;
231 cout <<
"REP3 " << recHitsRPC[11].size() <<
" recHits" << endl;
234 recHitFinder.setInput(recHitsRPC);
235 CosmicrecHitFinder.setInput(recHitsRPC);
236 LayerFinder.setInput(recHitsRPC);
239 Finder.setEventSetup(iSetup);
246 for(vector<weightedTrajectorySeed>::iterator weightedseed = goodweightedSeeds.begin(); weightedseed != goodweightedSeeds.end(); ++weightedseed)
247 goodCollection->push_back((*weightedseed).first);
248 for(vector<weightedTrajectorySeed>::iterator weightedseed = candidateweightedSeeds.begin(); weightedseed != candidateweightedSeeds.end(); ++weightedseed)
249 candidateCollection->push_back((*weightedseed).first);
252 iEvent.
put(goodCollection,
"goodSeeds");
253 iEvent.
put(candidateCollection,
"candidateSeeds");
256 recHitFinder.unsetInput();
257 CosmicrecHitFinder.unsetInput();
258 LayerFinder.unsetInput();
265 cout <<
"set link and Geometry EventSetup of RPCSeedFinder, RPCSeedrecHitFinder, RPCCosmicSeedrecHitFinder, RPCSeedLayerFinder and RPCSeedOverlapper" << endl;
267 Finder.setOutput(&goodweightedSeeds, &candidateweightedSeeds);
268 recHitFinder.setOutput(&
Finder);
269 CosmicrecHitFinder.setOutput(&
Finder);
270 LayerFinder.setOutput(&recHitFinder, &CosmicrecHitFinder);
273 CosmicrecHitFinder.setEdge(iSetup);
274 Overlapper.setEventSetup(iSetup);
275 Overlapper.setIO(&goodweightedSeeds, &candidateweightedSeeds);
280 cout <<
"All jobs completed" << endl;
T getParameter(std::string const &) const
edm::InputTag theRPCRecHits
RPCCosmicSeedrecHitFinder CosmicrecHitFinder
RPCSeedrecHitFinder recHitFinder
MuonTransientTrackingRecHit::MuonRecHitPointer MuonRecHitPointer
#define DEFINE_FWK_MODULE(type)
virtual void beginRun(const edm::Run &, const edm::EventSetup &iSetup) override
std::vector< TrajectorySeed > TrajectorySeedCollection
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
virtual void endJob() override
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
virtual void beginJob() override
std::pair< TrajectorySeed, double > weightedTrajectorySeed
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
MuonDetLayerMeasurements * muonMeasurements
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
RPCSeedOverlapper Overlapper
RPCSeedGenerator(const edm::ParameterSet &iConfig)
MuonTransientTrackingRecHit const * ConstMuonRecHitPointer
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::vector< weightedTrajectorySeed > goodweightedSeeds
std::vector< weightedTrajectorySeed > candidateweightedSeeds
std::vector< MuonRecHitPointer > MuonRecHitContainer
RPCSeedLayerFinder LayerFinder
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer