Go to the documentation of this file.00001 #ifndef MCTruth_RPCHitAssociator_h
00002 #define MCTruth_RPCHitAssociator_h
00003
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/Framework/interface/ESHandle.h"
00006 #include "FWCore/Utilities/interface/InputTag.h"
00007 #include "DataFormats/Common/interface/Handle.h"
00008 #include "SimDataFormats/EncodedEventId/interface/EncodedEventId.h"
00009 #include "SimDataFormats/TrackingHit/interface/PSimHit.h"
00010 #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
00011 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
00012 #include "DataFormats/MuonDetId/interface/RPCDetId.h"
00013 #include "SimDataFormats/RPCDigiSimLink/interface/RPCDigiSimLink.h"
00014
00015 #include <vector>
00016 #include <map>
00017 #include <string>
00018 #include <set>
00019
00020 #include "SimDataFormats/CrossingFrame/interface/CrossingFrame.h"
00021 #include "SimDataFormats/CrossingFrame/interface/MixCollection.h"
00022 #include "DataFormats/DetId/interface/DetId.h"
00023 #include "DataFormats/MuonDetId/interface/MuonSubdetId.h"
00024 #include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
00025 #include "DataFormats/RPCRecHit/interface/RPCRecHitCollection.h"
00026 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00027 #include "Geometry/Records/interface/MuonGeometryRecord.h"
00028 #include "Geometry/RPCGeometry/interface/RPCGeometry.h"
00029 #include "DataFormats/Common/interface/DetSetVector.h"
00030
00031 class RPCHitAssociator {
00032
00033 public:
00034 typedef edm::DetSetVector<RPCDigiSimLink> RPCDigiSimLinks;
00035 typedef std::pair<uint32_t, EncodedEventId> SimHitIdpr;
00036
00037
00038 RPCHitAssociator(const edm::Event&, const edm::EventSetup&, const edm::ParameterSet&);
00039
00040
00041 ~RPCHitAssociator(){}
00042
00043 std::vector<SimHitIdpr> associateRecHit(const TrackingRecHit & hit);
00044 std::set<RPCDigiSimLink> findRPCDigiSimLink(uint32_t rpcDetId, int strip, int bx);
00045
00046
00047
00048 private:
00049 edm::Handle< edm::DetSetVector<RPCDigiSimLink> > _thelinkDigis;
00050 edm::InputTag RPCdigisimlinkTag;
00051
00052 bool crossingframe;
00053 edm::InputTag RPCsimhitsTag;
00054 edm::InputTag RPCsimhitsXFTag;
00055
00056 std::map<unsigned int, edm::PSimHitContainer> _SimHitMap;
00057
00058 };
00059
00060 #endif
00061
00062
00063