CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonTruth.h
Go to the documentation of this file.
1 #ifndef MCTruth_MuonTruth_h
2 #define MCTruth_MuonTruth_h
3 
22 
23 class MuonTruth
24 {
25 public:
29  typedef std::pair <uint32_t, EncodedEventId> SimHitIdpr;
30 
31  MuonTruth(const edm::Event&, const edm::EventSetup&, const edm::ParameterSet&);
32  std::vector<SimHitIdpr> associateHitId(const TrackingRecHit &);
33  std::vector<SimHitIdpr> associateCSCHitId(const CSCRecHit2D *);
34 
35  void analyze(const CSCRecHit2D & recHit);
36  void analyze(const CSCStripDigi & stripDigi, int rawDetIdCorrespondingToCSCLayer);
37  void analyze(const CSCWireDigi & wireDigi , int rawDetIdCorrespondingToCSCLayer);
38 
40  float muonFraction();
41 
42  std::vector<PSimHit> muonHits();
43 
44  std::vector<PSimHit> simHits();
45 
47 
48 private:
49 
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 
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:219
edm::InputTag CSCsimHitsXFTag
Definition: MuonTruth.h:69
edm::InputTag wireLinksTag
Definition: MuonTruth.h:65
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< SimHitIdpr > associateHitId(const TrackingRecHit &)
Definition: MuonTruth.cc:154
std::vector< PSimHit > muonHits()
Definition: MuonTruth.cc:104
std::vector< PSimHit > simHits()
Definition: MuonTruth.cc:90
bool crossingframe
Definition: MuonTruth.h:67
const CSCBadChambers * cscBadChambers
Definition: MuonTruth.h:46
unsigned int theDetId
Definition: MuonTruth.h:59
std::vector< PSimHit > hitsFromSimTrack(SimHitIdpr truthId)
Definition: MuonTruth.cc:195
std::vector< SimHitIdpr > associateCSCHitId(const CSCRecHit2D *)
Definition: MuonTruth.cc:121
edm::DetSetVector< StripDigiSimLink > WireDigiSimLinks
Definition: MuonTruth.h:27
void analyze(const CSCRecHit2D &recHit)
Definition: MuonTruth.cc:231
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:72
const DigiSimLinks * theDigiSimLinks
Definition: MuonTruth.h:61
void addChannel(const LayerLinks &layerLinks, int channel, float weight=1.)
Definition: MuonTruth.cc:289