Go to the documentation of this file.00001
00002
00003
00004
00005
00013
00014
00015
00016
00017
00018
00019
00020 #include "RecoLocalMuon/RPCRecHit/interface/RPCPointProducer.h"
00021
00022
00023
00024 #include <memory>
00025 #include <ctime>
00026
00027
00028
00029 RPCPointProducer::RPCPointProducer(const edm::ParameterSet& iConfig)
00030 {
00031 cscSegments=iConfig.getParameter<edm::InputTag>("cscSegments");
00032 dt4DSegments=iConfig.getParameter<edm::InputTag>("dt4DSegments");
00033 tracks=iConfig.getParameter<edm::InputTag>("tracks");
00034
00035 debug=iConfig.getUntrackedParameter<bool>("debug",false);
00036 incldt=iConfig.getUntrackedParameter<bool>("incldt",true);
00037 inclcsc=iConfig.getUntrackedParameter<bool>("inclcsc",true);
00038 incltrack=iConfig.getUntrackedParameter<bool>("incltrack",true);
00039 MinCosAng=iConfig.getUntrackedParameter<double>("MinCosAng",0.95);
00040 MaxD=iConfig.getUntrackedParameter<double>("MaxD",80.);
00041 MaxDrb4=iConfig.getUntrackedParameter<double>("MaxDrb4",150.);
00042 ExtrapolatedRegion=iConfig.getUntrackedParameter<double>("ExtrapolatedRegion",0.5);
00043
00044 produces<RPCRecHitCollection>("RPCDTExtrapolatedPoints");
00045 produces<RPCRecHitCollection>("RPCCSCExtrapolatedPoints");
00046 produces<RPCRecHitCollection>("RPCTrackExtrapolatedPoints");
00047 trackTransformerParam = iConfig.getParameter<edm::ParameterSet>("TrackTransformer");
00048 }
00049
00050
00051 RPCPointProducer::~RPCPointProducer(){
00052
00053 }
00054
00055 void RPCPointProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup){
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 if(incldt){
00066 edm::Handle<DTRecSegment4DCollection> all4DSegments;
00067 iEvent.getByLabel(dt4DSegments, all4DSegments);
00068 if(all4DSegments.isValid()){
00069 DTSegtoRPC DTClass(all4DSegments,iSetup,iEvent,debug,ExtrapolatedRegion);
00070 std::auto_ptr<RPCRecHitCollection> TheDTPoints(DTClass.thePoints());
00071 iEvent.put(TheDTPoints,"RPCDTExtrapolatedPoints");
00072 }else{
00073 if(debug) std::cout<<"RPCHLT Invalid DTSegments collection"<<std::endl;
00074 }
00075 }
00076
00077 if(inclcsc){
00078 edm::Handle<CSCSegmentCollection> allCSCSegments;
00079 iEvent.getByLabel(cscSegments, allCSCSegments);
00080 if(allCSCSegments.isValid()){
00081 CSCSegtoRPC CSCClass(allCSCSegments,iSetup,iEvent,debug,ExtrapolatedRegion);
00082 std::auto_ptr<RPCRecHitCollection> TheCSCPoints(CSCClass.thePoints());
00083 iEvent.put(TheCSCPoints,"RPCCSCExtrapolatedPoints");
00084 }else{
00085 if(debug) std::cout<<"RPCHLT Invalid CSCSegments collection"<<std::endl;
00086 }
00087 }
00088 if(incltrack){
00089 edm::Handle<reco::TrackCollection> alltracks;
00090 iEvent.getByLabel(tracks,alltracks);
00091 if(!(alltracks->empty())){
00092 TracktoRPC TrackClass(alltracks,iSetup,iEvent,debug,trackTransformerParam,tracks);
00093 std::auto_ptr<RPCRecHitCollection> TheTrackPoints(TrackClass.thePoints());
00094 iEvent.put(TheTrackPoints,"RPCTrackExtrapolatedPoints");
00095 }else{
00096 std::cout<<"RPCHLT Invalid Tracks collection"<<std::endl;
00097 }
00098 }
00099
00100 }
00101
00102
00103 void
00104 RPCPointProducer::beginJob()
00105 {
00106 }
00107
00108
00109 void
00110 RPCPointProducer::endJob() {
00111 }
00112
00113