CMS 3D CMS Logo

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