CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
StubsSimHitsMatcher.h
Go to the documentation of this file.
1 /*
2  * StubsSimHitsMatcher.h
3  *
4  * Created on: Jan 13, 2021
5  * Author: kbunkow
6  */
7 
8 #ifndef L1T_OmtfP1_TOOLS_STUBSSIMHITSMATCHER_H_
9 #define L1T_OmtfP1_TOOLS_STUBSSIMHITSMATCHER_H_
10 
13 
20 
21 #include "TH1I.h"
22 #include "TH2I.h"
23 
24 class RPCGeometry;
25 class CSCGeometry;
26 class DTGeometry;
27 
28 struct MuonGeometryTokens;
29 
31 public:
35  virtual ~StubsSimHitsMatcher();
36 
37  void beginRun(edm::EventSetup const& eventSetup);
38 
39  void endJob();
40 
41  void match(const edm::Event& iEvent,
42  const l1t::RegionalMuonCand* omtfCand,
43  const AlgoMuonPtr& procMuon,
44  std::ostringstream& ostr); //Processor gbCandidate);
45 
47  public:
48  union {
49  struct {
50  int32_t eventNum = 0;
51  uint32_t trackId = 0;
52  };
54  };
55 
56  mutable std::vector<unsigned int> matchedDigiCnt;
57 
58  MatchedTrackInfo(uint32_t eventNum, uint32_t trackId) : matchedDigiCnt(18, 0) {
59  this->eventNum = eventNum;
60  this->trackId = trackId;
61  }
62 
63  bool operator<(const MatchedTrackInfo& b) const { return this->eventTrackNum < b.eventTrackNum; }
64 
65  bool operator>(const MatchedTrackInfo& b) const { return this->eventTrackNum > b.eventTrackNum; }
66 
67  bool operator==(const MatchedTrackInfo& b) const { return this->eventTrackNum == b.eventTrackNum; }
68  };
69 
70 private:
72 
76 
80 
82 
84 
86 
87  // pointers to the current geometry records
88  unsigned long long _geom_cache_id = 0;
92 
93  TH1I* allMatchedTracksPdgIds = nullptr; //indexing: [pdgId] = tracksCnt
94  TH1I* bestMatchedTracksPdgIds = nullptr; //indexing: [pdgId] = tracksCnt
95 
96  TH2I* stubsInLayersCntByPdgId = nullptr;
97  TH2I* firedLayersCntByPdgId = nullptr;
98  TH2I* ptByPdgId = nullptr;
99 
100  TH2I* rhoByPdgId = nullptr;
101 };
102 
103 #endif /* L1T_OmtfP1_TOOLS_STUBSSIMHITSMATCHER_H_ */
bool operator<(const MatchedTrackInfo &b) const
edm::ESWatcher< MuonGeometryRecord > muonGeometryRecordWatcher
edm::ESHandle< RPCGeometry > _georpc
std::vector< unsigned int > matchedDigiCnt
edm::ESHandle< CSCGeometry > _geocsc
StubsSimHitsMatcher(const edm::ParameterSet &edmCfg, const OMTFConfiguration *omtfConfig, const MuonGeometryTokens &muonGeometryTokens)
int iEvent
Definition: GenABIO.cc:224
const OMTFConfiguration * omtfConfig
MatchedTrackInfo(uint32_t eventNum, uint32_t trackId)
const MuonGeometryTokens & muonGeometryTokens
edm::InputTag rpcDigiSimLinkInputTag
unsigned long long _geom_cache_id
edm::InputTag cscStripDigiSimLinksInputTag
edm::InputTag rpcSimHitsInputTag
edm::InputTag dtDigiSimLinksInputTag
edm::ESHandle< DTGeometry > _geodt
edm::InputTag cscSimHitsInputTag
unsigned long long uint64_t
Definition: Time.h:13
edm::InputTag trackingParticleTag
double b
Definition: hdecay.h:118
void beginRun(edm::EventSetup const &eventSetup)
void match(const edm::Event &iEvent, const l1t::RegionalMuonCand *omtfCand, const AlgoMuonPtr &procMuon, std::ostringstream &ostr)
std::shared_ptr< AlgoMuon > AlgoMuonPtr
Definition: AlgoMuon.h:101
bool operator>(const MatchedTrackInfo &b) const
edm::InputTag dtSimHitsInputTag
bool operator==(const MatchedTrackInfo &b) const