CMS 3D CMS Logo

DTHitAssociator.h
Go to the documentation of this file.
1 #ifndef MCTruth_DTHitAssociator_h
2 #define MCTruth_DTHitAssociator_h
3 
19 
20 #include <map>
21 #include <vector>
22 
23 class MuonGeometryRecord;
24 
26 public:
27  typedef std::pair<uint32_t, EncodedEventId> SimHitIdpr;
28  typedef std::pair<PSimHit, bool> PSimHit_withFlag;
29  typedef std::map<DTWireId, std::vector<PSimHit_withFlag>> SimHitMap;
30  typedef std::map<DTWireId, std::vector<DTRecHit1DPair>> RecHitMap;
31  typedef std::map<DTWireId, std::vector<DTDigi>> DigiMap;
32  typedef std::map<DTWireId, std::vector<DTDigiSimLink>> LinksMap;
33 
34  class Config {
35  public:
37 
38  private:
39  friend class DTHitAssociator;
40 
46 
52 
54 
55  bool dumpDT;
59  };
60 
61  DTHitAssociator(const edm::Event &, const edm::EventSetup &, const Config &, bool printRtS);
62 
63  std::vector<SimHitIdpr> associateHitId(const TrackingRecHit &hit) const;
64  std::vector<SimHitIdpr> associateDTHitId(const DTRecHit1D *dtrechit) const;
65 
66  std::vector<PSimHit> associateHit(const TrackingRecHit &hit) const;
67 
72 
73 private:
74  void initEvent(const edm::Event &, const edm::EventSetup &);
75 
76  bool SimHitOK(const edm::ESHandle<DTGeometry> &, const PSimHit &);
77  Config const &config_;
78  bool printRtS;
79 };
80 
81 #endif
edm::InputTag DTdigisimlinkTag
std::vector< PSimHit > associateHit(const TrackingRecHit &hit) const
std::pair< uint32_t, EncodedEventId > SimHitIdpr
Config(const edm::ParameterSet &, edm::ConsumesCollector iC)
edm::EDGetTokenT< DTDigiCollection > DTdigiToken
std::map< DTWireId, std::vector< DTRecHit1DPair > > RecHitMap
RecHitMap mapOfRecHit
std::vector< SimHitIdpr > associateDTHitId(const DTRecHit1D *dtrechit) const
std::map< DTWireId, std::vector< DTDigi > > DigiMap
std::map< DTWireId, std::vector< DTDigiSimLink > > LinksMap
DTHitAssociator(const edm::Event &, const edm::EventSetup &, const Config &, bool printRtS)
SimHitMap mapOfSimHit
edm::InputTag DTsimhitsXFTag
edm::EDGetTokenT< DTRecHitCollection > DTrechitToken
edm::EDGetTokenT< DTDigiSimLinkCollection > DTdigisimlinkToken
std::map< DTWireId, std::vector< PSimHit_withFlag > > SimHitMap
edm::ESGetToken< DTGeometry, MuonGeometryRecord > geomToken
Config const & config_
edm::EDGetTokenT< edm::PSimHitContainer > DTsimhitsToken
edm::InputTag DTsimhitsTag
std::pair< PSimHit, bool > PSimHit_withFlag
void initEvent(const edm::Event &, const edm::EventSetup &)
Definition: Config.py:1
std::vector< SimHitIdpr > associateHitId(const TrackingRecHit &hit) const
edm::EDGetTokenT< CrossingFrame< PSimHit > > DTsimhitsXFToken
bool SimHitOK(const edm::ESHandle< DTGeometry > &, const PSimHit &)