CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonTruth.h
Go to the documentation of this file.
1 #ifndef MCTruth_MuonTruth_h
2 #define MCTruth_MuonTruth_h
3 
24 
25 class MuonTruth {
26 public:
30  typedef std::pair<uint32_t, EncodedEventId> SimHitIdpr;
31 
34 
35  void initEvent(const edm::Event &, const edm::EventSetup &);
36 
37  void analyze(const CSCRecHit2D &recHit);
38  void analyze(const CSCStripDigi &stripDigi, int rawDetIdCorrespondingToCSCLayer);
39  void analyze(const CSCWireDigi &wireDigi, int rawDetIdCorrespondingToCSCLayer);
40 
42  float muonFraction();
43 
44  std::vector<PSimHit> muonHits();
45 
46  std::vector<PSimHit> simHits();
47 
49 
50 private:
51  std::vector<PSimHit> hitsFromSimTrack(SimHitIdpr truthId);
52  // goes to SimHits for information
53  int particleType(SimHitIdpr truthId);
54 
55  void addChannel(const LayerLinks &layerLinks, int channel, float weight = 1.);
56 
57  std::map<SimHitIdpr, float> theChargeMap;
59 
60  unsigned int theDetId;
61 
64 
67 
71 
74 
75  std::map<unsigned int, edm::PSimHitContainer> theSimHitMap;
76 
78 };
79 
80 #endif
std::map< unsigned int, edm::PSimHitContainer > theSimHitMap
Definition: MuonTruth.h:75
std::pair< uint32_t, EncodedEventId > SimHitIdpr
Definition: MuonTruth.h:30
edm::ESGetToken< CSCBadChambers, CSCBadChambersRcd > badToken_
Definition: MuonTruth.h:73
edm::DetSet< StripDigiSimLink > LayerLinks
Definition: MuonTruth.h:29
edm::InputTag CSCsimHitsTag
Definition: MuonTruth.h:69
edm::InputTag linksTag
Definition: MuonTruth.h:65
int particleType(SimHitIdpr truthId)
Definition: MuonTruth.cc:147
edm::InputTag CSCsimHitsXFTag
Definition: MuonTruth.h:70
edm::InputTag wireLinksTag
Definition: MuonTruth.h:66
const DigiSimLinks * theWireDigiSimLinks
Definition: MuonTruth.h:63
const CSCGeometry * cscgeom
Definition: MuonTruth.h:77
std::map< SimHitIdpr, float > theChargeMap
Definition: MuonTruth.h:57
std::vector< PSimHit > muonHits()
Definition: MuonTruth.cc:117
std::vector< PSimHit > simHits()
Definition: MuonTruth.cc:105
bool crossingframe
Definition: MuonTruth.h:68
const CSCBadChambers * cscBadChambers
Definition: MuonTruth.h:48
unsigned int theDetId
Definition: MuonTruth.h:60
std::vector< PSimHit > hitsFromSimTrack(SimHitIdpr truthId)
Definition: MuonTruth.cc:130
edm::DetSetVector< StripDigiSimLink > WireDigiSimLinks
Definition: MuonTruth.h:28
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:156
edm::ESGetToken< CSCGeometry, MuonGeometryRecord > geomToken_
Definition: MuonTruth.h:72
float theTotalCharge
Definition: MuonTruth.h:58
MuonTruth(const edm::Event &, const edm::EventSetup &, const edm::ParameterSet &, edm::ConsumesCollector &)
Definition: MuonTruth.cc:7
edm::DetSetVector< StripDigiSimLink > DigiSimLinks
Definition: MuonTruth.h:27
int weight
Definition: histoStyle.py:51
float muonFraction()
analyze() must be called before any of the following
Definition: MuonTruth.cc:89
const DigiSimLinks * theDigiSimLinks
Definition: MuonTruth.h:62
void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.)
Definition: MuonTruth.cc:206
void initEvent(const edm::Event &, const edm::EventSetup &)
Definition: MuonTruth.cc:44