68 #ifndef RPCLayerNumber
69 #define RPCLayerNumber 12
72 #ifndef BarrelLayerNumber
73 #define BarrelLayerNumber 6
76 #ifndef EachEndcapLayerNumber
77 #define EachEndcapLayerNumber 3
95 virtual void endJob();
133 Finder.configure(iConfig);
134 recHitFinder.configure(iConfig);
135 CosmicrecHitFinder.configure(iConfig);
136 LayerFinder.configure(iConfig);
137 Overlapper.configure(iConfig);
139 produces<TrajectorySeedCollection>(
"goodSeeds");
140 produces<TrajectorySeedCollection>(
"candidateSeeds");
144 cout << endl <<
"[RPCSeedGenerator] --> Constructor called" << endl;
152 cout <<
"[RPCSeedGenerator] --> Destructor called" << endl;
183 goodweightedSeeds.clear();
184 candidateweightedSeeds.clear();
195 vector<DetLayer*> RPCBarrelLayers = muonLayers->barrelRPCLayers();
196 const DetLayer* RB4L = RPCBarrelLayers[5];
197 const DetLayer* RB3L = RPCBarrelLayers[4];
198 const DetLayer* RB22L = RPCBarrelLayers[3];
199 const DetLayer* RB21L = RPCBarrelLayers[2];
200 const DetLayer* RB12L = RPCBarrelLayers[1];
201 const DetLayer* RB11L = RPCBarrelLayers[0];
202 vector<DetLayer*> RPCEndcapLayers = muonLayers->endcapRPCLayers();
203 const DetLayer* REM3L = RPCEndcapLayers[0];
204 const DetLayer* REM2L = RPCEndcapLayers[1];
205 const DetLayer* REM1L = RPCEndcapLayers[2];
206 const DetLayer* REP1L = RPCEndcapLayers[3];
207 const DetLayer* REP2L = RPCEndcapLayers[4];
208 const DetLayer* REP3L = RPCEndcapLayers[5];
215 recHitsRPC[0] = muonMeasurements.
recHits(RB11L, iEvent);
216 recHitsRPC[1] = muonMeasurements.
recHits(RB12L, iEvent);
217 recHitsRPC[2] = muonMeasurements.
recHits(RB21L, iEvent);
218 recHitsRPC[3] = muonMeasurements.
recHits(RB22L, iEvent);
219 recHitsRPC[4] = muonMeasurements.
recHits(RB3L, iEvent);
220 recHitsRPC[5] = muonMeasurements.
recHits(RB4L, iEvent);
221 recHitsRPC[6] = muonMeasurements.
recHits(REM1L, iEvent);
222 recHitsRPC[7] = muonMeasurements.
recHits(REM2L, iEvent);
223 recHitsRPC[8] = muonMeasurements.
recHits(REM3L, iEvent);
224 recHitsRPC[9] = muonMeasurements.
recHits(REP1L, iEvent);
225 recHitsRPC[10] = muonMeasurements.
recHits(REP2L, iEvent);
226 recHitsRPC[11] = muonMeasurements.
recHits(REP3L, iEvent);
229 cout <<
"RB1in " << recHitsRPC[0].size() <<
" recHits" << endl;
230 cout <<
"RB1out " << recHitsRPC[1].size() <<
" recHits" << endl;
231 cout <<
"RB2in " << recHitsRPC[2].size() <<
" recHits" << endl;
232 cout <<
"RB2out " << recHitsRPC[3].size() <<
" recHits" << endl;
233 cout <<
"RB3 " << recHitsRPC[4].size() <<
" recHits" << endl;
234 cout <<
"RB4 " << recHitsRPC[5].size() <<
" recHits" << endl;
235 cout <<
"REM1 " << recHitsRPC[6].size() <<
" recHits" << endl;
236 cout <<
"REM2 " << recHitsRPC[7].size() <<
" recHits" << endl;
237 cout <<
"REM3 " << recHitsRPC[8].size() <<
" recHits" << endl;
238 cout <<
"REP1 " << recHitsRPC[9].size() <<
" recHits" << endl;
239 cout <<
"REP2 " << recHitsRPC[10].size() <<
" recHits" << endl;
240 cout <<
"REP3 " << recHitsRPC[11].size() <<
" recHits" << endl;
243 recHitFinder.setInput(recHitsRPC);
244 CosmicrecHitFinder.setInput(recHitsRPC);
245 LayerFinder.setInput(recHitsRPC);
248 Finder.setEventSetup(iSetup);
255 for(vector<weightedTrajectorySeed>::iterator weightedseed = goodweightedSeeds.begin(); weightedseed != goodweightedSeeds.end(); ++weightedseed)
256 goodCollection->push_back((*weightedseed).first);
257 for(vector<weightedTrajectorySeed>::iterator weightedseed = candidateweightedSeeds.begin(); weightedseed != candidateweightedSeeds.end(); ++weightedseed)
258 candidateCollection->push_back((*weightedseed).first);
261 iEvent.
put(goodCollection,
"goodSeeds");
262 iEvent.
put(candidateCollection,
"candidateSeeds");
265 recHitFinder.unsetInput();
266 CosmicrecHitFinder.unsetInput();
267 LayerFinder.unsetInput();
274 cout <<
"set link and Geometry EventSetup of RPCSeedFinder, RPCSeedrecHitFinder, RPCCosmicSeedrecHitFinder, RPCSeedLayerFinder and RPCSeedOverlapper" << endl;
276 Finder.setOutput(&goodweightedSeeds, &candidateweightedSeeds);
277 recHitFinder.setOutput(&Finder);
278 CosmicrecHitFinder.setOutput(&Finder);
279 LayerFinder.setOutput(&recHitFinder, &CosmicrecHitFinder);
282 CosmicrecHitFinder.setEdge(iSetup);
283 Overlapper.setEventSetup(iSetup);
284 Overlapper.setIO(&goodweightedSeeds, &candidateweightedSeeds);
289 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)
std::vector< TrajectorySeed > TrajectorySeedCollection
MuonRecHitContainer recHits(const DetLayer *layer, const edm::Event &iEvent)
returns the rechits which are on the layer
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
MuonTransientTrackingRecHit::ConstMuonRecHitContainer ConstMuonRecHitContainer
std::pair< TrajectorySeed, double > weightedTrajectorySeed
std::vector< ConstMuonRecHitPointer > ConstMuonRecHitContainer
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
RPCSeedPattern::weightedTrajectorySeed weightedTrajectorySeed
RPCSeedOverlapper Overlapper
RPCSeedGenerator(const edm::ParameterSet &iConfig)
MuonTransientTrackingRecHit::MuonRecHitContainer MuonRecHitContainer
std::vector< weightedTrajectorySeed > goodweightedSeeds
std::vector< weightedTrajectorySeed > candidateweightedSeeds
std::vector< MuonRecHitPointer > MuonRecHitContainer
RPCSeedLayerFinder LayerFinder
MuonTransientTrackingRecHit::ConstMuonRecHitPointer ConstMuonRecHitPointer